Update the component to use github as update server

This commit is contained in:
Llewellyn van der Merwe 2018-05-05 15:32:19 +02:00
parent 00f642156a
commit 508dd34a81
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
81 changed files with 146 additions and 112 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) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/) + *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016 + *First Build*: 18th October, 2016
+ *Last Build*: 24th April, 2018 + *Last Build*: 5th May, 2018
+ *Version*: 2.0.0 + *Version*: 2.0.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14587** + *Line count*: **14621**
+ *File count*: **147** + *File count*: **147**
+ *Folder count*: **54** + *Folder count*: **54**

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) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/) + *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016 + *First Build*: 18th October, 2016
+ *Last Build*: 24th April, 2018 + *Last Build*: 5th May, 2018
+ *Version*: 2.0.0 + *Version*: 2.0.0
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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**, > (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.) > never making one mistake or taking any coffee break.)
+ *Line count*: **14587** + *Line count*: **14621**
+ *File count*: **147** + *File count*: **147**
+ *Folder count*: **54** + *Folder count*: **54**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage admin.css @subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage dashboard.css @subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.css @subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.css @subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage admin.js @subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage import.php @subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php
@ -509,8 +509,15 @@ abstract class DemoHelper
return false; 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 // check if string is JSON
$result = json_decode($value, true); $result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE) if (json_last_error() === JSON_ERROR_NONE)
@ -523,9 +530,19 @@ abstract class DemoHelper
$names = array(); $names = array();
foreach ($result as $val) 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)) if (self::checkArray($names))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage batch_.php @subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage batchselection.php @subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_above.php @subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_under.php @subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_left.php @subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_right.php @subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage publishing.php @subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.js @subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage import.php @subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php
@ -318,29 +318,29 @@ class DemoTableLook extends JTable
$asset->loadByName('com_demo'); $asset->loadByName('com_demo');
return $asset->id; return $asset->id;
} }
/** /**
* Generate a valid alias from title / date. * Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving * Remains public to be able to check for duplicated alias before saving
* *
* @return string * @return string
*/ */
public function generateAlias() public function generateAlias()
{ {
if (empty($this->alias)) if (empty($this->alias))
{ {
$this->alias = $this->name; $this->alias = $this->name;
} }
$this->alias = JApplication::stringURLSafe($this->alias); $this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '') if (trim(str_replace('-', '', $this->alias)) == '')
{ {
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
} }
return $this->alias; return $this->alias;
} }
} }

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_main.php @subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_vdm.php @subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage edit.php @subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_batch_body.php @subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_batch_footer.php @subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_body.php @subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_foot.php @subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_head.php @subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default_toolbar.php @subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_DEMO</name> <name>COM_DEMO</name>
<creationDate>24th April, 2018</creationDate> <creationDate>5th May, 2018</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail> <authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl> <authorUrl>https://www.vdm.io/</authorUrl>
@ -95,6 +95,6 @@
</administration> </administration>
<updateservers> <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> </updateservers>
</extension> </extension>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage script.php @subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.css @subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looking.css @subpackage looking.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.css @subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage site.css @subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage site.js @subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage controller.php @subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage category.php @subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage demo.php @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 // check if string is JSON
$result = json_decode($value, true); $result = json_decode($value, true);
if (json_last_error() === JSON_ERROR_NONE) if (json_last_error() === JSON_ERROR_NONE)
@ -88,9 +95,19 @@ abstract class DemoHelper
$names = array(); $names = array();
foreach ($result as $val) 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)) if (self::checkArray($names))

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage headercheck.php @subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage route.php @subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_above.php @subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_fullwidth.php @subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage details_under.php @subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage metadata.php @subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_left.php @subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage more_right.php @subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage publishing.php @subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.js @subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage look.php @subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looking.php @subpackage looking.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage looks.php @subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage router.php @subpackage router.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage submitbutton.js @subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage edit.php @subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage default.php @subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/ /-------------------------------------------------------------------------------------------------------/
@version 2.0.0 @version 2.0.0
@build 24th April, 2018 @build 5th May, 2018
@created 18th October, 2016 @created 18th October, 2016
@package Demo @package Demo
@subpackage view.html.php @subpackage view.html.php