Extbase:
authorJochen Rau <j.rau@web.de>
Sat, 11 Jul 2009 09:35:22 +0000 (09:35 +0000)
committerJochen Rau <j.rau@web.de>
Sat, 11 Jul 2009 09:35:22 +0000 (09:35 +0000)
* Change: Using $GLOBALS['EXEC_TIME'] instead of time(); resolves #3782
* Fixed: back-ported LiteralInterface

typo3/sysext/extbase/Classes/Persistence/Backend.php
typo3/sysext/extbase/Classes/Persistence/QOM/ComparisonInterface.php
typo3/sysext/extbase/Classes/Persistence/QOM/DynamicOperandInterface.php
typo3/sysext/extbase/Classes/Persistence/QOM/LiteralInterface.php [new file with mode: 0644]
typo3/sysext/extbase/Classes/Persistence/QOM/StaticOperandInterface.php

index 2acb411..66218c6 100644 (file)
@@ -310,7 +310,7 @@ class Tx_Extbase_Persistence_Backend implements Tx_Extbase_Persistence_BackendIn
                if ($object->_isNew()) {
                        $this->insertObject($object, $parentObject, $parentPropertyName, $row);
                } elseif ($object->_isDirty()) {
-                       $this->updateObject($object, $parentObject, $parentPropertyName, $row);
+                               $this->updateObject($object, $parentObject, $parentPropertyName, $row);
                }
 
                if ($parentObject instanceof Tx_Extbase_DomainObject_DomainObjectInterface && !empty($parentPropertyName)) {
@@ -430,10 +430,10 @@ class Tx_Extbase_Persistence_Backend implements Tx_Extbase_Persistence_BackendIn
                $className = get_class($object);
                $dataMap = $this->dataMapper->getDataMap($className);
                if ($dataMap->hasCreationDateColumn() && $object->_isNew()) {
-                       $row[$dataMap->getCreationDateColumnName()] = time();
+                       $row[$dataMap->getCreationDateColumnName()] = $GLOBALS['EXEC_TIME'];
                }
                if ($dataMap->hasTimestampColumn()) {
-                       $row[$dataMap->getTimestampColumnName()] = time();
+                       $row[$dataMap->getTimestampColumnName()] = $GLOBALS['EXEC_TIME'];
                }
                if ($dataMap->hasPidColumn()) {
                        // FIXME Make the settings from $this->cObj available
index 2f59a97..f8edaa0 100644 (file)
@@ -68,7 +68,7 @@
  * * the string "\x" matches the character "x", and
  *   all other characters match themselves.
  *
- * @package PHPCR
+ * @package Extbase
  * @subpackage Persistence
  * @version $Id: ComparisonInterface.php 2191 2009-05-07 19:49:06Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
index 977a38e..3e4656b 100644 (file)
@@ -31,7 +31,6 @@
  * @package PHPCR
  * @subpackage Query
  * @version $Id: DynamicOperandInterface.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Extbase_Persistence_QOM_DynamicOperandInterface extends Tx_Extbase_Persistence_QOM_OperandInterface {
 }
diff --git a/typo3/sysext/extbase/Classes/Persistence/QOM/LiteralInterface.php b/typo3/sysext/extbase/Classes/Persistence/QOM/LiteralInterface.php
new file mode 100644 (file)
index 0000000..830d135
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
+*  All rights reserved
+*
+*  This class is a backport of the corresponding class of FLOW3.
+*  All credits go to the v5 team.
+*
+*  This script is part of the TYPO3 project. The TYPO3 project is
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+/**
+ * Evaluates to a literal value.
+ *
+ * @package Extbase
+ * @subpackage Query
+ * @version $Id: LiteralInterface.php 1811 2009-01-28 12:04:49Z robert $
+ */
+interface Tx_Extbase_Persistence_QOM_LiteralInterface extends Tx_Extbase_Persistence_QOM_StaticOperandInterface {
+
+       /**
+        * Gets the value of the literal.
+        *
+        * @return string the literal value; non-null
+        */
+       public function getLiteralValue();
+
+}
+
+?>
\ No newline at end of file
index 14a7182..d390bd1 100644 (file)
@@ -32,7 +32,6 @@
  * @package PHPCR
  * @subpackage Query
  * @version $Id: StaticOperandInterface.php 1811 2009-01-28 12:04:49Z robert $
- * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Extbase_Persistence_QOM_StaticOperandInterface extends Tx_Extbase_Persistence_QOM_OperandInterface {
 }