From 9d81813f782e6e9edf693eabcc73e5ce4660aee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 16 Sep 2008 17:44:21 +0000 Subject: [PATCH] Obsolete templates removed, surfbar fixed (admin add, userid not used) --- .gitattributes | 5 - inc/databases.php | 2 +- inc/libs/surfbar_functions.php | 8 +- inc/modules/admin/what-admins_contact.php | 98 ------------------- inc/modules/admin/what-cache_stats.php | 12 ++- .../de/emails/admins_mail_contact_admin.tpl | 16 --- .../de/emails/admins_msg_contact_admin.tpl | 16 --- .../html/admin/admin_admins_contact_form.tpl | 33 ------- .../html/member/member_support_contacted.tpl | 20 ---- 9 files changed, 12 insertions(+), 198 deletions(-) delete mode 100644 inc/modules/admin/what-admins_contact.php delete mode 100644 templates/de/emails/admins_mail_contact_admin.tpl delete mode 100644 templates/de/emails/admins_msg_contact_admin.tpl delete mode 100644 templates/de/html/admin/admin_admins_contact_form.tpl delete mode 100644 templates/de/html/member/member_support_contacted.tpl diff --git a/.gitattributes b/.gitattributes index 12f352f3c8..9fb971a6f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -272,7 +272,6 @@ inc/modules/admin/what-add_surfbar_url.php -text inc/modules/admin/what-admin_add.php -text inc/modules/admin/what-adminedit.php -text inc/modules/admin/what-admins_add.php -text -inc/modules/admin/what-admins_contact.php -text inc/modules/admin/what-admins_contct.php -text inc/modules/admin/what-admins_edit.php -text inc/modules/admin/what-admins_mails.php -text @@ -634,9 +633,7 @@ templates/de/emails/admin/admin_wernis_request.tpl -text templates/de/emails/admins/.htaccess -text templates/de/emails/admins/admins_mail_contct_admin.tpl -text templates/de/emails/admins/admins_msg_contct_admin.tpl -text -templates/de/emails/admins_mail_contact_admin.tpl -text templates/de/emails/admins_mail_contct_admin.tpl -text -templates/de/emails/admins_msg_contact_admin.tpl -text templates/de/emails/admins_msg_contct_admin.tpl -text templates/de/emails/back-admin.tpl -text templates/de/emails/back-member.tpl -text @@ -756,7 +753,6 @@ templates/de/html/admin/admin_add_surfbar_url.tpl -text templates/de/html/admin/admin_admin_add.tpl -text templates/de/html/admin/admin_admins_add.tpl -text templates/de/html/admin/admin_admins_add_acl.tpl -text -templates/de/html/admin/admin_admins_contact_form.tpl -text templates/de/html/admin/admin_admins_contct_default.tpl -text templates/de/html/admin/admin_admins_contct_form.tpl -text templates/de/html/admin/admin_admins_contct_select.tpl -text @@ -1298,7 +1294,6 @@ templates/de/html/member/member_reflinks_row.tpl -text templates/de/html/member/member_reflinks_table.tpl -text templates/de/html/member/member_stats_row.tpl -text templates/de/html/member/member_stats_table.tpl -text -templates/de/html/member/member_support_contacted.tpl -text templates/de/html/member/member_support_contcted.tpl -text templates/de/html/member/member_support_form.tpl -text templates/de/html/member/member_surfbar_book_dynamic.tpl -text diff --git a/inc/databases.php b/inc/databases.php index cd82d19dd9..f62d148d50 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "340"); +define('CURR_SVN_REVISION', "341"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 7df9fd5b81..ec045622f3 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -53,7 +53,7 @@ function SURFBAR_ADMIN_ADD_URL ($url) { } elseif (SURFBAR_LOOKUP_BY_URL($url, "0")) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS("0")) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more allowed! return false; } @@ -110,7 +110,7 @@ function SURFBAR_MEMBER_ADD_URL ($url) { } elseif (SURFBAR_LOOKUP_BY_URL($url, $GLOBALS['userid'])) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($GLOBALS['userid'])) { // No more allowed! return false; } @@ -413,8 +413,8 @@ WHERE userid NOT IN (".implode(",", $UIDs).") AND status='%s'", function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { global $_CONFIG; - // Simply check it out - return (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order']); + // Is this admin and userid is zero or does the user has some URLs left to book? + return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order'])); } // Get total amount of URLs of given status for current user function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) { diff --git a/inc/modules/admin/what-admins_contact.php b/inc/modules/admin/what-admins_contact.php deleted file mode 100644 index 146e16fd19..0000000000 --- a/inc/modules/admin/what-admins_contact.php +++ /dev/null @@ -1,98 +0,0 @@ - - ".ADMINS_SELECT_CONTACT_TYPE." - -  - -  ".ADMINS_CONTACT_TYPE_MAIL." -   -  ".ADMINS_CONTACT_TYPE_MSG." -"); - } - else - { - // Outout hidden input - define('ADMINS_MESSAGING_SELECTION', " - - ".ADMINS_CONTACT_DEFAULT_MAIL." - - -"); - } - LOAD_TEMPLATE("admin_admins_contact_form"); -} - else -{ - // Please select an admin! - LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_SELECT_ADMIN); -} -// -?> diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index 121f202bde..ee2f431796 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -40,12 +40,14 @@ if ((!defined('__SECURITY')) || (!is_admin())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); +// Calculate total hits +$totalHits = ($_CONFIG['db_hits'] + $_CONFIG['cache_hits']); + // Prepare data for the template -define('__DB_HITS' , $_CONFIG['db_hits']); -$HITS = str_repeat(" ", abs(strlen($_CONFIG['db_hits']) - strlen($_CONFIG['cache_hits']))).$_CONFIG['cache_hits']; -define('__CACHE_HITS', $HITS); -define('__TOTAL_HITS', ($_CONFIG['db_hits'] + $_CONFIG['cache_hits'])); -define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / __TOTAL_HITS * 100))); +define('__DB_HITS' , TRANSLATE_COMMA($_CONFIG['db_hits'])); +define('__CACHE_HITS', TRANSLATE_COMMA($_CONFIG['cache_hits'])); +define('__TOTAL_HITS', TRANSLATE_COMMA($totalHits)); +define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / $totalHits * 100))); // Load template LOAD_TEMPLATE("admin_cache_stats"); diff --git a/templates/de/emails/admins_mail_contact_admin.tpl b/templates/de/emails/admins_mail_contact_admin.tpl deleted file mode 100644 index 24403f21bb..0000000000 --- a/templates/de/emails/admins_mail_contact_admin.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{--HELLO_ADMIN--}, - -ein anderer Administrator hat Ihnen soeben eine Mail geschickt! - ------------------------------------- -$content ------------------------------------- -IP-Nummer: $REMOTE_ADDR ------------------------------------- -Browser: $HTTP_USER_AGENT ------------------------------------- - -Mit freundlichem Gruss, - Ihr {!MAIN_TITLE!} Script - -{!URL!}/admin.php diff --git a/templates/de/emails/admins_msg_contact_admin.tpl b/templates/de/emails/admins_msg_contact_admin.tpl deleted file mode 100644 index 0a22a9f1b0..0000000000 --- a/templates/de/emails/admins_msg_contact_admin.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{--HELLO_ADMIN--}, - -ein anderer Administrator hat Ihnen soeben eine Nachricht in Ihren Account geschickt! - ------------------------------------- -$content ------------------------------------- -IP-Nummer: $REMOTE_ADDR ------------------------------------- -Browser: $HTTP_USER_AGENT ------------------------------------- - -Mit freundlichem Gruss, - Ihr {!MAIN_TITLE!} Script - -{!URL!}/admin.php diff --git a/templates/de/html/admin/admin_admins_contact_form.tpl b/templates/de/html/admin/admin_admins_contact_form.tpl deleted file mode 100644 index 8235f0a71c..0000000000 --- a/templates/de/html/admin/admin_admins_contact_form.tpl +++ /dev/null @@ -1,33 +0,0 @@ -
- - - - - - - - - - - - - - - - {--ADMINS_MESSAGING_SELECTION--} - - - - - - - - -
{--ADMINS_ADMIN_ID--}: {!__ADMIN!}
 
{--ADMINS_ENTER_CONTACT_TEXT--}:
- -
 
 
-
diff --git a/templates/de/html/member/member_support_contacted.tpl b/templates/de/html/member/member_support_contacted.tpl deleted file mode 100644 index 05fb519a51..0000000000 --- a/templates/de/html/member/member_support_contacted.tpl +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - -
 
Vielen Dank, dass Sie uns kontaktiert haben!
 
Einer unserer - Mitarbeiter wird sich um Ihr Anliegen kümmern.
 
-- 2.39.5