]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-extension.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / loader / load-extension.php
index 791e6476169f219810f2aeda5661a8b27d78f92f..0d35dd45019d89ee2d186455ffb9bb5a0f573585 100644 (file)
@@ -18,7 +18,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -41,8 +41,8 @@
 if (!defined('__SECURITY')) {
        die();
 } elseif (isInstallationPhase()) {
-       // Use this code if you don't want to run this cache loader on installation phase
-       return;
+       // Do not run in installation phase
+       return FALSE;
 }
 
 // Next cached table is the extension
@@ -144,7 +144,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache
        } // END - if
 
        // Query for all extensions
-       $result = SQL_QUERY('SELECT
+       $result = sqlQuery('SELECT
        `id` AS `ext_id`,
        `ext_name`,
        `ext_active`,
@@ -156,13 +156,13 @@ ORDER BY
        `ext_name` ASC', __FILE__, __LINE__);
 
        // Load all entries
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Load extension
                if (!loadExtension($content['ext_name'], 'test')) {
                        // Is the name valid?
                        if (!isExtensionNameValid($content['ext_name'])) {
                                // Is not valid name (empty ext-foo.php script)
-                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
+                               sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
                                        array($content['ext_name']), __FILE__, __LINE__);
                        } else {
                                // Didn't load so deactivate it
@@ -195,7 +195,7 @@ ORDER BY
        } // END - while
 
        // Free memory
-       SQL_FREERESULT($result);
+       sqlFreeResult($result);
 
        // Close the cache
        $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');