File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed
Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -759,11 +759,6 @@ function pageTitle($page)
759759 'catlists ' ,
760760 ),
761761 ),
762- 'update ' => array (
763- 'toplink ' => 'redirecttoupdater ' ,
764- 'pages ' => array (),
765- 'menulinks ' => array (),
766- ),
767762 //'info' => array(
768763 //'toplink' => 'about',
769764 //'pages' => array(
@@ -787,6 +782,13 @@ function pageTitle($page)
787782 //'menulinks' => array(),
788783 //),
789784);
785+ if (ALLOW_UPDATER ){
786+ $ GLOBALS ['pagecategories ' ]['update ' ] = array (
787+ 'toplink ' => 'redirecttoupdater ' ,
788+ 'pages ' => array (),
789+ 'menulinks ' => array (),
790+ );
791+ }
790792if (DEVVERSION ) {
791793 $ GLOBALS ['pagecategories ' ]['develop ' ] = array (
792794 'toplink ' => 'develop ' ,
Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ function mb_strtolower($string)
521521 echo Info ($ GLOBALS ['I18N ' ]->get ('Running in testmode, no emails will be sent. Check your config file. ' ));
522522 }
523523 $ updaterdir = __DIR__ . '/../updater ' ;
524- if (file_exists ($ updaterdir )){
524+ if (file_exists ($ updaterdir ) && ALLOW_UPDATER ){
525525 echo Info (s ('Try automatic updater ' ).' <a href="?page=redirecttoupdater" title=" ' .s ('automatic updater ' ).'"> ' .s ('here ' ).'</a> ' .' ( ' .s ('beta ' ).') ' );
526526 }
527527 if (version_compare (PHP_VERSION , '5.3.3 ' , '< ' ) && WARN_ABOUT_PHP_SETTINGS ) {
Original file line number Diff line number Diff line change 606606if (!defined ('USERSPAGE_MAX ' )) {
607607 define ('USERSPAGE_MAX ' , 1000 );
608608}
609+ // if false, it will disable the automatic updater.
610+ if (!defined ('ALLOW_UPDATER ' )){
611+ define ('ALLOW_UPDATER ' , true );
612+ }
609613if (!isset ($ plugins_disabled ) || !is_array ($ plugins_disabled )) {
610614 $ plugins_disabled = array ();
611615}
Original file line number Diff line number Diff line change 22/**
33 * Only superusers can be redirected to updater.
44 */
5- if (isSuperUser ()) {
5+ if (isSuperUser () && ALLOW_UPDATER ) {
66 $ _SESSION ['phplist_updater_eligible ' ] = true ;
77 header ('Location: ../updater ' );
88}
You can’t perform that action at this time.
0 commit comments