X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fgen_sql_patches.php;h=d853f1ca8d9b9b1b56619e90b1827f27d2c1db99;hp=b6e3ec33e16785524ea0390fc1bc4f3352d4890b;hb=4b7f401f2a4680ae46ca41c57f749cfe35163660;hpb=fb7120ffa230b62b54895bcf95952e1cf30f8594 diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index b6e3ec33e1..d853f1ca8d 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -1,7 +1,7 @@ Cookie: ".get_session('u_hash')."
Test: ".$test); + if (isFileReadable($FQFN)) { + //* DEBUG: */ removeFile($FQFN); + //* DEBUG: */ $test = hexdec(getSession('u_hash')) / hexdec($secretKey); + //* DEBUG: */ $test = generateHash(str_replace('.', '', $test)); + //* DEBUG: */ die("Secret-Key: ".$secretKey."
Cookie: ".getSession('u_hash')."
Test: ".$test); // Write $fileHash to database - SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET file_hash='%s' WHERE config=0 LIMIT 1", - array($fileHash), __FILE__, __LINE__); + updateConfiguration('file_hash', $fileHash); // Generate FQFN for .htaccess file $FQFN = sprintf("%sinc/.secret/.htaccess", - constant('PATH') + getConfig('PATH') ); // Is the .htaccess file there? - if (!FILE_READABLE($FQFN)) { + if (!isFileReadable($FQFN)) { // Also create .htaccess file - WRITE_FILE($FQFN, "Deny from all\n"); + writeToFile($FQFN, "Deny from all\n"); } // END - if // Also update configuration setConfigEntry('secret_key', $secretKey); - setConfigEntry('file_hash' , $fileHash); // Remove variables unset($secretKey); @@ -123,5 +111,5 @@ if (getConfig('file_hash') == "") { } // END - if } // END - if -// -?> \ No newline at end of file +// [EOF] +?>