Файловый менеджер - Редактировать - /var/www/iplanru/data/www/i-plan.ru/administrator/components/com_pay/controllers/discount.php
Назад
<?php // No direct access defined( '_JEXEC' ) or die; // Подключаем библиотеку controllerform Joomla. jimport('joomla.application.component.controllerform'); /** * Controller for edit current element * @author kirdinyuri */ class PayControllerDiscount extends JControllerForm { /** * Class constructor * @param array $config */ function __construct( $config = array() ) { $this->view_list = 'discounts'; parent::__construct( $config ); } /** * Method override to check if you can edit an existing record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * @since 1.6 */ protected function allowEdit( $data = array(), $key = 'id' ) { // инициализируем переменные $recordId = ( int )isset( $data[$key] ) ? $data[$key] : 0; //получение объекта текущего пользователя $user = JFactory::getUser(); //Получаем идентификатор пользователя $userId = $user->get( 'id' ); // Сначала проверяем общий доступ на редактирование и если //пользователь может редактировать то возвращаем истину if ( $user->authorise( 'core.edit', 'com_pay.discount.' . $recordId ) ) { return true; } return parent::allowEdit( $data, $key ); } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45-1~dotdeb+6.1 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка