mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: NOW() replaced with DB-specific version
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72922 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cac97f9d78
commit
807736490f
@ -13,7 +13,7 @@ class QueuedEmailDispatchTask extends DailyTask {
|
||||
|
||||
echo "SENDING QUEUED EMAILS\n";
|
||||
|
||||
$queued = DataObject::get('QueuedEmail', "\"Send\" < NOW()");
|
||||
$queued = DataObject::get('QueuedEmail', "\"Send\" < " . DB::getConn()->now());
|
||||
|
||||
if( !$queued )
|
||||
return;
|
||||
|
@ -156,7 +156,7 @@ class Folder extends File {
|
||||
|
||||
DB::query("INSERT INTO \"File\"
|
||||
(\"ClassName\", \"ParentID\", \"OwnerID\", \"Name\", \"Filename\", \"Created\", \"LastEdited\", \"Title\")
|
||||
VALUES ('$className', $this->ID, $ownerID, '$name', '$filename', NOW(), NOW(), '$name')");
|
||||
VALUES ('$className', $this->ID, $ownerID, '$name', '$filename', " . DB::getConn()->now() . ',' . DB::getConn()->now() . ", '$name')");
|
||||
|
||||
return DB::getGeneratedID("File");
|
||||
}
|
||||
|
@ -325,8 +325,7 @@ class Member extends DataObject {
|
||||
static function member_from_autologinhash($RAW_hash, $login = false) {
|
||||
$SQL_hash = Convert::raw2sql($RAW_hash);
|
||||
|
||||
$member = DataObject::get_one('Member',"\"AutoLoginHash\"='" . $SQL_hash .
|
||||
"' AND \"AutoLoginExpired\" > NOW()");
|
||||
$member = DataObject::get_one('Member',"\"AutoLoginHash\"='" . $SQL_hash . "' AND \"AutoLoginExpired\" > " . DB::getConn()->now());
|
||||
|
||||
if($login && $member)
|
||||
$member->logIn();
|
||||
|
Loading…
x
Reference in New Issue
Block a user