summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibertyContent.php13
-rw-r--r--admin/schema_inc.php3
2 files changed, 14 insertions, 2 deletions
diff --git a/LibertyContent.php b/LibertyContent.php
index 1a73585..f9d698f 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.46 2006/02/08 18:32:10 mej Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.47 2006/02/08 20:18:31 lsces Exp $
* @author spider <spider@steelsun.com>
*/
@@ -116,8 +116,12 @@ class LibertyContent extends LibertyBase {
* last_modified <br>
* content_type_guid <br>
* format_guid <br>
+ * last_hit <br>
+ * event_time <br>
* hits <br>
- * language <br>
+ * lang_code <br>
+ * source_id <br>
+ * group_id <br>
* title <br>
* ip <br>
* data <br>
@@ -144,6 +148,7 @@ class LibertyContent extends LibertyBase {
// These should never be updated, only inserted
$pParamHash['content_store']['created'] = !empty( $pParamHash['created'] ) ? $pParamHash['created'] : $gBitSystem->getUTCTime();
$pParamHash['content_store']['user_id'] = $pParamHash['user_id'];
+ $pParamHash['content_store']['source_id'] = !empty( $pParamHash['source_id'] ) ? $pParamHash['source_id'] : 0;
} else {
$pParamHash['content_id'] = $this->mContentId;
}
@@ -235,6 +240,10 @@ class LibertyContent extends LibertyBase {
if( !@$this->verifyId( $pParamHash['content_id'] ) ) {
$pParamHash['content_store']['content_id'] = $this->mDb->GenID( 'liberty_content_id_seq' );
$pParamHash['content_id'] = $pParamHash['content_store']['content_id'];
+ if ( $pParamHash['content_store']['source_id'] == 0 ) {
+ $pParamHash['content_store']['source_id'] = $pParamHash['content_id'];
+ $pParamHash['source_id'] = $pParamHash['content_id'];
+ }
// make sure some variables are stuff in case services need getObjectType, mContentId, etc...
$this->mInfo['content_type_guid'] = $pParamHash['content_type_guid'];
$this->mContentId = $pParamHash['content_store']['content_id'];
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 4ea8335..5e204d3 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -43,12 +43,15 @@ $tables = array(
event_time I8 NOTNULL DEFAULT 0,
version I4,
lang_code C(32),
+ source_id I4 NOTNULL,
+ group_id I4 NOTNULL DEFAULT -1,
title C(160),
ip C(39),
data X
CONSTRAINT '
, CONSTRAINT `liberty_content_type_ref` FOREIGN KEY (`content_type_guid`) REFERENCES `".BIT_DB_PREFIX."liberty_content_types`( `content_type_guid` )
, CONSTRAINT `liberty_content_guid_ref` FOREIGN KEY (`format_guid`) REFERENCES `".BIT_DB_PREFIX."liberty_plugins`( `plugin_guid` )'
+ , CONSTRAINT `liberty_content_group_id` FOREIGN KEY (`group_id`) REFERENCES `".BIT_DB_PREFIX."users_groups`( `group_id` )'
",
'liberty_content_history' => "