133 $res =
$ilDB->queryF(
'SELECT * FROM frm_drafts_history WHERE history_id = %s',
150 $res =
$ilDB->queryF(
'SELECT * FROM frm_drafts_history WHERE draft_id = %s ORDER BY draft_date DESC',
151 array(
'integer'), array((
int)
$draft_id));
152 $instances = array();
158 $instances[] = $tmp_obj;
176 return $history_draft;
179 public function delete()
183 $ilDB->manipulatef(
'DELETE FROM frm_drafts_history WHERE history_id = %s',
194 $res =
$ilDB->queryF(
'SELECT * FROM frm_drafts_history WHERE draft_id = %s
195 ORDER BY history_id ASC',
196 array(
'integer'), array((
int)
$draft_id));
213 $res =
$ilDB->queryF(
'SELECT * FROM frm_drafts_history WHERE draft_id = %s
214 ORDER BY history_id DESC',
230 $next_id =
$ilDB->nextId(
'frm_drafts_history');
231 $ilDB->insert(
'frm_drafts_history',
232 array(
'history_id' => array(
'integer', $next_id),
233 'draft_id' => array(
'integer', $this->
getDraftId()),
236 'draft_date' => array(
'timestamp',
date(
"Y-m-d H:i:s"))
244 include_once
'Services/MediaObjects/classes/class.ilObjMediaObject.php';
248 foreach($mediaObjects as $mob)
250 foreach($myMediaObjects as $myMob)
265 require_once
'Services/MediaObjects/classes/class.ilObjMediaObject.php';
268 foreach($oldMediaObjects as $oldMob)
281 $draft = ilForumPostDraft::newInstanceByDraftId($this->
getDraftId());
289 $draft->updateDraft();
300 $draft_ids = array();
301 if(count($post_ids) > 0)
306 SELECT frm_drafts_history.history_id, frm_drafts_history.draft_id
307 FROM frm_posts_drafts
308 INNER JOIN frm_drafts_history ON frm_posts_drafts.draft_id
309 WHERE ' .
$ilDB->in(
'post_id', $post_ids,
false,
'integer'));
313 $draft_ids[] =
$row[
'draft_id'];
325 if(count($draft_ids) > 0)
327 $res =
$ilDB->query(
'SELECT history_id FROM frm_drafts_history
328 WHERE ' .
$ilDB->in(
'draft_id', $draft_ids,
false,
'integer'));
336 $ilDB->manipulate(
'DELETE FROM frm_drafts_history WHERE '
337 .
$ilDB->in(
'draft_id', $draft_ids,
false,
'integer'));
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
Class ilForumDraftHistory.
readByHistoryId($history_id)
setHistoryId($history_id)
deleteHistoryByDraftIds($draft_ids=array())
setDraftDate($draft_date)
getLastAutosaveByDraftId($draft_id)
static populateWithDatabaseRecord(ilForumDraftsHistory $history_draft, array $row)
addMobsToDraftsHistory($message)
deleteHistoryByPostIds($post_ids=array())
__construct($history_id=0)
ilForumDraftsHistory constructor.
setPostSubject($post_subject)
static getInstancesByDraftId($draft_id)
setPostMessage($post_message)
getFirstAutosaveByDraftId($draft_id)
static moveMediaObjects($post_message, $source_type, $source_id, $target_type, $target_id, $direction=0)
static _getMediaObjects($a_text, $a_direction=0)
Returns all media objects found in the passed string.