Update the component to use github as update server
This commit is contained in:
parent
00f642156a
commit
508dd34a81
@ -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*: 24th April, 2018
|
||||
+ *Last Build*: 5th May, 2018
|
||||
+ *Version*: 2.0.0
|
||||
+ *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*: **14587**
|
||||
+ *Line count*: **14621**
|
||||
+ *File count*: **147**
|
||||
+ *Folder count*: **54**
|
||||
|
||||
|
@ -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*: 24th April, 2018
|
||||
+ *Last Build*: 5th May, 2018
|
||||
+ *Version*: 2.0.0
|
||||
+ *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*: **14587**
|
||||
+ *Line count*: **14621**
|
||||
+ *File count*: **147**
|
||||
+ *Folder count*: **54**
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage admin.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage dashboard.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looks.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage admin.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage controller.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage import.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looks.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
@ -509,8 +509,15 @@ abstract class DemoHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
|
||||
{
|
||||
// do some table foot work
|
||||
$external = false;
|
||||
if (strpos($table, '#__') !== false)
|
||||
{
|
||||
$external = true;
|
||||
$table = str_replace('#__', '', $table);
|
||||
}
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
@ -523,9 +530,19 @@ abstract class DemoHelper
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
if ($external)
|
||||
{
|
||||
$names[] = $name;
|
||||
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($name = self::getVar($table, $val, $id, $name))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (self::checkArray($names))
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage headercheck.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage batch_.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage batchselection.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_above.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_under.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage metadata.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage more_left.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage more_right.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage publishing.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage import.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looks.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.php
|
||||
@ -318,29 +318,29 @@ class DemoTableLook extends JTable
|
||||
$asset->loadByName('com_demo');
|
||||
|
||||
return $asset->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a valid alias from title / date.
|
||||
* Remains public to be able to check for duplicated alias before saving
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generateAlias()
|
||||
{
|
||||
if (empty($this->alias))
|
||||
{
|
||||
$this->alias = $this->name;
|
||||
}
|
||||
|
||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||
|
||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||
{
|
||||
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||
}
|
||||
|
||||
return $this->alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_main.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_vdm.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage submitbutton.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage edit.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_body.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_foot.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_head.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
4
demo.xml
4
demo.xml
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_DEMO</name>
|
||||
<creationDate>24th April, 2018</creationDate>
|
||||
<creationDate>5th May, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://www.vdm.io/</authorUrl>
|
||||
@ -95,6 +95,6 @@
|
||||
|
||||
</administration>
|
||||
<updateservers>
|
||||
<server type="extension" enabled="1" element="com_demo" name="Demo">https://www.vdm.io/updates/demo_update_server.xml</server>
|
||||
<server type="extension" enabled="1" element="com_demo" name="Demo">https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml</server>
|
||||
</updateservers>
|
||||
</extension>
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage script.php
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looking.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looks.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage site.css
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage site.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage controller.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage category.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage demo.php
|
||||
@ -74,8 +74,15 @@ abstract class DemoHelper
|
||||
}
|
||||
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
|
||||
{
|
||||
// do some table foot work
|
||||
$external = false;
|
||||
if (strpos($table, '#__') !== false)
|
||||
{
|
||||
$external = true;
|
||||
$table = str_replace('#__', '', $table);
|
||||
}
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
@ -88,9 +95,19 @@ abstract class DemoHelper
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
if ($external)
|
||||
{
|
||||
$names[] = $name;
|
||||
if ($name = self::getVar(null, $val, $id, $name, '=', $table))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($name = self::getVar($table, $val, $id, $name))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (self::checkArray($names))
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage headercheck.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage route.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_above.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_fullwidth.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage details_under.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage metadata.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage more_left.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage more_right.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage publishing.php
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage look.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looking.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage looks.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage router.php
|
||||
|
@ -3,7 +3,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage submitbutton.js
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage edit.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage default.php
|
||||
|
@ -4,7 +4,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0
|
||||
@build 24th April, 2018
|
||||
@build 5th May, 2018
|
||||
@created 18th October, 2016
|
||||
@package Demo
|
||||
@subpackage view.html.php
|
||||
|
Loading…
x
Reference in New Issue
Block a user