From e5527fd38a6585c8466dc28d013f12d21eb7c07a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 29 Jul 2013 23:26:07 +0000 Subject: [PATCH] Rewrote some parts: - more double quotes converted to single (speed up) - introduced isThemeReadable() - Other minor rewrites --- .gitattributes | 1 + inc/config-functions.php | 2 +- inc/expression-functions.php | 2 +- inc/extensions-functions.php | 12 +++--- inc/extensions/ext-active.php | 2 +- inc/extensions/ext-admins.php | 2 +- inc/extensions/ext-admintheme1.php | 2 +- inc/extensions/ext-admintheme_default.php | 2 +- inc/extensions/ext-alert.php | 2 +- inc/extensions/ext-announcement.php | 2 +- inc/extensions/ext-autopurge.php | 2 +- inc/extensions/ext-autoreg.php | 2 +- inc/extensions/ext-bank.php | 2 +- inc/extensions/ext-beg.php | 2 +- inc/extensions/ext-birthday.php | 2 +- inc/extensions/ext-bitcoins.php | 2 +- inc/extensions/ext-blacklist.php | 2 +- inc/extensions/ext-bonus.php | 2 +- inc/extensions/ext-booking.php | 2 +- inc/extensions/ext-cache.php | 2 +- inc/extensions/ext-clickbanner.php | 2 +- inc/extensions/ext-country.php | 2 +- inc/extensions/ext-coupon.php | 2 +- inc/extensions/ext-cprping.php | 2 +- inc/extensions/ext-cron.php | 2 +- inc/extensions/ext-currency.php | 2 +- inc/extensions/ext-debug.php | 2 +- inc/extensions/ext-demo.php | 2 +- inc/extensions/ext-doubler.php | 2 +- inc/extensions/ext-earning.php | 2 +- inc/extensions/ext-events.php | 2 +- inc/extensions/ext-forced.php | 2 +- inc/extensions/ext-geoip.php | 2 +- inc/extensions/ext-grade.php | 2 +- inc/extensions/ext-holiday.php | 2 +- inc/extensions/ext-html_mail.php | 2 +- inc/extensions/ext-imprint.php | 2 +- inc/extensions/ext-jackpot.php | 2 +- inc/extensions/ext-lead.php | 2 +- inc/extensions/ext-logs.php | 2 +- inc/extensions/ext-mailid.php | 2 +- inc/extensions/ext-maintenance.php | 2 +- inc/extensions/ext-mediadata.php | 2 +- inc/extensions/ext-menu.php | 2 +- inc/extensions/ext-mods.php | 2 +- inc/extensions/ext-mydata.php | 2 +- inc/extensions/ext-network.php | 2 +- inc/extensions/ext-newsletter.php | 2 +- inc/extensions/ext-nickname.php | 2 +- inc/extensions/ext-online.php | 2 +- inc/extensions/ext-optimize.php | 2 +- inc/extensions/ext-order.php | 2 +- inc/extensions/ext-other.php | 2 +- inc/extensions/ext-partner.php | 2 +- inc/extensions/ext-payout.php | 2 +- inc/extensions/ext-politician-stop.php | 2 +- inc/extensions/ext-profile.php | 2 +- inc/extensions/ext-rallye.php | 2 +- inc/extensions/ext-ranking.php | 2 +- inc/extensions/ext-refback.php | 2 +- inc/extensions/ext-refsell.php | 2 +- inc/extensions/ext-register.php | 2 +- inc/extensions/ext-removeip.php | 2 +- inc/extensions/ext-repair.php | 2 +- inc/extensions/ext-report.php | 2 +- inc/extensions/ext-rewrite.php | 2 +- inc/extensions/ext-safe.php | 2 +- inc/extensions/ext-seo.php | 2 +- inc/extensions/ext-shredder.php | 2 +- inc/extensions/ext-signup.php | 2 +- inc/extensions/ext-sponsor.php | 2 +- inc/extensions/ext-sql_patches.php | 2 +- inc/extensions/ext-support.php | 2 +- inc/extensions/ext-surfbar.php | 2 +- inc/extensions/ext-task.php | 2 +- inc/extensions/ext-teams.php | 2 +- inc/extensions/ext-terms.php | 2 +- inc/extensions/ext-theme.php | 2 +- inc/extensions/ext-timezone.php | 2 +- inc/extensions/ext-top10.php | 2 +- inc/extensions/ext-transaction.php | 2 +- inc/extensions/ext-transfer.php | 2 +- inc/extensions/ext-uberwach.php | 2 +- inc/extensions/ext-update.php | 2 +- inc/extensions/ext-usage.php | 2 +- inc/extensions/ext-user.php | 2 +- inc/extensions/ext-validator.php | 2 +- inc/extensions/ext-wernis.php | 7 ++- inc/extensions/ext-yacy.php | 2 +- inc/extensions/ext-yoomedia.php | 2 +- inc/filter/theme_filter.php | 2 +- inc/fix_menu.php | 2 +- inc/functions.php | 36 ++++++++++------ inc/handler.php | 2 +- inc/language/theme_de.php | 1 + inc/libs/admins_functions.php | 2 +- inc/libs/refback_functions.php | 2 +- inc/libs/theme_functions.php | 13 +++--- inc/modules/admin.php | 4 +- inc/modules/admin/what-list_yoomedia_tm.php | 2 +- inc/modules/admin/what-theme_edit.php | 43 ++++++++++--------- inc/modules/guest/what-stats.php | 2 +- inc/mysql-manager.php | 6 +-- inc/template-functions.php | 4 +- inc/wrapper-functions.php | 6 +-- .../html/admin/admin_edit_theme_row_404.tpl | 23 ++++++++++ 106 files changed, 193 insertions(+), 151 deletions(-) create mode 100644 templates/de/html/admin/admin_edit_theme_row_404.tpl diff --git a/.gitattributes b/.gitattributes index 813cd72c83..af7a7ce1b4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1429,6 +1429,7 @@ templates/de/html/admin/admin_edit_surfbar_urls.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_surfbar_urls_row.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_theme.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_theme_row.tpl svneol=native#text/plain +templates/de/html/admin/admin_edit_theme_row_404.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_user.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_user_subids.tpl svneol=native#text/plain templates/de/html/admin/admin_edit_user_subids_row.tpl svneol=native#text/plain diff --git a/inc/config-functions.php b/inc/config-functions.php index 03ad13e7ac..29c0a7a2e1 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -305,7 +305,7 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0' // Update mode set? if (!empty($updateMode)) { // Update entry - $SQL .= sprintf("`%s`=`%s`%s%01.5f,", $entry, $entry, $updateMode, (float) $values[$idx]); + $SQL .= sprintf('`%s`=`%s`%s%01.5f,', $entry, $entry, $updateMode, (float) $values[$idx]); } else { // Check if string or number but no array if (is_array($values[$idx])) { diff --git a/inc/expression-functions.php b/inc/expression-functions.php index de71466a02..e25a28fd3f 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -157,7 +157,7 @@ function doExpressionExt ($data) { } // END - if // Generate replacer - $replacer = sprintf("&ext=%s&ver=%s&rev={?CURRENT_REPOSITORY_REVISION?}", $data['matches'][4][$data['key']], $replacer); + $replacer = sprintf('&ext=%s&ver=%s&rev={?CURRENT_REPOSITORY_REVISION?}', $data['matches'][4][$data['key']], $replacer); // Replace it and insert parameter for GET request $code = replaceExpressionCode($data, $replacer); diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index d842ddc163..88676dd81c 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -1100,7 +1100,7 @@ function createNewExtensionTask ($ext_name) { // Creates a task for automatically deactivated (deprecated) extension function createExtensionDeactivationTask ($ext_name) { // Create subject line - $subject = sprintf("[%s:] %s", $ext_name, '{--ADMIN_TASK_EXTENSION_DEACTIVATED_SUBJECT--}'); + $subject = sprintf('[%s:] %s', $ext_name, '{--ADMIN_TASK_EXTENSION_DEACTIVATED_SUBJECT--}'); // Get task id $taskId = determineTaskIdBySubject($subject); @@ -1618,7 +1618,7 @@ function getExtensionSqls () { // Output debug backtrace if not found (SHOULD NOT HAPPEN!) if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { // Not found, should not happen - reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", + reportBug(__FUNCTION__, __LINE__, sprintf('ext_sqls is empty, current extension: %s', getCurrentExtensionName() )); } // END - if @@ -1632,7 +1632,7 @@ function countExtensionSqls () { // Output debug backtrace if not found (SHOULD NOT HAPPEN!) if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) { // Not found, should not happen - reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s", + reportBug(__FUNCTION__, __LINE__, sprintf('ext_sqls is empty, current extension: %s', getCurrentExtensionName() )); } // END - if @@ -1961,7 +1961,7 @@ function addAdminMenuSql ($action, $what, $title, $descr, $sort) { addExtensionSql($sql); } elseif (isDebugModeEnabled()) { // Double menus should be located and fixed! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double admin menu action=%s,what=%s,title=%s detected.", $action, $what, $title)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double admin menu action=%s,what=%s,title=%s detected.', $action, $what, $title)); } } @@ -1991,7 +1991,7 @@ function addGuestMenuSql ($action, $what, $title, $sort) { addExtensionSql($sql); } elseif (isDebugModeEnabled()) { // Double menus should be located and fixed! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double guest menu action=%s,what=%s,title=%s detected.", $action, $what, $title)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double guest menu action=%s,what=%s,title=%s detected.', $action, $what, $title)); } } @@ -2021,7 +2021,7 @@ function addMemberMenuSql ($action, $what, $title, $sort) { addExtensionSql($sql); } elseif (isDebugModeEnabled()) { // Double menus should be located and fixed! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double member menu action=%s,what=%s,title=%s detected.", $action, $what, $title)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double member menu action=%s,what=%s,title=%s detected.', $action, $what, $title)); } } diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 1e258f0aa8..1fbcb79605 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -139,7 +139,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index f206c8d986..943f472bc6 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -94,7 +94,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index a2b1e1b615..42cc2a5095 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -89,7 +89,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index 524510463e..c263ce446c 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -89,7 +89,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-alert.php b/inc/extensions/ext-alert.php index 7925281a33..3388c6ae3d 100644 --- a/inc/extensions/ext-alert.php +++ b/inc/extensions/ext-alert.php @@ -92,7 +92,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-announcement.php b/inc/extensions/ext-announcement.php index c811a722ad..4b20a85c11 100644 --- a/inc/extensions/ext-announcement.php +++ b/inc/extensions/ext-announcement.php @@ -88,7 +88,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index ea52ca403f..223985f942 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -93,7 +93,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-autoreg.php b/inc/extensions/ext-autoreg.php index 1a0c8ea60b..7f0102a464 100644 --- a/inc/extensions/ext-autoreg.php +++ b/inc/extensions/ext-autoreg.php @@ -87,7 +87,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 123ae857fa..c92bddc9a1 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -198,7 +198,7 @@ UNIQUE INDEX (`account_id`, `tan`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 4fd43f9172..daf32c404c 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -119,7 +119,7 @@ INDEX (`userid`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 4cd81c3d51..1c79deaf68 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -218,7 +218,7 @@ INDEX (`userid`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-bitcoins.php b/inc/extensions/ext-bitcoins.php index be6584cba0..766a16fc0e 100644 --- a/inc/extensions/ext-bitcoins.php +++ b/inc/extensions/ext-bitcoins.php @@ -93,7 +93,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-blacklist.php b/inc/extensions/ext-blacklist.php index 911ee626a0..0f7fbf6cb9 100644 --- a/inc/extensions/ext-blacklist.php +++ b/inc/extensions/ext-blacklist.php @@ -131,7 +131,7 @@ INDEX (`pool_id`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 5c2d2a2d20..316cf35568 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -128,7 +128,7 @@ INDEX (`cat_id`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 34f73f99fe..4abbcde976 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -122,7 +122,7 @@ INDEX (`userid`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 533cdcb52f..f024ebdb05 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -253,7 +253,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-clickbanner.php b/inc/extensions/ext-clickbanner.php index 776ee53f32..ad3babecc4 100644 --- a/inc/extensions/ext-clickbanner.php +++ b/inc/extensions/ext-clickbanner.php @@ -87,7 +87,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index b97533bf9b..aa357dc1e0 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -140,7 +140,7 @@ UNIQUE INDEX (`code`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-coupon.php b/inc/extensions/ext-coupon.php index 9f20be5279..970adb0fdf 100644 --- a/inc/extensions/ext-coupon.php +++ b/inc/extensions/ext-coupon.php @@ -174,7 +174,7 @@ UNIQUE INDEX (`coupon_code`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-cprping.php b/inc/extensions/ext-cprping.php index e3f03c7c0b..e72744838c 100644 --- a/inc/extensions/ext-cprping.php +++ b/inc/extensions/ext-cprping.php @@ -92,7 +92,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-cron.php b/inc/extensions/ext-cron.php index 080c19a787..fc3378638c 100644 --- a/inc/extensions/ext-cron.php +++ b/inc/extensions/ext-cron.php @@ -92,7 +92,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-currency.php b/inc/extensions/ext-currency.php index d9fed226be..07530fb47b 100644 --- a/inc/extensions/ext-currency.php +++ b/inc/extensions/ext-currency.php @@ -92,7 +92,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 243d80d765..9a3296b7ef 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -179,7 +179,7 @@ INDEX `client_log` (`client_id`, `log_id`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index a95e630b04..d29f42b401 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -89,7 +89,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index eac8bdedb8..7fb46edd03 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -96,7 +96,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-earning.php b/inc/extensions/ext-earning.php index 00563b5567..babfad80ca 100644 --- a/inc/extensions/ext-earning.php +++ b/inc/extensions/ext-earning.php @@ -133,7 +133,7 @@ INDEX (`earning_userid`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index 3d54074e83..be65f71a7c 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -88,7 +88,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-forced.php b/inc/extensions/ext-forced.php index 7ded2845a1..4ddcf364a3 100644 --- a/inc/extensions/ext-forced.php +++ b/inc/extensions/ext-forced.php @@ -109,7 +109,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-geoip.php b/inc/extensions/ext-geoip.php index 580a319390..b5822d15dd 100644 --- a/inc/extensions/ext-geoip.php +++ b/inc/extensions/ext-geoip.php @@ -92,7 +92,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-grade.php b/inc/extensions/ext-grade.php index addae42a9c..d929f09d3f 100644 --- a/inc/extensions/ext-grade.php +++ b/inc/extensions/ext-grade.php @@ -99,7 +99,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 40c517ca7f..57cf3e7803 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -113,7 +113,7 @@ INDEX (`userid`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index a044096960..88481d2968 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -123,7 +123,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index 1e09e0e0f2..763cb8cb2f 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -121,7 +121,7 @@ UNIQUE INDEX (`imprint_key`)", break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-jackpot.php b/inc/extensions/ext-jackpot.php index 879c0642ae..0249b1d42b 100644 --- a/inc/extensions/ext-jackpot.php +++ b/inc/extensions/ext-jackpot.php @@ -87,7 +87,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-lead.php b/inc/extensions/ext-lead.php index 6f00aac894..64e9870509 100644 --- a/inc/extensions/ext-lead.php +++ b/inc/extensions/ext-lead.php @@ -87,7 +87,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 57add34a7b..f291d96f8e 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -87,7 +87,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index 9c0207ae01..af69550a8a 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -249,7 +249,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index a356bec8c5..fcecac8750 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -116,7 +116,7 @@ switch (getExtensionMode()) { break; default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 1a2b99b5b3..a34d8a7605 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -157,7 +157,7 @@ Bitte stellen Sie diesen derzeit manuell unter diff --git a/inc/handler.php b/inc/handler.php index 542e66aa9d..7a4aa53c87 100644 --- a/inc/handler.php +++ b/inc/handler.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Error handler function function __errorHandler ($errno, $errstr, $errfile, $errline) { // Construct message - $message = sprintf("errno=%s(0x%s),errstr=%s,errfile=%s,errline=%s", + $message = sprintf('errno=%s(0x%s),errstr=%s,errfile=%s,errline=%s', $errno, getHexErrorCode($errno), $errstr, diff --git a/inc/language/theme_de.php b/inc/language/theme_de.php index 92c4498ed6..d9bd247ba9 100644 --- a/inc/language/theme_de.php +++ b/inc/language/theme_de.php @@ -52,6 +52,7 @@ addMessages(array( 'ADMIN_EDIT_THEME_TITLE' => "Designs ändern, Standarddesign setzen", 'ADMIN_EDIT_THEME_NOTICE' => "Durch Anklicken des Uni*-Names wird das jeweilige Theme als Standard-Theme gesetzt, welches Ihre Besucher sofort sehen werden.", 'ADMIN_IMPORT_THEMES_TITLE' => "Hochgeladene Designs importieren", + 'ADMIN_THEME_NOT_READABLE' => "Theme-Datei nicht lesbar.", // Admin - for ext-task 'ADMIN_TASK_LIST_THEME_ALL' => "Alle inst. Themes", diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index 72d64ec02a..1c43c5ec22 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -557,7 +557,7 @@ function sendAdminsEmails ($subject, $template, $content, $userid) { EVENTS_ADD_LINE($subject, $message, $userid); } else { // Log error for debug - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension 'ext-events' missing: template=%s,subj=%s,userid=%s", + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Extension ext-events missing: template=%s,subj=%s,userid=%s', $template, $subject, $userid diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 6a882d10ac..4fb906fc38 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -103,7 +103,7 @@ LIMIT 1', // Add points again, but only directly //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refbackPoints=' . $refbackPoints . ',userid=' . $userid . ',ref=' . $ref . ',refid=' . convertNullToZero($refid) . ' - REFBACK-UPDATE! (' . sqlAffectedRows() . ')'); - addPointsThroughReferralSystem(sprintf("refback:%s", $refid), $userid, $refbackPoints); + addPointsThroughReferralSystem(sprintf('refback:%s', $refid), $userid, $refbackPoints); // Reduce points if refid is found //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refid=' . $refid . ',ref=' . $ref . ' - REDUCING?'); diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index 8539bff033..74894b9956 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -77,13 +77,10 @@ ORDER BY // Load all themes while ($row = sqlFetchArray($result)) { - // Construct relative include file name - $inc = sprintf("theme/%s/theme.php", secureString($row['theme_path'])); - // Load it's theme.php file if found - if (isIncludeReadable($inc)) { + if (isThemeReadable($row['theme_path'])) { // And save all data in array - loadInclude($inc); + loadInclude(sprintf('theme/%s/theme.php', secureString($row['theme_path']))); array_push($themesArray['theme_unix'], $row['theme_path']); array_push($themesArray['theme_name'], $row['theme_name']); } // END - if @@ -250,13 +247,13 @@ function getActualTheme () { } // END - if } elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) { // Prepare filename for checking - $themeFile = sprintf("theme/%s/theme.php", getRequestElement('theme')); + $themeFile = sprintf('theme/%s/theme.php', getRequestElement('theme')); // Installation mode active - if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) { + if ((isGetRequestElementSet('theme')) && (isThemeReadable(getRequestElement('theme')))) { // Set cookie from URL data setMailerTheme(getRequestElement('theme')); - } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme')))) { + } elseif ((isPostRequestElementSet('theme')) && (isThemeReadable(postRequestElement('theme')))) { // Set cookie from posted data setMailerTheme(postRequestElement('theme')); } diff --git a/inc/modules/admin.php b/inc/modules/admin.php index bab3484705..1807ee960f 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -136,7 +136,7 @@ if (!isAdminRegistered()) { break; default: // Others will be logged - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown return code %s from ifAdminLoginDataIsValid()", $ret)); + logDebugMessage(__FILE__, __LINE__, sprintf('Unknown return code %s from ifAdminLoginDataIsValid()', $ret)); break; } // END - switch } // END - if @@ -199,7 +199,7 @@ if (!isAdminRegistered()) { $register = getRequestElement('setup'); // Special logout redirect for installation of given extension - loadTemplate(sprintf("admin_logout_%s_install", $register)); + loadTemplate(sprintf('admin_logout_%s_install', $register)); } elseif (isGetRequestElementSet('remove')) { // Secure input $remove = getRequestElement('remove'); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index e7b42518b7..37f07a08d6 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -85,7 +85,7 @@ if ((!isFilledArray($result)) || (!isset($result[0]['id']))) { $code = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($result); // Output message - loadTemplate('admin_yoomedia_error', FALSE, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(translateYooMediaError($code)))); + loadTemplate('admin_yoomedia_error', FALSE, sprintf('{--ADMIN_YOOMEDIA_ERROR_%s--}', strtoupper(translateYooMediaError($code)))); return FALSE; } diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 80808500f4..9a515415aa 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -108,26 +108,29 @@ ORDER BY if (!ifSqlHasZeroNums($result)) { while ($content = sqlFetchArray($result)) { - // Construct IFN - $inc = sprintf("theme/%s/theme.php", $content['theme_path']); - - // Load theme in test mode - loadInclude($inc); - - // Copy data from theme to content - $content['theme_url'] = $GLOBALS['theme_data']['url']; - - // Is the loaded theme name != current theme name? - $content['link'] = $content['theme_path']; - if ($content['theme_path'] != getCurrentTheme()) { - $content['link'] = '' . $content['theme_path'] . ''; - } // END - if - - // Prepare data for the row template - $content['email'] = '' . $content['theme_path'] . ''; + } // END - if + + // Prepare data for the row template + $content['email'] = '%s detected.", sqlEscapeString($do))); + reportBug(__FILE__, __LINE__, sprintf('Unsupported mode %s detected.', sqlEscapeString($do))); break; } // END - switch diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index c26a12b991..b05768a24c 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -658,7 +658,7 @@ function addMaxReceiveList ($mode, $default = '') { break; default: // Invalid! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $mode)); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Invalid mode %s detected.', $mode)); break; } @@ -1789,7 +1789,7 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') { if (isValidId($categoryId)) { // Select category $extraColumns = "LEFT JOIN `{?_MYSQL_PREFIX?}_user_cats` AS `c` ON `d`.`userid`=`c`.`userid`"; - $addWhere = sprintf(" AND `c`.`cat_id`=%s", $categoryId); + $addWhere = sprintf(' AND `c`.`cat_id`=%s', $categoryId); } // END - if // Exclude users in holiday? @@ -2188,7 +2188,7 @@ function doGenericEditEntriesConfirm ($tableName, $columns = array(), $filterFun $content = array(); // Prepare SQL for this row - $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}_%s` SET", + $sql = sprintf('UPDATE `{?_MYSQL_PREFIX?}_%s` SET', sqlEscapeString($tableName[0]) ); diff --git a/inc/template-functions.php b/inc/template-functions.php index d3419dd80a..4ec0827401 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -1497,8 +1497,8 @@ function generateExtensionInactiveNotInstalledMessage ($ext_name) { break; default: // Should not happen! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("Invalid state of extension %s detected.", $ext_name)); - $message = sprintf("Invalid state of extension %s detected.", $ext_name); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('Invalid state of extension %s detected.', $ext_name)); + $message = sprintf('Invalid state of extension %s detected.', $ext_name); break; } // END - switch diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 191b6164ca..89b6ed3c76 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -66,7 +66,7 @@ function writeToFile ($FQFN, $content, $aquireLock = FALSE) { // Is the file writeable? if ((isFileReadable($FQFN)) && (!is_writeable($FQFN)) && (!changeMode($FQFN, 0644))) { // Not writeable! - logDebugMessage(__FUNCTION__, __LINE__, sprintf("File %s not writeable or cannot change CHMOD to 0644.", basename($FQFN))); + logDebugMessage(__FUNCTION__, __LINE__, sprintf('File %s not writeable or cannot change CHMOD to 0644.', basename($FQFN))); // Failed! :( return FALSE; @@ -157,10 +157,10 @@ function merge_array ($array1, $array2, $keepIndex = FALSE) { reportBug(__FUNCTION__, __LINE__, 'No arrays provided!'); } elseif (!is_array($array1)) { // Left one is not an array - reportBug(__FUNCTION__, __LINE__, sprintf("array1 is not an array. array != %s", gettype($array1))); + reportBug(__FUNCTION__, __LINE__, sprintf('array1 is not an array. array != %s', gettype($array1))); } elseif (!is_array($array2)) { // Right one is not an array - reportBug(__FUNCTION__, __LINE__, sprintf("array2 is not an array. array != %s", gettype($array2))); + reportBug(__FUNCTION__, __LINE__, sprintf('array2 is not an array. array != %s', gettype($array2))); } // Maintain index of array2? diff --git a/templates/de/html/admin/admin_edit_theme_row_404.tpl b/templates/de/html/admin/admin_edit_theme_row_404.tpl new file mode 100644 index 0000000000..defad70334 --- /dev/null +++ b/templates/de/html/admin/admin_edit_theme_row_404.tpl @@ -0,0 +1,23 @@ + + + {--ADMIN_THEME_NOT_READABLE--} + + + $content[link] + + + $content[theme_name] + + + {%pipe,translateYesNo=$content[theme_active]%} + + + $content[email] + + + $content[theme_url] + + + v$content[theme_version] + + -- 2.39.5