Skip to content

Commit

Permalink
Версия 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriitux committed May 17, 2019
1 parent 8c57c39 commit bdb07ee
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getDirectories()
{
$app = Factory::getApplication();
$data = $app->input->getArray();
$path = JPATH_ROOT . DIRECTORY_SEPARATOR . $data['path'];
$path = $data['path'];

JLoader::register('QuantummanagerFileSystemLocal', JPATH_ROOT . '/administrator/components/com_quantummanager/filesystem/local.php');
echo QuantummanagerFileSystemLocal::getDirectories($path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function getInput()
'right' => '',
'container-bottom' => '',
'bottom' => '',
'container-bottom-fixed' => '',
];

foreach ($fields as $field => $options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function createDirectory($path, $name)
public static function getDirectories($path)
{
JLoader::register('QuantummanagerHelper', JPATH_SITE . '/administrator/components/com_quantummanager/helpers/quantummanager.php');
$path = QuantummanagerHelper::preparePath($path);
$path = JPATH_ROOT . DIRECTORY_SEPARATOR . QuantummanagerHelper::preparePath($path);
$directories = [];
$directories = self::showdir($path, true, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public static function preparePath($path)
$pathConfig = $componentParams->get('path', 'images');

$path = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
$path = preg_replace("#" . JPATH_SITE . "\/root(\/)?#", '', $path);
$path = preg_replace("#" . JPATH_ROOT . "\/root(\/)?#", '', $path);
$path = preg_replace("#^root(\/)?#", '', $path);
$path = str_replace('..' . DIRECTORY_SEPARATOR, '', $path);

Expand All @@ -197,7 +197,9 @@ public static function preparePath($path)
$path = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
}

$folders = explode(DIRECTORY_SEPARATOR, $path);
$pathCurrent = str_replace(JPATH_ROOT, '', $path);
$pathCurrent = str_replace(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $pathCurrent);
$folders = explode(DIRECTORY_SEPARATOR, $pathCurrent);
$currentTmp = '';

foreach ($folders as $tmpFolder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FLIP_VERTICAL="Flip Vertical"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_CLEAR="Clear"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_DISABLE="Block"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_ENABLE="Unlock"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Free mode"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Free mode"

COM_QUANTUMMANAGER_HELP_QUESTIONS="Any questions?"
COM_QUANTUMMANAGER_HELP_QUESTIONS_CREATE="Ask"
COM_QUANTUMMANAGER_HELP_QUESTIONS_SHOW="View all"
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_ENABLE="Unlock"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Free mode"

COM_QUANTUMMANAGER_WRONG_JOOMLA="You need at least Joomla 3.8.1."
COM_QUANTUMMANAGER_WRONG_PHP="You need PHP version at least 5.6"
COM_QUANTUMMANAGER_WRONG_PHP="You need PHP version at least 5.6"

COM_QUANTUMMANAGER_HELP_QUESTIONS="Any questions?"
COM_QUANTUMMANAGER_HELP_QUESTIONS_CREATE="Ask"
COM_QUANTUMMANAGER_HELP_QUESTIONS_SHOW="View all"
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FLIP_VERTICAL="Отразить по
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_CLEAR="Очистить"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_DISABLE="Заблокировать"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_ENABLE="Разблокировать"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Свободный режим"
COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Свободный режим"

COM_QUANTUMMANAGER_HELP_QUESTIONS="Есть вопросы?"
COM_QUANTUMMANAGER_HELP_QUESTIONS_CREATE="Спросить"
COM_QUANTUMMANAGER_HELP_QUESTIONS_SHOW="Просмотреть все"
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ COM_QUANTUMMANAGER_FIELDS_QUANTUMCROPPERJS_FREE="Свободный режим"

COM_QUANTUMMANAGER_WRONG_JOOMLA="Ваша версия Joomla слишком старая. Quantum Manager будет работать только на Joomla с версии 3.8.1."
COM_QUANTUMMANAGER_WRONG_PHP="Нужна версия PHP не ниже 5.6"

COM_QUANTUMMANAGER_HELP_QUESTIONS="Есть вопросы?"
COM_QUANTUMMANAGER_HELP_QUESTIONS_CREATE="Спросить"
COM_QUANTUMMANAGER_HELP_QUESTIONS_SHOW="Просмотреть все"
10 changes: 6 additions & 4 deletions administrator/components/com_quantummanager/layouts/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@
* @link https://delo-design.ru
*/
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>

<div class="quantummanager-help">
<div class="close"></div>
<div class="quantummanager-help-content">
<div>
<span>Есть вопросы?</span>
<span><?php echo Text::_('COM_QUANTUMMANAGER_HELP_QUESTIONS'); ?></span>
</div>
<div>
<a href="https://github.com/Delo-Design/quantummanager/issues/new" target="_blank">Спросить</a>
<a href="https://github.com/Delo-Design/quantummanager/issues/new" target="_blank"><?php echo Text::_('COM_QUANTUMMANAGER_HELP_QUESTIONS_CREATE'); ?></a>
<span>|</span>
<a href="https://github.com/Delo-Design/quantummanager/issues" target="_blank">Просмотреть все</a>
<a href="https://github.com/Delo-Design/quantummanager/issues" target="_blank"><?php echo Text::_('COM_QUANTUMMANAGER_HELP_QUESTIONS_SHOW'); ?></a>
</div>
<div>
<span>Контакт с автором</span>
<span><a href="tg://resolve?domain=tsymbalmitia">@tsymbalmitia</a> (telegram)</span>
<span>|</span>
<span><a href="mailto:[email protected]">quantum@delo-design.ru</a> (email)</span>
<span><a href="mailto:[email protected]">quantum@hika.su</a> (email)</span>
</div>
<div>
<button class="btn">Скрыть</button>
Expand Down
2 changes: 1 addition & 1 deletion quantummanager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>https://delo-design.ru</authorUrl>
<copyright>Copyright (C) 2019 "Delo Design". All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>1.0</version>
<version>1.0.1</version>
<description>COM_QUANTUMMANAGER_XML_DESCRIPTION</description>

<scriptfile>script.php</scriptfile>
Expand Down

0 comments on commit bdb07ee

Please sign in to comment.