fixed gh-85 to insure parameter 2 is an array

This commit is contained in:
Dev
2017-05-28 23:44:15 +02:00
parent cb355feaf4
commit 5e36ede2ac
209 changed files with 365 additions and 343 deletions

View File

@ -545,7 +545,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views))
{
$tmpArray = json_decode($item->addadmin_views,true);
if (!in_array($this->addadmin_viewsvvwa, $tmpArray['adminview']))
if (!isset($tmpArray['adminview']) || !ComponentbuilderHelper::checkArray($tmpArray['adminview']) || !in_array($this->addadmin_viewsvvwa, $tmpArray['adminview']))
{
unset($items[$nr]);
continue;

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage ajax.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php

View File

@ -227,7 +227,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views))
{
$tmpArray = json_decode($item->addcustom_admin_views,true);
if (!in_array($this->addcustom_admin_viewsvvwb, $tmpArray['customadminview']))
if (!isset($tmpArray['customadminview']) || !ComponentbuilderHelper::checkArray($tmpArray['customadminview']) || !in_array($this->addcustom_admin_viewsvvwb, $tmpArray['customadminview']))
{
unset($items[$nr]);
continue;

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 37 of this MVC
@build 3rd February, 2017
@version @update number 38 of this MVC
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage field.php
@ -206,7 +206,7 @@ class ComponentbuilderModelField extends JModelAdmin
if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields))
{
$tmpArray = json_decode($item->addfields,true);
if (!in_array($this->addfieldsvvwd, $tmpArray['field']))
if (!isset($tmpArray['field']) || !ComponentbuilderHelper::checkArray($tmpArray['field']) || !in_array($this->addfieldsvvwd, $tmpArray['field']))
{
unset($items[$nr]);
continue;

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 37 of this MVC
@build 3rd February, 2017
@version @update number 38 of this MVC
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fields.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage adminviewfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage adminviews.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage articles.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage component.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage components.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customadminviews.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customfilelist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customgets.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dbtables.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dynamicget.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dynamicgets.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fields.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fieldsmulti.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage lang.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage maingets.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage siteviewfolderlist.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage siteviews.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 37 of this MVC
@build 3rd February, 2017
@version @update number 38 of this MVC
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage field.js

View File

@ -226,19 +226,20 @@
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Css_view Field. Type: Textarea. (joomla) -->
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="textarea"
name="css_view"
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
required="true"
/>
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Datadefault_other Field. Type: Text. (joomla) -->
<field
type="text"
@ -291,81 +292,6 @@
<option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field>
<!-- Css_views Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="css_views"
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_HINT"
required="true"
/>
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Xml Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="xml"
label="COM_COMPONENTBUILDER_FIELD_XML_LABEL"
rows="17"
cols="720"
description="COM_COMPONENTBUILDER_FIELD_XML_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_XML_HINT"
required="true"
/>
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
required="true"
/>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- Add_css_views Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -380,8 +306,6 @@
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
@ -396,6 +320,76 @@
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Xml Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="xml"
label="COM_COMPONENTBUILDER_FIELD_XML_LABEL"
rows="17"
cols="720"
description="COM_COMPONENTBUILDER_FIELD_XML_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_XML_HINT"
required="true"
/>
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- Css_view Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="css_view"
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
required="true"
/>
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Css_views Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="css_views"
label="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_HINT"
required="true"
/>
<!-- Store Field. Type: List. (joomla) -->
<field
type="list"
@ -419,27 +413,33 @@
<option value="4">
COM_COMPONENTBUILDER_FIELD_ADVANCE_ENCRYPTION_WHMCSKEY</option>
</field>
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field
type="radio"
name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
type="textarea"
name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
required="true"
/>
<!-- Note_vdm_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_vdm_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_VDM_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_VDM_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_vdm_encryption" close="true" />
<!-- Not_required Field. Type: Hidden. (joomla) -->
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
type="textarea"
name="javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
required="true"
/>
</fieldset>

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage import.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 20th May, 2017
@build 28th May, 2017
@created 30th April, 2015
@package Component Builder
@subpackage import_joomla_components.php

View File

@ -233,7 +233,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin
if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views))
{
$tmpArray = json_decode($item->addsite_views,true);
if (!in_array($this->addsite_viewsvvwc, $tmpArray['siteview']))
if (!isset($tmpArray['siteview']) || !ComponentbuilderHelper::checkArray($tmpArray['siteview']) || !in_array($this->addsite_viewsvvwc, $tmpArray['siteview']))
{
unset($items[$nr]);
continue;