summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2022-06-01 22:57:34 -0400
committerspiderr <spiderr@bitweaver.org>2022-06-01 22:57:34 -0400
commitf195c3a4bb4d04d59b85251fff361d4915d15aea (patch)
tree041a00db324c9786a9bc92338296c726ffc35a8e /includes
parent041774a955ad430056c7ba1ea9a484e3ae6719f5 (diff)
downloadliberty-f195c3a4bb4d04d59b85251fff361d4915d15aea.tar.gz
liberty-f195c3a4bb4d04d59b85251fff361d4915d15aea.tar.bz2
liberty-f195c3a4bb4d04d59b85251fff361d4915d15aea.zip
add storeOptions for options_json X
Diffstat (limited to 'includes')
-rw-r--r--includes/classes/LibertyContent.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/classes/LibertyContent.php b/includes/classes/LibertyContent.php
index 0170312..d842346 100644
--- a/includes/classes/LibertyContent.php
+++ b/includes/classes/LibertyContent.php
@@ -1885,6 +1885,18 @@ class LibertyContent extends LibertyBase implements BitCacheable {
return $ret;
}
+ public function storeOptions( $pKey, $pHash ) {
+ if( $this->isValid() ) {
+ $this->mInfo['options'][$pKey] = $pHash;
+ $optionsJson = json_encode( $this->mInfo['options'] );
+ $this->mDb->query( "UPDATE `".BIT_DB_PREFIX."liberty_content` lc SET `options_json`=? WHERE `content_id`=?", array( $optionsJson, $this->getField( 'content_id' ) ) );
+ }
+ }
+
+ public function setOptions( $pKey, $pHash ) {
+ $this->mInfo['options'][$pKey] = $pHash;
+ }
+
/**
* Register the content type for reference
*