- Timestamp:
- 03/24/06 20:14:37 (3 years ago)
- Location:
- branches/postgresql
- Files:
-
- 94 added
- 25 removed
- 41 modified
-
INSTALL (modified) (1 diff)
-
admin/channels.php (modified) (8 diffs)
-
admin/config.php (modified) (7 diffs)
-
admin/dashboard.php (modified) (1 diff)
-
admin/ds.php (modified) (2 diffs)
-
admin/folders.php (modified) (6 diffs)
-
admin/index.php (modified) (4 diffs)
-
admin/themes.php (modified) (5 diffs)
-
admin/users.php (modified) (2 diffs)
-
ajax.php (modified) (1 diff)
-
cls/config.php (modified) (5 diffs)
-
cls/nav.php (modified) (1 diff)
-
cls/rss.php (modified) (5 diffs)
-
cls/search.php (modified) (4 diffs)
-
cls/wrappers/feeds.php (modified) (2 diffs)
-
cls/wrappers/misc.php (modified) (1 diff)
-
cls/wrappers/searchform.php (modified) (2 diffs)
-
constants.php (modified) (2 diffs)
-
css/opml.xsl (modified) (1 diff)
-
dbstruct.pgsql.sql (modified) (3 diffs)
-
dist/dist.sh (modified) (3 diffs)
-
extlib/Snoopy.class.inc (modified) (2 diffs)
-
extlib/rss_dbcache.inc (modified) (2 diffs)
-
feed.php (modified) (11 diffs)
-
index.php (modified) (1 diff)
-
init.php (modified) (4 diffs)
-
intl/de.php (modified) (11 diffs)
-
intl/dk.php (modified) (4 diffs)
-
intl/en.php (modified) (6 diffs)
-
intl/es.php (modified) (4 diffs)
-
intl/fr.php (modified) (5 diffs)
-
intl/it.php (modified) (3 diffs)
-
intl/pt_BR.php (modified) (3 diffs)
-
intl/ru.php (modified) (5 diffs)
-
intl/sv.php (modified) (5 diffs)
-
opml.php (modified) (1 diff)
-
plugins.php (modified) (1 diff)
-
plugins/markallread.php (added)
-
plugins/rssview.php (added)
-
plugins/stickyflag/stickyflag.php (modified) (2 diffs)
-
schema.php (modified) (9 diffs)
-
tags.php (modified) (1 diff)
-
themes/default/catfolder.php (deleted)
-
themes/default/config.php (added)
-
themes/default/css/layout.css (deleted)
-
themes/default/css/look.css (deleted)
-
themes/default/css/media/arrows.gif (deleted)
-
themes/default/css/media/bg.gif (deleted)
-
themes/default/css/media/sr.gif (deleted)
-
themes/default/error.php (deleted)
-
themes/default/feed.php (deleted)
-
themes/default/feeds.php (deleted)
-
themes/default/feedsfeed.php (deleted)
-
themes/default/feedsfolder.php (deleted)
-
themes/default/footer.php (deleted)
-
themes/default/header.php (deleted)
-
themes/default/index.php (deleted)
-
themes/default/item.php (deleted)
-
themes/default/itemlist.php (deleted)
-
themes/default/mobile (added)
-
themes/default/mobile/error.php (added)
-
themes/default/mobile/feed.php (added)
-
themes/default/mobile/feeds.php (added)
-
themes/default/mobile/feedsfeed.php (added)
-
themes/default/mobile/footer.php (added)
-
themes/default/mobile/header.php (added)
-
themes/default/mobile/index.php (added)
-
themes/default/mobile/item.php (added)
-
themes/default/mobile/itemlist.php (added)
-
themes/default/mobile/media (added)
-
themes/default/mobile/media/folder.gif (added)
-
themes/default/mobile/mobileconstants.php (added)
-
themes/default/mobile/nav.php (added)
-
themes/default/mobile/navitem.php (added)
-
themes/default/mobile/overrides.php (added)
-
themes/default/mobile/plugins.php (added)
-
themes/default/mobile/searchform.php (added)
-
themes/default/mobile/style.css (added)
-
themes/default/nav.php (deleted)
-
themes/default/navitem.php (deleted)
-
themes/default/rss (added)
-
themes/default/rss/.themeinfo (added)
-
themes/default/rss/feed.php (added)
-
themes/default/rss/index.php (added)
-
themes/default/rss/item.php (added)
-
themes/default/rss/itemlist.php (added)
-
themes/default/rss/searchform.php (added)
-
themes/default/searchform.php (deleted)
-
themes/default/web (added)
-
themes/default/web/catfolder.php (added)
-
themes/default/web/css (added)
-
themes/default/web/css/layout.css (added)
-
themes/default/web/css/look.css (added)
-
themes/default/web/css/media (added)
-
themes/default/web/css/media/arrows.gif (added)
-
themes/default/web/css/media/bg.gif (added)
-
themes/default/web/error.php (added)
-
themes/default/web/feed.php (added)
-
themes/default/web/feeds.php (added)
-
themes/default/web/feedsfeed.php (added)
-
themes/default/web/feedsfolder.php (added)
-
themes/default/web/footer.php (added)
-
themes/default/web/header.php (added)
-
themes/default/web/index.php (added)
-
themes/default/web/item.php (added)
-
themes/default/web/itemlist.php (added)
-
themes/default/web/media (added)
-
themes/default/web/media/busy.gif (added)
-
themes/default/web/media/edit.gif (added)
-
themes/default/web/media/folder.gif (added)
-
themes/default/web/media/installer (added)
-
themes/default/web/media/installer/codename.jpg (added)
-
themes/default/web/media/minus.gif (added)
-
themes/default/web/media/noicon.png (added)
-
themes/default/web/media/noscreenshot.png (added)
-
themes/default/web/media/pl.gif (added)
-
themes/default/web/media/plus.gif (added)
-
themes/default/web/media/sr0.png (added)
-
themes/default/web/media/sr1.png (added)
-
themes/default/web/nav.php (added)
-
themes/default/web/navitem.php (added)
-
themes/default/web/searchform.php (added)
-
themes/lilina (added)
-
themes/lilina/.themeinfo (added)
-
themes/lilina/config.php (added)
-
themes/lilina/shot.png (added)
-
themes/lilina/web (added)
-
themes/lilina/web/css (added)
-
themes/lilina/web/css/layout.css (added)
-
themes/lilina/web/css/look.css (added)
-
themes/lilina/web/css/media (added)
-
themes/lilina/web/css/media/arrows.gif (added)
-
themes/lilina/web/css/media/bg.gif (added)
-
themes/lilina/web/css/media/sr.gif (added)
-
themes/lilina/web/feed.php (added)
-
themes/lilina/web/index.php (added)
-
themes/lilina/web/item.php (added)
-
themes/lilina/web/js (added)
-
themes/lilina/web/js/lilina.js (added)
-
themes/lilina/web/media (added)
-
themes/lilina/web/media/edit.gif (added)
-
themes/lilina/web/media/folder.gif (added)
-
themes/lilina/web/media/mark_off.gif (added)
-
themes/lilina/web/media/mark_on.gif (added)
-
themes/lilina/web/media/minus.gif (added)
-
themes/lilina/web/media/noicon.png (added)
-
themes/lilina/web/media/pl.gif (added)
-
themes/lilina/web/media/plus.gif (added)
-
themes/lilina/web/overrides.php (added)
-
themes/lilina/web/schemes (added)
-
themes/lilina/web/schemes/lowcontrast (added)
-
themes/lilina/web/schemes/lowcontrast/.themeinfo (added)
-
themes/lilina/web/schemes/lowcontrast/diff.css (added)
-
themes/rss/.themeinfo (deleted)
-
themes/rss/feed.php (deleted)
-
themes/rss/index.php (deleted)
-
themes/rss/item.php (deleted)
-
themes/rss/itemlist.php (deleted)
-
themes/rss/searchform.php (deleted)
-
util.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/postgresql/INSTALL
r1262 r1393 66 66 67 67 68 7. Point your browser to the URL corresponding the install location69 and click "Admin". You can start adding feeds by pasting URLs of70 RSS or RDF feeds into the "Add a feed" field. Alternatively you71 can import a whole structure of items using the OPML import72 feature.68 7. Point your browser to the URL corresponding the install 69 location and click "Admin". After selecting a new password, 70 you can start adding feeds by pasting URLs of RSS or RDF feeds 71 into the "Add a feed" field. Alternatively you can import a 72 list of feeds using the OPML import feature. 73 73 74 8. You may wish to password-protect the administration section of75 your fresh gregarius installation, to prevent unauthorized users76 from messing with your subscriptions and breaking stuff.74 8. This version of Gregarius comes with default password 75 protection, however you may wish to to strengthen it by using 76 a .htaccess file. 77 77 78 See http://wiki.gregarius.net/index.php/Password_Protection for79 this purpose.78 See http://wiki.gregarius.net/index.php/Password_Protection 79 for this purpose. -
branches/postgresql/admin/channels.php
r1284 r1393 240 240 case 'LBL_ADMIN_ADD': 241 241 case 'Add': 242 243 $label = trim($_REQUEST['new_channel']);244 $fid = trim(sanitize($_REQUEST['add_channel_to_folder'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES));242 243 $label = trim(sanitize($_REQUEST['new_channel'], RSS_SANITIZER_URL)); 244 $fid = trim(sanitize($_REQUEST['add_channel_to_folder'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES)); 245 245 list($flabel) = rss_fetch_row(rss_query( 246 246 "select name from " . getTable('folders') . " where id=$fid")); … … 431 431 432 432 433 if (array_key_exists('opml',$_ REQUEST) && strlen(trim($_REQUEST['opml'])) > 7) {434 $url = trim( sanitize($_ REQUEST['opml'],RSS_SANITIZER_NO_SPACES) );433 if (array_key_exists('opml',$_POST) && strlen(trim($_POST['opml'])) > 7) { 434 $url = trim( sanitize($_POST['opml'],RSS_SANITIZER_NO_SPACES) ); 435 435 } 436 436 elseif (array_key_exists('opmlfile',$_FILES) && $_FILES['opmlfile']['tmp_name']) { … … 451 451 452 452 453 if (array_key_exists('opml_import_option',$_ REQUEST)) {454 $import_opt = $_ REQUEST['opml_import_option'];453 if (array_key_exists('opml_import_option',$_POST)) { 454 $import_opt = $_POST['opml_import_option']; 455 455 } else { 456 456 $import_opt = CST_ADMIN_OPML_IMPORT_MERGE; … … 458 458 459 459 if ($import_opt == CST_ADMIN_OPML_IMPORT_FOLDER) { 460 $opmlfid = sanitize($_ REQUEST['opml_import_to_folder'], RSS_SANITIZER_NUMERIC);460 $opmlfid = sanitize($_POST['opml_import_to_folder'], RSS_SANITIZER_NUMERIC); 461 461 } else { 462 462 $opmlfid = getRootFolder(); … … 481 481 $fid = $opmlfid; 482 482 483 $prev_folder= rss_fetch_row(rss_query(483 list($prev_folder) = rss_fetch_row(rss_query( 484 484 "select name from " .getTable('folders') 485 485 ." where id= $opmlfid ")); … … 494 494 while (list($folder,$items) = each ($opml)) { 495 495 if ($folder != $prev_folder && $import_opt != CST_ADMIN_OPML_IMPORT_FOLDER) { 496 $fid = create_folder( $folder, false);497 $prev_folder = $folder;496 $fid = create_folder(strip_tags($folder), false); 497 $prev_folder = strip_tags($folder); 498 498 } 499 499 500 500 501 for ($i=0;$i<sizeof($opml[$folder]);$i++) { … … 508 509 $descr_ = isset($opml[$folder][$i]['DESCRIPTION'])? 509 510 trim($opml[$folder][$i]['DESCRIPTION']):null; 510 if ($url_) { 511 echo "<li><p>" . sprintf(LBL_ADMIN_OPML_IMPORT_FEED_INFO,$title_,$prev_folder); 511 512 $t__ = strip_tags($title_); 513 $d__ = strip_tags($descr_); 514 $f__ = strip_tags($prev_folder); 515 $u__ = sanitize($url_,RSS_SANITIZER_URL); 516 517 if ($u__) { 518 519 echo "<li><p>" . sprintf(LBL_ADMIN_OPML_IMPORT_FEED_INFO,$t__,$f__); 512 520 flush(); 513 list($retcde, $retmsg) = add_channel($u rl_, $fid, $title_, $descr_);521 list($retcde, $retmsg) = add_channel($u__, $fid, $t__, $d__); 514 522 echo ($retcde<0 ?$retmsg:" OK")."</p></li>\n"; 515 523 flush(); … … 535 543 rss_plugin_hook('rss.plugins.admin.feed.properties.submit', null); 536 544 // TBD 537 $title= rss_real_escape_string(real_strip_slashes($_POST['c_name']));545 $title= strip_tags(rss_real_escape_string(real_strip_slashes($_POST['c_name']))); 538 546 $url= rss_real_escape_string($_POST['c_url']); 539 547 $siteurl= rss_real_escape_string($_POST['c_siteurl']); 540 548 $parent= rss_real_escape_string($_POST['c_parent']); 541 $descr= rss_real_escape_string(real_strip_slashes($_POST['c_descr']));549 $descr= strip_tags(rss_real_escape_string(real_strip_slashes($_POST['c_descr']))); 542 550 $icon = rss_real_escape_string($_POST['c_icon']); 543 551 $priv = (array_key_exists('c_private',$_POST) && $_POST['c_private'] == '1'); -
branches/postgresql/admin/config.php
r1284 r1393 32 32 ."<div id=\"admin_config\" class=\"trigger\">\n"; 33 33 34 echo "<table id=\"configtable\">\n" 35 ."<tr>\n" 34 config_table_header(); 35 36 $sql = "select * from " .getTable("config") ." where key_ like 37 'rss.%' order by key_ asc"; 38 39 $res = rss_query($sql); 40 $cntr = 0; 41 while ($row = rss_fetch_assoc($res)) { 42 // Don't show old/moved config keys in the main config list 43 if ($row['key_'] == 'rss.config.plugins' or 44 $row['key_'] == 'rss.output.theme' or 45 $row['key_'] == 'rss.output.barefrontpage' or 46 $row['key_'] == 'rss.output.noreaditems' or 47 $row['key_'] == 'rss.output.cachedir' or 48 $row['key_'] == 'rss.config.showdevloglink' or 49 $row['key_'] == 'rss.output.numitemsonpage') { 50 continue; 51 } 52 53 $class_ = (($cntr++ % 2 == 0)?"even":"odd"); 54 config_table_row($row, $class_, CST_ADMIN_DOMAIN_CONFIG); 55 } 56 57 config_table_footer(); 58 echo "</div>\n"; 59 } 60 61 function config_table_header($caption=null) { 62 echo "<table id=\"configtable\">\n"; 63 if ($caption !== null) { 64 echo "<caption>$caption</caption>\n"; 65 } 66 echo "<tr>\n" 36 67 ."\t<th>". LBL_ADMIN_CHANNELS_HEADING_KEY ."</th>\n" 37 68 ."\t<th>". LBL_ADMIN_CHANNELS_HEADING_VALUE ."</th>\n" … … 39 70 ."\t<th class=\"cntr\">". LBL_ADMIN_CHANNELS_HEADING_ACTION ."</th>\n" 40 71 ."</tr>\n"; 41 42 $sql = "select * from " .getTable("config") ." where key_ like 43 'rss.%' order by key_ asc"; 44 45 $res = rss_query($sql); 46 $cntr = 0; 47 while ($row = rss_fetch_assoc($res)) { 48 $value = real_strip_slashes($row['value_']); 49 $class_ = (($cntr++ % 2 == 0)?"even":"odd"); 50 51 // Fix for #279. Plugins have their own section. 52 if ($row['key_'] == 'rss.config.plugins' or $row['key_'] == 53 'rss.output.theme' or $row['key_'] == 'rss.output.barefrontpage' 54 or $row['key_'] == 'rss.output.noreaditems' or $row['key_'] == 'rss.output.numitemsonpage') { 55 continue; 56 } 57 58 echo "<tr class=\"$class_\">\n" 59 ."\t<td>".$row['key_']."</td>\n"; 60 61 echo "\t<td>"; 62 63 switch($row['key_']) { 64 65 //specific handling per key 66 case 'rss.config.dateformat': 67 echo $value 68 . " (" 69 . preg_replace('/ /',' ',date($value)) 70 .")"; 71 break; 72 case 'rss.input.allowed': 73 72 } 73 74 function config_table_footer() { 75 echo "</table>"; 76 } 77 78 function config_table_row($row, $class_, $adminDomain, $extraLinkText='') { 79 $value = real_strip_slashes($row['value_']); 80 81 echo "<tr class=\"$class_\">\n" 82 ."\t<td>".$row['key_']."</td>\n"; 83 84 echo "\t<td>"; 85 86 switch($row['key_']) { 87 88 //specific handling per key 89 case 'rss.config.dateformat': 90 echo $value 91 . " (" 92 . preg_replace('/ /',' ',date($value)) 93 .")"; 94 break; 95 case 'rss.input.allowed': 96 97 $arr = unserialize($value); 98 echo admin_kses_to_html($arr); 99 100 break; 101 case 'rss.config.plugins': 102 case 'rss.output.theme': 103 continue; 104 break; 105 106 case 'rss.output.lang': 107 $arr = getLanguages(); 108 echo $arr[getConfig('rss.output.lang')]; 109 break; 110 case 'rss.config.tzoffset': 111 echo $value 112 . " (your local time: " 113 . preg_replace('/ /',' ',date("g:i A",mktime()+$value*3600)) 114 .")"; 115 break; 116 default: 117 118 // generic handling per type: 119 switch ($row['type_']) { 120 case 'string': 121 case 'num': 122 case 'boolean': 123 default: 124 echo $value; 125 break; 126 case 'enum': 127 $arr = explode(',',$value); 128 129 echo admin_enum_to_html($arr); 130 131 break; 132 case 'array': 74 133 $arr = unserialize($value); 75 echo admin_kses_to_html($arr); 76 77 break; 78 case 'rss.config.plugins': 79 case 'rss.output.theme': 80 continue; 81 break; 82 83 case 'rss.output.lang': 84 $arr = getLanguages(); 85 echo $arr[getConfig('rss.output.lang')]; 86 break; 87 case 'rss.config.tzoffset': 88 echo $value 89 . " (your local time: " 90 . preg_replace('/ /',' ',date("g:i A",mktime()+$value*3600)) 91 .")"; 92 break; 93 case 'rss.output.cachedir': 94 echo $value; 95 if (!is_writable($value)) { 96 echo "<br />" 97 ."<span class=\"error\">Warning: this isn't a writable directory!</span>"; 134 echo "<ul>\n"; 135 foreach($arr as $av) { 136 echo "\t<li>$av</li>\n"; 98 137 } 99 break; 100 default: 101 102 // generic handling per type: 103 switch ($row['type_']) { 104 case 'string': 105 case 'num': 106 case 'boolean': 107 default: 108 echo $value; 109 break; 110 case 'enum': 111 $arr = explode(',',$value); 112 echo admin_enum_to_html($arr); 113 114 break; 115 case 'array': 116 $arr = unserialize($value); 117 echo "<ul>\n"; 118 foreach($arr as $av) { 119 echo "\t<li>$av</li>\n"; 120 } 121 echo "</ul>\n"; 122 } 123 break; 124 } 125 126 echo "</td>\n"; 127 128 echo "\t<td>" . 129 // source: http://ch2.php.net/manual/en/function.preg-replace.php 130 preg_replace('/\s(\w+:\/\/)(\S+)/', 131 ' <a href="\\1\\2">\\1\\2</a>', 132 $row['desc_']) 133 . "</td>\n"; 134 135 echo "\t<td class=\"cntr\">" 136 ."<a href=\"".$_SERVER['PHP_SELF']. "?".CST_ADMIN_DOMAIN."=". CST_ADMIN_DOMAIN_CONFIG 137 ."&action=". CST_ADMIN_EDIT_ACTION. "&key=".$row['key_'] 138 ."&".CST_ADMIN_VIEW."=". CST_ADMIN_DOMAIN_CONFIG 139 ."\">" . LBL_ADMIN_EDIT 138 echo "</ul>\n"; 139 } 140 break; 141 } 142 143 echo "</td>\n"; 144 145 echo "\t<td>" . 146 // source: http://ch2.php.net/manual/en/function.preg-replace.php 147 preg_replace('/\s(\w+:\/\/)(\S+)/', 148 ' <a href="\\1\\2">\\1\\2</a>', 149 $row['desc_']) 150 . "</td>\n"; 151 152 echo "\t<td class=\"cntr\">" 153 ."<a href=\"".$_SERVER['PHP_SELF']. "?".CST_ADMIN_DOMAIN."=". $adminDomain 154 ."&action=". CST_ADMIN_EDIT_ACTION. "&key=".$row['key_'] 155 ."&".CST_ADMIN_VIEW."=". $adminDomain 156 ."$extraLinkText\">" . LBL_ADMIN_EDIT 157 ."</a>"; 158 159 if ($row['value_'] != $row['default_'] && $row['key_'] != 'rss.config.plugins') { 160 echo "|" 161 162 ."<a href=\"".$_SERVER['PHP_SELF']. "?".CST_ADMIN_DOMAIN."=". $adminDomain 163 ."&action=". CST_ADMIN_DEFAULT_ACTION. "&key=".$row['key_']."$extraLinkText\">" . LBL_ADMIN_DEFAULT 140 164 ."</a>"; 141 142 if ($row['value_'] != $row['default_'] && $row['key_'] != 'rss.config.plugins') { 143 echo "|" 144 145 ."<a href=\"".$_SERVER['PHP_SELF']. "?".CST_ADMIN_DOMAIN."=". CST_ADMIN_DOMAIN_CONFIG 146 ."&action=". CST_ADMIN_DEFAULT_ACTION. "&key=".$row['key_']."\">" . LBL_ADMIN_DEFAULT 147 ."</a>"; 148 } 149 150 echo "</td>\n" 151 ."</tr>\n"; 152 153 } 154 echo "</table>"; 155 echo "</div>\n"; 165 } 166 167 echo "</td>\n" 168 ."</tr>\n"; 156 169 } 157 170 … … 185 198 } 186 199 187 switch ($type) {188 case 'enum':189 $html_default = admin_enum_to_html(explode(',',$default));190 break;191 case 'array':192 $html_default = admin_kses_to_html(unserialize($default));193 break;194 default:195 $html_default = $default;196 break;197 }198 199 200 if (array_key_exists(CST_ADMIN_CONFIRMED,$_POST) && $_POST[CST_ADMIN_CONFIRMED] == LBL_ADMIN_YES) { 200 201 rss_query("update " . getTable('config') ." set value_=default_ where key_='$key'" ); … … 205 206 } 206 207 else { 207 208 echo "<form class=\"box\" method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n" 209 ."<p class=\"error\">"; 210 printf(LBL_ADMIN_ARE_YOU_SURE_DEFAULT,$key,$html_def
