File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 9898 'allowempty ' => true ,
9999 'category ' => 'general ' ,
100100 ),
101+ 'rc_notification ' => array (
102+ 'value ' => 0 ,
103+ 'description ' => s ('Show notification for Release Candidates ' ),
104+ 'type ' => 'boolean ' ,
105+ 'allowempty ' => true ,
106+ 'category ' => 'general ' ,
107+ ),
101108
102109 //# remote processing secret
103110 // @TODO previous value generation was limited to 20 hex characters (max), determine if this is enough (80 bits)
Original file line number Diff line number Diff line change @@ -55,9 +55,14 @@ function checkForUpdate($path = '')
5555{
5656 $ serverResponse = getResponse ($ path );
5757 $ version = isset ($ serverResponse ['version ' ]) ? $ serverResponse ['version ' ] : '' ;
58+ $ enabledNotification = true ;
59+
60+ if (strpos ($ version , 'RC ' ) && (getConfig ('rc_notification ' ) == 0 )) {
61+ $ enabledNotification = false ;
62+ }
5863 $ versionString = isset ($ serverResponse ['versionstring ' ]) ? $ serverResponse ['versionstring ' ] : '' ;
5964
60- if ($ version !== '' && $ version !== getCurrentphpListVersion ($ path ) && version_compare (getCurrentphpListVersion ($ path ), $ version )) {
65+ if ($ version !== '' && $ version !== getCurrentphpListVersion ($ path ) && version_compare (getCurrentphpListVersion ($ path ), $ version ) && $ enabledNotification ) {
6166 $ updateMessage = s ('Update to ' . htmlentities ($ versionString ) . ' is available. ' );
6267 } else {
6368 $ updateMessage = '' ;
You can’t perform that action at this time.
0 commit comments