fixed import error with version is ignored.

This commit is contained in:
Llewellyn van der Merwe 2016-03-10 23:23:44 +02:00
parent f85fb7bb47
commit 6d6767b6c8
83 changed files with 104 additions and 90 deletions

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla] (http://www.
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
+ *Name*: [Demo] (https://www.vdm.io/)
+ *First Build*: 5th August, 2015
+ *Last Build*: 5th March, 2016
+ *Last Build*: 10th March, 2016
+ *Version*: 1.0.5
+ *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-builde
> (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*: **16658**
+ *Line count*: **16672**
+ *File count*: **152**
+ *Folder count*: **50**

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -813,6 +813,16 @@ abstract class DemoHelper
return $button->input;
}
public static function checkJson($string)
{
if (self::checkString($string))
{
json_decode($string);
return (json_last_error() === JSON_ERROR_NONE);
}
return false;
}
public static function checkObject($object)
{

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage batch_.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage publishing.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage repetable_numbers_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage articles.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.js

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_documents.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage import.php
@ -503,7 +503,6 @@ class DemoModelImport extends JModelLegacy
// reset all buckets
$query = $db->getQuery(true);
$fields = array();
$version = false;
// Fields to update.
foreach($row as $key => $cell)
{
@ -526,7 +525,6 @@ class DemoModelImport extends JModelLegacy
if ('version' == $target[$key])
{
$cell = (int) $version + 1;
$version = true;
}
// verify publish authority
if ('published' == $target[$key] && !$canState)
@ -551,10 +549,6 @@ class DemoModelImport extends JModelLegacy
// load the defaults
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
if (!$version)
{
$fields[] = $db->quoteName('version') . " = " . (int) $version + 1;
}
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = ' . $id

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help_document.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_head.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage view.html.php

View File

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

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage site.css

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage help.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage demo.php
@ -588,6 +588,16 @@ abstract class DemoHelper
}
return $result;
}
public static function checkJson($string)
{
if (self::checkString($string))
{
json_decode($string);
return (json_last_error() === JSON_ERROR_NONE);
}
return false;
}
public static function checkObject($object)
{

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage route.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.5
@build 5th March, 2016
@build 10th March, 2016
@created 5th August, 2015
@package Demo
@subpackage router.php