Changeset 2626

Show
Ignore:
Timestamp:
11/30/06 04:37:05 (2 years ago)
Author:
gendoh
Message:

Static Code Analysis

  • " 안의 \이스케이핑 문제
  • 사용하지 않는 변수 제거
  • 불필요한 레퍼런스 파라미터 제거
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1-beta/lib/view/view.php

    r2579 r2626  
    2424 
    2525function dress($tag, $value, & $contents) { 
    26     if (eregi("\[##_{$tag}_##\]", $contents, $temp)) { 
     26    if (preg_match("@\\[##_{$tag}_##\\]@iU", $contents)) { 
    2727        $contents = str_replace("[##_{$tag}_##]", $value, $contents); 
    2828        return true; 
     
    357357} 
    358358 
    359 function getTrackbacksView($entryId, & $skin) { 
     359function getTrackbacksView($entryId, $skin) { 
    360360    global $suri, $defaultURL, $skinSetting, $blogURL, $service; 
    361361    $trackbacksContainer = $skin->trackbackContainer; 
     
    392392} 
    393393 
    394 function getCommentView($entryId, & $skin) { 
    395     global $database, $blogURL, $service, $owner, $suri, $paging, $blog; 
     394function getCommentView($entryId, $skin) { 
     395    global $database, $blogURL, $service, $owner, $suri, $paging; 
    396396    //if ($entryId <= 0) 
    397397    //  return getGuestCommentView($entryId, $skin); 
     
    402402        $prefix1 = 'rp'; 
    403403        $isComment = true; 
    404         $SubItem = 'commentSubItem'; 
    405404    } else { 
    406405        $prefix1 = 'guest'; 
    407406        $isComment = false; 
    408         $SubItem = 'guestSubItem'; 
    409407    } 
    410408    $commentView = ($isComment ? $skin->comment : $skin->guest); 
     
    559557} 
    560558 
    561 function getGuestCommentView($entryId, & $skin) { 
     559function getGuestCommentView($entryId, $skin) { 
    562560    global $blogURL, $owner, $suri, $paging, $blog, $skinSetting; 
    563561    $authorized = doesHaveOwnership(); 
     
    565563        $prefix1 = 'rp'; 
    566564        $isComment = true; 
    567         $SubItem = 'commentSubItem'; 
    568565    } else { 
    569566        $prefix1 = 'guest'; 
    570567        $isComment = false; 
    571         $SubItem = 'guestSubItem'; 
    572568    } 
    573569    $commentView = "<form method=\"post\" action=\"$blogURL/comment/add/$entryId\" onsubmit=\"return false\" style=\"margin: 0\">" . ($isComment ? $skin->comment : $skin->guest) . '</form>'; 
     
    981977} 
    982978 
    983 function getArchivesView($archives, & $template) { 
     979function getArchivesView($archives, $template) { 
    984980    global $blogURL; 
    985981    ob_start(); 
     
    10981094} 
    10991095 
    1100 function getRecentEntriesView($entries, & $template) { 
     1096function getRecentEntriesView($entries, $template) { 
    11011097    global $blogURL, $skinSetting; 
    11021098    ob_start(); 
     
    11131109} 
    11141110 
    1115 function getRecentCommentsView($comments, & $template) { 
     1111function getRecentCommentsView($comments, $template) { 
    11161112    global $blogURL, $skinSetting; 
    11171113    ob_start(); 
     
    11291125} 
    11301126 
    1131 function getRecentTrackbacksView($trackbacks, & $template) { 
     1127function getRecentTrackbacksView($trackbacks, $template) { 
    11321128    global $blogURL, $skinSetting; 
    11331129    ob_start(); 
     
    11451141} 
    11461142 
    1147 function getLinksView($links, & $template) { 
     1143function getLinksView($links, $template) { 
    11481144    global $blogURL, $skinSetting; 
    11491145    ob_start(); 
     
    11591155} 
    11601156 
    1161 function getRandomTagsView($tags, & $template) { 
     1157function getRandomTagsView($tags, $template) { 
    11621158    global $blogURL; 
    11631159    ob_start(); 
     
    12831279        $attributes = explode('|', substr($view, $start + 4, $end - $start - 4)); 
    12841280        $prefix = ''; 
    1285         $postfix = ''; 
    12861281        $buf = ''; 
    12871282        if ($attributes[0] == 'Gallery') { 
     
    18301825                                                <div id="entryHead"> 
    18311826                                                    <div class="title"><a href="<?php echo htmlspecialchars($entry['permalink']);?>" onclick="window.open(this.href); return false;"><?php echo htmlspecialchars($entry['entry_title']);?></a></div> 
    1832                                                     <div class="writing-info"><span class="by">by </span><span class="name"><?php echo htmlspecialchars($entry['author'] ? eregi_replace("^\((.+)\)$", "\\1", $entry['author']) : $entry['blog_title']);?></span><span class="divider"> : </span><span class="date"><?php echo date('Y-m-d H:i:s', $entry['written']);?></span></div> 
     1827                                                    <div class="writing-info"><span class="by">by </span><span class="name"><?php echo htmlspecialchars($entry['author'] ? eregi_replace("^\\((.+)\\)$", "\\1", $entry['author']) : $entry['blog_title']);?></span><span class="divider"> : </span><span class="date"><?php echo date('Y-m-d H:i:s', $entry['written']);?></span></div> 
    18331828                                                    <div class="open"><a id="entryPermalink" href="<?php echo htmlspecialchars($entry['permalink']);?>" onclick="window.open(this.href); return false;" title="<?php echo _t('이 포스트를 새 창으로 엽니다.');?>"><span class="text"><?php echo _t('새 창으로');?></span></a></div> 
    18341829                                                </div>