-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,309 additions
and
1,307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<access component="com_attrs"> | ||
<section name="component"> | ||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC"/> | ||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC"/> | ||
</section> | ||
</access> | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<access component="com_attrs"> | ||
<section name="component"> | ||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC"/> | ||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC"/> | ||
</section> | ||
</access> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\BaseController; | ||
use Joomla\CMS\Language\Text; | ||
use Symfony\Component\Yaml\Exception\RuntimeException; | ||
|
||
if (!Factory::getUser()->authorise('core.manage', 'com_attrs')) { | ||
throw new RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 403); | ||
} | ||
|
||
$controller = BaseController::getInstance('attrs'); | ||
$controller->execute(Factory::getApplication()->input->get('task')); | ||
$controller->redirect(); | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\BaseController; | ||
use Joomla\CMS\Language\Text; | ||
use Symfony\Component\Yaml\Exception\RuntimeException; | ||
|
||
if (!Factory::getUser()->authorise('core.manage', 'com_attrs')) { | ||
throw new RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 403); | ||
} | ||
|
||
$controller = BaseController::getInstance('attrs'); | ||
$controller->execute(Factory::getApplication()->input->get('task')); | ||
$controller->redirect(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
<?xml version="1.0"?> | ||
<extension type="component" version="3.7.0" method="upgrade"> | ||
<name>COM_ATTRS</name> | ||
<version>1.3.2</version> | ||
<creationDate>July 2021</creationDate> | ||
<author>Aleksey A. Morozov</author> | ||
<authorEmail>alekvolsk@yandex.ru</authorEmail> | ||
<authorUrl>https://alekvolsk.pw</authorUrl> | ||
<copyright>© Aleksey A. Morozov. All right reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt</license> | ||
<description>COM_ATTRS_DESC</description> | ||
<install> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file> | ||
</sql> | ||
</install> | ||
<uninstall> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file> | ||
</sql> | ||
</uninstall> | ||
<update> | ||
<schemas> | ||
<schemapath type="mysql">sql/updates/mysql</schemapath> | ||
</schemas> | ||
</update> | ||
<administration> | ||
<menu>COM_ATTRS</menu> | ||
<files folder="admin"> | ||
<filename>attrs.php</filename> | ||
<filename>controller.php</filename> | ||
<filename>config.xml</filename> | ||
<filename>access.xml</filename> | ||
<folder>controllers</folder> | ||
<folder>layouts</folder> | ||
<folder>helpers</folder> | ||
<folder>models</folder> | ||
<folder>sql</folder> | ||
<folder>tables</folder> | ||
<folder>views</folder> | ||
</files> | ||
<languages folder="admin"> | ||
<language tag="en-GB">language/en-GB/en-GB.com_attrs.ini</language> | ||
<language tag="en-GB">language/en-GB/en-GB.com_attrs.sys.ini</language> | ||
<language tag="ru-RU">language/ru-RU/ru-RU.com_attrs.ini</language> | ||
<language tag="ru-RU">language/ru-RU/ru-RU.com_attrs.sys.ini</language> | ||
</languages> | ||
</administration> | ||
</extension> | ||
<?xml version="1.0"?> | ||
<extension type="component" version="3.7.0" method="upgrade"> | ||
<name>COM_ATTRS</name> | ||
<version>1.3.3</version> | ||
<creationDate>July 2021</creationDate> | ||
<author>Aleksey A. Morozov</author> | ||
<authorEmail>alekvolsk@yandex.ru</authorEmail> | ||
<authorUrl>https://alekvolsk.pw</authorUrl> | ||
<copyright>© Aleksey A. Morozov. All right reserved.</copyright> | ||
<license>GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt</license> | ||
<description>COM_ATTRS_DESC</description> | ||
<install> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file> | ||
</sql> | ||
</install> | ||
<uninstall> | ||
<sql> | ||
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file> | ||
</sql> | ||
</uninstall> | ||
<update> | ||
<schemas> | ||
<schemapath type="mysql">sql/updates/mysql</schemapath> | ||
</schemas> | ||
</update> | ||
<administration> | ||
<menu>COM_ATTRS</menu> | ||
<files folder="admin"> | ||
<filename>attrs.php</filename> | ||
<filename>controller.php</filename> | ||
<filename>config.xml</filename> | ||
<filename>access.xml</filename> | ||
<folder>controllers</folder> | ||
<folder>layouts</folder> | ||
<folder>helpers</folder> | ||
<folder>models</folder> | ||
<folder>sql</folder> | ||
<folder>tables</folder> | ||
<folder>views</folder> | ||
</files> | ||
<languages folder="admin"> | ||
<language tag="en-GB">language/en-GB/en-GB.com_attrs.ini</language> | ||
<language tag="en-GB">language/en-GB/en-GB.com_attrs.sys.ini</language> | ||
<language tag="ru-RU">language/ru-RU/ru-RU.com_attrs.ini</language> | ||
<language tag="ru-RU">language/ru-RU/ru-RU.com_attrs.sys.ini</language> | ||
</languages> | ||
</administration> | ||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<config> | ||
<fieldset name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC"> | ||
<field name="rules" type="rules" label="JCONFIG_PERMISSIONS_LABEL" class="inputbox" validate="rules" filter="rules" component="com_attrs" section="component"/> | ||
</fieldset> | ||
</config> | ||
<?xml version="1.0"?> | ||
<config> | ||
<fieldset name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC"> | ||
<field name="rules" type="rules" label="JCONFIG_PERMISSIONS_LABEL" class="inputbox" validate="rules" filter="rules" component="com_attrs" section="component"/> | ||
</fieldset> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\BaseController; | ||
|
||
class AttrsController extends BaseController | ||
{ | ||
|
||
function display($cachable = false, $urlparams = []) | ||
{ | ||
$this->default_view = 'items'; | ||
parent::display($cachable, $urlparams); | ||
return $this; | ||
} | ||
|
||
public function getAjax() | ||
{ | ||
$input = Factory::getApplication()->input; | ||
$model = $this->getModel('ajax'); | ||
$action = $input->getCmd('action'); | ||
$reflection = new ReflectionClass($model); | ||
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC); | ||
$methodList = []; | ||
foreach ($methods as $method) { | ||
$methodList[] = $method->name; | ||
} | ||
if (in_array($action, $methodList)) { | ||
$model->$action(); | ||
} | ||
exit; | ||
} | ||
} | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\BaseController; | ||
|
||
class AttrsController extends BaseController | ||
{ | ||
|
||
function display($cachable = false, $urlparams = []) | ||
{ | ||
$this->default_view = 'items'; | ||
parent::display($cachable, $urlparams); | ||
return $this; | ||
} | ||
|
||
public function getAjax() | ||
{ | ||
$input = Factory::getApplication()->input; | ||
$model = $this->getModel('ajax'); | ||
$action = $input->getCmd('action'); | ||
$reflection = new ReflectionClass($model); | ||
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC); | ||
$methodList = []; | ||
foreach ($methods as $method) { | ||
$methodList[] = $method->name; | ||
} | ||
if (in_array($action, $methodList)) { | ||
$model->$action(); | ||
} | ||
exit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\FormController; | ||
|
||
class AttrsControllerItem extends FormController | ||
{ | ||
|
||
function __construct($config = []) | ||
{ | ||
$this->view_list = 'items'; | ||
parent::__construct($config); | ||
} | ||
|
||
protected function allowEdit($data = [], $key = 'id') | ||
{ | ||
return Factory::getUser()->authorise('core.manage', 'com_attrs'); | ||
} | ||
} | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\MVC\Controller\FormController; | ||
|
||
class AttrsControllerItem extends FormController | ||
{ | ||
|
||
function __construct($config = []) | ||
{ | ||
$this->view_list = 'items'; | ||
parent::__construct($config); | ||
} | ||
|
||
protected function allowEdit($data = [], $key = 'id') | ||
{ | ||
return Factory::getUser()->authorise('core.manage', 'com_attrs'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\AdminController; | ||
|
||
class AttrsControllerItems extends AdminController | ||
{ | ||
function __construct($config = []) | ||
{ | ||
parent::__construct($config); | ||
} | ||
|
||
public function getModel($name = 'Item', $prefix = 'AttrsModel', $config = ['ignore_request' => true]) | ||
{ | ||
return parent::getModel($name, $prefix, $config); | ||
} | ||
} | ||
<?php defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\MVC\Controller\AdminController; | ||
|
||
class AttrsControllerItems extends AdminController | ||
{ | ||
function __construct($config = []) | ||
{ | ||
parent::__construct($config); | ||
} | ||
|
||
public function getModel($name = 'Item', $prefix = 'AttrsModel', $config = ['ignore_request' => true]) | ||
{ | ||
return parent::getModel($name, $prefix, $config); | ||
} | ||
} |
Oops, something went wrong.