Skip to content

Commit

Permalink
Update to 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Jul 29, 2023
1 parent 3cc27a4 commit 57ecc23
Show file tree
Hide file tree
Showing 22 changed files with 78 additions and 76 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<project name="admin" default="dist" basedir=".">

<property name="VERSION" value="2.0.1"/>
<property name="VERSION" value="2.0.2"/>

<tstamp>
<format property="DATE" pattern="%d.%m.%Y" />
Expand Down
28 changes: 25 additions & 3 deletions packages/tpl_admin/ajax/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,32 @@
* @license Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License (http://creativecommons.org/licenses/by-nc-nd/3.0/)
*/

error_reporting(0);
ini_set('display_errors', 0);
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);
define('JPATH_BASE', dirname(__DIR__, 3));
define('MAX_SIZE', '500');

$root = $_SERVER[ 'DOCUMENT_ROOT' ];
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';

use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Factory;
use Joomla\Session\SessionInterface;

$container = Factory::getContainer();
$container->alias(SessionInterface::class, 'session.web.site');

$app = $container->get(AdministratorApplication::class);
$joomlaUser = Factory::getUser();
$lang = Factory::getLanguage();
$doc = Factory::getDocument();

if($joomlaUser->get('id') < 1)
{
return;
}

$root = dirname(__DIR__, 3);

echo unlinkRecursive($root . '/cache/com_cck**', '1');

Expand Down
74 changes: 27 additions & 47 deletions packages/tpl_admin/ajax/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,32 @@

header('Content-type: application/json; charset=utf-8');

$data = [
'data' => [
[
'tag' => "Bikes4Ukraine",
'count' => rand(0, 100),
],
[
'tag' => "find Bikes4Ukraine",
'count' => rand(0, 100),
],
[
'tag' => "Venezuela",
'count' => rand(0, 100),
],
[
'tag' => "Rodrigo Figueredo",
'count' => rand(0, 100),
],
[
'tag' => "CERT-UA",
'count' => rand(0, 100),
],
[
'tag' => "Bushmaster",
'count' => rand(0, 100),
]
]
];

echo json_encode($data);

die;
define('_JEXEC', 1);
define('JPATH_BASE', $_SERVER[ 'DOCUMENT_ROOT' ]);
define('DS', DIRECTORY_SEPARATOR);
define('JPATH_BASE', dirname(__DIR__, 3));
define('MAX_SIZE', '500');

require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';

error_reporting(1);
ini_set('display_errors', 1);

use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Factory;
use Joomla\Session\SessionInterface;

$_app = Factory::getApplication('site');
$user = Factory::getUser();
$container = Factory::getContainer();
$container->alias(SessionInterface::class, 'session.web.site');

$_app->initialise();
$app = $container->get(AdministratorApplication::class);
$joomlaUser = Factory::getUser();
$lang = Factory::getLanguage();
$doc = Factory::getDocument();

if($user->get('id') < 1)
if($joomlaUser->get('id') < 1)
{
return;
}

$app = Factory::getApplication();
$search = $app->input->getString('term');

if(isset($search))
{
$db = Factory::getDbo();
Expand All @@ -85,24 +55,26 @@
$data = [];
foreach($rows as $mod)
{
sort($arr);
$arr = explode(',', $mod->metakey);
$i = 0;
sort($arr);

$i = 0;
foreach($arr as $row)
{
if(trim($row) != '' && $i <= 15)
{
$pos = strpos(mb_strtolower(trim($row)), mb_strtolower($search));
if($pos !== false)
{
$str = trim($row);
$str = str_replace([
$str = trim($row);
$str = str_replace([
'"',
'»',
'«',
'',
''
], '', $str);

$data[] = $str;
}
}
Expand All @@ -112,11 +84,19 @@

$inputs = array_unique($data, SORT_LOCALE_STRING);

$items = [];
foreach($inputs as $input)
{
$items[] = [ 'tag' => $input ];
}

$keyword = [];
foreach($inputs as $k => $v)
foreach($items as $k => $v)
{
$keyword[] = $v;
}

$keyword = [ 'data' => $keyword ];

echo json_encode($keyword);
}
3 changes: 0 additions & 3 deletions packages/tpl_admin/app/css/app.main.2.0.1.css

This file was deleted.

3 changes: 3 additions & 0 deletions packages/tpl_admin/app/css/app.main.2.0.2.css

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/tpl_admin/app/js/app.m-js-tags.2.0.1.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/tpl_admin/app/js/app.m-js-tags.2.0.2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/tpl_admin/app/js/app.main.2.0.1.js

This file was deleted.

Loading

0 comments on commit 57ecc23

Please sign in to comment.