Changeset 1626

Show
Ignore:
Timestamp:
01/06/2007 03:55:31 PM (2 years ago)
Author:
jeena
Message:

bug #7 eliminated

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/comments.php

    r1622 r1626  
    153153   </tr>";  
    154154 
    155     $sql = "SELECT  
     155    $sql = "SELECT   
    156156                    ".JLOG_DB_COMMENTS.".id AS id,  
    157157                    ".JLOG_DB_CONTENT.".url AS url,  
     
    160160                    ".JLOG_DB_COMMENTS.".name AS name,  
    161161                    ".JLOG_DB_CONTENT.".topic AS topic,  
    162                     ".JLOG_DB_COMMENTS.".email AS email  
     162                    ".JLOG_DB_COMMENTS.".email AS email, 
     163                                                                                ".JLOG_DB_COMMENTS.".type AS type 
    163164              FROM ".JLOG_DB_COMMENTS.", ".JLOG_DB_CONTENT."  
    164165              WHERE ".JLOG_DB_COMMENTS.".reference = ".JLOG_DB_CONTENT.".id  
     
    174175     } 
    175176 
    176     while ($daten = $comments->fetch()) {  
     177    while ($daten = $comments->fetch()) { 
     178                         
    177179      if(!empty($daten['name'])) $daten['name'] = htmlspecialchars($daten['name'], ENT_QUOTES);  
    178180      else $daten['name'] = $l['comments_anonym'];  
     
    185187        $email_b = "";  
    186188      } 
    187        $c['main'] .= "  
     189       $comment = "  
    188190      <tr>  
    189191       <td><a href='?id=".$daten['id']."&amp;action=change'><img src='".JLOG_PATH."/img/JLOG_edit.png' alt='".$l['admin']['change']."' /></a></td>  
     
    194196       <td>".$daten['topic']."</td>  
    195197      </tr>";  
     198 
     199                        ### Plugin Hook 
     200            $c['main'] .= $plugins->callHook('commentAdminList', $comment, $daten); 
     201 
    196202    } 
    197203      
  • trunk/admin/login.php

    r1620 r1626  
    3434                        $false_password = "  <p class='error'>".$l['admin']['login_false_pw']."</p>\n"; 
    3535                } 
    36     } 
     36  } 
    3737       
    3838 $c['meta']['title'] = $l['admin']['login_headline']; 
  • trunk/scripts/general.func.php

    r1622 r1626  
    2929 
    3030        function Year_Links($get, $start, $page, $l, $cat="") { 
    31     $date  = getdate(); 
     31         $date  = getdate(); 
    3232         $this->_now = $date['year']; 
    3333         $this->_start = $start; 
     
    5353          else { 
    5454           if(JLOG_CLEAN_URL === true) $years_links .= " <a href='".JLOG_PATH.$this->cat."/".$y."/'>".$y."</a>\n"; 
    55            else $years_links .= " <a href='".$this->_page."?".$this->cat."y=".$y."'>".$y."</a>\n"; 
     55           else $years_links .= " <a href='".$this->_page.(strpos($this->_page, '?') === false ? "?" : "&amp;").$this->cat."y=".$y."'>".$y."</a>\n"; 
    5656          } 
    5757         } 
     
    6565          if($y != $this->_start) $years_links .= " | "; 
    6666          if($y == $this->year) $years_links .= " <strong>".$y."</strong>"; 
    67           else $years_links .= " <a href='".$this->_page."?y=".$y."'>".$y."</a>\n"; 
     67          else $years_links .= " <a href='".$this->_page.(strpos($this->_page, '?') === false ? "?" : "&amp;")."y=".$y."'>".$y."</a>\n"; 
    6868         } 
    6969          
  • trunk/scripts/jlogPlugins.class.php

    r1622 r1626  
    2525                function hook_adminMail       ($t) { return $t; } // array with mail + array blogentry 
    2626                function hook_commentorMail   ($t) { return $t; } // array with mail + array blogentry 
    27  
     27    function hook_commentAdminList($t) { return $t; } // string with actual tr + array with comment data 
    2828} 
    2929 
  • trunk/xmlrpc.php

    r1575 r1626  
    2121class Jlog_GetPingback { 
    2222 
    23     var $errors = array();    // array 
    24     var $method = "";         // string 
    25     var $sourceURI = "";      // string 
    26     var $targetURI = array(); // array incl: orginal, parsed [array from parse_url()], y, m, url 
    27     var $title = "";          // string 
    28     var $sid = "";            // string 
     23    var $errors = array();        // array 
     24    var $method = "";             // string 
     25    var $sourceURI = "";          // string 
     26    var $targetURI = array();     // array incl: orginal, parsed [array from parse_url()], y, m, url 
     27    var $title = "";              // string 
     28    var $sid = "";                // string 
    2929 
    3030    function Jlog_GetPingback($db_content, $db_comments, $path, $sid = NULL) { 
     
    9999        if(PEAR::isError($s->sendRequest())) $this->send_error(16, 'The source URI does not exist.'); 
    100100        else { 
    101             $source = $s->getResponseBody(); 
     101                                                $source = $s->getResponseBody(); 
    102102            $source = strip_tags(str_replace('<!DOCTYPE','<DOCTYPE', $source), '<title><a>'); 
    103103 
     
    106106 
    107107            preg_match('|<title>([^<]*?)</title>|is', $source, $title); 
    108             $this->title = empty($title[1]) ? $this->sourceURI : html_entity_decode($title[1]); 
     108 
     109                                                if(! $utf8 = preg_match ('/charset\s*=\s*utf-8/i', $s->getResponseHeader("Content-Type"))) 
     110              $utf8 = 'application/xhtml+xml' == strtolower(trim($s->getResponseHeader("Content-Type"))); 
     111 
     112            $this->title = empty($title[1]) ? $this->sourceURI : html_entity_decode($utf8 ? utf8_decode($title[1]) : $title[1]); 
    109113        } 
    110114