]> git.mxchange.org Git - mailer.git/commitdiff
Directories with a dot caused some trouble, rewritten all code to make no longer...
authorquix0r <quix0r@mxchange.org>
Thu, 1 Jul 2010 17:00:09 +0000 (17:00 +0000)
committerquix0r <quix0r@mxchange.org>
Thu, 1 Jul 2010 17:00:09 +0000 (17:00 +0000)
inc/extensions-functions.php
inc/extensions/ext-sql_patches.php
inc/gen_sql_patches.php
inc/libs/mediadata_functions.php

index ee5ff4908fc385e56f38c08793343a316683917c..db650b47e208804a0674599dd4e650c7f5523f52 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Load the extension and maybe found language and function files.
-function loadExtension ($ext_name, $ext_mode = 'init', $ext_ver = '', $dry_run = false) {
+function loadExtension ($ext_name, $ext_mode, $ext_ver = '', $dry_run = false) {
        // If this happens twice, we need the bug report from you, except for updates/tests
        if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) {
                debug_report_bug(__FUNCTION__, __LINE__, '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true));
index 138f723c1d053ad4807b114f3ffcbdcec4e94dff..4d73669ae9011b348103960ee010074dba098603 100644 (file)
@@ -772,7 +772,7 @@ INDEX (`ip`)
                // Test again
                if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) {
                        // File hash fas generated so we can also file the secret file... hopefully.
-                       $hashFile = sprintf("%sinc/cache/.%s", getPath(), getFileHash());
+                       $hashFile = sprintf("%sinc/cache/.%s.cache", getPath(), getFileHash());
                        if (isFileReadable($hashFile)) {
                                // Read file
                                setConfigEntry('secret_key', readFromFile($hashFile));
index 1173c4b3b21b767bce99d00863c521b3b0962726..184eb28e307f8fb5527266d3e5733edf8b28227c 100644 (file)
@@ -70,7 +70,7 @@ if (getMasterSalt() == '') {
 if (getFileHash() == '') {
        // Create filename from hashed random string
        $fileHash = sha1(generatePassword(mt_rand(128, 256)));
-       $FQFN = sprintf("%sinc/cache/.%s",
+       $FQFN = sprintf("%sinc/cache/.%s.cache",
                getPath(),
                $fileHash
        );
index db14350b4d8cd085bedb9a358eb5921cdfe6c8b2..fc06a8e4a0c9609bf059198d430932a66a6d4774 100644 (file)
@@ -52,7 +52,7 @@ function updateMediadataEntry ($keys_array, $mode, $value) {
 WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result_media) == 0) {
                                // Not found so we create it (mode will be ignored here!)
-                               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
+                               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (`media_key`, `media_value`) VALUES ('%s', '%s')",
                                array($key, $value), __FUNCTION__, __LINE__);
                        } else {
                                // Update entry
@@ -63,11 +63,11 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
 
                                if ($mode == 'init') {
                                        // Initialize entry
-                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mediadata` SET media_value=%s WHERE media_key='%s' LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mediadata` SET `media_value`=%s WHERE `media_key`='%s' LIMIT 1",
                                        array($value, $key), __FUNCTION__, __LINE__);
                                } else {
                                        // Update entry
-                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mediadata` SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
+                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mediadata` SET `media_value`=`media_value`".$mode."%s WHERE `media_key`='%s' LIMIT 1",
                                        array($value, $key), __FUNCTION__, __LINE__);
                                }
                        }