X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fadmin-inc.php;h=76d9c6666c1b3979292b222b13ea4f75786613b0;hb=74ea26a36ff202cfdca545025a17c9faf4d68efb;hp=e8e468b2be136eb4208b77bc076fea7d1f08d747;hpb=c3f2beb3f1d47c9593d262d7f5dac47640b4aa52;p=mailer.git
diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php
index e8e468b2be..76d9c6666c 100644
--- a/inc/modules/admin/admin-inc.php
+++ b/inc/modules/admin/admin-inc.php
@@ -18,6 +18,7 @@
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -99,8 +100,9 @@ function ifAdminLoginDataIsValid ($adminLogin, $adminPassword) {
// Prepare data array
$data = array(
- 'login' => $adminLogin,
- 'pass_hash' => $adminHash
+ 'login' => $adminLogin,
+ 'plain_pass' => $adminPassword,
+ 'pass_hash' => $adminHash
);
// Run a special filter
@@ -122,19 +124,20 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) {
if ($adminHash != '-1') {
// Now, we need to encode the password in the same way the one is encoded in database
$testHash = encodeHashForCookie($adminHash);
+ //* DEBUG: */ outputHtml('adminLogin='.$adminLogin.',
passHash='.$passHash.',
adminHash='.$adminHash.',
testHash='.$testHash.'
');
// If they both match, the login data is valid
if ($testHash == $passHash) {
// All fine
$ret = 'done';
} else {
-
// Set status
$ret = 'pass';
}
} // END - if
// Return status
+ //* DEBUG: */ outputHtml('ret='.$ret);
return $ret;
}
@@ -143,7 +146,7 @@ function doAdminAction () {
// Get default what
$what = getWhat();
- //* DEBUG: */ outputHtml(__LINE__."*".$what.'/'.getModule().'/'.getAction().'/'.getWhat()."*
");
+ //* DEBUG: */ outputHtml(__LINE__.'*'.$what.'/'.getModule().'/'.getAction().'/'.getWhat().'*
');
// Remove any spaces from variable
if (empty($what)) {
@@ -493,6 +496,9 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
if ('' . $val . '' == '' . $test . '') {
// Add numbers
$tableData[] = sprintf("`%s`=%s", $id, $test);
+ } elseif (is_null($val)) {
+ // Add NULL
+ $tableData[] = sprintf("`%s`=NULL", $id);
} else {
// Add strings
$tableData[] = sprintf("`%s`='%s'", $id, trim($val));
@@ -559,7 +565,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
$affected = SQL_AFFECTEDROWS();
// Rebuild cache
- rebuildCacheFile('config', 'config');
+ rebuildCache('config', 'config');
// Settings saved, so display message?
if ($displayMessage === true) loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));