Esempio n. 1
0
 public function executeMainListPanel()
 {
     try {
         $module = $this->getRequestParameter("m");
         $this->module = $module;
         $this->page = $this->getRequestParameter('page');
         $parent = $this->getRequestParameter('p');
         $res = PanelService::getMainList($parent, $this->getRequestParameter('m'), $this->page);
         if ($module == 'labels' || $module == 'settings') {
             $class = 'Rootfolder';
         } else {
             $document = Document::getDocumentInstance($parent);
             $class = get_class($document);
         }
         // get user's rigts
         $user = $this->getUser()->getSubscriber();
         include SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . SF_APP . '_rights.php';
         $this->user_rights = $allRights[$user->getType()];
         $rights = PanelService::getUserRights($user, $class, $this->getRequestParameter('m'));
         $this->module_rights = $rights;
         if (isset($rights[$class])) {
             $this->rights = explode(",", $rights[$class]);
         } else {
             $this->rights = array();
         }
         $this->children = $res['children'];
         $this->paging = $res['paging'];
     } catch (Exception $e) {
         UtilsHelper::setBackendMsg($e->getMessage(), "error");
     }
     if ($module == 'labels' || $module == 'settings') {
         // main list for XML data editing
         return 'Xml';
     }
 }