Show
Ignore:
Timestamp:
10/04/06 06:55:02 (2 years ago)
Author:
mdodoo
Message:

Partial sync with trunk. Only up to changeset [1542].

Location:
branches/multiuser/admin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/multiuser/admin/channels.php

    r1530 r1595  
    9898    $sql = "select " 
    9999           ." c.id, c.title, c.url, c.siteurl, d.name, c.descr, c.parent, c.icon, c.mode, c.daterefreshed " 
    100            ." from " .getTable("channels") ." c, " . getTable("folders") ." d " 
    101            ." where d.id = c.parent "; 
     100           ." from " .getTable("channels") ." c " 
     101           ." inner join " . getTable("folders") ." d " 
     102           ."   on d.id = c.parent "; 
    102103 
    103104    if (getConfig('rss.config.absoluteordering')) { 
     
    123124        // get feed's tags 
    124125        $tags = ""; 
    125         $sql2 = "select t.id, t.tag from " . getTable('tag') . " t, " 
    126                 . getTable('metatag') . " m where t.id = m.tid " 
    127                 . "and m.ttype = 'channel' and m.fid = $id"; 
     126        $sql2 = "select t.id, t.tag from " . getTable('tag') . " t " 
     127                . "inner join " . getTable('metatag') . " m " 
     128                . "  on m.tid = t.id " 
     129                . "where m.ttype = 'channel' and m.fid = $id"; 
    128130        $res2 = rss_query($sql2); 
    129131 
     
    747749 
    748750function channel_edit_form($cid) { 
    749     $sql = "select id, title, url, siteurl, parent, descr, icon, mode from " .getTable("channels") ." where id=$cid"; 
     751    $sql = "select id, title, url, siteurl, parent, descr, icon, mode, daterefreshed, dateadded from " .getTable("channels") ." where id=$cid"; 
    750752    $res = rss_query($sql); 
    751     list ($id, $title, $url, $siteurl, $parent, $descr, $icon,$mode) = rss_fetch_row($res); 
     753    list ($id, $title, $url, $siteurl, $parent, $descr, $icon, $mode, $daterefreshed, $dateadded) = rss_fetch_row($res); 
    752754    // get tags 
    753     $sql = "select t.tag from " . getTable('tag')." t, " . getTable('metatag') 
    754            . " m where t.id = m.tid and m.ttype = 'channel' and m.fid = $cid"; 
     755    $sql = "select t.tag from " . getTable('tag')." t "  
     756         . "  inner join " . getTable('metatag') . " m " 
     757         . "    on m.tid = t.id " 
     758         . "where m.ttype = 'channel' and m.fid = $cid"; 
    755759    $res = rss_query($sql); 
    756760    $tags = ""; 
     
    763767 
    764768    echo "<form method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."#fa$cid\" id=\"channeledit\">\n"; 
    765     echo "<fieldset id=\"channeleditfs\">" 
    766     ."<p>"; 
     769    echo "<fieldset id=\"channeleditfs\">"; 
     770    // Timestamps 
     771    if(!empty($daterefreshed)) { 
     772      echo "<p><label>" . LBL_ADDED . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" 
     773                    ."<p><label>" . LBL_LAST_UPDATE . ": ".date("M-d-Y H:i", strtotime($daterefreshed))."</label></p>\n"; 
     774    } else { 
     775      echo "<p><label>" . LBL_ADDED . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" 
     776                    ."<p><label>" . LBL_LAST_UPDATE . ": " . LBL_FOOTER_LAST_MODIF_NEVER . "</label></p>\n"; 
     777    } 
    767778    // Item name 
    768     echo "<label for=\"c_name\">". LBL_ADMIN_CHANNEL_NAME ."</label>\n" 
     779    echo "<p><label for=\"c_name\">". LBL_ADMIN_CHANNEL_NAME ."</label>\n" 
    769780    ."<input type=\"text\" id=\"c_name\" name=\"c_name\" value=\"$title\" />" 
    770781    ."<input type=\"hidden\" name=\"".CST_ADMIN_DOMAIN."\" value=\"". CST_ADMIN_DOMAIN_CHANNEL."\" />\n" 
  • branches/multiuser/admin/items.php

    r1530 r1595  
    9696                break; 
    9797            } 
    98             $sql = " from ".getTable('item') ." i INNER JOIN " .getTable('channels') . " c ON c.id=i.cid " 
     98            $sql = " from ".getTable('item') ." i inner join " .getTable('channels') . " c on c.id=i.cid " 
    9999                   ." where 1=1 "; 
    100100 
     
    131131                    } 
    132132 
    133                     $tsql = " select distinct fid from ". getTable('metatag') . " m, " 
    134                             . getTable('tag') . " t" 
    135                             ." where m.tid=t.id and t.tag in ('" 
     133                    $tsql = " select distinct fid from ". getTable('metatag') . " m " 
     134                            . " inner join " . getTable('tag') . " t" 
     135                            . "   on t.id = m.tid " 
     136                            . " where t.tag in ('" 
    136137                            . implode("', '", $trimmed_exclude_tags) ."')"; 
    137138                } 
     
    151152                //delete the tags for these items 
    152153                $sqlids = "select distinct i.id,i.cid " . $sql 
    153                           . " and i.cid=c.id order by i.cid, i.id desc"; 
     154                          . " order by i.cid, i.id desc"; 
    154155 
    155156