]> git.mxchange.org Git - mailer.git/blobdiff - inc/load_extensions.php
Fixes for installation mode
[mailer.git] / inc / load_extensions.php
index d6ef7eb1bec750779c76c4a1b5b567a0b4a543da..4a7015304512b2d0b9dd5d9a156ddacae73118a2 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -276,10 +275,10 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode ==
                // Load more cache files (like admins)
                require_once(PATH."inc/load_cache.php");
        } // END - if
-}
 
-// Free memory
-SQL_FREERESULT($res_ext_crt);
+       // Free memory
+       SQL_FREERESULT($res_ext_crt);
+}
 
 // Load include files
 if (!empty($INC_POOL[0])) {
@@ -293,12 +292,12 @@ if (!empty($DEL[0])) {
        // Remove extensions from two tables: extension registry and tasks table
        foreach ($DEL as $name) {
                // First remove entry from extensions table
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
-                array($name), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
+                       array($name), __FILE__, __LINE__);
 
                // Remove (maybe?) found tasks (main task and possible updates
-               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
-                array($name), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
+                       array($name), __FILE__, __LINE__);
        } // END - foreach
 
        // I think it's not neccessary to run the optimization function here