diff --git a/Changelog b/Changelog index 9e6f7c455..118d8dedb 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-01-08 DariusIII + * Chg: Move constants.php to config folder * Chg: Update simfony components 2018-01-05 DariusIII * Chg: Update ReleaseFile model diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 9881940af..49bbe0f47 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -1,7 +1,7 @@ . - * @author niel - */ - -namespace nntmux; - -/** - * A `NetworkException` may be thrown whenever an unsuccessful attempt is made to connect to a - * remote service over the network. This may be a web service, a database, or another network - * resource. - */ -class NetworkException extends \RuntimeException -{ - protected $code = 503; -} diff --git a/nntmux/config/Configure.php b/nntmux/config/Configure.php index 8106dd166..d2394fbb5 100755 --- a/nntmux/config/Configure.php +++ b/nntmux/config/Configure.php @@ -100,7 +100,7 @@ class Configure require_once $settings_file; if (PHP_SAPI === 'cli') { $current_settings_file_version = 7; // Update this when updating settings.example.php - if (! defined('NN_SETTINGS_FILE_VERSION') || + if (! \defined('NN_SETTINGS_FILE_VERSION') || NN_SETTINGS_FILE_VERSION !== $current_settings_file_version ) { echo "\033[0;31mNotice: Your $settings_file file is either out of date or you have not updated". @@ -109,22 +109,22 @@ class Configure } unset($current_settings_file_version); } - } elseif (! defined('ITEMS_PER_PAGE')) { - define('ITEMS_PER_PAGE', '50'); - define('ITEMS_PER_COVER_PAGE', '20'); - define('NN_ECHOCLI', true); - define('NN_QUERY_STRIP_WHITESPACE', false); - define('NN_RENAME_PAR2', true); - define('NN_RENAME_MUSIC_MEDIAINFO', true); - define('NN_CACHE_EXPIRY_SHORT', 300); - define('NN_CACHE_EXPIRY_MEDIUM', 600); - define('NN_CACHE_EXPIRY_LONG', 900); - define('NN_FLOOD_CHECK', false); - define('NN_FLOOD_WAIT_TIME', 5); - define('NN_FLOOD_MAX_REQUESTS_PER_SECOND', 5); - define('NN_USE_SQL_TRANSACTIONS', true); - define('NN_RELEASE_SEARCH_TYPE', 0); - define('NN_MAX_PAGER_RESULTS', '125000'); + } elseif (! \defined('ITEMS_PER_PAGE')) { + \define('ITEMS_PER_PAGE', '50'); + \define('ITEMS_PER_COVER_PAGE', '20'); + \define('NN_ECHOCLI', true); + \define('NN_QUERY_STRIP_WHITESPACE', false); + \define('NN_RENAME_PAR2', true); + \define('NN_RENAME_MUSIC_MEDIAINFO', true); + \define('NN_CACHE_EXPIRY_SHORT', 300); + \define('NN_CACHE_EXPIRY_MEDIUM', 600); + \define('NN_CACHE_EXPIRY_LONG', 900); + \define('NN_FLOOD_CHECK', false); + \define('NN_FLOOD_WAIT_TIME', 5); + \define('NN_FLOOD_MAX_REQUESTS_PER_SECOND', 5); + \define('NN_USE_SQL_TRANSACTIONS', true); + \define('NN_RELEASE_SEARCH_TYPE', 0); + \define('NN_MAX_PAGER_RESULTS', '125000'); } unset($settings_file); break; @@ -134,12 +134,12 @@ class Configure private function defaultSSL() { // Check if they updated config.php for the openssl changes. Only check 1 to save speed. - if (! defined('NN_SSL_VERIFY_PEER')) { - define('NN_SSL_CAFILE', ''); - define('NN_SSL_CAPATH', ''); - define('NN_SSL_VERIFY_PEER', '0'); - define('NN_SSL_VERIFY_HOST', '0'); - define('NN_SSL_ALLOW_SELF_SIGNED', '1'); + if (! \defined('NN_SSL_VERIFY_PEER')) { + \define('NN_SSL_CAFILE', ''); + \define('NN_SSL_CAPATH', ''); + \define('NN_SSL_VERIFY_PEER', '0'); + \define('NN_SSL_VERIFY_HOST', '0'); + \define('NN_SSL_ALLOW_SELF_SIGNED', '1'); } } }