Changeset 4625

Show
Ignore:
Timestamp:
10/29/07 11:39:36 (13 months ago)
Author:
inureyes
Message:

#719

  • 서식 반영시에 저장이 되지 않던 오류 수정
Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/blog/owner/center/about/index.php

    r4622 r4625  
    257257                                    <h4><?php echo _t('Reporter');?></h4> 
    258258                                     
    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> 
    260260                                </div> 
    261261                            </div> 
  • trunk/blog/owner/entry/edit/item.php

    r4621 r4625  
    266266                                            templateContents = this.getText("/response/content"); 
    267267                                            entryManager.entryId = this.getText("/response/entryId"); 
     268                                            alert(entryManager.entryId); 
    268269                                            entryManager.isSaved = true; 
    269270                                            PM.removeRequest(this); 
  • trunk/lib/model/blog.entry.php

    r4621 r4625  
    423423    $entry['slogan'] = array_key_exists('slogan', $entry) ? trim($entry['slogan']) : ''; 
    424424     
    425     $isDraft = empty($entry['draft']) ? 0 : $entry['draft']; 
    426      
    427425    if((empty($entry['slogan']))||($entry['category'] == -1)) { 
    428426        $slogan = $slogan0 = getSlogan($entry['title']); 
     
    469467    } 
    470468     
    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; 
    481472    } 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; 
    488474    } 
    489475    $result = DBQuery::query("INSERT INTO {$database['prefix']}Entries  
     
    495481            $userid, 
    496482            $id, 
    497             $isDraft, 
     483            0, 
    498484            {$entry['visibility']}, 
    499485            {$entry['category']}, 
     
    515501        return false; 
    516502    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); 
    528512    } 
    529513    return $id;