public function refreshCache()
 {
     CacheLocal::delete('page', $this->getCollectionID() . ':' . $this->getVersionID());
     CacheLocal::delete('page', $this->getCollectionID() . ':' . 'RECENT');
     CacheLocal::delete('page', $this->getCollectionID() . ':' . 'ACTIVE');
     Events::fire('on_page_version_refresh_cache', $this);
 }
Esempio n. 2
0
 public static function refreshCache()
 {
     CacheLocal::delete('packageHandleList', false);
     CacheLocal::delete('pkgList', 1);
     CacheLocal::delete('pkgList', 0);
 }
Esempio n. 3
0
 public function add($type, $args, $pkg = false)
 {
     CacheLocal::delete('user_attribute_key_by_handle', $args['akHandle']);
     $ak = parent::add('user', $type, $args, $pkg);
     extract($args);
     if ($uakProfileDisplay != 1) {
         $uakProfileDisplay = 0;
     }
     if ($uakMemberListDisplay != 1) {
         $uakMemberListDisplay = 0;
     }
     if ($uakProfileEdit != 1) {
         $uakProfileEdit = 0;
     }
     if ($uakProfileEditRequired != 1) {
         $uakProfileEditRequired = 0;
     }
     if ($uakRegisterEdit != 1) {
         $uakRegisterEdit = 0;
     }
     if ($uakRegisterEditRequired != 1) {
         $uakRegisterEditRequired = 0;
     }
     if (isset($uakIsActive) && !$uakIsActive) {
         $uakIsActive = 0;
     } else {
         $uakIsActive = 1;
     }
     $db = Loader::db();
     $displayOrder = $db->GetOne('select max(displayOrder) from UserAttributeKeys');
     if (!$displayOrder) {
         $displayOrder = 0;
     }
     $displayOrder++;
     $v = array($ak->getAttributeKeyID(), $uakProfileDisplay, $uakMemberListDisplay, $uakProfileEdit, $uakProfileEditRequired, $uakRegisterEdit, $uakRegisterEditRequired, $displayOrder, $uakIsActive);
     $db->Execute('insert into UserAttributeKeys (akID, uakProfileDisplay, uakMemberListDisplay, uakProfileEdit, uakProfileEditRequired, uakRegisterEdit, uakRegisterEditRequired, displayOrder, uakIsActive) values (?, ?, ?, ?, ?, ?, ?, ?, ?)', $v);
     $nak = new UserAttributeKey();
     $nak->load($ak->getAttributeKeyID());
     return $nak;
 }
Esempio n. 4
0
	public function add($at, $args, $pkg = false) {

		// legacy check
		$fargs = func_get_args();
		if (count($fargs) >= 5) {
			$at = $fargs[4];
			$pkg = false;
			$args = array('akHandle' => $fargs[0], 'akName' => $fargs[1], 'akIsSearchable' => $fargs[2]);
		}

		CacheLocal::delete('collection_attribute_key_by_handle', $args['akHandle']);

		$ak = parent::add('collection', $at, $args, $pkg);
		return $ak;
	}
Esempio n. 5
0
 public function add($at, $args, $pkg = false)
 {
     CacheLocal::delete('file_attribute_key_by_handle', $args['akHandle']);
     $ak = parent::add('file', $at, $args, $pkg);
     return $ak;
 }