From e3701377bd1dcae6ac39265f8c1bdd8d0fed7911 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 4 Mar 2009 20:16:41 +0000 Subject: [PATCH] Area 'modify' added to all extensions, some fixes for installing/modifying extension --- inc/extensions.php | 12 +++++------- inc/extensions/ext- | 3 +++ inc/extensions/ext-active.php | 3 +++ inc/extensions/ext-admins.php | 3 +++ inc/extensions/ext-admintheme1.php | 3 +++ inc/extensions/ext-admintheme_default.php | 3 +++ inc/extensions/ext-autopurge.php | 3 +++ inc/extensions/ext-bank.php | 3 +++ inc/extensions/ext-beg.php | 3 +++ inc/extensions/ext-birthday.php | 3 +++ inc/extensions/ext-bonus.php | 3 +++ inc/extensions/ext-booking.php | 3 +++ inc/extensions/ext-cache.php | 3 +++ inc/extensions/ext-country.php | 3 +++ inc/extensions/ext-debug.php | 3 +++ inc/extensions/ext-demo.php | 3 +++ inc/extensions/ext-doubler.php | 3 +++ inc/extensions/ext-events.php | 3 +++ inc/extensions/ext-holiday.php | 3 +++ inc/extensions/ext-html_mail.php | 3 +++ inc/extensions/ext-iso3166.php | 3 +++ inc/extensions/ext-logs.php | 3 +++ inc/extensions/ext-mailid.php | 3 +++ inc/extensions/ext-maintenance.php | 3 +++ inc/extensions/ext-mediadata.php | 3 +++ inc/extensions/ext-mods.php | 3 +++ inc/extensions/ext-mydata.php | 3 +++ inc/extensions/ext-network.php | 3 +++ inc/extensions/ext-newsletter.php | 3 +++ inc/extensions/ext-nickname.php | 3 +++ inc/extensions/ext-online.php | 3 +++ inc/extensions/ext-optimize.php | 3 +++ inc/extensions/ext-order.php | 3 +++ inc/extensions/ext-other.php | 3 +++ inc/extensions/ext-payout.php | 3 +++ inc/extensions/ext-primera.php | 3 +++ inc/extensions/ext-profile.php | 3 +++ inc/extensions/ext-rallye.php | 3 +++ inc/extensions/ext-refback.php | 3 +++ inc/extensions/ext-register.php | 3 +++ inc/extensions/ext-removeip.php | 3 +++ inc/extensions/ext-repair.php | 3 +++ inc/extensions/ext-rewrite.php | 3 +++ inc/extensions/ext-safe.php | 3 +++ inc/extensions/ext-sponsor.php | 3 +++ inc/extensions/ext-sql_patches.php | 3 +++ inc/extensions/ext-support.php | 3 +++ inc/extensions/ext-surfbar.php | 3 +++ inc/extensions/ext-task.php | 3 +++ inc/extensions/ext-theme.php | 3 +++ inc/extensions/ext-top10.php | 3 +++ inc/extensions/ext-transfer.php | 3 +++ inc/extensions/ext-usage.php | 3 +++ inc/extensions/ext-user.php | 3 +++ inc/extensions/ext-wernis.php | 3 +++ inc/extensions/ext-yoomedia.php | 3 +++ inc/mysql-manager.php | 2 ++ 57 files changed, 172 insertions(+), 7 deletions(-) diff --git a/inc/extensions.php b/inc/extensions.php index 7e8fb37f89..b2bca3ea6e 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -52,14 +52,12 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run return false; } // END - if - // Construct FQFN for extension file - $FQFN = sprintf("%sinc/extensions/ext-%s.php", - constant('PATH'), - $ext_name - ); + // Construct include filename and FQFN for extension file + $INC = sprintf("inc/extensions/ext-%s.php", $ext_name); + $FQFN = constant('PATH') . $INC; // Is the extension file NOT there? - if (!FILE_READABLE($FQFN)) { + if (!INCLUDE_READABLE($INC)) { // Debug message DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension %s not found.", $ext_name)); @@ -103,7 +101,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run // Include the extension file //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded."); - require_once($FQFN); + require($FQFN); // Is this extension deprecated? if (EXT_GET_DEPRECATED() == "Y") { diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 99656500aa..988a032b79 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -73,6 +73,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index e73ff6a9b4..74783b617d 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -128,6 +128,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index e588777427..f4757e4047 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -303,6 +303,9 @@ PRIMARY KEY (id) } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index a35e08fb67..e7f3f7ff22 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -78,6 +78,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index f82bdfb1c6..c0ab77a5e7 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -78,6 +78,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 006c3c8351..802e9a1d5c 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -246,6 +246,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index b245c1595a..0bd94d1f8d 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -181,6 +181,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index d6c3c1935c..2b53a44fce 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -255,6 +255,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index b6a45dbf3c..2f46110ffc 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -186,6 +186,9 @@ CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 5db31d82ec..49404628a5 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -539,6 +539,9 @@ WHERE last_online < ".$mark." ORDER BY userid"); } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index f32143f462..b1378a752f 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -86,6 +86,9 @@ case "deactivate": // Do stuff when admin deactivates this extension ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); break; +case "modify": // When the extension got modified + break; + case "update": // Update an extension switch ($EXT_VER) { diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index a1ecd0f022..16300c142e 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -235,6 +235,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index c4a86d32de..060af0e63f 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -107,6 +107,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 6ced58c3ad..ae191d87aa 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -162,6 +162,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index 1a6594664e..20af1378f0 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -75,6 +75,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 3e1b249ca7..c53dce8fb1 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -231,6 +231,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index 2e198e1751..8852716da9 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -74,6 +74,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 7bb73f7402..6f898ed997 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -219,6 +219,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index 5c379b6ba5..7f157c7ff2 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -127,6 +127,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-iso3166.php b/inc/extensions/ext-iso3166.php index 42c0303304..04607497be 100644 --- a/inc/extensions/ext-iso3166.php +++ b/inc/extensions/ext-iso3166.php @@ -327,6 +327,9 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 2034458ad0..66e070882d 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -76,6 +76,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index 0c5ea26c78..c2211d707d 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -230,6 +230,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 35e9a7fe43..053e068f5e 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -101,6 +101,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index b8f6145a49..2c383cb343 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -132,6 +132,9 @@ Bitte stellen Sie diesen derzeit manuell unter templates/".GET_LANG } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index 693893facf..98ed38a6a0 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -97,6 +97,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index 67d153338c..810fc367db 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -315,6 +315,9 @@ PRIMARY KEY(id) } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 90b7fc15f1..4c2131c6e9 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -91,6 +91,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index ebf4f3bd14..f86c9ccd2d 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -105,6 +105,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index ef2931d80b..817bf8ad7f 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -152,6 +152,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index e342b606ce..4935aa90cd 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -74,6 +74,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 1157f574d5..742a39b406 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -411,6 +411,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index fa7969499b..545b10f258 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -725,6 +725,9 @@ PRIMARY KEY (`filter_id`) } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index 172bc301aa..d983b32c7a 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -125,6 +125,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 81b2130a05..70ab262f24 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -222,6 +222,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index a53f966784..2566354321 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -234,6 +234,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 4ad35051a3..d5cc37660b 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -149,6 +149,9 @@ INDEX (`theme_active`) } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index ddfbcd3670..38c6a11100 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -133,6 +133,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index e952879c1d..57e004a5ef 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -273,6 +273,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index f38482a40a..b4feac2a8d 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -76,6 +76,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 159c046263..7cc575b566 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -252,6 +252,9 @@ PRIMARY KEY(`id`) } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index c197471bab..db288ccae6 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -143,6 +143,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index d9720a0bad..b872a0d26e 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -105,6 +105,9 @@ case "update": // Update an extension } break; +case "modify": // When the extension got modified + break; + case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index e2bfccdb25..0f5051ae0c 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -2140,6 +2140,7 @@ function GET_SQLS () { // Add an SQL to the list function ADD_SQL ($sql) { + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("sql=%s, count=%d", $sql, COUNT_SQLS())); $GLOBALS['sqls'][] = (string) $sql; } @@ -2157,6 +2158,7 @@ function COUNT_SQLS () { if (IS_SQLS_INITIALIZED()) { // Then count it $count = count($GLOBALS['sqls']); + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("count=%d", $count)); } // END - if // Return it -- 2.39.2