示例#1
0
 public function __construct(&$db)
 {
     parent::__construct('#__community_config', 'name', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove all cache on configuration change.
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, COMMUNITY_CACHE_TAG_ALL);
 }
示例#2
0
文件: event.php 项目: bizanto/Hooked
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_events', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
 }
示例#3
0
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_groups_category', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove groups category cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT));
 }
示例#4
0
 /**
  * Constructor
  */
 function CTableVideosCategory(&$db)
 {
     parent::__construct('#__community_videos_category', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT));
 }
示例#5
0
文件: album.php 项目: bizanto/Hooked
 /**
  * Constructor
  */
 function __construct(&$db)
 {
     parent::__construct('#__community_photos_albums', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove photo cache on album delete.
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS));
 }
示例#6
0
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_events', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     // Set default timezone to current user's timezone
     $my = CFactory::getUser();
     $this->offset = $my->getParam('timezone');
 }
示例#7
0
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_photos_albums', 'id', $db);
     // General Permission as initial permission
     $this->permissions = 0;
     $my = CFactory::getUser();
     $params = $my->getParams();
     if ($my->id > 0 && $params->get('privacyPhotoView')) {
         $this->permissions = $params->get('privacyPhotoView');
     }
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove photo cache on album delete.
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS));
 }
示例#8
0
文件: video.php 项目: bizanto/Hooked
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_videos', 'id', $db);
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
     CFactory::load('helpers', 'videos');
     $config = CFactory::getConfig();
     $this->_size = $config->get('videosSize');
     $this->_width = CVideosHelper::getVideoSize('width');
     $this->_height = CVideosHelper::getVideoSize('height');
     $this->storage = 'file';
     $this->hits = 0;
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     // load helpers
     CFactory::load('helpers', 'string');
 }
示例#9
0
 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_likes', 'id', $db);
 }