Esempio n. 1
0
 public static function getInstance($path, $params)
 {
     $page = parent::getInstance($path, $params);
     $page->userId = $params['user'];
     $page->deleteMode = isset($params['delete']) && $params['delete'];
     return $page;
 }
Esempio n. 2
0
 public static function getInstance($path, $params)
 {
     $page = parent::getInstance($path, $params);
     $page->groupId = $params['group'];
     $page->editMode = isset($params['edit']) && $params['edit'];
     return $page;
 }
Esempio n. 3
0
 public function init($params)
 {
     Page::requireNonce();
     Authorization::logout();
     self::redirectTo('login');
     exit;
 }
Esempio n. 4
0
 public static function getInstance($path, $params)
 {
     $page = parent::getInstance($path, $params);
     $page->uid = isset($params['user']) ? $params['user'] : false;
     $page->confirmed = isset($params['confirmed']);
     $page->revert = isset($params['revert']);
     return $page;
 }
Esempio n. 5
0
 public static function getInstance($path, $params)
 {
     $page = parent::getInstance($path, $params);
     $page->page = isset($params['offset']) ? intval($params['offset']) : 1;
     if ($page->page <= 0) {
         $page->page = 1;
     }
     return $page;
 }
Esempio n. 6
0
 public function init($params)
 {
     Page::requireNonce();
     Page::requirePermission('group.add_groups');
     $dbc = Application::dbConnection();
     $group_id = $dbc->groups()->addGroup('New Group');
     self::redirectTo('groups/details', array('group' => $group_id, 'edit' => 1));
     exit;
 }
Esempio n. 7
0
 private static function initWebRenderer($options)
 {
     $renderer = new WebRenderer($options);
     $renderer->provide('pageURL', function ($path, $params = array()) {
         return Page::getURL($path, $params)->build();
     });
     $renderer->provide('theUser', Authorization::user());
     $renderer->provide('theNonce', Authorization::getNonce());
     return $renderer;
 }
Esempio n. 8
0
 public static function getInstance($path, $params)
 {
     Page::requirePermission('settings.change_site_settings');
     if (!count($path)) {
         self::redirectTo('settings/site/general');
         exit;
     }
     $sname = $path[0];
     $path = self::nextPath($path);
     switch ($sname) {
         case 'general':
             $page = Site\GeneralSettingsPage::getInstance($path, $params);
             break;
         case 'links':
             $page = Site\LinksSettingsPage::getInstance($path, $params);
             break;
         case 'users':
             $page = Site\UsersSettingsPage::getInstance($path, $params);
             break;
         default:
             $page = NotFoundPage::getInstance($path, $params);
     }
     return $page;
 }
Esempio n. 9
0
 public static function getInstance($path, $params)
 {
     $page = parent::getInstance($path, $params);
     $page->linkId = $params['link'];
     $page->editMode = isset($params['edit']) && $params['edit'];
     $page->deleteMode = isset($params['delete']) && $params['delete'];
     return $page;
 }