Upgraded to JCB v2.12.10

This commit is contained in:
Llewellyn van der Merwe 2021-10-18 21:47:53 +02:00
parent 8ee0fcffc0
commit 64390bd418
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
88 changed files with 9690 additions and 9861 deletions

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 8th February, 2021
+ *Last Build*: 18th October, 2021
+ *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,7 +23,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16831**
+ *Line count*: **16817**
+ *File count*: **156**
+ *Folder count*: **57**

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 8th February, 2021
+ *Last Build*: 18th October, 2021
+ *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,7 +23,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16831**
+ *Line count*: **16817**
+ *File count*: **156**
+ *Folder count*: **57**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,6 +21,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
@ -471,7 +472,7 @@ abstract class DemoHelper
/**
* Prepares the xml document
*/
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Joomla Component Builder', $description = null, $category = null,$keywords = null, $modified = null)
public static function xls($rows, $fileName = null, $title = null, $subjectTab = null, $creator = 'Vast Development Method', $description = null, $category = null,$keywords = null, $modified = null)
{
// set the user
$user = JFactory::getUser();
@ -505,7 +506,7 @@ abstract class DemoHelper
// Set document properties
$spreadsheet->getProperties()
->setCreator($creator)
->setCompany('Joomla Component Builder')
->setCompany('Vast Development Method')
->setLastModifiedBy($modified)
->setTitle($title)
->setSubject($subjectTab);
@ -1122,12 +1123,12 @@ abstract class DemoHelper
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPathModel))
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage trashhelper.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -1,157 +0,0 @@
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.js
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvvvvvvv_required = false;
jform_vvvvvvvvvw_required = false;
jform_vvvvvvvvvx_required = false;
// Initial Script
jQuery(document).ready(function()
{
var add_vvvvvvv = jQuery("#jform_add input[type='radio']:checked").val();
vvvvvvv(add_vvvvvvv);
});
// the vvvvvvv function
function vvvvvvv(add_vvvvvvv)
{
// set the function logic
if (add_vvvvvvv == 1)
{
jQuery('#jform_dateofbirth').closest('.control-group').show();
// add required attribute to dateofbirth field
if (jform_vvvvvvvvvv_required)
{
updateFieldRequired('dateofbirth',0);
jQuery('#jform_dateofbirth').prop('required','required');
jQuery('#jform_dateofbirth').attr('aria-required',true);
jQuery('#jform_dateofbirth').addClass('required');
jform_vvvvvvvvvv_required = false;
}
jQuery('#jform_email').closest('.control-group').show();
// add required attribute to email field
if (jform_vvvvvvvvvw_required)
{
updateFieldRequired('email',0);
jQuery('#jform_email').prop('required','required');
jQuery('#jform_email').attr('aria-required',true);
jQuery('#jform_email').addClass('required');
jform_vvvvvvvvvw_required = false;
}
jQuery('#jform_image').closest('.control-group').show();
jQuery('#jform_mobile_phone').closest('.control-group').show();
// add required attribute to mobile_phone field
if (jform_vvvvvvvvvx_required)
{
updateFieldRequired('mobile_phone',0);
jQuery('#jform_mobile_phone').prop('required','required');
jQuery('#jform_mobile_phone').attr('aria-required',true);
jQuery('#jform_mobile_phone').addClass('required');
jform_vvvvvvvvvx_required = false;
}
jQuery('#jform_website').closest('.control-group').show();
}
else
{
jQuery('#jform_dateofbirth').closest('.control-group').hide();
// remove required attribute from dateofbirth field
if (!jform_vvvvvvvvvv_required)
{
updateFieldRequired('dateofbirth',1);
jQuery('#jform_dateofbirth').removeAttr('required');
jQuery('#jform_dateofbirth').removeAttr('aria-required');
jQuery('#jform_dateofbirth').removeClass('required');
jform_vvvvvvvvvv_required = true;
}
jQuery('#jform_email').closest('.control-group').hide();
// remove required attribute from email field
if (!jform_vvvvvvvvvw_required)
{
updateFieldRequired('email',1);
jQuery('#jform_email').removeAttr('required');
jQuery('#jform_email').removeAttr('aria-required');
jQuery('#jform_email').removeClass('required');
jform_vvvvvvvvvw_required = true;
}
jQuery('#jform_image').closest('.control-group').hide();
jQuery('#jform_mobile_phone').closest('.control-group').hide();
// remove required attribute from mobile_phone field
if (!jform_vvvvvvvvvx_required)
{
updateFieldRequired('mobile_phone',1);
jQuery('#jform_mobile_phone').removeAttr('required');
jQuery('#jform_mobile_phone').removeAttr('aria-required');
jQuery('#jform_mobile_phone').removeClass('required');
jform_vvvvvvvvvx_required = true;
}
jQuery('#jform_website').closest('.control-group').hide();
}
}
// update fields required
function updateFieldRequired(name, status) {
// check if not_required exist
if (jQuery('#jform_not_required').length > 0) {
var not_required = jQuery('#jform_not_required').val().split(",");
if(status == 1)
{
not_required.push(name);
}
else
{
not_required = removeFieldFromNotRequired(not_required, name);
}
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
}
}
// remove field from not_required
function removeFieldFromNotRequired(array, what) {
return array.filter(function(element){
return element !== what;
});
}
// fix not required array
function fixNotRequiredArray(array) {
var seen = {};
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
});
}
// remove empty from not_required array
function removeEmptyFromNotRequiredArray(array) {
return array.filter(function (el) {
// remove ( 一_一) as well - lol
return (el.length > 0 && '一_一' !== el);
});
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !== val.length){
return true;
}
return false;
}

View File

@ -120,8 +120,6 @@
maxlength="150"
description="COM_DEMO_LOOK_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_DEMO_LOOK_NAME_MESSAGE"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage import.php
@ -21,6 +21,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Utilities\ArrayHelper;
use PhpOffice\PhpSpreadsheet\IOFactory;
@ -231,7 +233,7 @@ class DemoModelImport extends JModelLegacy
// Move uploaded file
jimport('joomla.filesystem.file');
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
$p_file = File::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
// Was the package downloaded?
if (!$p_file)
@ -409,12 +411,12 @@ class DemoModelImport extends JModelLegacy
// Is the package file a valid file?
if (is_file($package))
{
JFile::delete($package);
File::delete($package);
}
elseif (is_file(JPath::clean($package)))
{
// It might also be just a base filename
JFile::delete(JPath::clean($package));
File::delete(JPath::clean($package));
}
}

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -123,12 +123,6 @@ class DemoModelLook extends JModelAdmin
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_demo.look');
}
}
return $item;
@ -252,7 +246,7 @@ class DemoModelLook extends JModelAdmin
*/
public function getScript()
{
return 'administrator/components/com_demo/models/forms/look.js';
return 'media/com_demo/js/look.js';
}
/**

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_DEMO</name>
<creationDate>8th February, 2021</creationDate>
<creationDate>18th October, 2021</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage script.php
@ -21,6 +21,8 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
JHTML::_('behavior.modal');
/**
@ -445,12 +447,12 @@ class com_demoInstallerScript
{
}
// check if the PHPExcel stuff is still around
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_demo/helpers/PHPExcel.php'))
if (File::exists(JPATH_ADMINISTRATOR . '/components/com_demo/helpers/PHPExcel.php'))
{
// We need to remove this old PHPExcel folder
$this->removeFolder(JPATH_ADMINISTRATOR . '/components/com_demo/helpers/PHPExcel');
// We need to remove this old PHPExcel file
JFile::delete(JPATH_ADMINISTRATOR . '/components/com_demo/helpers/PHPExcel.php');
File::delete(JPATH_ADMINISTRATOR . '/components/com_demo/helpers/PHPExcel.php');
}
return true;
}
@ -683,7 +685,7 @@ class com_demoInstallerScript
*/
protected function removeFolder($dir, $ignore = false)
{
if (JFolder::exists($dir))
if (Folder::exists($dir))
{
$it = new RecursiveDirectoryIterator($dir);
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
@ -713,7 +715,7 @@ class com_demoInstallerScript
{
continue;
}
JFolder::delete($file_dir);
Folder::delete($file_dir);
}
else
{
@ -732,13 +734,13 @@ class com_demoInstallerScript
{
continue;
}
JFile::delete($file_dir);
File::delete($file_dir);
}
}
// delete the root folder if not ignore found
if (!$this->checkArray($ignore))
{
return JFolder::delete($dir);
return Folder::delete($dir);
}
return true;
}
@ -784,7 +786,7 @@ class com_demoInstallerScript
$installer = $parent->getParent();
$installPath = $installer->getPath('source');
// get all the folders
$folders = JFolder::folders($installPath);
$folders = Folder::folders($installPath);
// check if we have folders we may want to copy
$doNotCopy = array('media','admin','site'); // Joomla already deals with these
if (count((array) $folders) > 1)
@ -799,7 +801,7 @@ class com_demoInstallerScript
// set the destination path
$dest = JPATH_ROOT.'/'.$folder;
// now try to copy the folder
if (!JFolder::copy($src, $dest, '', true))
if (!Folder::copy($src, $dest, '', true))
{
$app->enqueueMessage('Could not copy '.$folder.' folder into place, please make sure destination is writable!', 'error');
}

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looking.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php
@ -21,6 +21,7 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Language\Language;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
@ -468,12 +469,12 @@ abstract class DemoHelper
$filePath = $path . '/' . $name . '.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
if (File::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPathModel))
elseif (File::exists($fullPathModel))
{
// get the file
require_once $fullPathModel;

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.js

View File

@ -120,8 +120,6 @@
maxlength="150"
description="COM_DEMO_LOOK_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_DEMO_LOOK_NAME_MESSAGE"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php
@ -123,12 +123,6 @@ class DemoModelLook extends JModelAdmin
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_demo.look');
}
}
return $item;
@ -252,7 +246,7 @@ class DemoModelLook extends JModelAdmin
*/
public function getScript()
{
return 'administrator/components/com_demo/models/forms/look.js';
return 'media/com_demo/js/look.js';
}
/**

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looking.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage router.php
@ -60,7 +60,7 @@ class DemoRouter extends JComponentRouterBase
{
$view = $query['view'];
if (empty($query['Itemid']))
if (empty($query['Itemid']) && !(isset($view) && isset($query['id']) && ($view === 'look' || $view === 'looks' || $view === 'looking')))
{
$segments[] = $query['view'];
}

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -125,21 +125,19 @@ class DemoViewLooking extends JViewLegacy
$uikitComp = $this->get('UikitComp');
if ($uikit != 2 && isset($uikitComp) && DemoHelper::checkArray($uikitComp))
{
// load just in case.
jimport('joomla.filesystem.file');
// loading...
foreach ($uikitComp as $class)
{
foreach (DemoHelper::$uk_components[$class] as $name)
{
// check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{
// load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
}
// check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
{
// load the js.
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@build 18th October, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -89,21 +89,19 @@ class DemoViewLooks extends JViewLegacy
$uikitComp = $this->get('UikitComp');
if ($uikit != 2 && isset($uikitComp) && DemoHelper::checkArray($uikitComp))
{
// load just in case.
jimport('joomla.filesystem.file');
// loading...
foreach ($uikitComp as $class)
{
foreach (DemoHelper::$uk_components[$class] as $name)
{
// check if the CSS file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{
// load the css.
$this->document->addStyleSheet(JURI::root(true) .'/media/com_demo/uikit-v2/css/components/'.$name.$style.$size.'.css', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
}
// check if the JavaScript file exists.
if (JFile::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
if (File::exists(JPATH_ROOT.'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js'))
{
// load the js.
$this->document->addScript(JURI::root(true) .'/media/com_demo/uikit-v2/js/components/'.$name.$size.'.js', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (DemoHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);