]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions.php
Password reset for admin login added (still buggy if cache is installed and sql_patch...
[mailer.git] / inc / extensions.php
index 3e301719a8b3b297f4cb36d1a5f4765d707d873b..cf3ba20d5924d4d63dadcbf681419612f37bb84d 100644 (file)
@@ -38,7 +38,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
        require($INC);
 }
 //
-function EXTENSION_REGISTER($ext_name, $id, $dry_run=false)
+function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
 {
        global $NOTES, $_CONFIG, $INC_POOL;
        // We want to register an extension and registration status is by default "failed" (= false)
@@ -65,7 +65,7 @@ function EXTENSION_REGISTER($ext_name, $id, $dry_run=false)
                foreach ($EXT_VER_HISTORY as $EXT_VER)
                {
                        require($file);
-                       if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
+                       if (((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['verbose_sql'] == "Y")) || (!EXT_IS_ACTIVE("sql_patches")))
                        {
                                if (!empty($UPDATE_NOTES))
                                {
@@ -307,7 +307,7 @@ function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false)
        // Shorter way
        return (
                (
-                       ($active == 'Y') || (
+                       ($active == "Y") || (
                                (IS_ADMIN()) &&
                                (!$ignore_admin) &&
                                (!empty($active))
@@ -382,7 +382,7 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
                        include(PATH."inc/extensions/".$file);
 
                        // Add notes
-                       if ($_CONFIG['verbose_sql'] == 'Y')
+                       if ($_CONFIG['verbose_sql'] == "Y")
                        {
                                $EXT_VER = $EXT_VER_HISTORY[$idx];
                                if (!empty($UPDATE_NOTES))
@@ -433,7 +433,7 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
                        {
                                // Task not created so it's a brand-new extension which we need to register and create a task for!
                                $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'EXTENSION_UPDATE', '%s', '%s', UNIX_TIMESTAMP())",
-                                array(GET_ADMIN_ID(SQL_ESCAPE($_SESSION['admin_login'])), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__);
+                                array(GET_ADMIN_ID(SQL_ESCAPE(get_session('admin_login'))), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__);
                        }
 
                        // Free memory
@@ -468,7 +468,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $
 
        $S = false; $SW = 2; $i = 1;
        $OUT = "";
-       if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y'))
+       if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y"))
        {
                $OUT  = "<DIV align=\"center\">
 <TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"".$WIDTH."\" align=\"center\"".$dashed.">
@@ -495,7 +495,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $
                }
        }
 
-       if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y'))
+       if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y"))
        {
                // No addional SQL commands to run
                $OUT .= "<TR>