Changeset 4625
- Timestamp:
- 10/29/07 11:39:36 (13 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
blog/owner/center/about/index.php (modified) (1 diff)
-
blog/owner/entry/edit/item.php (modified) (1 diff)
-
lib/model/blog.entry.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/blog/owner/center/about/index.php
r4622 r4625 257 257 <h4><?php echo _t('Reporter');?></h4> 258 258 259 <p>마모루, 건더기, 유마, 섭이, JCrew, cirrus, 작은인장, 김종찬, 김정훈, BLue, 소필, webthink, 일모리, lunamoth, 빌리디안, 티즈, rooine, baragi74, soonJin, Juno, 딘제, iarchitect, Rukxer, gofeel, Ever_K, BlueOcean, thessando, advck1123, danew, 엉뚱이, 마잇, 하노아, Naive, mintstate, 바둥이, expansor, 싸이친구, rhapsody, 제주시티, funny4u, 안용열, lacovnk, laziel, 랜덤여신, McFuture, subyis, leokim, diasozo, Ikaris Cyrus Faust, DARKLiCH, 주성애비, dikafryo, 이일환, Chiri, htna, Milfy, filmstyle, citta, 날개달기, vampelf, 비나무, FeelSoGood, 헤이, 밤하늘, raziel, U클래스, pom., bellblog </p>259 <p>마모루, 건더기, 유마, 섭이, JCrew, cirrus, 작은인장, 김종찬, 김정훈, BLue, 소필, webthink, 일모리, lunamoth, 빌리디안, 티즈, rooine, baragi74, soonJin, Juno, 딘제, iarchitect, Rukxer, gofeel, Ever_K, BlueOcean, thessando, advck1123, danew, 엉뚱이, 마잇, 하노아, Naive, mintstate, 바둥이, expansor, 싸이친구, rhapsody, 제주시티, funny4u, 안용열, lacovnk, laziel, 랜덤여신, McFuture, subyis, leokim, diasozo, Ikaris Cyrus Faust, DARKLiCH, 주성애비, dikafryo, 이일환, Chiri, htna, Milfy, filmstyle, citta, 날개달기, vampelf, 비나무, FeelSoGood, 헤이, 밤하늘, raziel, U클래스, pom., bellblog, ataiger</p> 260 260 </div> 261 261 </div> -
trunk/blog/owner/entry/edit/item.php
r4621 r4625 266 266 templateContents = this.getText("/response/content"); 267 267 entryManager.entryId = this.getText("/response/entryId"); 268 alert(entryManager.entryId); 268 269 entryManager.isSaved = true; 269 270 PM.removeRequest(this); -
trunk/lib/model/blog.entry.php
r4621 r4625 423 423 $entry['slogan'] = array_key_exists('slogan', $entry) ? trim($entry['slogan']) : ''; 424 424 425 $isDraft = empty($entry['draft']) ? 0 : $entry['draft'];426 427 425 if((empty($entry['slogan']))||($entry['category'] == -1)) { 428 426 $slogan = $slogan0 = getSlogan($entry['title']); … … 469 467 } 470 468 471 if(isset($entry['id'])) { // entry id를 지정한 경우 (주로 saveDraftEntry에 의하여 draft를 생성하는 경우가 될 것이다) 472 if(DBQuery::queryCell("SELECT count(*) 473 FROM {$database['prefix']}Entries 474 WHERE blogid = $blogid 475 AND id = {$entry['id']} 476 AND draft = $isDraft") > 0) { // 이미 원하는 draft에 같은 id가 다 존재한다. 이 경우 저장할 수 없음. 477 return false; 478 } else { 479 $id = $entry['id']; 480 } 469 $currentMaxId = DBQuery::queryCell("SELECT MAX(id) FROM {$database['prefix']}Entries WHERE blogid = $blogid AND draft = 0"); 470 if(!empty($currentMaxId) && $currentMaxId > 0) { 471 $id = $currentMaxId + 1; 481 472 } else { 482 $currentMaxId = DBQuery::queryCell("SELECT MAX(id) FROM {$database['prefix']}Entries WHERE blogid = $blogid AND draft = 0"); 483 if(!empty($currentMaxId) && $currentMaxId > 0) { 484 $id = $currentMaxId + 1; 485 } else { 486 $id = 1; 487 } 473 $id = 1; 488 474 } 489 475 $result = DBQuery::query("INSERT INTO {$database['prefix']}Entries … … 495 481 $userid, 496 482 $id, 497 $isDraft,483 0, 498 484 {$entry['visibility']}, 499 485 {$entry['category']}, … … 515 501 return false; 516 502 DBQuery::query("UPDATE {$database['prefix']}Attachments SET parent = $id WHERE blogid = $blogid AND parent = 0"); 517 if(!$isDraft) { // draft가 없는 상태에서 저장하고 나가는 경우. 518 DBQuery::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = $blogid AND id = $id AND draft = 1"); 519 updateEntriesOfCategory($blogid, $entry['category']); 520 if ($entry['visibility'] == 3) 521 syndicateEntry($id, 'create'); 522 if ($entry['visibility'] >= 2) 523 clearRSS(); 524 if (!empty($entry['tag'])) { 525 $tags = getTagsWithEntryString($entry['tag']); 526 addTagsWithEntryId($blogid, $id, $tags); 527 } 503 DBQuery::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = $blogid AND id = $id AND draft = 1"); 504 updateEntriesOfCategory($blogid, $entry['category']); 505 if ($entry['visibility'] == 3) 506 syndicateEntry($id, 'create'); 507 if ($entry['visibility'] >= 2) 508 clearRSS(); 509 if (!empty($entry['tag'])) { 510 $tags = getTagsWithEntryString($entry['tag']); 511 addTagsWithEntryId($blogid, $id, $tags); 528 512 } 529 513 return $id;
