Changeset 1581

Show
Ignore:
Timestamp:
09/14/06 21:30:34 (2 years ago)
Author:
mbonetti
Message:

Applied Sam Johnston's patch for #440

Location:
trunk/gregarius
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/nav.php

    r1561 r1581  
    6161     
    6262        $this->appendNavItem(getPath(),__('<span>H</span>ome'),LOCATION_HOME); 
    63         $this->appendNavItem(getPath().'update.php',__('<span>R</span>efresh'),LOCATION_UPDATE); 
     63        if (!getConfig("rss.config.restrictrefresh")) { 
     64            $this->appendNavItem(getPath().'update.php',__('<span>R</span>efresh'),LOCATION_UPDATE); 
     65        } 
    6466        $this->appendNavItem(getPath().'search.php',__('<span>S</span>earch'),LOCATION_SEARCH); 
    6567        $this->appendNavItem(getPath().'admin/',__('A<span>d</span>min'),LOCATION_ADMIN); 
  • trunk/gregarius/schema.php

    r1580 r1581  
    476476        "rss.config.defaultdashboard"           => array('true','true','boolean','If the first page seen when entering the admin section should be the dashboard',NULL), 
    477477        "rss.config.deadthreshhold" =>  array('24', '24', 'num', 'Sets the threshold for when a feed is marked as dead, in hours', NULL), 
    478         "rss.search.maxitems" => array(500, 500, 'num', 'Sets the maximum number of items returned on a search', NULL) 
     478        "rss.search.maxitems" => array(500, 500, 'num', 'Sets the maximum number of items returned on a search', NULL), 
     479        "rss.config.restrictrefresh"    => array("false","false","boolean","Restrict refresh to command line only (eg php -f update.php). Useful for busy sites with multiple users.",NULL), 
    479480    ); 
    480481     
  • trunk/gregarius/update.php

    r1561 r1581  
    2828define ('RSS_NO_CACHE',true); 
    2929require_once('init.php'); 
     30$cline = isset($argv) && !$_REQUEST && isset($argc) && $argc; 
     31if (!$cline && getConfig('rss.config.restrictrefresh')) { 
     32    die(__('Sorry, updating from the web is currently not allowed.')); 
     33} 
    3034rss_require("cls/update.php"); 
    3135rss_require("extlib/browser.php"); 
     
    5054 
    5155$browser = new Browser(); 
    52  
    53 $cline = isset($argv) && !$_REQUEST && isset($argc) && $argc; 
    5456$silent = array_key_exists('silent', $_GET) || ($cline && in_array('--silent',$argv)); 
    5557$newsonly = array_key_exists('newsonly', $_GET) || ($cline && in_array('--newsonly', $argv));