Ejemplo n.º 1
0
 /**
  * Initialize controller.
  */
 public function init()
 {
     parent::init();
     $this->_facetMenu = new Solrsearch_Model_FacetMenu();
     $this->_helper->mainMenu('search');
     // activate entry in main menu
 }
 public function init()
 {
     parent::init();
     $client = PR_Session::getSession(PR_Session::SESSION_USER);
     if (empty($client)) {
         $this->_helper->redirector("index", "login");
     }
 }
Ejemplo n.º 3
0
 /**
  * Custom access check to be called by parent class.  Returns the value of
  * config key "account.editOwnAccount" if set; false otherwise.
  *
  * @return boolean
  */
 protected function customAccessCheck()
 {
     $parentValue = parent::customAccessCheck();
     $config = $this->getConfig();
     if (!isset($config) or !isset($config->account->editOwnAccount)) {
         return false;
     }
     return $parentValue and $config->account->editOwnAccount;
 }
 public function init()
 {
     parent::init();
     // $client = PR_Session::getSession(PR_Session::SESSION_CLIENT);
     $user = PR_Session::getSession(PR_Session::SESSION_USER);
     //echo("user");print_r($user);
     if (empty($user)) {
         $this->_helper->redirector("index", "login");
     }
 }
Ejemplo n.º 5
0
 /**
  * Setup module.  Check privileges.
  */
 public function init()
 {
     parent::init();
     // Highlight menu entries.
     if (true === Opus_Security_Realm::getInstance()->checkModule('admin')) {
         $this->getHelper('MainMenu')->setActive('admin');
     } else {
         $this->getHelper('MainMenu')->setActive('review');
     }
     $this->_loggedUser = new Publish_Model_LoggedUser();
     $this->view->title = $this->view->translate('review_index_title');
 }
 /**
  * Initializes controller.
  */
 public function init()
 {
     parent::init();
     $this->_documentsHelper = $this->_helper->getHelper('Documents');
     $this->_workflowHelper = $this->_helper->getHelper('Workflow');
     $config = $this->getConfig();
     if (isset($config->confirmation->document->statechange->enabled)) {
         $this->_confirmChanges = $config->confirmation->document->statechange->enabled == 1 ? true : false;
     } else {
         $this->_confirmChanges = true;
     }
 }
Ejemplo n.º 7
0
 public function init()
 {
     parent::init();
     $user = CS_Session::getSession();
     if ($this->view->ajax == 1 && empty($user)) {
         $this->_helper->json(array('logined' => 0));
     } else {
         if (empty($user)) {
             $this->_helper->redirector("index", "login");
         }
     }
 }
Ejemplo n.º 8
0
 public function init()
 {
     parent::init();
     $client = PR_Session::getSession(PR_Session::SESSION_USER);
     if ($this->view->ajax == 1 && empty($client)) {
         $this->_helper->json(array('logined' => 0));
     } else {
         if (empty($client)) {
             // $this->_helper->redirector("index", "login");
             $this->_helper->redirector("index", "star");
         }
     }
 }
 public function init()
 {
     parent::init();
     $this->_model = new Admin_Model_IndexMaintenance($this->getLogger());
     // TODO features will be enabled in later version
     $this->view->disabledFeatureFulltextExtractionCheck = true;
     // TODO OPUSVIER-2955
     $this->view->disabledFeatureIndexOptimization = true;
     // TODO OPUSVIER-2956
     if ($this->_model->getFeatureDisabled()) {
         $this->view->featureDisabled = true;
     } else {
         $this->view->allowConsistencyCheck = $this->_model->allowConsistencyCheck();
         $this->view->allowFulltextExtractionCheck = $this->_model->allowFulltextExtractionCheck();
         $this->view->allowIndexOptimization = $this->_model->allowIndexOptimization();
     }
 }
 public function init()
 {
     parent::init();
     $config = $this->getConfig();
     if (isset($config->admin->documents->linkToAuthorSearch)) {
         $this->view->linkToAuthorSearch = $config->admin->documents->linkToAuthorSearch;
     } else {
         $this->view->linkToAuthorSearch = 0;
     }
     if (isset($config->admin->documents->maxDocsDefault)) {
         $this->_maxDocsDefault = $config->admin->documents->maxDocsDefault;
     } else {
         $this->_maxDocsDefault = 10;
     }
     if (isset($config->admin->documents->defaultview)) {
         $default = $config->admin->documents->defaultview;
         if (!in_array($default, $this->_docOptions)) {
             $this->getLogger()->err("Option 'admin.documents.defaultview' hat ungegueltigen Wert '{$default}'.");
         }
         $this->_stateOptionDefault = $default;
     }
 }
Ejemplo n.º 11
0
 /**
  * The home module is the place for all custom static pages.  This function
  * catches all action calls, thus making a new page available via
  * http://.../home/index/page by simply placing it in
  * modules/home/views/scripts/index/page.phtml
  *
  * @param  string $action     The name of the action that was called.
  * @param  array  $parameters The parameters passed to the action.
  * @return void
  */
 public function __call($action, $parameters)
 {
     if (!'Action' == substr($action, -6)) {
         $this->getLogger()->info(__METHOD__ . ' undefined method: ' . $action);
         parent::__call($action, $parameters);
     }
     // it should be checked if the requested static page exists at all, as
     // otherwise this controller will not throw exceptions of type NO_ACTION
     $actionName = $this->getRequest()->getActionName();
     $phtmlFilesAvailable = $this->getViewScripts();
     if (array_search($actionName, $phtmlFilesAvailable) === FALSE) {
         $this->getLogger()->info(__METHOD__ . ' requested file ' . $actionName . '.phtml is not readable or does not exist');
         parent::__call($action, $parameters);
     }
     $translation = $this->view->translate('help_content_' . $actionName);
     $helpFilesAvailable = Home_Model_HelpFiles::getFiles();
     $pos = array_search($translation, $helpFilesAvailable);
     if ($pos === FALSE) {
         $this->view->text = $translation;
     } else {
         $this->view->text = Home_Model_HelpFiles::getFileContent($helpFilesAvailable[$pos]);
     }
 }
Ejemplo n.º 12
0
 public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     $this->log = $this->getLogger();
     $this->session = new Zend_Session_Namespace('Publish');
     parent::__construct($request, $response, $invokeArgs);
 }
Ejemplo n.º 13
0
 /**
  * Initializes controller.
  */
 public function init()
 {
     parent::init();
     $this->_documentsHelper = $this->_helper->getHelper('Documents');
 }
 public function init()
 {
     parent::init();
     $this->_statisticsModel = new Admin_Model_Statistics();
 }
Ejemplo n.º 15
0
 public function init()
 {
     parent::init();
     //$this->_helper->_layout->setLayout('login');
 }
Ejemplo n.º 16
0
 /**
  * Initialisiert den Controller.
  */
 public function init()
 {
     parent::init();
     $this->loadDefaultMessages();
 }
Ejemplo n.º 17
0
 /**
  * Initializes common controller variables.
  */
 public function init()
 {
     parent::init();
     $this->_exportHelper = new CitationExport_Model_Helper($this->view->fullUrl(), $this->view->getScriptPath('index'));
     $this->view->title = $this->view->translate('citationExport_modulename');
 }
Ejemplo n.º 18
0
 public function init()
 {
     parent::init();
     $this->getHelper('MainMenu')->setActive('publish');
 }
Ejemplo n.º 19
0
 public function init()
 {
     parent::init();
     $this->_documentTypesHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('DocumentTypes');
 }
Ejemplo n.º 20
0
 public function init()
 {
     parent::init();
     $this->_helper->mainMenu('browsing');
     $this->seriesUtil = new Solrsearch_Model_SeriesUtil();
 }
 /**
  * Setup theme path
  *
  * @return void
  */
 public function init()
 {
     parent::init();
 }
Ejemplo n.º 22
0
 public function init()
 {
     $this->session = new Zend_Session_Namespace('Publish');
     parent::init();
 }