Show
Ignore:
Timestamp:
08/11/06 02:20:30 (2 years ago)
Author:
mdodoo
Message:

Merges trunk changes ([1522],[1523],[1525],[1526],[1527],[1528], and [1529]).

Location:
branches/multiuser/admin
Files:
6 modified

Legend:

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

    r1518 r1530  
    4545 
    4646    echo "<label for=\"add_channel_to_folder\">". LBL_ADMIN_IN_FOLDER . "</label>\n"; 
    47     folder_combo('add_channel_to_folder'); 
     47    echo rss_toolkit_folders_combo('add_channel_to_folder'); 
    4848    echo "<label for=\"channel_tags\">" . LBL_TAG_FOLDERS . ":</label>\n"; 
    4949    echo "<input type=\"text\" name=\"channel_tags\" id=\"channel_tags\" />\n"; 
     
    139139                    $dead = true; 
    140140                } else { 
    141                     $dead = (time() - strtotime($daterefreshed) > getConfig('rss.config.deadthreshhold')*60 ? true : false); 
     141                    $dead = (time() - strtotime($daterefreshed) > getConfig('rss.config.deadthreshhold')*60*60 ? true : false); 
    142142                } 
    143143 
     
    187187    ."<legend>Selected...</legend>\n" 
    188188    ."<p>\n" 
    189     ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n"; 
    190     folder_combo('me_folder',null); 
     189    ."<label for=\"me_folder\">".LBL_ADMIN_CHANNEL_FOLDER."</label>\n" 
     190    .rss_toolkit_folders_combo('me_folder',null); 
    191191 
    192192    echo 
     
    785785 
    786786    // Folder 
    787     ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n"; 
    788  
    789     folder_combo('c_parent',$parent); 
    790     echo "</p>\n"; 
     787    ."<p><label for=\"c_parent\">". LBL_ADMIN_CHANNEL_FOLDER ."</label>\n" 
     788 
     789    .rss_toolkit_folders_combo('c_parent',$parent) 
     790    ."</p>\n"; 
    791791 
    792792    // Tags 
  • branches/multiuser/admin/folders.php

    r1495 r1530  
    128128 
    129129} 
    130  
    131 function folder_combo($name, $selected = -1) { 
    132     echo "\n<select name=\"$name\" id=\"$name\">\n"; 
    133     if (getConfig('rss.config.absoluteordering')) { 
    134         $sql = " order by position asc"; 
    135     } else { 
    136         $sql = " order by name asc"; 
    137     } 
    138     $res = rss_query("select id, name from " .getTable("folders") . $sql); 
    139     while (list($id, $name) = rss_fetch_row($res)) { 
    140         echo "\t<option value=\"$id\"" 
    141         .($selected > -1 && $selected == $id ? " selected=\"selected\"":"") 
    142         .">" .  (($name == "")?LBL_HOME_FOLDER:$name)  ."</option>\n"; 
    143     } 
    144     echo "</select>\n"; 
    145 } 
    146  
    147  
    148130 
    149131function folder_admin() { 
  • branches/multiuser/admin/index.php

    r1502 r1530  
    4343require_once('themes.php'); 
    4444require_once('tags.php'); 
     45require_once('../cls/wrappers/toolkit.php'); 
    4546 
    4647define ('CST_ADMIN_DOMAIN','domain'); 
  • branches/multiuser/admin/items.php

    r1275 r1530  
    2525# 
    2626############################################################################### 
     27 
     28rss_require('cls/wrappers/toolkit.php'); 
    2729 
    2830/** 
     
    4547    . "<option>" . LBL_ADMIN_PRUNE_YEARS . "</option>\n" 
    4648    . "</select></p>\n" 
     49    . "<p>\n" 
     50        . rss_toolkit_channels_combo("prune_channel") . "\n" 
     51    . "</p>\n" 
    4752    . "<p><label for=\"prune_include_sticky\">".LBL_ADMIN_PRUNE_INCLUDE_STICKY."</label>\n" 
    4853    . "<input type=\"checkbox\" id=\"prune_include_sticky\" name=\"prune_include_sticky\" value=\"1\"/></p>\n" 
     
    9196                break; 
    9297            } 
    93             $sql = " from ".getTable('item') ." i, " .getTable('channels') . " c " 
     98            $sql = " from ".getTable('item') ." i INNER JOIN " .getTable('channels') . " c ON c.id=i.cid " 
    9499                   ." where 1=1 "; 
     100 
     101            if (array_key_exists('prune_channel', $_REQUEST)) { 
     102                if(ALL_CHANNELS_ID != $_REQUEST['prune_channel']) { 
     103                    $sql .= " and c.id = " . $_REQUEST['prune_channel'] . ""; 
     104                } 
     105            } 
    95106 
    96107            if ($prune_older > 0) { 
     
    135146                } 
    136147            } 
    137  
    138148 
    139149            if (array_key_exists(CST_ADMIN_CONFIRMED,$_REQUEST)) { 
  • branches/multiuser/admin/opml.php

    r1181 r1530  
    6868 
    6969    ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_folder\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_FOLDER."\" />\n" 
    70     ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>"; 
    71     folder_combo('opml_import_to_folder',null); 
    72     echo "</p>\n" 
     70    ."<label for=\"opml_import_option_folder\" >".LBL_ADMIN_OPML_IMPORT_FOLDER."</label>" 
     71    .rss_toolkit_folders_combo('opml_import_to_folder',null) 
     72    ."</p>\n" 
    7373 
    7474    ."<p style=\"padding-left:1em;\"><input type=\"radio\" id=\"opml_import_option_wipe\" name=\"opml_import_option\" value=\"".CST_ADMIN_OPML_IMPORT_WIPE."\" />\n" 
    7575    ."<label for=\"opml_import_option_wipe\" >".LBL_ADMIN_OPML_IMPORT_WIPE."</label></p>\n" 
    76  
    7776 
    7877    .""; 
  • branches/multiuser/admin/themes.php

    r1372 r1530  
    4545        $active_theme= getConfig('rss.output.theme'); 
    4646    } 
     47 
     48        echo "<form style=\"float:right\" method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n" 
     49          . "<p><input type=\"hidden\" name=\"".CST_ADMIN_DOMAIN."\" value=\"".CST_ADMIN_DOMAIN_THEMES."\" />\n" 
     50        ."<input type=\"submit\" name=\"admin_themes_check_for_updates\" value=\"".LBL_ADMIN_CHECK_FOR_UPDATES."\" /></p>\n" 
     51        . "</form>\n"; 
     52        if (isset($_POST['admin_themes_check_for_updates'])) { 
     53            theme_getThemesUpdate(&$themes); 
     54        } 
    4755     
    4856    echo "<h2 class=\"trigger\">".LBL_ADMIN_THEMES."</h2>\n" 
     
    6169        } 
    6270        $active = ($entry ==  $active_theme); 
     71        $updateAvailable = isset($theme['updateVersion']); 
    6372        if ($screenshot) { 
    6473            $screenshotURL = "<img src=\"". getPath() . RSS_THEME_DIR . "/$fsname/$screenshot\"  />"; 
     
    6877        $h4="$name";  
    6978        $h5="By&nbsp;$author | Version:&nbsp;$version"; 
     79        if ($updateAvailable) { 
     80            $h5 .= ' | <a class="update" href="'.$theme['updateUrl'].'">Update to version ' .$theme['updateVersion'] .'</a>'; 
     81        } 
     82         
    7083        if ($htmltheme) { 
    7184            $seturl = "index.php?view=themes&amp;theme=$entry"; 
     
    7386            $seturl = ""; 
    7487        } 
    75         echo "<div class=\"themeframe".($active?" active":"")."\"><span>"; 
     88        echo "<div class=\"themeframe".($active?" active":""). ($updateAvailable?" hilite":"")."\"><span>"; 
    7689        if (!$active && $htmltheme) { 
    7790            echo "<a href=\"$seturl\" class=\"bookmarklet\">".LBL_ADMIN_USE_THIS_THEME."</a>"; 
     
    399412} 
    400413 
     414function theme_getThemesUpdate(&$themes) { 
     415      $themesxml = array(); 
     416    global $themesxml; 
     417    $xml = getUrl('http://themes.gregarius.net/api.php'); 
     418    $xml = str_replace("\r", '', $xml); 
     419    $xml = str_replace("\n", '', $xml); 
     420 
     421    $xp = xml_parser_create() or rss_error("couldn't create parser"); 
     422 
     423    xml_set_element_handler($xp, 'themes_xml_startElement', 'themes_xml_endElement') 
     424    or rss_error("couldnt set XML handlers"); 
     425 
     426    xml_parse($xp, $xml, true) or rss_error("failed parsing xml"); 
     427    xml_parser_free($xp) or rss_error("failed freeing the parser"); 
     428    if (is_array($themesxml)) { 
     429        foreach($themesxml as $theme => $data) { 
     430            list($tversion,$turl) = $data; 
     431            if (isset($themes[$theme]) && $themes[$theme]['version'] < $tversion) { 
     432                $themes[$theme]['updateVersion'] = $tversion; 
     433                $themes[$theme]['updateUrl'] = $turl; 
     434            } 
     435        } 
     436    } 
     437} 
     438 
     439function themes_xml_startElement($xp, $element, $attr) { 
     440    global $themesxml; 
     441 
     442    if ($element == 'THEME' && 
     443            array_key_exists('PID',$attr) && 
     444            array_key_exists('URL',$attr) && 
     445            array_key_exists('VERSION',$attr)) { 
     446 
     447        $themesxml[$attr['PID']] = array($attr['VERSION'],$attr['URL']); 
     448    } 
     449} 
     450 
     451function themes_xml_endElement($xp, $element) { 
     452    ///global $pluginsxml; 
     453    return; 
     454} 
     455 
    401456?>