Changeset 5958

Show
Ignore:
Timestamp:
05/17/08 08:07:52 (6 months ago)
Author:
creorix
Message:

#964

  • useSloganOnPost 설정을 공지도 따르도록 수정
Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/interface/owner/skin/sidebar/preview/index.php

    r5905 r5958  
    144144            $itemView = $recentNoticeItem; 
    145145            dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', UTF8::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView); 
    146             dress('notice_rep_link', "$blogURL/notice/{$notice['id']}", $itemView); 
     146            dress('notice_rep_link', "$blogURL/notice/".($blog['useSloganOnPost'] ? URL::encode($notice['slogan'], $itemView) : $notice['id']), $itemView); 
    147147            $itemsView .= $itemView; 
    148148        } 
  • trunk/lib/model/blog.notice.php

    r5285 r5958  
    2525    global $database; 
    2626    $visibility = doesHaveOwnership() ? '' : 'AND visibility = 2'; 
    27     return POD::queryAll("SELECT id, title, published FROM {$database['prefix']}Entries WHERE blogid = $blogid AND draft = 0 $visibility AND category = -2 ORDER BY published DESC"); 
     27    return POD::queryAll("SELECT id, title, slogan, published FROM {$database['prefix']}Entries WHERE blogid = $blogid AND draft = 0 $visibility AND category = -2 ORDER BY published DESC"); 
    2828} 
    2929?> 
  • trunk/lib/piece/blog/end.php

    r5922 r5958  
    6363        $itemView = $skin->recentNoticeItem; 
    6464        dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', UTF8::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView); 
    65         dress('notice_rep_link', "$blogURL/notice/{$notice['id']}", $itemView); 
     65        dress('notice_rep_link', "$blogURL/notice/".($blog['useSloganOnPost'] ? URL::encode($notice['slogan'], $itemView) : $notice['id']), $itemView); 
    6666        $itemsView .= $itemView; 
    6767    } 
  • trunk/lib/piece/blog/entries.php

    r5754 r5958  
    3434    foreach ($entries as $entry) { 
    3535        if ($suri['directive'] == '/notice') 
    36             $permalink = "$blogURL/notice/{$entry['id']}"; 
     36            $permalink = "$blogURL/notice/" . ($blog['useSloganOnPost'] ? URL::encode($entry['slogan'], $service['useEncodedURL']) : $entry['id']); 
    3737        else if ($suri['directive'] == '/page') 
    3838            $permalink = "$blogURL/page/{$entry['id']}"; 
     
    5656            dress('notice_rep_date', fireEvent('ViewNoticeDate', Timestamp::format5($entry['published']), $entry['published']), $entryView); 
    5757            dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', $entry['title'], $entry['id'])), $entryView); 
    58             if ($suri['directive'] == '/notice') 
    59                 dress('notice_rep_link', "$blogURL/notice/{$entry['id']}", $entryView); 
    60             else 
    61                 dress('notice_rep_link', "$blogURL/page/{$entry['id']}", $entryView); 
     58            dress('notice_rep_link', $permalink, $entryView); 
    6259             
    6360            // 사용자가 작성한 본문은 lib/piece/blog/end.php의 removeAllTags() 다음에 처리하기 위한 조치.