Exemple #1
0
 /**
  * Roll back to a specific version of a page
  * @param pVersion Version number to roll back to
  * @param comment Comment text to be added to the action log
  * @return TRUE if completed successfully
  */
 function rollbackVersion($pVersion, $comment = '')
 {
     global $gBitSystem;
     $ret = FALSE;
     if (parent::rollbackVersion($pVersion, $comment)) {
         $action = "Changed actual version to {$pVersion}";
         $t = $gBitSystem->getUTCTime();
         $query = "insert into `" . BIT_DB_PREFIX . "liberty_action_log`(`log_message`,`content_id`,`last_modified`,`user_id`,`ip`,`error_message`) values(?,?,?,?,?,?)";
         $result = $this->mDb->query($query, array($action, $this->mContentId, $t, ROOT_USER_ID, $_SERVER["REMOTE_ADDR"], $comment));
         $ret = TRUE;
     }
     return $ret;
 }