public function indexAction()
 {
     if (JO_Session::get('successfu_edite')) {
         $this->view->successfu_edite = JO_Session::get('successfu_edite');
         JO_Session::clear('successfu_edite');
     }
     if (JO_Session::get('error_permision')) {
         $this->view->error_permision = JO_Session::get('error_permision');
         JO_Session::clear('error_permision');
     }
     $files = glob(dirname(__FILE__) . '/Modules/*.php');
     $this->view->modules = array();
     if ($files) {
         foreach ($files as $file) {
             if (preg_match('/^([\\w]{1,})Controller$/i', basename($file, '.php'), $match)) {
                 $key = mb_strtolower($match[1], 'utf-8');
                 $this->view->modules[] = array('key' => $key, 'edit' => $this->getRequest()->getModule() . '/modules_' . $key, 'name' => $this->translate($match[1]), 'is_installed' => Model_Extensions_Install::isInstalled($key), 'install' => $this->getRequest()->getModule() . '/modules_' . $key . '/install', 'uninstall' => $this->getRequest()->getModule() . '/modules_' . $key . '/uninstall');
             }
         }
     }
 }
 public function uninstallAction()
 {
     Model_Extensions_Install::uninstall('facebook');
     $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/modules_oauth');
 }
 public function uninstallAction()
 {
     Model_Extensions_Install::uninstall('rackspace');
     $this->redirect($this->getRequest()->getBaseUrl() . $this->getRequest()->getModule() . '/modules_storage');
 }
Exemple #4
0
 public static function deleteUser($user_id)
 {
     $db = JO_Db::getDefaultAdapter();
     $user_info = self::getUser($user_id);
     if (!$user_info) {
         return;
     }
     /*if($user_info['store'] == 's3') {
     			self::deleteImagesAmazon($user_info['avatar']);
     		} else {
     			if($user_info['avatar']) {
     				$model_image = new Helper_Images();
     				$model_image->deleteImages($user_info['avatar']);
     			}
     		}*/
     $query = $db->select()->from('boards')->where('user_id = ?', (string) $user_id);
     $rows = $db->fetchAll($query);
     if ($rows) {
         foreach ($rows as $row) {
             Model_Boards::delete($row['board_id']);
         }
     }
     $ext = Model_Extensions_Install::getByMethod('user_login');
     $front = JO_Front::getInstance();
     foreach ($ext as $login) {
         $model = $front->formatModuleName('model_' . $login . '_users');
         $instance = new $model();
         $instance->deleteByUserId($user_id);
     }
     $db->query("DELETE FROM url_alias WHERE query = 'user_id=" . (string) $user_id . "'");
     $db->delete('users_boards', array('user_id = ?' => (string) $user_id));
     $db->delete('shared_content', array('user_id = ?' => (string) $user_id));
     $db->delete('users_following', array('user_id = ?' => (string) $user_id));
     $db->delete('users_following', array('following_id = ?' => (string) $user_id));
     $db->delete('users_following_ignore', array('user_id = ?' => (string) $user_id));
     $db->delete('users_following_ignore', array('following_id = ?' => (string) $user_id));
     $db->delete('users_following_user', array('user_id = ?' => (string) $user_id));
     $db->delete('users_following_user', array('following_id = ?' => (string) $user_id));
     $db->delete('users_history', array('from_user_id = ?' => (string) $user_id));
     $db->delete('users_history', array('to_user_id = ?' => (string) $user_id));
     $db->delete('users', array('user_id = ?' => (string) $user_id));
 }
 private function getUploadStorages()
 {
     $files = glob(dirname(__FILE__) . '/Modules/Storage/*.php');
     $this->view->modules_url = $this->getRequest()->getModule() . '/modules';
     $modules = array();
     if ($files) {
         foreach ($files as $file) {
             if (preg_match('/^([\\w]{1,})Controller$/i', basename($file, '.php'), $match)) {
                 $key = mb_strtolower($match[1], 'utf-8');
                 $modules[] = array('key' => $key, 'default' => 'Model_Upload_' . ucfirst(strtolower($key)) == Helper_Config::get('file_upload_method'), 'edit' => $this->getRequest()->getModule() . '/modules_storage_' . $key, 'name' => $this->translate($match[1]), 'is_installed' => Model_Extensions_Install::isInstalled($key), 'install' => $this->getRequest()->getModule() . '/modules_storage_' . $key . '/install', 'uninstall' => $this->getRequest()->getModule() . '/modules_storage_' . $key . '/uninstall');
             }
         }
     }
     return $modules;
 }