From 8ff448fa64ce1b5f122339e224e596b101a2d4ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 28 Jun 2010 19:07:25 +0000 Subject: [PATCH] Getter for boolean values should be named like ifFoo() or isBar() --- inc/extensions-functions.php | 38 +++++++++++++------------- inc/extensions/ext-active.php | 4 +-- inc/extensions/ext-admins.php | 16 +++++------ inc/extensions/ext-bonus.php | 4 +-- inc/extensions/ext-booking.php | 8 +++--- inc/extensions/ext-cache.php | 36 ++++++++++++------------ inc/extensions/ext-mediadata.php | 8 +++--- inc/extensions/ext-online.php | 4 +-- inc/extensions/ext-other.php | 4 +-- inc/extensions/ext-politician-stop.php | 4 +-- inc/extensions/ext-rallye.php | 4 +-- inc/extensions/ext-register.php | 4 +-- inc/extensions/ext-removeip.php | 4 +-- inc/extensions/ext-sql_patches.php | 6 ++-- inc/extensions/ext-theme.php | 8 +++--- inc/extensions/ext-timezone.php | 4 +-- inc/extensions/ext-uberwach.php | 4 +-- 17 files changed, 80 insertions(+), 80 deletions(-) diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 4bc33da72f..48397e939e 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -205,7 +205,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru $task_id = determineExtensionTaskId(getCurrentExtensionName()); // Still zero and not in dry-run? - if (($task_id == '0') && (!getExtensionDryRun())) { + if (($task_id == '0') && (!isExtensionDryRun())) { // Then request a bug report debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)", __FUNCTION__, @@ -228,7 +228,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru // Does this extension exists? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName()); - if (loadExtension(getCurrentExtensionName(), 'register', '', getExtensionDryRun())) { + if (loadExtension(getCurrentExtensionName(), 'register', '', isExtensionDryRun())) { // Set current extension name again setCurrentExtensionName($ext_name); @@ -238,7 +238,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru foreach ($history as $ver) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ', ext_ver=' . $ver); // Load extension in update mode - loadExtension(getCurrentExtensionName(), 'update', $ver, getExtensionDryRun()); + loadExtension(getCurrentExtensionName(), 'update', $ver, isExtensionDryRun()); // Add update notes to our output addExtensionNotes($ver); @@ -254,7 +254,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru // Check if extension is not installed and not already in registration procedure and if loading it wents finally fine... //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',isExtensionRegistrationRunning(' . $ext_update . ')=' . intval(isExtensionRegistrationRunning($ext_update))); - if ((!isExtensionInstalled($ext_update)) && (!isExtensionRegistrationRunning($ext_update)) && (loadExtension($ext_update, 'test', '', getExtensionDryRun()))) { + if ((!isExtensionInstalled($ext_update)) && (!isExtensionRegistrationRunning($ext_update)) && (loadExtension($ext_update, 'test', '', isExtensionDryRun()))) { // Set current extension name again setCurrentExtensionName($ext_name); @@ -274,7 +274,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru if ($task > 0) { // Try to register the extension //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ':ext_update=' . $ext_update . ',taskId=' . $task); - $test = registerExtension($ext_update, $task, getExtensionDryRun(), false); + $test = registerExtension($ext_update, $task, isExtensionDryRun(), false); // Reset extension name setCurrentExtensionName($ext_name); @@ -286,7 +286,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',currVer=' . getCurrentExtensionVersion()); $GLOBALS['ext_backup_name'][$ext_update][$ext_ver] = getCurrentExtensionName(); $GLOBALS['ext_backup_ver'][$ext_update][$ext_ver] = getCurrentExtensionVersion(); - updateExtension($ext_update, $ext_ver, getExtensionDryRun()); + updateExtension($ext_update, $ext_ver, isExtensionDryRun()); setCurrentExtensionName($GLOBALS['ext_backup_name'][$ext_update][$ext_ver]); setCurrentExtensionVersion($GLOBALS['ext_backup_ver'][$ext_update][$ext_ver]); unset($GLOBALS['ext_backup_name'][$ext_update][$ext_ver]); @@ -328,14 +328,14 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru // Does everthing before wents ok? if ($test === true) { // "Dry-run-mode" activated? - if ((getExtensionDryRun() === false) && (!isExtensionOnRemovalList())) { + if ((isExtensionDryRun() === false) && (!isExtensionOnRemovalList())) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName()); // Init SQLs and transfer ext->generic initSqls(); setSqlsArray(getExtensionSqls()); // Run installation pre-installation filters - runFilterChain('pre_extension_installed', array('dry_run' => getExtensionDryRun())); + runFilterChain('pre_extension_installed', array('dry_run' => isExtensionDryRun())); // Register extension //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'insert=' . getCurrentExtensionName() . '/' . getCurrentExtensionVersion() . ' - INSERT!'); @@ -376,7 +376,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru // In normal mode return a true on success $ret = true; - } elseif (getExtensionDryRun() === true) { + } elseif (isExtensionDryRun() === true) { // In "dry-run" mode do always return a true $ret = true; @@ -400,7 +400,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru // Is this the sql_patches? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . '/' . getExtensionMode()); - if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!getExtensionDryRun()) && ($test)) { + if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!isExtensionDryRun()) && ($test)) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ': LOAD!'); if ($logout === true) { // Then redirect to logout @@ -638,7 +638,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { initIncludePool('extension'); // Load extension in test mode - loadExtension($ext_name, 'test', $ext_ver, getExtensionDryRun()); + loadExtension($ext_name, 'test', $ext_ver, isExtensionDryRun()); // Save version history $history = getExtensionVersionHistory(); @@ -648,7 +648,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { // Check if version is updated //* DEBUG: */ debugOutput(getCurrentExtensionName().'/'.$ext_name.':'.getThisExtensionVersion().'/'.$ext_ver.'/'.intval(is_array($history))); - if (((getThisExtensionVersion() != $ext_ver) || (getExtensionDryRun())) && (is_array($history))) { + if (((getThisExtensionVersion() != $ext_ver) || (isExtensionDryRun())) && (is_array($history))) { // Search for starting point $start = array_search($ext_ver, $history); @@ -658,7 +658,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { $GLOBALS['update_ver'][getCurrentExtensionName()] = $history[$idx]; // Load again... - loadExtension(getCurrentExtensionName(), 'update', $GLOBALS['update_ver'][getCurrentExtensionName()], getExtensionDryRun()); + loadExtension(getCurrentExtensionName(), 'update', $GLOBALS['update_ver'][getCurrentExtensionName()], isExtensionDryRun()); // Get all depencies $depencies = getExtensionUpdateDependencies(); @@ -678,10 +678,10 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { // Is the extension there? if (isExtensionInstalled($ext_depend)) { // Update another extension first! - $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun()); + $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), isExtensionDryRun()); } else { // Register new extension - $test = registerExtension($ext_depend, 0, getExtensionDryRun(), false); + $test = registerExtension($ext_depend, 0, isExtensionDryRun(), false); } } // END - if } // END - foreach @@ -698,7 +698,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { } // END - for // In real-mode execute any existing includes - if (getExtensionDryRun() === false) { + if (isExtensionDryRun() === false) { $GLOBALS['ext_inc_pool'][getCurrentExtensionName()] = getIncludePool('extension'); runFilterChain('load_includes', 'extension'); setIncludePool('extension', $GLOBALS['ext_inc_pool'][getCurrentExtensionName()]); @@ -710,9 +710,9 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false) { setSqlsArray(getExtensionSqls()); // Run SQLs - runFilterChain('run_sqls', array('dry_run' => getExtensionDryRun())); + runFilterChain('run_sqls', array('dry_run' => isExtensionDryRun())); - if (getExtensionDryRun() === false) { + if (isExtensionDryRun() === false) { // Run filters on success extension update runFilterChain('extension_update', getCurrentExtensionName()); } // END - if @@ -1550,7 +1550,7 @@ function enableExtensionDryRun ($dry_run = true) { } // Getter for dry-run -function getExtensionDryRun () { +function isExtensionDryRun () { return $GLOBALS['ext_dry_run']; } diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 1cab824ee7..96638bc102 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -60,7 +60,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_active'"); // Unregister filter - unregisterFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, getExtensionDryRun()); + unregisterFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -123,7 +123,7 @@ switch (getExtensionMode()) { addExtensionUpdateDependency('online'); // Register filter - registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, getExtensionDryRun()); + registerFilter('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für den "Wer ist Online" Block hinzugefügt und ist von online abhängig."); diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 30c49c3248..6b4d26badc 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -67,10 +67,10 @@ switch (getExtensionMode()) { addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`"); // Remove filters - unregisterFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, getExtensionDryRun()); - unregisterFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', true, getExtensionDryRun()); - unregisterFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', true, getExtensionDryRun()); - unregisterFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', true, getExtensionDryRun()); + unregisterFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, isExtensionDryRun()); + unregisterFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', true, isExtensionDryRun()); + unregisterFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', true, isExtensionDryRun()); + unregisterFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -297,7 +297,7 @@ PRIMARY KEY (id) addExtensionUpdateDependency('sql_patches'); // Add filters - registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, getExtensionDryRun()); + registerFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -323,15 +323,15 @@ PRIMARY KEY (id) case '0.7.4': // SQL queries for v0.7.4 // Add filter - registerFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, getExtensionDryRun()); - registerFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, getExtensionDryRun()); + registerFilter('do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, isExtensionDryRun()); + registerFilter('do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefuegt."); break; case '0.7.5': // SQL queries for v0.7.5 - registerFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, getExtensionDryRun()); + registerFilter('do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, isExtensionDryRun()); break; // Add filter diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 14e0f2e5ba..928b9c29f4 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -90,7 +90,7 @@ PRIMARY KEY (`id`) addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`'); // Unregister filter - unregisterFilter('member_login_check', 'ADD_LOGIN_BONUS', true, getExtensionDryRun()); + unregisterFilter('member_login_check', 'ADD_LOGIN_BONUS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -545,7 +545,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC"); case '0.9.0': // SQL queries for v0.9.0 // Register filter - registerFilter('member_login_check', 'ADD_LOGIN_BONUS', false, true, getExtensionDryRun()); + registerFilter('member_login_check', 'ADD_LOGIN_BONUS', false, true, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Filter hinzugefügt der den Login-Bonus aktualisiert (bzw. soll) (internes TODO)."); diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 5de7294616..510a416033 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -77,8 +77,8 @@ PRIMARY KEY (`id`) addMemberMenuSql('main','booking','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Kontoauszug','N','Y',5); // Add the filters - registerFilter('add_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); - registerFilter('sub_points', 'ADD_BOOKING_RECORD', false, true, getExtensionDryRun()); + registerFilter('add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); + registerFilter('sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -87,8 +87,8 @@ PRIMARY KEY (`id`) addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'"); // Remove the filters - unregisterFilter('add_points', 'ADD_BOOKING_RECORD', true, getExtensionDryRun()); - unregisterFilter('sub_points', 'ADD_BOOKING_RECORD', true, getExtensionDryRun()); + unregisterFilter('add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); + unregisterFilter('sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 6d32d311e0..1028d3e617 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -62,15 +62,15 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('cache_stats','config_config')"); // Unregister all filters - unregisterFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, getExtensionDryRun()); - unregisterFilter('extension_remove', 'CACHE_DESTROY_ALL', true, getExtensionDryRun()); - unregisterFilter('shutdown', 'CACHE_DESTROY_FILTER', true, getExtensionDryRun()); + unregisterFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); + unregisterFilter('extension_remove', 'CACHE_DESTROY_ALL', true, isExtensionDryRun()); + unregisterFilter('shutdown', 'CACHE_DESTROY_FILTER', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -201,14 +201,14 @@ switch (getExtensionMode()) { case '0.2.1': // SQL queries for v0.2.1 // Register the new filter - registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, getExtensionDryRun()); - registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, getExtensionDryRun()); + registerFilter('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); + registerFilter('extension_remove', 'CACHE_DESTROY_ALL', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Erweiterungsmanagement hinzugefügt."); @@ -226,7 +226,7 @@ switch (getExtensionMode()) { setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); // Register a new filter - registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, getExtensionDryRun()); + registerFilter('shutdown', 'CACHE_DESTROY_FILTER', false, true, isExtensionDryRun()); break; case '0.2.4': // SQL queries for v0.2.4 diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index b5a33d9c88..ee56ea3e7b 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -57,8 +57,8 @@ switch (getExtensionMode()) { addExtensionSql(''); // Add the filters - registerFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun()); - registerFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, getExtensionDryRun()); + registerFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -68,8 +68,8 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'"); // Remove the filters - unregisterFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', true, getExtensionDryRun()); - unregisterFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', true, getExtensionDryRun()); + unregisterFilter('add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter('sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index b1d8b24f11..45051d6892 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -79,7 +79,7 @@ KEY `admin_member` (`is_admin`,`is_member`) addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='online'"); // Unregister filter - unregisterFilter('init', 'UPDATE_ONLINE_LIST', true, getExtensionDryRun()); + unregisterFilter('init', 'UPDATE_ONLINE_LIST', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -120,7 +120,7 @@ KEY `admin_member` (`is_admin`,`is_member`) addGuestMenuSql('online', NULL, 'Jetzt Online', 'Y', 'N', 2); // Register filter - registerFilter('init', 'UPDATE_ONLINE_LIST', false, true, getExtensionDryRun()); + registerFilter('init', 'UPDATE_ONLINE_LIST', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index fabc988ff7..ac398cfc00 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -62,7 +62,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'"); // Unregister filter - unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', true, getExtensionDryRun()); + unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -217,7 +217,7 @@ switch (getExtensionMode()) { case '0.2.4': // SQL queries for v0.2.4 // Register filter - registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun()); + registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgeführten SQL-Anweisungen hinzugefügt."); diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php index f466368426..1cad577a2d 100644 --- a/inc/extensions/ext-politician-stop.php +++ b/inc/extensions/ext-politician-stop.php @@ -55,12 +55,12 @@ switch (getExtensionMode()) { addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); // Register filter - registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun()); + registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension // Unregister filter - unregisterFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', true, getExtensionDryRun()); + unregisterFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index f3fc2aed8a..82c7fe91fb 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -114,7 +114,7 @@ PRIMARY KEY (id) addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='rallyes'"); // Unregister filter - unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, getExtensionDryRun()); + unregisterFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -312,7 +312,7 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu addExtensionUpdateDependency('sql_patches'); // Register filter - registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, getExtensionDryRun()); + registerFilter('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index e9232b6462..55c190134a 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -60,7 +60,7 @@ switch (getExtensionMode()) { addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`'); // Unregister a filter - unregisterFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', true, getExtensionDryRun()); + unregisterFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -321,7 +321,7 @@ PRIMARY KEY (id) case '0.5.3': // SQL queries for v0.5.3 // Register a filter - registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, getExtensionDryRun()); + registerFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, isExtensionDryRun()); // Run these SQLs addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')"); diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index c0985287df..e25a464d94 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -69,7 +69,7 @@ switch (getExtensionMode()) addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip' LIMIT 1"); // Remove filters - unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, getExtensionDryRun()); + unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -87,7 +87,7 @@ switch (getExtensionMode()) addExtensionUpdateDependency('sql_patches'); // Add filters - registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, getExtensionDryRun()); + registerFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 4e644041ab..872b85df59 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -93,7 +93,7 @@ switch (getExtensionMode()) { `action`='account'"); // Unregister filter - unregisterFilter('member_login_check', 'RESET_USER_LOGIN_FAILURE', true, getExtensionDryRun()); + unregisterFilter('member_login_check', 'RESET_USER_LOGIN_FAILURE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -707,7 +707,7 @@ CHANGE `what` `what` VARCHAR(50) NULL DEFAULT NULL'); case '0.6.9': // SQL queries for 0.6.9 // Register filter - registerFilter('member_login_check', 'RESET_USER_LOGIN_FAILURE', false, true, getExtensionDryRun()); + registerFilter('member_login_check', 'RESET_USER_LOGIN_FAILURE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Zurücksetzens des fehlgeschlagenen Mitgliederlogins hinzugefügt (internes TODO)."); @@ -728,7 +728,7 @@ INDEX (`ip`) addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `dns_cache_timeout` BIGINT(20) NOT NULL DEFAULT ' . (60*60*24)); // Register filter - registerFilter('reset', 'CLEANUP_DNS_CACHE', false, true, getExtensionDryRun()); + registerFilter('reset', 'CLEANUP_DNS_CACHE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("IP-Resolver-Klasse hinzugefügt, um bei der Erweiterung ext-network DNS-Anfragen einzusparen."); diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 10fff0feb6..08c1ee0bbb 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -67,8 +67,8 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='themes' OR `what`='themes'"); // Unregister filters - unregisterFilter('init', 'HANDLE_THEME_CHANGE', true, getExtensionDryRun()); - unregisterFilter('member_login_check', 'SET_USERS_THEME', true, getExtensionDryRun()); + unregisterFilter('init', 'HANDLE_THEME_CHANGE', true, isExtensionDryRun()); + unregisterFilter('member_login_check', 'SET_USERS_THEME', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -163,7 +163,7 @@ INDEX (`theme_active`) case '0.1.0': // SQL queries for v0.1.0 // Register filter - registerFilter('init', 'HANDLE_THEME_CHANGE', false, true, getExtensionDryRun()); + registerFilter('init', 'HANDLE_THEME_CHANGE', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ändern des Designs nun im Filter (internes TODO)."); @@ -171,7 +171,7 @@ INDEX (`theme_active`) case '0.1.1': // SQL queries for v0.1.1 // Register filter - registerFilter('member_login_check', 'SET_USERS_THEME', false, true, getExtensionDryRun()); + registerFilter('member_login_check', 'SET_USERS_THEME', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Setzen des Mitgliedes' eigener Design-Auswahl per Filter (internes TODO)."); diff --git a/inc/extensions/ext-timezone.php b/inc/extensions/ext-timezone.php index 6346b02516..46ec4d9367 100644 --- a/inc/extensions/ext-timezone.php +++ b/inc/extensions/ext-timezone.php @@ -57,7 +57,7 @@ switch (getExtensionMode()) { addAdminMenuSql('setup','config_timezone','Zeitzone','Einstellungen an der Zeitzone können hier konfiguriert werden.',10); // Register filter - registerFilter('init', 'INIT_TIMEZONE', false, true, getExtensionDryRun()); + registerFilter('init', 'INIT_TIMEZONE', false, true, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -65,7 +65,7 @@ switch (getExtensionMode()) { addExtensionSQL("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_timezone' LIMIT 1"); // Unregister filter - unregisterFilter('init', 'INIT_TIMEZONE', true, getExtensionDryRun()); + unregisterFilter('init', 'INIT_TIMEZONE', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 12be8bb3fb..28e00094f0 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -58,7 +58,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_uberwach' LIMIT 1"); // Unregister filter - unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', true, getExtensionDryRun()); + unregisterFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -72,7 +72,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - registerFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, getExtensionDryRun()); + registerFilter('page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugefügt"); -- 2.39.5