From 508dd34a81c2490b08179a3e0403286014a38cfe Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 5 May 2018 15:32:19 +0200 Subject: [PATCH] Update the component to use github as update server --- README.md | 4 +- admin/README.txt | 4 +- admin/assets/css/admin.css | 2 +- admin/assets/css/dashboard.css | 2 +- admin/assets/css/look.css | 2 +- admin/assets/css/looks.css | 2 +- admin/assets/js/admin.js | 2 +- admin/controller.php | 2 +- admin/controllers/demo.php | 2 +- admin/controllers/import.php | 2 +- admin/controllers/look.php | 2 +- admin/controllers/looks.php | 2 +- admin/demo.php | 2 +- admin/helpers/demo.php | 25 ++++++++-- admin/helpers/headercheck.php | 2 +- admin/helpers/html/batch_.php | 2 +- admin/layouts/batchselection.php | 2 +- admin/layouts/look/details_above.php | 2 +- admin/layouts/look/details_fullwidth.php | 2 +- admin/layouts/look/details_under.php | 2 +- admin/layouts/look/metadata.php | 2 +- admin/layouts/look/more_left.php | 2 +- admin/layouts/look/more_right.php | 2 +- admin/layouts/look/publishing.php | 2 +- admin/models/demo.php | 2 +- admin/models/forms/look.js | 2 +- admin/models/import.php | 2 +- admin/models/look.php | 2 +- admin/models/looks.php | 2 +- admin/tables/look.php | 48 +++++++++---------- admin/views/demo/tmpl/default.php | 2 +- admin/views/demo/tmpl/default_main.php | 2 +- admin/views/demo/tmpl/default_vdm.php | 2 +- admin/views/demo/view.html.php | 2 +- admin/views/import/tmpl/default.php | 2 +- admin/views/import/view.html.php | 2 +- admin/views/look/submitbutton.js | 2 +- admin/views/look/tmpl/edit.php | 2 +- admin/views/look/view.html.php | 2 +- admin/views/looks/tmpl/default.php | 2 +- admin/views/looks/tmpl/default_batch_body.php | 2 +- .../views/looks/tmpl/default_batch_footer.php | 2 +- admin/views/looks/tmpl/default_body.php | 2 +- admin/views/looks/tmpl/default_foot.php | 2 +- admin/views/looks/tmpl/default_head.php | 2 +- admin/views/looks/tmpl/default_toolbar.php | 2 +- admin/views/looks/view.html.php | 2 +- demo.xml | 4 +- ...update_server.xml => demo_updateserver.xml | 0 script.php | 2 +- site/assets/css/look.css | 2 +- site/assets/css/looking.css | 2 +- site/assets/css/looks.css | 2 +- site/assets/css/site.css | 2 +- site/assets/js/site.js | 2 +- site/controller.php | 2 +- site/controllers/look.php | 2 +- site/demo.php | 2 +- site/helpers/category.php | 2 +- site/helpers/demo.php | 25 ++++++++-- site/helpers/headercheck.php | 2 +- site/helpers/route.php | 2 +- site/layouts/look/details_above.php | 2 +- site/layouts/look/details_fullwidth.php | 2 +- site/layouts/look/details_under.php | 2 +- site/layouts/look/metadata.php | 2 +- site/layouts/look/more_left.php | 2 +- site/layouts/look/more_right.php | 2 +- site/layouts/look/publishing.php | 2 +- site/models/forms/look.js | 2 +- site/models/look.php | 2 +- site/models/looking.php | 2 +- site/models/looks.php | 2 +- site/router.php | 2 +- site/views/look/submitbutton.js | 2 +- site/views/look/tmpl/edit.php | 2 +- site/views/look/view.html.php | 2 +- site/views/looking/tmpl/default.php | 2 +- site/views/looking/view.html.php | 2 +- site/views/looks/tmpl/default.php | 2 +- site/views/looks/view.html.php | 2 +- 81 files changed, 146 insertions(+), 112 deletions(-) rename demo_update_server.xml => demo_updateserver.xml (100%) diff --git a/README.md b/README.md index 3ba14e6..0767b53 100644 --- a/README.md +++ b/README.md @@ -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** diff --git a/admin/README.txt b/admin/README.txt index 3ba14e6..0767b53 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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** diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 8c8d78f..1e6abf7 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/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 admin.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 045b6ba..91d716d 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/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 dashboard.css diff --git a/admin/assets/css/look.css b/admin/assets/css/look.css index 9a74df8..9f9f15b 100644 --- a/admin/assets/css/look.css +++ b/admin/assets/css/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 look.css diff --git a/admin/assets/css/looks.css b/admin/assets/css/looks.css index 389c4ea..1223ead 100644 --- a/admin/assets/css/looks.css +++ b/admin/assets/css/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 looks.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 207a46f..87ab16a 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -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 diff --git a/admin/controller.php b/admin/controller.php index c089cfa..efa3d05 100644 --- a/admin/controller.php +++ b/admin/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 controller.php diff --git a/admin/controllers/demo.php b/admin/controllers/demo.php index 7dcefc5..0ab5f57 100644 --- a/admin/controllers/demo.php +++ b/admin/controllers/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 diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 65688d8..7d02fb1 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/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 import.php diff --git a/admin/controllers/look.php b/admin/controllers/look.php index 1b0061c..ba4be92 100644 --- a/admin/controllers/look.php +++ b/admin/controllers/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 look.php diff --git a/admin/controllers/looks.php b/admin/controllers/looks.php index f42de1e..0cad4dc 100644 --- a/admin/controllers/looks.php +++ b/admin/controllers/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 looks.php diff --git a/admin/demo.php b/admin/demo.php index 8f1e0f6..c144c5a 100644 --- a/admin/demo.php +++ b/admin/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 diff --git a/admin/helpers/demo.php b/admin/helpers/demo.php index 99db61d..89a9d31 100644 --- a/admin/helpers/demo.php +++ b/admin/helpers/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)) diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index d9408dc..9654af4 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/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 headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 886a991..fa2c726 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/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 batch_.php diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 58c7738..1ec94aa 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/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 batchselection.php diff --git a/admin/layouts/look/details_above.php b/admin/layouts/look/details_above.php index da572ff..e3af998 100644 --- a/admin/layouts/look/details_above.php +++ b/admin/layouts/look/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_above.php diff --git a/admin/layouts/look/details_fullwidth.php b/admin/layouts/look/details_fullwidth.php index 417e6c0..09f2cfc 100644 --- a/admin/layouts/look/details_fullwidth.php +++ b/admin/layouts/look/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_fullwidth.php diff --git a/admin/layouts/look/details_under.php b/admin/layouts/look/details_under.php index 652c267..386fdd1 100644 --- a/admin/layouts/look/details_under.php +++ b/admin/layouts/look/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 details_under.php diff --git a/admin/layouts/look/metadata.php b/admin/layouts/look/metadata.php index 2f71b24..67428c8 100644 --- a/admin/layouts/look/metadata.php +++ b/admin/layouts/look/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 metadata.php diff --git a/admin/layouts/look/more_left.php b/admin/layouts/look/more_left.php index ea6268a..56fc0e4 100644 --- a/admin/layouts/look/more_left.php +++ b/admin/layouts/look/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_left.php diff --git a/admin/layouts/look/more_right.php b/admin/layouts/look/more_right.php index 8927411..b94764f 100644 --- a/admin/layouts/look/more_right.php +++ b/admin/layouts/look/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 more_right.php diff --git a/admin/layouts/look/publishing.php b/admin/layouts/look/publishing.php index 5abd824..8770def 100644 --- a/admin/layouts/look/publishing.php +++ b/admin/layouts/look/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 publishing.php diff --git a/admin/models/demo.php b/admin/models/demo.php index 843b406..5235f1d 100644 --- a/admin/models/demo.php +++ b/admin/models/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 diff --git a/admin/models/forms/look.js b/admin/models/forms/look.js index e1a70ed..a56a48a 100644 --- a/admin/models/forms/look.js +++ b/admin/models/forms/look.js @@ -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 diff --git a/admin/models/import.php b/admin/models/import.php index 83cfe58..9a4f267 100644 --- a/admin/models/import.php +++ b/admin/models/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 import.php diff --git a/admin/models/look.php b/admin/models/look.php index e0b3e7c..1986332 100644 --- a/admin/models/look.php +++ b/admin/models/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 look.php diff --git a/admin/models/looks.php b/admin/models/looks.php index 36051b0..31bc3b1 100644 --- a/admin/models/looks.php +++ b/admin/models/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 looks.php diff --git a/admin/tables/look.php b/admin/tables/look.php index 648987a..8c55ab2 100644 --- a/admin/tables/look.php +++ b/admin/tables/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 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; } } diff --git a/admin/views/demo/tmpl/default.php b/admin/views/demo/tmpl/default.php index d7e764e..eae048b 100644 --- a/admin/views/demo/tmpl/default.php +++ b/admin/views/demo/tmpl/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.php diff --git a/admin/views/demo/tmpl/default_main.php b/admin/views/demo/tmpl/default_main.php index 523211b..bac65ce 100644 --- a/admin/views/demo/tmpl/default_main.php +++ b/admin/views/demo/tmpl/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_main.php diff --git a/admin/views/demo/tmpl/default_vdm.php b/admin/views/demo/tmpl/default_vdm.php index 9ddb560..5f2de88 100644 --- a/admin/views/demo/tmpl/default_vdm.php +++ b/admin/views/demo/tmpl/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 default_vdm.php diff --git a/admin/views/demo/view.html.php b/admin/views/demo/view.html.php index 233c840..6cc278a 100644 --- a/admin/views/demo/view.html.php +++ b/admin/views/demo/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 view.html.php diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index 5890f08..9e40e87 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/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.php diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index 61570be..dc452fe 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/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 view.html.php diff --git a/admin/views/look/submitbutton.js b/admin/views/look/submitbutton.js index 48867b9..f3ed727 100644 --- a/admin/views/look/submitbutton.js +++ b/admin/views/look/submitbutton.js @@ -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 diff --git a/admin/views/look/tmpl/edit.php b/admin/views/look/tmpl/edit.php index 17ef4db..3af40db 100644 --- a/admin/views/look/tmpl/edit.php +++ b/admin/views/look/tmpl/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 edit.php diff --git a/admin/views/look/view.html.php b/admin/views/look/view.html.php index f2f7802..86bd95f 100644 --- a/admin/views/look/view.html.php +++ b/admin/views/look/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 view.html.php diff --git a/admin/views/looks/tmpl/default.php b/admin/views/looks/tmpl/default.php index bc1c987..d3df467 100644 --- a/admin/views/looks/tmpl/default.php +++ b/admin/views/looks/tmpl/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.php diff --git a/admin/views/looks/tmpl/default_batch_body.php b/admin/views/looks/tmpl/default_batch_body.php index f7ed7b1..a0ebb01 100644 --- a/admin/views/looks/tmpl/default_batch_body.php +++ b/admin/views/looks/tmpl/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_body.php diff --git a/admin/views/looks/tmpl/default_batch_footer.php b/admin/views/looks/tmpl/default_batch_footer.php index 56e0bcf..607d19f 100644 --- a/admin/views/looks/tmpl/default_batch_footer.php +++ b/admin/views/looks/tmpl/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_batch_footer.php diff --git a/admin/views/looks/tmpl/default_body.php b/admin/views/looks/tmpl/default_body.php index 33a7062..7bdcde3 100644 --- a/admin/views/looks/tmpl/default_body.php +++ b/admin/views/looks/tmpl/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_body.php diff --git a/admin/views/looks/tmpl/default_foot.php b/admin/views/looks/tmpl/default_foot.php index 6a7182e..c26db03 100644 --- a/admin/views/looks/tmpl/default_foot.php +++ b/admin/views/looks/tmpl/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_foot.php diff --git a/admin/views/looks/tmpl/default_head.php b/admin/views/looks/tmpl/default_head.php index bb0bd4e..bc9db59 100644 --- a/admin/views/looks/tmpl/default_head.php +++ b/admin/views/looks/tmpl/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_head.php diff --git a/admin/views/looks/tmpl/default_toolbar.php b/admin/views/looks/tmpl/default_toolbar.php index fd929eb..e787934 100644 --- a/admin/views/looks/tmpl/default_toolbar.php +++ b/admin/views/looks/tmpl/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 default_toolbar.php diff --git a/admin/views/looks/view.html.php b/admin/views/looks/view.html.php index f92c57d..f6419ae 100644 --- a/admin/views/looks/view.html.php +++ b/admin/views/looks/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 view.html.php diff --git a/demo.xml b/demo.xml index 3eeab0f..856953c 100644 --- a/demo.xml +++ b/demo.xml @@ -1,7 +1,7 @@ COM_DEMO - 24th April, 2018 + 5th May, 2018 Llewellyn van der Merwe joomla@vdm.io https://www.vdm.io/ @@ -95,6 +95,6 @@ - https://www.vdm.io/updates/demo_update_server.xml + https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml \ No newline at end of file diff --git a/demo_update_server.xml b/demo_updateserver.xml similarity index 100% rename from demo_update_server.xml rename to demo_updateserver.xml diff --git a/script.php b/script.php index ae0fc45..be01d09 100644 --- a/script.php +++ b/script.php @@ -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 diff --git a/site/assets/css/look.css b/site/assets/css/look.css index 9a74df8..9f9f15b 100644 --- a/site/assets/css/look.css +++ b/site/assets/css/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 look.css diff --git a/site/assets/css/looking.css b/site/assets/css/looking.css index d2d1266..dbfa257 100644 --- a/site/assets/css/looking.css +++ b/site/assets/css/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 looking.css diff --git a/site/assets/css/looks.css b/site/assets/css/looks.css index 389c4ea..1223ead 100644 --- a/site/assets/css/looks.css +++ b/site/assets/css/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 looks.css diff --git a/site/assets/css/site.css b/site/assets/css/site.css index 4e1c805..862d39f 100644 --- a/site/assets/css/site.css +++ b/site/assets/css/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.css diff --git a/site/assets/js/site.js b/site/assets/js/site.js index 9ca91f0..567cab7 100644 --- a/site/assets/js/site.js +++ b/site/assets/js/site.js @@ -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 diff --git a/site/controller.php b/site/controller.php index 54a12a6..18e641d 100644 --- a/site/controller.php +++ b/site/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 controller.php diff --git a/site/controllers/look.php b/site/controllers/look.php index 784d02b..a2e0ad3 100644 --- a/site/controllers/look.php +++ b/site/controllers/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 look.php diff --git a/site/demo.php b/site/demo.php index d3a5e49..c486f6f 100644 --- a/site/demo.php +++ b/site/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 diff --git a/site/helpers/category.php b/site/helpers/category.php index a71d9da..5a27285 100644 --- a/site/helpers/category.php +++ b/site/helpers/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 category.php diff --git a/site/helpers/demo.php b/site/helpers/demo.php index 0036444..553a9ae 100644 --- a/site/helpers/demo.php +++ b/site/helpers/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 @@ -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)) diff --git a/site/helpers/headercheck.php b/site/helpers/headercheck.php index d9408dc..9654af4 100644 --- a/site/helpers/headercheck.php +++ b/site/helpers/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 headercheck.php diff --git a/site/helpers/route.php b/site/helpers/route.php index 2f004f2..8895127 100644 --- a/site/helpers/route.php +++ b/site/helpers/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 route.php diff --git a/site/layouts/look/details_above.php b/site/layouts/look/details_above.php index da572ff..e3af998 100644 --- a/site/layouts/look/details_above.php +++ b/site/layouts/look/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_above.php diff --git a/site/layouts/look/details_fullwidth.php b/site/layouts/look/details_fullwidth.php index 417e6c0..09f2cfc 100644 --- a/site/layouts/look/details_fullwidth.php +++ b/site/layouts/look/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_fullwidth.php diff --git a/site/layouts/look/details_under.php b/site/layouts/look/details_under.php index 652c267..386fdd1 100644 --- a/site/layouts/look/details_under.php +++ b/site/layouts/look/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 details_under.php diff --git a/site/layouts/look/metadata.php b/site/layouts/look/metadata.php index 2f71b24..67428c8 100644 --- a/site/layouts/look/metadata.php +++ b/site/layouts/look/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 metadata.php diff --git a/site/layouts/look/more_left.php b/site/layouts/look/more_left.php index ea6268a..56fc0e4 100644 --- a/site/layouts/look/more_left.php +++ b/site/layouts/look/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_left.php diff --git a/site/layouts/look/more_right.php b/site/layouts/look/more_right.php index 8927411..b94764f 100644 --- a/site/layouts/look/more_right.php +++ b/site/layouts/look/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 more_right.php diff --git a/site/layouts/look/publishing.php b/site/layouts/look/publishing.php index 5abd824..8770def 100644 --- a/site/layouts/look/publishing.php +++ b/site/layouts/look/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 publishing.php diff --git a/site/models/forms/look.js b/site/models/forms/look.js index e1a70ed..a56a48a 100644 --- a/site/models/forms/look.js +++ b/site/models/forms/look.js @@ -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 diff --git a/site/models/look.php b/site/models/look.php index e0b3e7c..1986332 100644 --- a/site/models/look.php +++ b/site/models/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 look.php diff --git a/site/models/looking.php b/site/models/looking.php index 290de4c..4b720af 100644 --- a/site/models/looking.php +++ b/site/models/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 looking.php diff --git a/site/models/looks.php b/site/models/looks.php index 100b1f9..864be83 100644 --- a/site/models/looks.php +++ b/site/models/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 looks.php diff --git a/site/router.php b/site/router.php index 1c66c3a..3ac91e7 100644 --- a/site/router.php +++ b/site/router.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 diff --git a/site/views/look/submitbutton.js b/site/views/look/submitbutton.js index 48867b9..f3ed727 100644 --- a/site/views/look/submitbutton.js +++ b/site/views/look/submitbutton.js @@ -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 diff --git a/site/views/look/tmpl/edit.php b/site/views/look/tmpl/edit.php index 6a61868..321f0e2 100644 --- a/site/views/look/tmpl/edit.php +++ b/site/views/look/tmpl/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 edit.php diff --git a/site/views/look/view.html.php b/site/views/look/view.html.php index acb245a..a84292b 100644 --- a/site/views/look/view.html.php +++ b/site/views/look/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 view.html.php diff --git a/site/views/looking/tmpl/default.php b/site/views/looking/tmpl/default.php index c96d121..aeff621 100644 --- a/site/views/looking/tmpl/default.php +++ b/site/views/looking/tmpl/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.php diff --git a/site/views/looking/view.html.php b/site/views/looking/view.html.php index e0689c8..8708cab 100644 --- a/site/views/looking/view.html.php +++ b/site/views/looking/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 view.html.php diff --git a/site/views/looks/tmpl/default.php b/site/views/looks/tmpl/default.php index 64eacef..3cc978d 100644 --- a/site/views/looks/tmpl/default.php +++ b/site/views/looks/tmpl/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.php diff --git a/site/views/looks/view.html.php b/site/views/looks/view.html.php index e4faf5b..6e5ac45 100644 --- a/site/views/looks/view.html.php +++ b/site/views/looks/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 view.html.php