From 0dd76819236495cb7cfe97d8152700b895261eea Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 3 Apr 2015 20:16:11 +0200 Subject: [PATCH] Removed deprecated 'hidden' column from mod_reg table. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/ideas/ext-engine.php | 2 +- inc/extensions/ext- | 2 +- inc/extensions/ext-alert.php | 2 +- inc/extensions/ext-beg.php | 2 +- inc/extensions/ext-bonus.php | 2 +- inc/extensions/ext-cprping.php | 2 +- inc/extensions/ext-cron.php | 2 +- inc/extensions/ext-cryptocoins.php | 2 +- inc/extensions/ext-currency.php | 2 +- inc/extensions/ext-doubler.php | 2 +- inc/extensions/ext-geoip.php | 2 +- inc/extensions/ext-mailid.php | 2 +- inc/extensions/ext-network.php | 8 ++-- inc/extensions/ext-order.php | 4 +- inc/extensions/ext-ranking.php | 2 +- inc/extensions/ext-sponsor.php | 2 +- inc/extensions/ext-surfbar.php | 2 +- inc/extensions/ext-teams.php | 2 +- inc/extensions/ext-yacy.php | 2 +- inc/filters.php | 2 +- inc/language/mods_de.php | 1 - inc/loader/load-modules.php | 4 +- inc/module-functions.php | 38 +++++++++---------- inc/modules/admin/what-list_mods.php | 23 ++++++++--- install/tables.sql | 21 +++++----- templates/de/html/admin/admin_edit_mods.tpl | 5 +-- .../de/html/admin/admin_edit_mods_row.tpl | 3 -- templates/de/html/admin/admin_list_mods.tpl | 5 +-- .../de/html/admin/admin_list_mods_row.tpl | 3 -- 29 files changed, 74 insertions(+), 77 deletions(-) diff --git a/contrib/ideas/ext-engine.php b/contrib/ideas/ext-engine.php index da23f45de2..d34d3b8f3c 100644 --- a/contrib/ideas/ext-engine.php +++ b/contrib/ideas/ext-engine.php @@ -157,7 +157,7 @@ PRIMARY KEY (`id`)", // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='engine' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='engine' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module` LIKE 'engine%'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module` LIKE 'engine%'"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 2002da710b..e53fee19b8 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-alert.php b/inc/extensions/ext-alert.php index 3388c6ae3d..4afb0aab8a 100644 --- a/inc/extensions/ext-alert.php +++ b/inc/extensions/ext-alert.php @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index daf32c404c..f668da5bc0 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -96,7 +96,7 @@ INDEX (`userid`)", // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `what`='beg' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what` IN ('beg','beg2')"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='beg' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 316cf35568..cba8cdbaab 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -104,7 +104,7 @@ INDEX (`cat_id`)", // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='bonus' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='bonus' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='show_bonus' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='show_bonus' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-cprping.php b/inc/extensions/ext-cprping.php index e72744838c..d3b76e1f86 100644 --- a/inc/extensions/ext-cprping.php +++ b/inc/extensions/ext-cprping.php @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-cron.php b/inc/extensions/ext-cron.php index fc3378638c..4f38161e86 100644 --- a/inc/extensions/ext-cron.php +++ b/inc/extensions/ext-cron.php @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-cryptocoins.php b/inc/extensions/ext-cryptocoins.php index 766a16fc0e..136bfc0143 100644 --- a/inc/extensions/ext-cryptocoins.php +++ b/inc/extensions/ext-cryptocoins.php @@ -64,7 +64,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-currency.php b/inc/extensions/ext-currency.php index 07530fb47b..5aac560f1b 100644 --- a/inc/extensions/ext-currency.php +++ b/inc/extensions/ext-currency.php @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 7fb46edd03..3a1acf3aae 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -73,7 +73,7 @@ switch (getExtensionMode()) { // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='doubler' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `what`='doubler' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='doubler' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='doubler' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-geoip.php b/inc/extensions/ext-geoip.php index b5822d15dd..29afef6da0 100644 --- a/inc/extensions/ext-geoip.php +++ b/inc/extensions/ext-geoip.php @@ -63,7 +63,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index af69550a8a..da87fe3d0a 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -62,7 +62,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='mailid' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='mailid' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 8a1a5b5976..dcd2000f96 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -79,13 +79,13 @@ switch (getExtensionMode()) { break; case 'activate': // Do stuff when admin activates this extension - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-delurl' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-vcheck' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='network-delurl' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='network-vcheck' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y',`hidden`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-delurl' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y',`hidden`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-vcheck' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-delurl' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y',`admin_only`='N',`mem_only`='N' WHERE `module`='network-vcheck' LIMIT 1"); break; case 'update': // Update an extension diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index dd9807424b..8226dd07ef 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -74,13 +74,13 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `action`='order'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='N',`locked`='N',`admin_only`='N',`mem_only`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='Y' WHERE `module`='order' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N',`locked`='Y' WHERE `action`='order'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='Y',`locked`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='order' LIMIT 1"); break; case 'update': // Update an extension diff --git a/inc/extensions/ext-ranking.php b/inc/extensions/ext-ranking.php index bd47dd8e7e..76d9d6b9e5 100644 --- a/inc/extensions/ext-ranking.php +++ b/inc/extensions/ext-ranking.php @@ -65,7 +65,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index f6a902d5af..d8e8dc61b9 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -80,7 +80,7 @@ switch (getExtensionMode()) { addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='sponsor' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_menu` SET `active`='Y' WHERE active='N'"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_sponsor_registry` SET `is_active`='Y' WHERE `is_active`='N'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module` IN ('sponsor','sponsor_confirm','sponsor_ref') LIMIT 3"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module` IN ('sponsor','sponsor_confirm','sponsor_ref') LIMIT 3"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index df59c379a1..7af96ea7d0 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -78,7 +78,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `action`='surfbar' LIMIT 5"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='Y' WHERE `module`='surfbar' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='Y' WHERE `module`='surfbar' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-teams.php b/inc/extensions/ext-teams.php index 5b603a6fea..f2a83a098d 100644 --- a/inc/extensions/ext-teams.php +++ b/inc/extensions/ext-teams.php @@ -64,7 +64,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/extensions/ext-yacy.php b/inc/extensions/ext-yacy.php index 649a217c29..663eea5fe9 100644 --- a/inc/extensions/ext-yacy.php +++ b/inc/extensions/ext-yacy.php @@ -64,7 +64,7 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); + //addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`admin_only`='N',`mem_only`='N' WHERE `module`='foo' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension diff --git a/inc/filters.php b/inc/filters.php index 0cd2a06191..33dbf565e8 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -1223,7 +1223,7 @@ function FILTER_ACTIVATE_EXCHANGE () { // Check total amount of users if (getTotalConfirmedUser() >= getActivateXchange()) { // Activate System - addSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`hidden`='N',`mem_only`='Y' WHERE `module`='order' LIMIT 1"); + addSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N',`mem_only`='Y' WHERE `module`='order' LIMIT 1"); addSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2"); // Run SQLs diff --git a/inc/language/mods_de.php b/inc/language/mods_de.php index 0c8d156ecf..e5d4a75cfa 100644 --- a/inc/language/mods_de.php +++ b/inc/language/mods_de.php @@ -45,7 +45,6 @@ addMessages(array( 'ADMIN_MODS_NAME' => "Modulname", 'ADMIN_MODS_TITLE' => "Modultitel", 'ADMIN_MODS_IS_LOCKED' => "Gesperrt", - 'ADMIN_MODS_IS_HIDDEN' => "Verdeckt", 'ADMIN_MODS_IS_ADMIN' => "Nur Admin", 'ADMIN_MODS_IS_MEMBER' => "Nur Mitglied", 'ADMIN_MODS_CLICKS' => "Modulklicks", diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php index 5daebb5d1f..5c9b3573c8 100644 --- a/inc/loader/load-modules.php +++ b/inc/loader/load-modules.php @@ -62,7 +62,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i // Rewrite some parts foreach ($modArray['module'] as $key => $mod) { // Default without sql_patches - $entries = array('id','title','locked','hidden','admin_only','mem_only'); + $entries = array('id', 'title', 'locked', 'admin_only', 'mem_only'); // Is ext-sql_patches newer or equal 0.3.6? if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) { @@ -98,7 +98,6 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i `module`, `title`, `locked`, - `hidden`, `admin_only`, `title`, `mem_only`, @@ -114,7 +113,6 @@ ORDER BY `module`, `title`, `locked`, - `hidden`, `admin_only`, `title`, `mem_only` diff --git a/inc/module-functions.php b/inc/module-functions.php index 49845ac804..9665a078b1 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -140,7 +140,15 @@ function isModuleRegistered ($module) { } elseif (!isExtensionActive('cache')) { // Check for module in database //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using database.'); - $result = sqlQueryEscaped("SELECT `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", + $result = sqlQueryEscaped("SELECT + `locked`, + `admin_only`, + `mem_only` +FROM + `{?_MYSQL_PREFIX?}_mod_reg` +WHERE + `module`='%s' +LIMIT 1", array($module), __FUNCTION__, __LINE__); if (sqlNumRows($result) == 1) { // Read data @@ -175,15 +183,6 @@ function isModuleLocked ($module) { return $return; } -// Checks whether the given module is hidden by just checking the cache -function isModuleHidden ($module) { - // Determine if there a cache entry and is it set - $return = ((isset($GLOBALS['cache_array']['modules']['hidden'][$module])) && ($GLOBALS['cache_array']['modules']['hidden'][$module] == 'Y')); - - // Return determined value - return $return; -} - // Checks whether the given module is mem_only by just checking the cache function isModuleMemberOnly ($module) { // Determine if there a cache entry and is it set @@ -266,10 +265,9 @@ function checkModulePermissions ($module = '') { setModuleStatus($module_chk, 'admin_only'); } else { // @TODO Nothing helped??? - logDebugMessage(__FUNCTION__, __LINE__, sprintf('ret=%s,locked=%d,hidden=%d,mem=%d,admin=%d', + logDebugMessage(__FUNCTION__, __LINE__, sprintf('ret=%s,locked=%d,mem=%d,admin=%d', getModuleStatus($module_chk), intval(isModuleLocked($module_chk)), - intval(isModuleHidden($module_chk)), intval(isModuleMemberOnly($module_chk)), intval(isModuleAdminOnly($module_chk)) )); @@ -287,15 +285,15 @@ function checkModulePermissions ($module = '') { * hour to find a loop here... *sigh* */ sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` -(`module`, `locked`, `hidden`, `mem_only`, `admin_only`, `has_menu`) +(`module`, `locked`, `mem_only`, `admin_only`, `has_menu`) VALUES -('%s','Y','N','N','N','N')", array($module_chk), __FUNCTION__, __LINE__); +('%s','Y'','N','N','N')", array($module_chk), __FUNCTION__, __LINE__); } else { // Wrong/missing sql_patches! sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` -(`module`, `locked`, `hidden`, `mem_only`, `admin_only`) +(`module`, `locked`, `mem_only`, `admin_only`) VALUES -('%s','Y','N','N','N')", array($module_chk), __FUNCTION__, __LINE__); +('%s','Y','N','N')", array($module_chk), __FUNCTION__, __LINE__); } // Everthing is fine? @@ -323,11 +321,10 @@ VALUES rebuildCache('modules', 'modules'); } elseif ($found === FALSE) { // Problem with module detected - logDebugMessage(__FUNCTION__, __LINE__, sprintf('Problem in module %s detected. getModuleStatus()=%s,locked=%d,hidden=%d,mem=%d,admin=%d,output_mode=%s', + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Problem in module %s detected. getModuleStatus()=%s,isModuleLocked()=%d,mem=%d,admin=%d,output_mode=%s', $module_chk, getModuleStatus($module_chk), intval(isModuleLocked($module_chk)), - intval(isModuleHidden($module_chk)), intval(isModuleMemberOnly($module_chk)), intval(isModuleAdminOnly($module_chk)), getScriptOutputMode() @@ -397,13 +394,12 @@ function addModuleSql ($module, $title, $locked, $hidden, $adminOnly, $memOnly) // Is the module already registered? if (!isModuleRegistered($module)) { // Add it - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only`) VALUES ('" . $module . "', '" . $title . "', '" . $locked . "', '" . $hidden . "', '" . $adminOnly . "', '" . $memOnly . "')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `title`, `locked`, `admin_only`, `mem_only`) VALUES ('" . $module . "', '" . $title . "', '" . $locked . "', '" . $adminOnly . "', '" . $memOnly . "')"); } else { // Already registered - logDebugMessage(__FUNCTION__, __LINE__, sprintf('Already registered: module=%s,locked=%s,hidden=%s,admin=%s,mem=%s', + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Already registered: module=%s,locked=%s,admin=%s,mem=%s', $module, $locked, - $hidden, $adminOnly, $memOnly )); diff --git a/inc/modules/admin/what-list_mods.php b/inc/modules/admin/what-list_mods.php index e6fd6943e1..38ee36972a 100644 --- a/inc/modules/admin/what-list_mods.php +++ b/inc/modules/admin/what-list_mods.php @@ -53,7 +53,18 @@ if (isFormSent('edit')) { foreach (postRequestElement('sel') as $id => $sel) { // Load module data // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function - $result = sqlQueryEscaped("SELECT `id`, `module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1", + $result = sqlQueryEscaped('SELECT + `id`, + `module`, + `title`, + `locked`, + `admin_only`, + `mem_only` +FROM + `{?_MYSQL_PREFIX?}_mod_reg` +WHERE + `id`=%s +LIMIT 1', array(bigintval($id)), __FILE__, __LINE__); // Load data @@ -64,7 +75,6 @@ if (isFormSent('edit')) { // Prepare array for the template $content['locked'] = addSelectionBox('yn', $content['locked'] , 'locked', $id); - $content['hidden'] = addSelectionBox('yn', $content['hidden'] , 'hidden', $id); $content['admin_only'] = addSelectionBox('yn', $content['admin_only'], 'admin' , $id); $content['mem_only'] = addSelectionBox('yn', $content['mem_only'] , 'member', $id); @@ -97,7 +107,6 @@ if (isFormSent('edit')) { SET `title`='%s', `locked`='%s', - `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE @@ -106,7 +115,6 @@ LIMIT 1", array( postRequestElement('title', $id), postRequestElement('locked', $id), - postRequestElement('hidden', $id), postRequestElement('admin', $id), postRequestElement('member', $id), $id @@ -126,7 +134,12 @@ LIMIT 1", if (!ifPostContainsSelections()) { // Load module data (We do not need to check if there's at least one...) $result = sqlQuery('SELECT - `id`, `module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only` + `id`, + `module`, + `locked`, + `admin_only`, + `title`, + `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` ORDER BY diff --git a/install/tables.sql b/install/tables.sql index 9ceee334fc..aa034d0308 100644 --- a/install/tables.sql +++ b/install/tables.sql @@ -94,7 +94,6 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_mod_reg` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `module` VARCHAR(50) NOT NULL DEFAULT '', `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y', - `hidden` ENUM('Y','N') NOT NULL DEFAULT 'N', `admin_only` ENUM('Y','N') NOT NULL DEFAULT 'N', `title` VARCHAR(255) NOT NULL DEFAULT '', `mem_only` ENUM('Y','N') NOT NULL DEFAULT 'N', @@ -186,16 +185,16 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_jackpot` ( INSERT INTO `{?_MYSQL_PREFIX?}_config` (`config`) VALUES (0); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('admin','N','N','Y','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('chk_login','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('confirm','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('css','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('frametester','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('index','N','N','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('js','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('loader','N','Y','N','','N'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('login','N','N','N','','Y'); -INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `hidden`, `admin_only`, `title`, `mem_only`) VALUES ('ref','N','Y','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('admin','N','Y','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('chk_login','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('confirm','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('css','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('frametester','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('index','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('js','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('loader','N','N','','N'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('login','N','N','','Y'); +INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg` (`module`, `locked`, `admin_only`, `title`, `mem_only`) VALUES ('ref','N','N','','N'); INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`, `percents`) VALUES (0,100); INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`, `percents`) VALUES (1,30); diff --git a/templates/de/html/admin/admin_edit_mods.tpl b/templates/de/html/admin/admin_edit_mods.tpl index 490a1a4be7..eac7dfc272 100644 --- a/templates/de/html/admin/admin_edit_mods.tpl +++ b/templates/de/html/admin/admin_edit_mods.tpl @@ -2,7 +2,7 @@ {%form,formMethodPost=modules.php?module=admin&what=list_mods%} - @@ -11,7 +11,6 @@ - @@ -19,7 +18,7 @@ $content - diff --git a/templates/de/html/admin/admin_edit_mods_row.tpl b/templates/de/html/admin/admin_edit_mods_row.tpl index d870a05a04..4ffeee32f1 100644 --- a/templates/de/html/admin/admin_edit_mods_row.tpl +++ b/templates/de/html/admin/admin_edit_mods_row.tpl @@ -8,9 +8,6 @@ - diff --git a/templates/de/html/admin/admin_list_mods.tpl b/templates/de/html/admin/admin_list_mods.tpl index 524c6bc1a2..91454d3222 100644 --- a/templates/de/html/admin/admin_list_mods.tpl +++ b/templates/de/html/admin/admin_list_mods.tpl @@ -2,7 +2,7 @@ {%form,formMethodPost=modules.php?module=admin&what=list_mods%}
+ {--ADMIN_MODS_EDIT_TITLE--}
{--ADMIN_MODS_NAME--} {--ADMIN_MODS_TITLE--} {--ADMIN_MODS_IS_LOCKED--}{--ADMIN_MODS_IS_HIDDEN--} {--ADMIN_MODS_IS_ADMIN--} {--ADMIN_MODS_IS_MEMBER--}
$content[locked] - $content[hidden] - $content[admin_only]
- @@ -12,7 +12,6 @@ - @@ -20,7 +19,7 @@ $content - diff --git a/templates/de/html/admin/admin_list_mods_row.tpl b/templates/de/html/admin/admin_list_mods_row.tpl index 1dc0b3cf00..d958343d65 100644 --- a/templates/de/html/admin/admin_list_mods_row.tpl +++ b/templates/de/html/admin/admin_list_mods_row.tpl @@ -11,9 +11,6 @@ - -- 2.39.5
+ {--ADMIN_LIST_MODS_TITLE--}
{--ADMIN_MODS_NAME--} {--ADMIN_MODS_TITLE--} {--ADMIN_MODS_IS_LOCKED--}{--ADMIN_MODS_IS_HIDDEN--} {--ADMIN_MODS_IS_ADMIN--} {--ADMIN_MODS_IS_MEMBER--}
{%pipe,translateYesNo=$content[locked]%} - {%pipe,translateYesNo=$content[hidden]%} - {%pipe,translateYesNo=$content[admin_only]%}