Example #1
0
 public function onEnable()
 {
     parent::onEnable();
     $db = $this->getDb();
     $db->query("UPDATE `engine4_core_modules` SET `enabled`= 0 WHERE `engine4_core_modules`.`name` = 'group';");
     $this->updateGroupConfiguration('1');
     //Update album table for advgroup compatible
     $select = new Zend_Db_Select($db);
     $select->from('engine4_group_albums')->where('user_id = 0');
     $albums = $select->query()->fetchAll();
     if (count($albums) > 0) {
         foreach ($albums as $album) {
             $select = new Zend_Db_Select($db);
             $select->from('engine4_group_groups')->where('group_id = ?', $album['group_id']);
             $group = $select->query()->fetch();
             if ($group) {
                 $db->query("UPDATE `engine4_group_albums` SET `user_id` =" . $group['user_id'] . ", `title`= 'Group Profile' WHERE `engine4_group_albums`.`album_id` =" . $album['album_id'] . ";");
             }
         }
     }
 }
Example #2
0
 public function onEnable()
 {
     parent::onEnable();
     $db = $this->getDb();
     $db->query("UPDATE `engine4_core_modules` SET `enabled`= 0 WHERE `engine4_core_modules`.`name` = 'event';");
 }
Example #3
0
 function onEnable()
 {
     if ($this->checkModuleAlbum()) {
         $db = $this->getDb();
         $db->query("UPDATE `engine4_core_modules` SET `enabled`= 0 WHERE `engine4_core_modules`.`name` = 'album';");
         $query = "select * FROM `engine4_authorization_allow` AS a1  Where a1.resource_type = 'album' AND EXISTS (\n                                    SELECT * FROM `engine4_authorization_allow` a2\n                                    WHERE a2.resource_type = 'advalbum_album'\n                                    AND a1.resource_id = a2.resource_id\n                                    AND a1.`action` = a2.`action`\n                                    AND a1.role = a2.role\n                                    AND a1.role_id = a2.role_id)";
         $this->deleteDuplicateAlbumPermissionRow($query);
         $this->updateAlbumsConfiguration("1");
     }
     parent::onEnable();
 }
Example #4
0
	public function onEnable() {
		parent::onEnable();

		// Disable SE Video module
		$db = $this -> getDb();
		$db -> query("UPDATE `engine4_core_modules` SET `enabled`= 0 WHERE `engine4_core_modules`.`name` = 'video';");

		$this -> _addNonCategory();
		$this -> _synchronizeStatisticData();
		$this -> _updateActionTypes('ynvideo');
		$this -> _addMenuItems();
	}
Example #5
0
 function onEnable()
 {
     $db = $this->getDb();
     $db->query("UPDATE `engine4_user_signup` SET `class` = 'Contactimporter_Plugin_Signup_Invite' WHERE `class` = 'User_Plugin_Signup_Invite';");
     parent::onEnable();
 }