public function testRemoveLinkParam() { URLHelper::addLinkParam('foo', 'bar'); URLHelper::addLinkParam('answer', 42); URLHelper::removeLinkParam('foo'); $this->assertEquals('?answer=42', URLHelper::getURL('')); }
function before_filter(&$action, &$args) { parent::before_filter($action, $args); // Remove cid URLHelper::removeLinkParam('cid'); unset($_SESSION['SessionSeminar']); $this->set_layout($GLOBALS['template_factory']->open('layouts/base_without_infobox')); Navigation::activateItem('/profile/index'); URLHelper::addLinkParam('username', Request::username('username')); PageLayout::setHelpKeyword('Basis.Homepage'); SkipLinks::addIndex(_('Benutzerprofil'), 'user_profile', 100); $this->user = User::findCurrent(); // current logged in user $this->perm = $GLOBALS['perm']; // perms of current logged in user $this->current_user = User::findByUsername(Request::username('username', $this->user->username)); // current selected user // get additional informations to selected user $this->profile = new ProfileModel($this->current_user->user_id, $this->user->user_id); // set the page title depending on user selection if ($this->current_user['user_id'] == $this->user->id && !$this->current_user['locked']) { PageLayout::setTitle(_('Mein Profil')); UserConfig::get($this->user->id)->store('PROFILE_LAST_VISIT', time()); } elseif ($this->current_user['user_id'] && ($this->perm->have_perm('root') || !$this->current_user['locked'] && get_visibility_by_id($this->current_user['user_id']))) { PageLayout::setTitle(_('Profil') . ' - ' . $this->current_user->getFullname()); object_add_view($this->current_user->user_id); } else { PageLayout::setTitle(_('Profil')); $action = 'not_available'; } }
public function index_action() { PageLayout::setHelpKeyword("Basis.MeineStudiengruppen"); PageLayout::setTitle(_("Meine Studiengruppen")); URLHelper::removeLinkParam('cid'); $this->studygroups = MyRealmModel::getStudygroups(); $this->nav_elements = MyRealmModel::calc_single_navigation($this->studygroups); $this->set_sidebar(); }
/** * Common tasks for all actions. */ function before_filter(&$action, &$args) { parent::before_filter($action, $args); URLHelper::removeLinkParam('cid'); // ajax if (Request::isXhr()) { $this->via_ajax = true; $this->set_layout(null); } // user must have root permission $GLOBALS['perm']->check('root'); // set navigation Navigation::activateItem('/admin/config/banner'); //pagelayout PageLayout::setTitle(_('Verwaltung der Banner')); // Define banner target types $this->target_types = array('url' => _('URL'), 'seminar' => _('Veranstaltung'), 'inst' => _('Einrichtung'), 'user' => _('Person'), 'none' => _('Kein Verweis')); // Define banner priorities $this->priorities = array(0 => '0 (' . _('nicht anzeigen') . ')', 1 => '1 (' . _('sehr niedrig') . ')', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10 (' . _('sehr hoch') . ')'); //Infobox $this->setSidebar(); }
/** * This function closes a opened Veranstaltung or Einrichtung * * @global string $SessionSeminar * @global array $SessSemName * @global string $SemSecLevelRead * @global string $SemSecLevelWrite * @global string $SemUserStatus * @global boolean $rechte * @global object $sess * * @return void */ function closeObject() { global $SessionSeminar, $SessSemName, $SemSecLevelRead, $SemSecLevelWrite, $SemUserStatus, $rechte, $sess; $SessionSeminar = null; $SessSemName = array(); $SemSecLevelRead = null; $SemSecLevelWrite = null; $SemUserStatus = null; $rechte = false; unset($_SESSION['SessionSeminar']); unset($_SESSION['SessSemName']); unset($_SESSION['raumzeitFilter']); URLHelper::removeLinkParam('cid'); }
require_once 'lib/datei.inc.php'; require_once 'lib/msg.inc.php'; $open = Request::option('open'); $close = Request::option('close'); $check_all = Request::option('check_all'); //Switch fuer die Ansichten URLHelper::bindLinkParam('data', $folder_system_data); if (Request::option('cmd') == 'tree') { URLHelper::removeLinkParam('data'); $folder_system_data = array(); $folder_system_data['cmd'] = 'tree'; URLHelper::addLinkParam('data', $folder_system_data); } elseif (Request::option('cmd') == 'all') { URLHelper::removeLinkParam('data'); $folder_system_data = array(); $folder_system_data['cmd'] = 'all'; URLHelper::addLinkParam('data', $folder_system_data); } elseif(!isset($folder_system_data['cmd'])) { $folder_system_data['cmd'] = 'all'; } if (Request::option('orderby')) { $folder_system_data['orderby'] = Request::option('orderby'); } /////////////////////////////////////////////////////////// //Zip-Download-Funktionen /////////////////////////////////////////////////////////// if (Request::get('folderzip')) {
public function index_action() { // switch to the view the user has selected in his personal settings $default_view = $this->settings['view'] ?: 'week'; // Remove cid if (Request::option('self')) { URLHelper::removeLinkParam('cid'); unset($_SESSION['SessSemName']); unset($_SESSION['SessionSeminar']); $this->redirect(URLHelper::getURL('dispatch.php/' . $this->base . $default_view . '/' . $GLOBALS['user']->id, array(), true)); } else { $this->redirect(URLHelper::getURL('dispatch.php/' . $this->base . $default_view)); } }