public static function getCurrentPage() { return Wicked_Page::getPage(rtrim(Horde_Util::getFormData('page'), '/'), Horde_Util::getFormData('version'), Horde_Util::getFormData('referrer')); }
<?php /** * Copyright 2003-2014 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you * did not receive this file, see http://www.horde.org/licenses/gpl. * * @author Tyler Colbert <*****@*****.**> */ require_once __DIR__ . '/lib/Application.php'; Horde_Registry::appInit('wicked'); $actionID = Horde_Util::getFormData('actionID'); try { $page = Wicked_Page::getCurrentPage(); } catch (Wicked_Exception $e) { $notification->push(_("Internal error viewing requested page"), 'horde.error'); $page = Wicked_Page::getPage(''); $actionID = null; } switch ($actionID) { case 'lock': if (!$page->allows(Wicked::MODE_LOCKING)) { $notification->push(_("You are not allowed to lock this page"), 'horde.error'); break; } try { $result = $page->lock(); } catch (Wicked_Exception $e) { $notification->push(sprintf(_("Page failed to lock: %s"), $e->getMessage()), 'horde.error'); }