use wcf\data\AbstractDatabaseObjectAction;
/**
-* Executes edit history entry-related actions.
-*
-* @author Tim Duesterhus
-* @copyright 2001-2014 WoltLab GmbH
-* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
-* @package com.woltlab.wcf
-* @subpackage data.edit.history.entry
-* @category Community Framework
-*/
+ * Executes edit history entry-related actions.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data.edit.history.entry
+ * @category Community Framework
+ */
class EditHistoryEntryAction extends AbstractDatabaseObjectAction {
/**
- * @see \wcf\data\AbstractDatabaseObjectAction::$className
- */
+ * @see \wcf\data\AbstractDatabaseObjectAction::$className
+ */
protected $className = 'wcf\data\edit\history\entry\EditHistoryEntryEditor';
/**
use wcf\data\DatabaseObjectEditor;
/**
-* Extends the edit history entry object with functions to create, update and delete history entries.
-*
-* @author Tim Duesterhus
-* @copyright 2001-2014 WoltLab GmbH
-* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
-* @package com.woltlab.wcf
-* @subpackage data.edit.history.entry
-* @category Community Framework
-*/
+ * Extends the edit history entry object with functions to create, update and delete history entries.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data.edit.history.entry
+ * @category Community Framework
+ */
class EditHistoryEntryEditor extends DatabaseObjectEditor {
/**
- * @see \wcf\data\DatabaseObjectEditor::$baseClass
- */
+ * @see \wcf\data\DatabaseObjectEditor::$baseClass
+ */
protected static $baseClass = 'wcf\data\edit\history\entry\EditHistoryEntry';
}
use wcf\data\DatabaseObjectList;
/**
-* Represents a list of edit history entries.
-*
-* @author Tim Duesterhus
-* @copyright 2001-2014 WoltLab GmbH
-* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
-* @package com.woltlab.wcf
-* @subpackage data.edit.history.entry
-* @category Community Framework
-*/
+ * Represents a list of edit history entries.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data.edit.history.entry
+ * @category Community Framework
+ */
class EditHistoryEntryList extends DatabaseObjectList {
/**
- * @see \wcf\data\DatabaseObjectList::$className
- */
+ * @see \wcf\data\DatabaseObjectList::$className
+ */
public $className = 'wcf\data\edit\history\entry\EditHistoryEntry';
}
}
/**
- * @see \wcf\page\IPage::readData()
- */
+ * @see \wcf\page\IPage::readData()
+ */
public function readData() {
parent::readData();
}
/**
- * @see \wcf\page\IPage::assignVariables()
- */
+ * @see \wcf\page\IPage::assignVariables()
+ */
public function assignVariables() {
parent::assignVariables();
use wcf\system\WCF;
/**
-* Manages the search index.
-*
-* @author Tim Duesterhus
-* @copyright 2001-2014 WoltLab GmbH
-* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
-* @package com.woltlab.wcf
-* @subpackage system.search
-* @category Community Framework
-*/
+ * Manages the edit history.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.search
+ * @category Community Framework
+ */
class EditHistoryManager extends SingletonFactory {
/**
- * list of available object types
- * @var array
- */
+ * list of available object types
+ * @var array
+ */
protected $availableObjectTypes = array();
/**
- * @see \wcf\system\SingletonFactory::init()
- */
+ * @see \wcf\system\SingletonFactory::init()
+ */
protected function init() {
// get available object types
$this->availableObjectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.edit.historySavingObject');
}
/**
- * Returns the id of the object type with the given name.
- *
- * @param string $objectType
- * @return integer
- */
+ * Returns the id of the object type with the given name.
+ *
+ * @param string $objectType
+ * @return integer
+ */
public function getObjectTypeID($objectType) {
if (!isset($this->availableObjectTypes[$objectType])) {
throw new SystemException("unknown object type '".$objectType."'");
}
/**
- * Adds a new entry.
- *
- * @param string $objectType
- * @param integer $objectID
- * @param string $message
- * @param integer $time
- * @param integer $userID
- * @param string $username
- * @param string $editReason
- */
+ * Adds a new entry.
+ *
+ * @param string $objectType
+ * @param integer $objectID
+ * @param string $message
+ * @param integer $time
+ * @param integer $userID
+ * @param string $username
+ * @param string $editReason
+ */
public function add($objectType, $objectID, $message, $time, $userID, $username, $editReason) {
// save new entry
$sql = "INSERT INTO wcf".WCF_N."_edit_history_entry
}
/**
- * Deletes edit history entries.
- *
- * @param string $objectType
- * @param array<integer> $objectIDs
- */
+ * Deletes edit history entries.
+ *
+ * @param string $objectType
+ * @param array<integer> $objectIDs
+ */
public function delete($objectType, array $objectIDs) {
$objectTypeID = $this->getObjectTypeID($objectType);
use wcf\data\IUserContent;
/**
-* Represents an object that saves it's edit history.
-*
-* @author Tim Duesterhus
-* @copyright 2001-2014 WoltLab GmbH
-* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
-* @package com.woltlab.wcf
-* @subpackage system.edit
-* @category Community Framework
-*/
+ * Represents an object that saves it's edit history.
+ *
+ * @author Tim Duesterhus
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.edit
+ * @category Community Framework
+ */
interface IHistorySavingObject extends IDatabaseObjectProcessor, IUserContent {
/**
* Reverts the object's text to the given EditHistoryEntry.