summaryrefslogtreecommitdiff
path: root/backend/php/src/objects/class.recordversion.php
Unidiff
Diffstat (limited to 'backend/php/src/objects/class.recordversion.php') (more/less context) (ignore whitespace changes)
-rw-r--r--backend/php/src/objects/class.recordversion.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/php/src/objects/class.recordversion.php b/backend/php/src/objects/class.recordversion.php
index 3fbc436..f2de14a 100644
--- a/backend/php/src/objects/class.recordversion.php
+++ b/backend/php/src/objects/class.recordversion.php
@@ -247,24 +247,26 @@ class recordversion extends POG_Base
247 } 247 }
248 return $recordversionList; 248 return $recordversionList;
249 } 249 }
250 250
251 251
252 /** 252 /**
253 * Saves the object to the database 253 * Saves the object to the database
254 * @return integer $recordversionId 254 * @return integer $recordversionId
255 */ 255 */
256 function Save() 256 function Save()
257 { 257 {
258 $connection = Database::Connect(); 258 $connection = Database::Connect();
259 $this->update_date = date( 'Y-m-d H:i:s');
260 $this->access_date = date( 'Y-m-d H:i:s');
259 $this->pog_query = "select `recordversionid` from `recordversion` where `recordversionid`='".$this->recordversionId."' LIMIT 1"; 261 $this->pog_query = "select `recordversionid` from `recordversion` where `recordversionid`='".$this->recordversionId."' LIMIT 1";
260 $rows = Database::Query($this->pog_query, $connection); 262 $rows = Database::Query($this->pog_query, $connection);
261 if ($rows > 0) 263 if ($rows > 0)
262 { 264 {
263 $this->pog_query = "update `recordversion` set 265 $this->pog_query = "update `recordversion` set
264 `recordid`='".$this->recordId."', 266 `recordid`='".$this->recordId."',
265 `reference`='".$this->Escape($this->reference)."', 267 `reference`='".$this->Escape($this->reference)."',
266 `header`='".$this->Escape($this->header)."', 268 `header`='".$this->Escape($this->header)."',
267 `data`='".$this->Escape($this->data)."', 269 `data`='".$this->Escape($this->data)."',
268 `version`='".$this->Escape($this->version)."', 270 `version`='".$this->Escape($this->version)."',
269 `previous_version_key`='".$this->Escape($this->previous_version_key)."', 271 `previous_version_key`='".$this->Escape($this->previous_version_key)."',
270 `previous_version_id`='".$this->Escape($this->previous_version_id)."', 272 `previous_version_id`='".$this->Escape($this->previous_version_id)."',
@@ -369,13 +371,13 @@ class recordversion extends POG_Base
369 } 371 }
370 372
371 373
372 /** 374 /**
373 * Associates the record object to this one 375 * Associates the record object to this one
374 * @return 376 * @return
375 */ 377 */
376 function SetRecord(&$record) 378 function SetRecord(&$record)
377 { 379 {
378 $this->recordId = $record->recordId; 380 $this->recordId = $record->recordId;
379 } 381 }
380} 382}
381?> \ No newline at end of file 383?>