Some dublicated braces removed, some fixed (broken: update depencies got registered...
authorRoland Häder <roland@mxchange.org>
Mon, 9 Mar 2009 06:14:07 +0000 (06:14 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 9 Mar 2009 06:14:07 +0000 (06:14 +0000)
22 files changed:
inc/extensions.php
inc/fatal_errors.php
inc/filters.php
inc/functions.php
inc/modules/admin.php
inc/modules/admin/what-admins_edit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_bank_package.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-list_yoomedia_tm.php
inc/modules/admin/what-payments.php
inc/stylesheet.php

index cfa4c928d4518f8609820fd0a3d8f362944be4e9..d21e3b4d13d7f2e444790782dfec42774edcf3d3 100644 (file)
@@ -266,9 +266,16 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr
                                // Remove cache file(s) if extension is active
                                runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id));
 
                                // Remove cache file(s) if extension is active
                                runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id));
 
+                               // Remove all SQL commands
+                               UNSET_SQLS();
+
                                // In normal mode return a true on success
                                $ret = true;
                        } elseif ($dry_run) {
                                // In normal mode return a true on success
                                $ret = true;
                        } elseif ($dry_run) {
+                               // Init SQLs and transfer ext->generic
+                               INIT_SQLS();
+                               SET_SQLS(GET_EXT_SQLS());
+
                                // Rewrite SQL command to keep { and } inside for dry-run
                                foreach (GET_SQLS() as $key => $sql) {
                                        $sql = str_replace('{', "&#123;", str_replace('}', "&#125;", $sql));
                                // Rewrite SQL command to keep { and } inside for dry-run
                                foreach (GET_SQLS() as $key => $sql) {
                                        $sql = str_replace('{', "&#123;", str_replace('}', "&#125;", $sql));
@@ -328,6 +335,9 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
        // Set current SQL name
        EXT_SET_CURR_NAME($ext_name);
 
        // Set current SQL name
        EXT_SET_CURR_NAME($ext_name);
 
+       // Init EXT_UPDATE_DEPENDS
+       EXT_INIT_UPDATE_DEPENDS();
+
        // Init array
        INIT_EXT_SQLS();
 
        // Init array
        INIT_EXT_SQLS();
 
@@ -338,6 +348,10 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]={EXT_GET_CURR_NAME()}");
        LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false);
 
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]={EXT_GET_CURR_NAME()}");
        LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false);
 
+       // Init these SQLs
+       INIT_SQLS();
+       SET_SQLS(GET_EXT_SQLS());
+
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":SQLs::count=".COUNT_SQLS()."");
        if ((IS_SQLS_VALID() && (COUNT_SQLS() > 0))) {
                // Run SQL commands...
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":SQLs::count=".COUNT_SQLS()."");
        if ((IS_SQLS_VALID() && (COUNT_SQLS() > 0))) {
                // Run SQL commands...
@@ -492,9 +506,6 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
                        LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run);
 
                        if (EXT_GET_UPDATE_DEPENDS() != "") {
                        LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run);
 
                        if (EXT_GET_UPDATE_DEPENDS() != "") {
-                               // Backup current SQL queries
-                               $GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()] = GET_SQLS();
-
                                // Is the extension there?
                                if (GET_EXT_VERSION(EXT_GET_UPDATE_DEPENDS()) != "") {
                                        // Update another extension first!
                                // Is the extension there?
                                if (GET_EXT_VERSION(EXT_GET_UPDATE_DEPENDS()) != "") {
                                        // Update another extension first!
@@ -503,10 +514,6 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
                                        // Register new extension
                                        $test = REGISTER_EXTENSION(EXT_GET_UPDATE_DEPENDS(), 0, $dry_run, false);
                                }
                                        // Register new extension
                                        $test = REGISTER_EXTENSION(EXT_GET_UPDATE_DEPENDS(), 0, $dry_run, false);
                                }
-
-                               // Restore previous SQL queries
-                               SET_SQLS($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]);
-                               unset($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]);
                        } // END - if
 
                        // Add notes
                        } // END - if
 
                        // Add notes
@@ -521,6 +528,10 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
                        unset($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]);
                } // END - if
 
                        unset($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]);
                } // END - if
 
+               // Init these SQLs
+               INIT_SQLS();
+               SET_SQLS(GET_EXT_SQLS());
+
                // Run SQLs
                runFilterChain('run_sqls', array('dry_run' => $dry_run));
 
                // Run SQLs
                runFilterChain('run_sqls', array('dry_run' => $dry_run));
 
@@ -930,32 +941,32 @@ function EXT_ADD_CSS_FILE ($file) {
 
 // Setter for EXT_ALWAYS_ACTIVE flag
 function EXT_SET_ALWAYS_ACTIVE ($active) {
 
 // Setter for EXT_ALWAYS_ACTIVE flag
 function EXT_SET_ALWAYS_ACTIVE ($active) {
-       $GLOBALS['ext_always_active'] = (string) $active;
+       $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()] = (string) $active;
 }
 
 // Getter for EXT_ALWAYS_ACTIVE flag
 function EXT_GET_ALWAYS_ACTIVE () {
 }
 
 // Getter for EXT_ALWAYS_ACTIVE flag
 function EXT_GET_ALWAYS_ACTIVE () {
-       return $GLOBALS['ext_always_active'];
+       return $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()];
 }
 
 // Setter for EXT_VERSION flag
 function EXT_SET_VERSION ($version) {
 }
 
 // Setter for EXT_VERSION flag
 function EXT_SET_VERSION ($version) {
-       $GLOBALS['ext_version'] = (float) $version;
+       $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (float) $version;
 }
 
 // Getter for EXT_VERSION flag
 function EXT_GET_VERSION () {
 }
 
 // Getter for EXT_VERSION flag
 function EXT_GET_VERSION () {
-       return $GLOBALS['ext_version'];
+       return $GLOBALS['ext_version'][EXT_GET_CURR_NAME()];
 }
 
 // Setter for EXT_DEPRECATED flag
 function EXT_SET_DEPRECATED ($deprecated) {
 }
 
 // Setter for EXT_DEPRECATED flag
 function EXT_SET_DEPRECATED ($deprecated) {
-       $GLOBALS['ext_deprecated'] = (string) $deprecated;
+       $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()] = (string) $deprecated;
 }
 
 // Getter for EXT_DEPRECATED flag
 function EXT_GET_DEPRECATED () {
 }
 
 // Getter for EXT_DEPRECATED flag
 function EXT_GET_DEPRECATED () {
-       return $GLOBALS['ext_deprecated'];
+       return $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()];
 }
 
 // Setter for EXT_UPDATE_DEPENDS flag
 }
 
 // Setter for EXT_UPDATE_DEPENDS flag
@@ -998,19 +1009,19 @@ function EXT_INIT_RUNNING_UPDATES () {
 
 // Getter for EXT_UPDATE_DEPENDS flag
 function EXT_GET_UPDATE_DEPENDS () {
 
 // Getter for EXT_UPDATE_DEPENDS flag
 function EXT_GET_UPDATE_DEPENDS () {
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
        return $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()];
 }
 
 // Getter for next iterator depency
 function EXT_GET_ITERATOR_UPDATE_DEPENDS () {
        return $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()];
 }
 
 // Getter for next iterator depency
 function EXT_GET_ITERATOR_UPDATE_DEPENDS () {
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
        return ($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][EXT_GET_UPDATE_ITERATOR()]);
 }
 
 // Counter for extension update depencies
 function EXT_COUNT_UPDATE_DEPENDS () {
        return ($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][EXT_GET_UPDATE_ITERATOR()]);
 }
 
 // Counter for extension update depencies
 function EXT_COUNT_UPDATE_DEPENDS () {
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
        return count($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]);
 }
 
        return count($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]);
 }
 
@@ -1031,7 +1042,7 @@ function EXT_REMOVE_UPDATE_DEPENDS ($ext_name) {
 
 // Init iterator for update depencies
 function EXT_INIT_UPDATE_ITERATOR () {
 
 // Init iterator for update depencies
 function EXT_INIT_UPDATE_ITERATOR () {
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
        $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()] = 0;
 }
 
        $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()] = 0;
 }
 
@@ -1041,13 +1052,13 @@ function EXT_GET_UPDATE_ITERATOR () {
        if (!isset($GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()])) EXT_INIT_UPDATE_ITERATOR();
 
        // Return it
        if (!isset($GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()])) EXT_INIT_UPDATE_ITERATOR();
 
        // Return it
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]."<br />\n";
        return $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()];
 }
 
 // Increments the update iterator
 function EXT_INCREMENT_UPDATE_INTERATOR () {
        return $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()];
 }
 
 // Increments the update iterator
 function EXT_INCREMENT_UPDATE_INTERATOR () {
-       print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+       //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
        $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]++;
 }
 
        $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]++;
 }
 
@@ -1113,7 +1124,10 @@ function EXT_GET_CURR_NAME () {
 
 // Init SQLs array for current extension
 function INIT_EXT_SQLS () {
 
 // Init SQLs array for current extension
 function INIT_EXT_SQLS () {
-       $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array();
+       // Auto-init the array now...
+       if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) {
+               $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array();
+       } // END - if
 }
 
 // Adds SQLs to the SQLs array but "assigns" it with current extension name
 }
 
 // Adds SQLs to the SQLs array but "assigns" it with current extension name
index 6f00d220d6449e141a4ea48155491490fdbc4819..f1f1ee7001299bccb74f02555bee6e1d010e5390 100644 (file)
@@ -48,7 +48,7 @@ if (getTotalFatalErrors() > 0) {
 
        // Set unset variable
        if (empty($check)) $check = "";
 
        // Set unset variable
        if (empty($check)) $check = "";
-       if (isInstalling()) {
+       if ((isInstalling()) || (!isInstalled())) {
                // While we are installing ouput other header than while it is installed... :-)
                $OUT = "";
                foreach (getFatalArray() as $key => $value) {
                // While we are installing ouput other header than while it is installed... :-)
                $OUT = "";
                foreach (getFatalArray() as $key => $value) {
index 8d96ef26dab4d7c6d5ec625ff440f9ce83da6462..6ec29093ff180772213f3a9656def13f4eb2a041 100644 (file)
@@ -245,7 +245,7 @@ function FILTER_FLUSH_FILTERS () {
        INIT_SQLS();
 
        // Are we installing?
        INIT_SQLS();
 
        // Are we installing?
-       if (isInstalling()) {
+       if ((isInstalling()) || (!isInstalled())) {
                // Then silently skip this filter
                return true;
        } // END - if
                // Then silently skip this filter
                return true;
        } // END - if
index 13b1be31a9186c45c528fbd106222553c71748f1..a54750c09ccd8d2236e9a689d1aa6e7f9c788b0a 100644 (file)
@@ -2390,10 +2390,10 @@ function GET_CURR_THEME() {
        }
 
        // Add (maybe) found theme.php file to inclusion list
        }
 
        // Add (maybe) found theme.php file to inclusion list
-       $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($ret));
+       $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($ret));
 
        // Try to load the requested include file
 
        // Try to load the requested include file
-       if (FILE_READABLE($theme)) ADD_INC_TO_POOL($theme);
+       if (INCLUDE_READABLE($INC)) ADD_INC_TO_POOL($INC);
 
        // Return theme value
        return $ret;
 
        // Return theme value
        return $ret;
@@ -3563,7 +3563,7 @@ function shutdown () {
        if (SQL_IS_LINK_UP()) {
                // Close link
                SQL_CLOSE(__FILE__, __LINE__);
        if (SQL_IS_LINK_UP()) {
                // Close link
                SQL_CLOSE(__FILE__, __LINE__);
-       } elseif (!isInstalling()) {
+       } elseif ((!isInstalling()) && (isInstalled())) {
                // No database link
                addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN'));
        }
                // No database link
                addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN'));
        }
index 38764db5050e6a70ba7aca15ef03f912a281e2ea..42a9860dcbb5c8358a052c86755c04d28ec14427 100644 (file)
@@ -322,9 +322,9 @@ if (!isAdminRegistered()) {
 
                        // Special logout redirect for installation of given extension
                        LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register));
 
                        // Special logout redirect for installation of given extension
                        LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register));
-               } elseif (REQUEST_ISSET_GET(('remove'))) {
+               } elseif (REQUEST_ISSET_GET('remove')) {
                        // Secure input
                        // Secure input
-                       $remove = REQUEST_GET(('remove'));
+                       $remove = REQUEST_GET('remove');
 
                        // Special logout redirect for removal of given extension
                        LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove));
 
                        // Special logout redirect for removal of given extension
                        LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove));
index c85b8448b5044d942f4295b72ce9456c17c4522e..2ba1e8bab2bbdd6ec1fa9a77a18dda7d72ac27a1 100644 (file)
@@ -61,14 +61,14 @@ if (REQUEST_ISSET_GET('admin')) {
 if ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
        // Edit account(s)
        ADMINS_EDIT_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
 if ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
        // Edit account(s)
        ADMINS_EDIT_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
-} elseif ((REQUEST_ISSET_POST(('change'))) && (count(REQUEST_POST('login')) > 0)) {
+} elseif ((REQUEST_ISSET_POST('change')) && (count(REQUEST_POST('login')) > 0)) {
        // Change admin accounts
        ADMINS_CHANGE_ADMIN_ACCOUNT(REQUEST_POST_ARRAY());
 } elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
        // Show admin accounts for deletetion
        ADMINS_DELETE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
 } else {
        // Change admin accounts
        ADMINS_CHANGE_ADMIN_ACCOUNT(REQUEST_POST_ARRAY());
 } elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
        // Show admin accounts for deletetion
        ADMINS_DELETE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
 } else {
-       if ((REQUEST_ISSET_POST(('remove'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+       if ((REQUEST_ISSET_POST('remove')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
                // Remove accounts now
                ADMINS_REMOVE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
        }
                // Remove accounts now
                ADMINS_REMOVE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
        }
index 0ec8adefb19de4a1312117d8e9f4d1316161e0e2..37baf61f81114e519a4835581569f23d33e13d9a 100644 (file)
@@ -117,7 +117,7 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // Shall I change entries?
 
        if (SQL_NUMROWS($result) > 0) {
                // Shall I change entries?
-               if (REQUEST_ISSET_POST(('change'))) {
+               if (REQUEST_ISSET_POST('change')) {
                        // Init SQLs
                        INIT_SQLS();
 
                        // Init SQLs
                        INIT_SQLS();
 
index 234ec2fced0519d604b333b86ad1a687f6615a0f..eb0ab1447064940e223fd2a840989f12034bd852 100644 (file)
@@ -81,7 +81,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
 
        // Load main template
        LOAD_TEMPLATE("admin_config_admins_edit");
 
        // Load main template
        LOAD_TEMPLATE("admin_config_admins_edit");
-} elseif ((REQUEST_ISSET_POST(('change'))) && ($SEL > 0)) {
+} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0)) {
        // Change entries
        foreach (REQUEST_POST('sel') as $id => $selected) {
                // Secure ID
        // Change entries
        foreach (REQUEST_POST('sel') as $id => $selected) {
                // Secure ID
@@ -146,7 +146,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
 
        // Load main template
        LOAD_TEMPLATE("admin_config_admins_del");
 
        // Load main template
        LOAD_TEMPLATE("admin_config_admins_del");
-} elseif ((REQUEST_ISSET_POST(('remove'))) && ($SEL > 0)) {
+} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0)) {
        // Remove entries
        foreach (REQUEST_POST('sel') as $id => $selected) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1",
        // Remove entries
        foreach (REQUEST_POST('sel') as $id => $selected) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1",
index 22e01de1c331c52769380137d8f75f1ea0639a8e..dfe8417c2f0bc8d41259f5cb00d1242d9bb69c38 100644 (file)
@@ -67,7 +67,7 @@ if (REQUEST_ISSET_POST(('add_max'))) {
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $content);
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $content);
-} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('do')))) {
+} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('do'))) {
        // Change or delete entries...
        $TEXT = "";
        foreach (REQUEST_POST('id') as $id => $value) {
        // Change or delete entries...
        $TEXT = "";
        foreach (REQUEST_POST('id') as $id => $value) {
index f049d932afe9a6968b26306d2431e531ddbe15d2..8d6846e117b3bb8b01248f89ec3b944603b92838 100644 (file)
@@ -86,9 +86,9 @@ if (REQUEST_ISSET_POST('edit')) {
 
                // Remove maybe confusing data
                REQUEST_UNSET_POST('edit');
 
                // Remove maybe confusing data
                REQUEST_UNSET_POST('edit');
-               REQUEST_UNSET_POST(('change'));
+               REQUEST_UNSET_POST('change');
        }
        }
-} elseif (REQUEST_ISSET_POST(('change'))) {
+} elseif (REQUEST_ISSET_POST('change')) {
        // Init SQLs
        INIT_SQLS();
 
        // Init SQLs
        INIT_SQLS();
 
index b12fd674b47e363ec0c1dc66467e22037c7a4b60..a29c1790a9a6cf97c3fddb234fd146f92460e1a6 100644 (file)
@@ -60,7 +60,7 @@ if (REQUEST_ISSET_GET(('sub'))) {
                break;
 
        case "ref":
                break;
 
        case "ref":
-               if (REQUEST_ISSET_GET(('do'))) {
+               if (REQUEST_ISSET_GET('do')) {
                        if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == "add")) {
                                REQUEST_UNSET_POST('ok');
                        }
                        if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == "add")) {
                                REQUEST_UNSET_POST('ok');
                        }
index 98960fe2517849b7090f8129cba64dbfd72f5bc7..95031a59ed85ad16511639d802c22e685a9c0242 100644 (file)
@@ -72,7 +72,7 @@ VALUES ('%s','%s','%s','%s')",
                                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
                        }
                }
                                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
                        }
                }
-       } elseif (REQUEST_ISSET_POST(('remove'))) {
+       } elseif (REQUEST_ISSET_POST('remove')) {
                // Check if at last one line is selected
                $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
                if ($SEL > 0) {
                // Check if at last one line is selected
                $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
                if ($SEL > 0) {
@@ -87,7 +87,7 @@ VALUES ('%s','%s','%s','%s')",
                } else {
                        LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
                }
                } else {
                        LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
                }
-       } elseif (REQUEST_ISSET_POST(('change'))) {
+       } elseif (REQUEST_ISSET_POST('change')) {
                // Change entries
                foreach (REQUEST_POST('level') as $id => $level) {
                        // Secure ID
                // Change entries
                foreach (REQUEST_POST('level') as $id => $level) {
                        // Secure ID
index cd8f8f518e98deab121f490ec61fbad136784393..43aea000f5c117d08ad20b6f45d98af6a1cc5aaf 100644 (file)
@@ -54,7 +54,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
        // We are about to register a new extension
        $do = "register"; $ext_id = bigintval(REQUEST_GET('reg_ext'));
        // The ID comes from task management and it is - of course - *not* the extension's name!
        // We are about to register a new extension
        $do = "register"; $ext_id = bigintval(REQUEST_GET('reg_ext'));
        // The ID comes from task management and it is - of course - *not* the extension's name!
-} elseif ((REQUEST_ISSET_POST(('change'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0) && (!IS_DEMO())) {
        // De-/activate extensions
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
                // Shall we keep the extension always active?
        // De-/activate extensions
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
                // Shall we keep the extension always active?
@@ -158,7 +158,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                LOAD_TEMPLATE("admin_extensions_edit");
                $do = "edit";
        }
                LOAD_TEMPLATE("admin_extensions_edit");
                $do = "edit";
        }
-} elseif ((REQUEST_ISSET_POST(('delete'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) {
        // List extensions and when verbose is enabled SQL statements which will be executed
        $OUT = ""; $SW = 2;
        foreach (REQUEST_POST('sel') as $ext_id => $sel) {
        // List extensions and when verbose is enabled SQL statements which will be executed
        $OUT = ""; $SW = 2;
        foreach (REQUEST_POST('sel') as $ext_id => $sel) {
@@ -198,7 +198,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
        // Load template
        LOAD_TEMPLATE("admin_extensions_delete");
        $do = "delete";
        // Load template
        LOAD_TEMPLATE("admin_extensions_delete");
        $do = "delete";
-} elseif ((REQUEST_ISSET_POST(('remove'))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0) && (!IS_DEMO())) {
        // Remove extensions from DB (you have to delete all files manually!)
        $cache_update = 0;
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
        // Remove extensions from DB (you have to delete all files manually!)
        $cache_update = 0;
        foreach (REQUEST_POST('sel') as $ext_id => $active) {
@@ -214,10 +214,10 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                        EXTENSION_RUN_SQLS($ext_id, "remove");
                } // END - if
        } // END - foreach
                        EXTENSION_RUN_SQLS($ext_id, "remove");
                } // END - if
        } // END - foreach
-} elseif (REQUEST_ISSET_GET(('do')) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_GET('do')) && (!IS_DEMO())) {
        // Other things to do
        $do = SQL_ESCAPE(strip_tags(REQUEST_GET('do')));
        // Other things to do
        $do = SQL_ESCAPE(strip_tags(REQUEST_GET('do')));
-} elseif (REQUEST_ISSET_GET(('do'))) {
+} elseif (REQUEST_ISSET_GET('do')) {
        // Demo mode active!
        $do = "demo";
 }
        // Demo mode active!
        $do = "demo";
 }
index 06bc8e11d3a49f0f2ed8cb262a49a9f9f8d616ee..c2f6fa63fbbd790fdfa1bafbc52a8a8a014fb956 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR("admin", __FILE__);
 $show = true;
 if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) {
        // Okay, which button was pressed?
 $show = true;
 if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) {
        // Okay, which button was pressed?
-       if (REQUEST_ISSET_POST(('change'))) {
+       if (REQUEST_ISSET_POST('change')) {
                // Change permissions
                ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "bank_packages", "package_active");
        } elseif (REQUEST_ISSET_POST('edit')) {
                // Change permissions
                ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "bank_packages", "package_active");
        } elseif (REQUEST_ISSET_POST('edit')) {
@@ -65,11 +65,11 @@ if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQ
        } elseif (REQUEST_ISSET_POST(('do_edit'))) {
                // Delete entries (with confirmation)
                ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true);
        } elseif (REQUEST_ISSET_POST(('do_edit'))) {
                // Delete entries (with confirmation)
                ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true);
-       } elseif (REQUEST_ISSET_POST(('delete'))) {
+       } elseif (REQUEST_ISSET_POST('delete')) {
                // Delete entries (with confirmation)
                ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"), array("", "", "", ""));
                $show = false;
                // Delete entries (with confirmation)
                ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"), array("", "", "", ""));
                $show = false;
-       } elseif (REQUEST_ISSET_POST(('remove'))) {
+       } elseif (REQUEST_ISSET_POST('remove')) {
                // Delete entries (with confirmation)
                ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true);
        }
                // Delete entries (with confirmation)
                ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true);
        }
index 78ae63ad0838fc8112734efc57bb1cbfef4e8846..2bcf66f4fae218e6c00dc900dc97a4cd3d2539db 100644 (file)
@@ -71,7 +71,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-} elseif ((REQUEST_ISSET_POST(('change'))) && (REQUEST_ISSET_POST(('id')))) {
+} elseif ((REQUEST_ISSET_POST('change')) && (REQUEST_ISSET_POST(('id')))) {
        // Change all status
        ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "countries", "is_active");
 
        // Change all status
        ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "countries", "is_active");
 
@@ -80,7 +80,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                'url'   => "modules.php?module=admin&amp;what=list_country",
                'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
        ));
                'url'   => "modules.php?module=admin&amp;what=list_country",
                'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
        ));
-} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST(('delete')))) && (REQUEST_ISSET_POST(('id')))) {
+} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('delete'))) && (REQUEST_ISSET_POST(('id')))) {
        if (count(REQUEST_POST('id')) > 0) {
                if (REQUEST_ISSET_POST('edit')) {
                        // Edit template
        if (count(REQUEST_POST('id')) > 0) {
                if (REQUEST_ISSET_POST('edit')) {
                        // Edit template
@@ -153,7 +153,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
 
                // Create message
                $MSG = getMessage('ADMIN_COUNTRIES_MODIFIED');
 
                // Create message
                $MSG = getMessage('ADMIN_COUNTRIES_MODIFIED');
-       } elseif ((REQUEST_ISSET_POST(('remove'))) && (REQUEST_ISSET_POST(('id')))) {
+       } elseif ((REQUEST_ISSET_POST('remove')) && (REQUEST_ISSET_POST(('id')))) {
                // Remove
                $IDs = implode(",", array_keys(REQUEST_POST('id')));
                ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
                // Remove
                $IDs = implode(",", array_keys(REQUEST_POST('id')));
                ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id'))."");
index 063ff4c1933e156cfe44e08587dde55438694bd0..cb84d4108295ae48d63233ead062b34e1b877408 100644 (file)
@@ -206,7 +206,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
        }
 } else {
                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
        }
 } else {
-       if (!REQUEST_ISSET_GET(('do'))) REQUEST_SET_GET('do', "");
+       if (!REQUEST_ISSET_GET('do')) REQUEST_SET_GET('do', "");
 
        if (REQUEST_GET('do') == "delete") {
                // Delete all requests
 
        if (REQUEST_GET('do') == "delete") {
                // Delete all requests
index 217a444e1a2d8b43b9ca2c979b61a51c1e0bd3e0..48852fddfe852543cbf6741c2e005c8fe8f2d759 100644 (file)
@@ -93,7 +93,7 @@ if (REQUEST_ISSET_GET(('rallye'))) {
 
        // Run SQL command
        runFilterChain('run_sqls');
 
        // Run SQL command
        runFilterChain('run_sqls');
-} elseif (REQUEST_ISSET_POST(('remove'))) {
+} elseif (REQUEST_ISSET_POST('remove')) {
        // Delete rallyes
        $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
        if ($SEL > 0) {
        // Delete rallyes
        $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
        if ($SEL > 0) {
@@ -120,7 +120,7 @@ if (REQUEST_ISSET_GET(('rallye'))) {
                // No rallye selected to delete!
                $MSG = getMessage('RALLYE_DELETE_NOTHING_SELECTED');
        }
                // No rallye selected to delete!
                $MSG = getMessage('RALLYE_DELETE_NOTHING_SELECTED');
        }
-} elseif (REQUEST_ISSET_POST(('change'))) {
+} elseif (REQUEST_ISSET_POST('change')) {
        // Change rallye
        $SEL = SELECTION_COUNT(REQUEST_POST('title'));
        if ($SEL > 0) {
        // Change rallye
        $SEL = SELECTION_COUNT(REQUEST_POST('title'));
        if ($SEL > 0) {
index 15afc7871601ccd8a6dc246e15aa30a8b04b8a7e..2e9fe8192a65e8c692d0227259ad2ba61814cbec 100644 (file)
@@ -57,15 +57,15 @@ if (REQUEST_ISSET_POST(('add'))) {
        if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST(('pay_min_count')))) REQUEST_UNSET_POST(('add'));
        if (!REQUEST_ISSET_POST(('pay_currency'))) REQUEST_UNSET_POST(('add'));
 
        if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST(('pay_min_count')))) REQUEST_UNSET_POST(('add'));
        if (!REQUEST_ISSET_POST(('pay_currency'))) REQUEST_UNSET_POST(('add'));
 
-} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) {
+} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST('change')) || (REQUEST_ISSET_POST('remove'))) {
        // Check if at least one entry was selected
        if (!REQUEST_ISSET_POST(('id'))) {
                // Nothing selected for editing / deleting???
                REQUEST_UNSET_POST('edit');
                REQUEST_UNSET_POST('del');
        // Check if at least one entry was selected
        if (!REQUEST_ISSET_POST(('id'))) {
                // Nothing selected for editing / deleting???
                REQUEST_UNSET_POST('edit');
                REQUEST_UNSET_POST('del');
-               REQUEST_UNSET_POST(('change'));
-               REQUEST_UNSET_POST(('remove'));
-       } elseif (REQUEST_ISSET_POST(('change'))) {
+               REQUEST_UNSET_POST('change');
+               REQUEST_UNSET_POST('remove');
+       } elseif (REQUEST_ISSET_POST('change')) {
                // Change entries here...
                foreach (REQUEST_POST('id') as $id => $sel) {
                        // Secure ID
                // Change entries here...
                foreach (REQUEST_POST('id') as $id => $sel) {
                        // Secure ID
@@ -85,7 +85,7 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id
 
                // Generate message
                $MSG = getMessage('SPONSOR_PAY_ENTRIES_CHANGED');
 
                // Generate message
                $MSG = getMessage('SPONSOR_PAY_ENTRIES_CHANGED');
-       } elseif (REQUEST_ISSET_POST(('remove'))) {
+       } elseif (REQUEST_ISSET_POST('remove')) {
                // Remove entries here...
                foreach (REQUEST_POST('id') as $id => $sel) {
                        // Remove entry
                // Remove entries here...
                foreach (REQUEST_POST('id') as $id => $sel) {
                        // Remove entry
index 167b9c8f20600d116bdc0995ca085b5ffe9cf3b9..a8b9dba6cb4577a7c73d4c11510cf27b31e16dfe 100644 (file)
@@ -78,7 +78,7 @@ if (REQUEST_ISSET_POST('edit')) {
                array(),
                true
        );
                array(),
                true
        );
-} elseif (REQUEST_ISSET_POST(('delete'))) {
+} elseif (REQUEST_ISSET_POST('delete')) {
        // Show entries for deletion
        ADMIN_DELETE_ENTRIES_CONFIRM(
                REQUEST_POST('id'),
        // Show entries for deletion
        ADMIN_DELETE_ENTRIES_CONFIRM(
                REQUEST_POST('id'),
index 649fc8dcfb6a5770b8fdf76320e5ac53d636021b..ec846b2e313c9eec3ff4eac6e5f4c6e657240062 100644 (file)
@@ -58,7 +58,7 @@ if (IS_FORM_SENT()) {
 } elseif (REQUEST_ISSET_POST(('sent'))) {
        // Sent mail
        YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), "normal");
 } elseif (REQUEST_ISSET_POST(('sent'))) {
        // Sent mail
        YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), "normal");
-} elseif (REQUEST_ISSET_POST(('remove'))) {
+} elseif (REQUEST_ISSET_POST('remove')) {
        // Add mail to exclude list
        YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), "normal");
 } elseif (REQUEST_ISSET_POST(('unlist'))) {
        // Add mail to exclude list
        YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), "normal");
 } elseif (REQUEST_ISSET_POST(('unlist'))) {
index 8243393bbd7a4d14aa5710a5abbf068ace9ca275..f3f6eb75590ebf195de6953f65dc58ebfeb5f5e2 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET(('do'))) && (REQUEST_GET('do') == "add")) {
+if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET('do')) && (REQUEST_GET('do') == "add")) {
        REQUEST_UNSET_POST('ok');
 }
 
        REQUEST_UNSET_POST('ok');
 }
 
index e9816671756d9a038ba6bd77ec9597370a9091fc..4e58c9ad15efb703053b410cacda62d2fa49d1aa 100644 (file)
@@ -80,12 +80,12 @@ if (($GLOBALS['output_mode'] == "1") || (getConfig('css_php') == "DIRECT")) {
 } else {
        // Now we load all CSS files from css.php!
        OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/css.php", false);
 } else {
        // Now we load all CSS files from css.php!
        OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/css.php", false);
-       if (isInstalling()) {
+       if ((isInstalling()) || (!isInstalled())) {
                // Default theme first
                // Default theme first
-               $NEW_THEME = "default";
-               if (REQUEST_ISSET_GET(('theme')))  $NEW_THEME = REQUEST_GET(('theme'));
-               if (REQUEST_ISSET_POST(('theme'))) $NEW_THEME = SQL_ESCAPE(REQUEST_POST('theme'));
-               OUTPUT_HTML("?theme=".$NEW_THEME."&amp;installing=1", false);
+               $newTheme = "default";
+               if (REQUEST_ISSET_GET(('theme')))  $newTheme = REQUEST_GET(('theme'));
+               if (REQUEST_ISSET_POST(('theme'))) $newTheme = SQL_ESCAPE(REQUEST_POST('theme'));
+               OUTPUT_HTML("?theme=".$newTheme."&amp;installing=1", false);
        } // END - if
        OUTPUT_HTML("\" />");
 }
        } // END - if
        OUTPUT_HTML("\" />");
 }