Release of v3.2.5
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed.
This commit is contained in:
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -114,7 +115,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -122,17 +123,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,7 +188,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -195,17 +196,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -263,7 +264,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -271,17 +272,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -612,7 +613,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -620,17 +621,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// update the fields
|
||||
@@ -799,6 +800,9 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
}
|
||||
}
|
||||
|
||||
// update the ajax_input (sub form) layout
|
||||
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('admin_view', 'ajax_input'));
|
||||
|
||||
// update all editors to use this components global editor
|
||||
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
|
||||
// now get all the editor fields
|
||||
@@ -1013,7 +1017,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
@@ -164,35 +165,73 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
}
|
||||
|
||||
/**
|
||||
* set the component display
|
||||
**/
|
||||
* Generate the component details display in HTML.
|
||||
*
|
||||
* @param object $object The component object containing details.
|
||||
* @return string The HTML string for displaying component details.
|
||||
*/
|
||||
protected function componentDetailsDisplay($object)
|
||||
{
|
||||
// set some vars
|
||||
$image = (StringHelper::check($object->image)) ? '<img alt="Joomla Component Image" src="'. Uri::root() . $object->image . '" style="float: right;">': '';
|
||||
$desc = (StringHelper::check($object->description)) ? $object->description : $object->short_description;
|
||||
$placeholder = ($object->add_placeholders == 1) ? '<span class="btn btn-small btn-success"> ' . Text::_('COM_COMPONENTBUILDER_YES') . ' </span>' : '<span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
|
||||
$debug = ($object->debug_linenr == 1) ? '<span class="btn btn-small btn-success"> ' .Text::_('COM_COMPONENTBUILDER_YES') . '</span>' : ' <span class="btn btn-small btn-danger"> ' .Text::_('COM_COMPONENTBUILDER_NO') . ' </span>' ;
|
||||
$html = array();
|
||||
$html[] = '<h3>' . $object->name . ' (v' . $object->component_version . ')</h3>';
|
||||
$html[] = '<p>' . $desc . $image . '</p>';
|
||||
$html[] = '<ul>';
|
||||
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ': <b>' . $object->companyname . '</b></li>';
|
||||
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ': <b>' . $object->author . '</b></li>';
|
||||
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ': <b>' . $object->email . '</b></li>';
|
||||
$html[] = '<li>' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ': <b>' . $object->website . '</b></li>';
|
||||
$html[] = '</ul>';
|
||||
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS') . '</h4>';
|
||||
// Helper variables with null coalescing to ensure robust value assignment
|
||||
$imageSrc = !empty($object->image) ? htmlspecialchars($object->image, ENT_QUOTES) : null;
|
||||
$image = $imageSrc
|
||||
? '<img alt="' . Text::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE') . '" src="' . Uri::root() . $imageSrc . '" style="float: right; max-width: 250px; margin-left: 15px;">'
|
||||
: '';
|
||||
|
||||
$description = htmlspecialchars(!empty($object->description) ? $object->description : $object->short_description, ENT_QUOTES);
|
||||
|
||||
$placeholderStatus = $object->add_placeholders
|
||||
? '<span class="badge badge-success">' . Text::_('COM_COMPONENTBUILDER_YES') . '</span>'
|
||||
: '<span class="badge badge-danger">' . Text::_('COM_COMPONENTBUILDER_NO') . '</span>';
|
||||
|
||||
$debugStatus = $object->debug_linenr
|
||||
? '<span class="badge badge-success">' . Text::_('COM_COMPONENTBUILDER_YES') . '</span>'
|
||||
: '<span class="badge badge-danger">' . Text::_('COM_COMPONENTBUILDER_NO') . '</span>';
|
||||
|
||||
// Author and company details
|
||||
$company = '<ul>';
|
||||
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_COMPANY') . ':</strong> ' . htmlspecialchars($object->companyname, ENT_QUOTES) . '</li>';
|
||||
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_AUTHOR') . ':</strong> ' . htmlspecialchars($object->author, ENT_QUOTES) . '</li>';
|
||||
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_EMAIL') . ':</strong> <a href="mailto:' . htmlspecialchars($object->email, ENT_QUOTES) . '">' . htmlspecialchars($object->email, ENT_QUOTES) . '</a></li>';
|
||||
$company .= '<li><strong>' . Text::_('COM_COMPONENTBUILDER_WEBSITE') . ':</strong> <a href="' . htmlspecialchars($object->website, ENT_QUOTES) . '" target="_blank" rel="noopener">' . htmlspecialchars($object->website, ENT_QUOTES) . '</a></li>';
|
||||
$company .= '</ul>';
|
||||
|
||||
// Build HTML output
|
||||
$html = [];
|
||||
|
||||
// Header with component name and version
|
||||
$html[] = '<div class="component-details">';
|
||||
$html[] = '<h3>' . htmlspecialchars($object->name, ENT_QUOTES) . ' (v' . htmlspecialchars($object->component_version, ENT_QUOTES) . ')</h3>';
|
||||
|
||||
// Description with optional image
|
||||
$html[] = '<div class="description" style="overflow: hidden;">';
|
||||
$html[] = '<p>' . $image . $description . $company . '</p>';
|
||||
$html[] = '</div>';
|
||||
|
||||
// Component settings
|
||||
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COMPONENT_SETTINGS') . '</h4>';
|
||||
$html[] = '<p>';
|
||||
$html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . '<br />' . $placeholder . '<br />';
|
||||
$html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . '<br />' . $debug ;
|
||||
$html[] = Text::_('COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS') . ': ' . $placeholderStatus . '<br>';
|
||||
$html[] = Text::_('COM_COMPONENTBUILDER_DEBUG_LINE_NUMBERS') . ': ' . $debugStatus;
|
||||
$html[] = '</p>';
|
||||
|
||||
// License details
|
||||
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_LICENSE') . '</h4>';
|
||||
$html[] = '<p>' . $object->license . '</p>';
|
||||
$html[] = '<p>' . nl2br(htmlspecialchars($object->license, ENT_QUOTES)) . '</p>';
|
||||
|
||||
// Copyright
|
||||
$html[] = '<h4>' . Text::_('COM_COMPONENTBUILDER_COPYRIGHT') . '</h4>';
|
||||
$html[] = '<p>' . $object->copyright . '<br /><br />';
|
||||
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-small span12"><span class="icon-edit"></span> ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' .$object->system_name . '</a></p>';
|
||||
// now return the diplay
|
||||
$html[] = '<p>' . nl2br(htmlspecialchars($object->copyright, ENT_QUOTES)) . '</p>';
|
||||
|
||||
// Edit button
|
||||
$html[] = '<p>';
|
||||
$html[] = '<a href="index.php?option=com_componentbuilder&ref=compiler&view=joomla_components&task=joomla_component.edit&id=' . (int) $object->id . '" class="btn btn-primary btn-block">';
|
||||
$html[] = '<span class="icon-edit"></span> ' . Text::_('COM_COMPONENTBUILDER_EDIT') . ' ' . htmlspecialchars($object->system_name, ENT_QUOTES);
|
||||
$html[] = '</a>';
|
||||
$html[] = '</p>';
|
||||
|
||||
$html[] = '</div>'; // Close component-details
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
|
||||
@@ -1595,7 +1634,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
* @var array
|
||||
* @since 3.0.13
|
||||
*/
|
||||
protected $viewid = [];
|
||||
protected array $viewid = [];
|
||||
|
||||
/**
|
||||
* Get the view details via the session
|
||||
@@ -1615,7 +1654,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
if ($vdm)
|
||||
{
|
||||
// set view and id
|
||||
if ($view = ComponentbuilderHelper::get($vdm))
|
||||
if (($view = SessionHelper::get($vdm)) !== null)
|
||||
{
|
||||
$current = (array) explode('__', $view);
|
||||
if (StringHelper::check($current[0]) && isset($current[1]) && is_numeric($current[1]))
|
||||
@@ -1628,7 +1667,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
}
|
||||
}
|
||||
// set GUID if found
|
||||
if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false)
|
||||
if (($guid = SessionHelper::get($vdm . '__guid')) !== null)
|
||||
{
|
||||
if (GuidHelper::valid($guid))
|
||||
{
|
||||
@@ -1636,7 +1675,7 @@ class ComponentbuilderModelAjax extends ListModel
|
||||
}
|
||||
}
|
||||
// set return if found
|
||||
if (($return = ComponentbuilderHelper::get($vdm . '__return')) !== false)
|
||||
if (($return = SessionHelper::get($vdm . '__return')) !== null)
|
||||
{
|
||||
if (StringHelper::check($return))
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -118,7 +119,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -126,17 +127,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,7 +196,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -203,17 +204,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -122,7 +123,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -130,17 +131,17 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +206,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -213,17 +214,17 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -554,7 +555,7 @@ class ComponentbuilderModelClass_method extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -119,7 +120,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -127,17 +128,17 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,7 +197,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
|
||||
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -204,17 +205,17 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,7 +546,7 @@ class ComponentbuilderModelClass_property extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,6 +21,10 @@ use Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Helper\Compiler;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Installer\InstallerHelper;
|
||||
use Joomla\CMS\Installer\Installer;
|
||||
|
||||
/**
|
||||
* Componentbuilder List Model for Compiler
|
||||
@@ -162,7 +166,7 @@ class ComponentbuilderModelCompiler extends ListModel
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
if (JFolder::exists($dir))
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$it = new RecursiveDirectoryIterator($dir);
|
||||
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
@@ -171,19 +175,19 @@ class ComponentbuilderModelCompiler extends ListModel
|
||||
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue;
|
||||
if ($file->isDir())
|
||||
{
|
||||
JFolder::delete($file->getPathname());
|
||||
Folder::delete($file->getPathname());
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($file->getBasename() !== 'index.html')
|
||||
{
|
||||
JFile::delete($file->getPathname());
|
||||
File::delete($file->getPathname());
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($removeDir)
|
||||
{
|
||||
if (JFolder::delete($dir))
|
||||
if (Folder::delete($dir))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -228,7 +232,7 @@ class ComponentbuilderModelCompiler extends ListModel
|
||||
$tmp_dest = $config->get('tmp_path');
|
||||
|
||||
// Unpack the downloaded package file.
|
||||
$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file, true);
|
||||
$package = InstallerHelper::unpack($tmp_dest . '/' . $p_file, true);
|
||||
|
||||
// insure the install type is folder (JCB zip file is in the folder)
|
||||
$installType = 'folder';
|
||||
@@ -253,7 +257,7 @@ class ComponentbuilderModelCompiler extends ListModel
|
||||
}
|
||||
|
||||
// Get an installer instance.
|
||||
$installer = JInstaller::getInstance();
|
||||
$installer = Installer::getInstance();
|
||||
|
||||
// Install the package.
|
||||
if (!$installer->install($package['dir']))
|
||||
@@ -290,7 +294,7 @@ class ComponentbuilderModelCompiler extends ListModel
|
||||
$package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile'];
|
||||
}
|
||||
|
||||
JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
|
||||
InstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
|
||||
|
||||
// Clear the cached extension data and menu cache
|
||||
$this->cleanCache('_system', 0);
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -122,7 +123,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -130,17 +131,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,7 +202,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -209,17 +210,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// update the fields
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -123,7 +124,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -131,17 +132,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +215,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
|
||||
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -222,17 +223,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
|
||||
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -455,97 +455,6 @@ class ComponentbuilderModelComponentbuilder extends ListModel
|
||||
}
|
||||
|
||||
|
||||
public function getNoticeboard()
|
||||
{
|
||||
// get the document to load the scripts
|
||||
$document = Factory::getDocument();
|
||||
Html::_('script', "media/com_componentbuilder/js/marked.js", ['version' => 'auto']);
|
||||
$document->addScriptDeclaration('
|
||||
var token = "' . Session::getFormToken() . '";
|
||||
var noticeboard = "https://vdm.bz/componentbuilder-noticeboard-md";
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
fetch(noticeboard)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
return response.text();
|
||||
})
|
||||
.then(board => {
|
||||
if (board.length > 5) {
|
||||
document.getElementById("noticeboard-md").innerHTML = marked.parse(board);
|
||||
getIS(1, board)
|
||||
.then(result => {
|
||||
if (result) {
|
||||
document.querySelectorAll("#cpanel_tabTabs a").forEach(link => {
|
||||
if (link.href.includes("#vast_development_method") || link.href.includes("#notice_board")) {
|
||||
var textVDM = link.textContent;
|
||||
link.innerHTML = "<span class=\"label label-important vdm-new-notice\">1</span> " + textVDM;
|
||||
link.id = "vdm-new-notice";
|
||||
document.getElementById("vdm-new-notice").addEventListener("click", () => {
|
||||
getIS(2, board)
|
||||
.then(result => {
|
||||
if (result) {
|
||||
document.querySelectorAll(".vdm-new-notice").forEach(element => {
|
||||
element.style.opacity = 0;
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
document.getElementById("noticeboard-md").innerHTML = "'.Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER').'.";
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("There was an error!", error);
|
||||
document.getElementById("noticeboard-md").innerHTML = "'.Text::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_PLEASE_CHECK_AGAIN_LATER').'.";
|
||||
});
|
||||
});
|
||||
|
||||
// to check is READ/NEW
|
||||
function getIS(type, notice) {
|
||||
let getUrl = "";
|
||||
if (type === 1) {
|
||||
getUrl = "index.php?option=com_componentbuilder&task=ajax.isNew&format=json&raw=true";
|
||||
} else if (type === 2) {
|
||||
getUrl = "index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true";
|
||||
}
|
||||
let request = new URLSearchParams();
|
||||
if (token.length > 0 && notice.length) {
|
||||
request.append(token, "1");
|
||||
request.append("notice", notice);
|
||||
}
|
||||
return fetch(getUrl, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
||||
},
|
||||
body: request
|
||||
}).then(response => response.json());
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.querySelectorAll(".loading-dots").forEach(function(loading_dots) {
|
||||
let x = 0;
|
||||
let intervalId = setInterval(function() {
|
||||
if (!loading_dots.classList.contains("loading-dots")) {
|
||||
clearInterval(intervalId);
|
||||
return;
|
||||
}
|
||||
let dots = ".".repeat(x % 8);
|
||||
loading_dots.textContent = dots;
|
||||
x++;
|
||||
}, 500);
|
||||
});
|
||||
});');
|
||||
|
||||
return '<div id="noticeboard-md">'.Text::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING').'.<span class="loading-dots">.</span></small></div>';
|
||||
}
|
||||
|
||||
public function getReadme()
|
||||
{
|
||||
$document = Factory::getDocument();
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -180,7 +181,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -188,17 +189,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,7 +350,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -357,17 +358,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,6 +504,9 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
||||
}
|
||||
}
|
||||
|
||||
// update the ajax_input (sub form) layout
|
||||
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('custom_admin_view', 'ajax_input'));
|
||||
|
||||
// update all editors to use this components global editor
|
||||
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
|
||||
// now get all the editor fields
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -134,7 +135,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -142,17 +143,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +206,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
|
||||
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -213,17 +214,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -547,7 +548,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -174,7 +175,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -182,17 +183,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,7 +350,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
if (($vdm = SessionHelper::get('dynamic_get__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -357,17 +358,17 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
SessionHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,7 +739,7 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -167,7 +168,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
|
||||
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -175,17 +176,17 @@ class ComponentbuilderModelField extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
SessionHelper::set('field__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,7 +287,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
|
||||
if (($vdm = SessionHelper::get('field__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -294,17 +295,17 @@ class ComponentbuilderModelField extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
SessionHelper::set('field__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -633,7 +634,7 @@ class ComponentbuilderModelField extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldClassextends extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldClasspowers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldCron_servers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -44,12 +45,12 @@ class JFormFieldCustomfilelist extends JFormFieldList
|
||||
// set the default
|
||||
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
|
||||
// setup the folder if it does not exist
|
||||
if (!\JFolder::exists($localfolder))
|
||||
if (!is_dir($localfolder))
|
||||
{
|
||||
\JFolder::create($localfolder);
|
||||
Folder::create($localfolder);
|
||||
}
|
||||
// now check if there are files in the folder
|
||||
if ($files = \JFolder::files($localfolder))
|
||||
if ($files = Folder::files($localfolder))
|
||||
{
|
||||
$options = array();
|
||||
foreach ($files as $file)
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldExcludedlanguages extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldFieldtypes extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldJoomlaplugingroups extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldJoomlaplugins extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldLibraries extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldLibrariesx extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldLibrary extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldMaingets extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -68,7 +69,7 @@ class JFormFieldServers extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -16,6 +16,7 @@ use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
@@ -69,7 +70,7 @@ class JFormFieldSnippets extends JFormFieldList
|
||||
$ref = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
|
||||
// get the return value.
|
||||
$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();
|
||||
$_uri = (string) Uri::getInstance();
|
||||
$_return = urlencode(base64_encode($_uri));
|
||||
// load return value.
|
||||
$ref .= '&return=' . $_return;
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -141,7 +142,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
|
||||
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -149,17 +150,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +215,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
|
||||
if (($vdm = SessionHelper::get('fieldtype__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -222,17 +223,17 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
SessionHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// check what type of properties array we have here (should be subform... but just incase)
|
||||
@@ -813,7 +814,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2470,6 +2470,7 @@
|
||||
name="table"
|
||||
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
default="0"
|
||||
button="false"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -171,7 +170,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL"
|
||||
rows="20"
|
||||
cols="30"
|
||||
default=""
|
||||
class="text_area tab_html"
|
||||
filter="raw"
|
||||
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -184,7 +183,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL"
|
||||
rows="20"
|
||||
cols="40"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION"
|
||||
class="text_area ids_selection"
|
||||
filter="raw"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
|
@@ -101,7 +101,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
|
||||
class="list_class"
|
||||
layout="joomla.form.field.list-fancy-select"
|
||||
multiple="false"
|
||||
required="true"
|
||||
readonly="true"
|
||||
@@ -156,7 +155,6 @@
|
||||
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -329,7 +329,6 @@
|
||||
label="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL"
|
||||
rows="2"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_DESCRIPTION"
|
||||
message="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE"
|
||||
class="text_area span12"
|
||||
|
@@ -140,7 +140,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -140,7 +140,6 @@
|
||||
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL"
|
||||
rows="30"
|
||||
cols="15"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION"
|
||||
class="text_area mysql_update"
|
||||
filter="raw"
|
||||
|
@@ -163,7 +163,6 @@
|
||||
label="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_LABEL"
|
||||
rows="15"
|
||||
cols="5"
|
||||
default=""
|
||||
description="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_DESCRIPTION"
|
||||
class="input-xxlarge span12"
|
||||
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_HINT"
|
||||
|
@@ -433,7 +433,7 @@ class ComponentbuilderModelHelp_document extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -201,7 +201,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// get install folder
|
||||
$dir = JFile::stripExt($package['dir']);
|
||||
$dir = File::stripExt($package['dir']);
|
||||
// remove unziped folder
|
||||
ComponentbuilderHelper::removeFolder($dir);
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// extract the package
|
||||
if (JFile::exists($package['dir']))
|
||||
if (is_file($package['dir']))
|
||||
{
|
||||
// does this package pass a checksum
|
||||
$checksum = false;
|
||||
@@ -355,12 +355,12 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
// set the directory name
|
||||
$this->dir = JFile::stripExt($package['dir']);
|
||||
$this->dir = File::stripExt($package['dir']);
|
||||
// unzip the package
|
||||
$zip->extract($package['dir'], $this->dir);
|
||||
// check for database file
|
||||
$infoFile = $this->dir . '/info.vdm';
|
||||
if (JFile::exists($infoFile))
|
||||
if (is_file($infoFile))
|
||||
{
|
||||
// load the data
|
||||
if ($info = FileHelper::getContent($infoFile))
|
||||
@@ -631,13 +631,13 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
// set auto loader
|
||||
ComponentbuilderHelper::autoLoader('smart');
|
||||
// extract the package
|
||||
if (JFile::exists($package['dir']))
|
||||
if (is_file($package['dir']))
|
||||
{
|
||||
// set the directory name
|
||||
$this->dir = JFile::stripExt($package['dir']);
|
||||
$this->dir = File::stripExt($package['dir']);
|
||||
// check for database file
|
||||
$dbFile = $this->dir . '/db.vdm';
|
||||
if (!JFile::exists($dbFile))
|
||||
if (!is_file($dbFile))
|
||||
{
|
||||
// get the zip adapter
|
||||
$zip = JArchive::getAdapter('zip');
|
||||
@@ -645,7 +645,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
$zip->extract($package['dir'], $this->dir);
|
||||
}
|
||||
// check again
|
||||
if (JFile::exists($dbFile))
|
||||
if (is_file($dbFile))
|
||||
{
|
||||
// load the data
|
||||
if ($data = FileHelper::getContent($dbFile))
|
||||
@@ -938,10 +938,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
$success = true;
|
||||
// check if we have custom files
|
||||
$customDir = str_replace('//', '/', $this->dir . '/custom');
|
||||
if (JFolder::exists($customDir))
|
||||
if (is_dir($customDir))
|
||||
{
|
||||
// great we have some custom stuff lets move it
|
||||
if (!JFolder::copy($customDir, $customPath,'',true))
|
||||
if (!Folder::copy($customDir, $customPath,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
|
||||
$success = false;
|
||||
@@ -954,10 +954,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
}
|
||||
// check if we have images
|
||||
$imageDir = str_replace('//', '/', $this->dir . '/images');
|
||||
if (JFolder::exists($imageDir))
|
||||
if (is_dir($imageDir))
|
||||
{
|
||||
// great we have some images lets move them
|
||||
if (!JFolder::copy($imageDir, $imagesPath,'',true))
|
||||
if (!Folder::copy($imageDir, $imagesPath,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::_('COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVED_TO_CORRECT_LOCATION'), 'error');
|
||||
$success = false;
|
||||
@@ -970,10 +970,10 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
}
|
||||
// now move the dynamic files if found
|
||||
$dynamicDir = str_replace('//', '/', $this->dir . '/dynamic');
|
||||
if (JFolder::exists($dynamicDir))
|
||||
if (is_dir($dynamicDir))
|
||||
{
|
||||
// get a list of folders
|
||||
$folders = JFolder::folders($dynamicDir);
|
||||
$folders = Folder::folders($dynamicDir);
|
||||
// check if we have files
|
||||
if(UtilitiesArrayHelper::check($folders))
|
||||
{
|
||||
@@ -981,7 +981,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
{
|
||||
$destination = $this->setDynamicPath($folder);
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $folder);
|
||||
if (!JFolder::exists($fullPath) || !JFolder::copy($fullPath, $destination,'',true))
|
||||
if (!is_dir($fullPath) || !Folder::copy($fullPath, $destination,'',true))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FOLDER_BSB_WAS_NOT_MOVED_TO_BSB', $folder, $destination), 'error');
|
||||
$success = false;
|
||||
@@ -994,7 +994,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
}
|
||||
}
|
||||
// get a list of files
|
||||
$files = JFolder::files($dynamicDir);
|
||||
$files = Folder::files($dynamicDir);
|
||||
// check if we have files
|
||||
if(UtilitiesArrayHelper::check($files))
|
||||
{
|
||||
@@ -1002,7 +1002,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
{
|
||||
$destination = $this->setDynamicPath($file);
|
||||
$fullPath = str_replace('//', '/', $dynamicDir . '/' . $file);
|
||||
if (!JFile::exists($fullPath) || !JFile::copy($fullPath, $destination))
|
||||
if (!is_file($fullPath) || !File::copy($fullPath, $destination))
|
||||
{
|
||||
$this->app->enqueueMessage(Text::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB', $file, $destination), 'error');
|
||||
$success = false;
|
||||
@@ -1037,7 +1037,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
{
|
||||
$subPath = str_replace('//', '/', $this->dir . '/' . $folder);
|
||||
// go to the package sub folder if found
|
||||
if (JFolder::exists($subPath))
|
||||
if (is_dir($subPath))
|
||||
{
|
||||
$this->unLockFile($subPath);
|
||||
}
|
||||
@@ -1057,7 +1057,7 @@ class ComponentbuilderModelImport_joomla_components extends BaseDatabaseModel
|
||||
// we are changing the working directory to the tmp path (important)
|
||||
chdir($tmpPath);
|
||||
// get a list of files in the current directory tree (all)
|
||||
$files = JFolder::files('.', '.', true, true);
|
||||
$files = Folder::files('.', '.', true, true);
|
||||
// read in the file content
|
||||
foreach ($files as $file)
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -298,7 +299,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -306,17 +307,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -528,7 +529,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_component__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -536,17 +537,17 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
SessionHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -919,7 +920,7 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,10 +24,12 @@ use VDM\Joomla\Utilities\FileHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\Base64Helper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\FOF\Encrypt\AES;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
|
||||
/**
|
||||
* Joomla_components List Model
|
||||
@@ -125,14 +127,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
|
||||
// has any data been set for this component
|
||||
if (JCBArrayHelper::check($pks))
|
||||
if (UtilitiesArrayHelper::check($pks))
|
||||
{
|
||||
// load the linked stuff
|
||||
$this->getLinkedToComponents($pks);
|
||||
}
|
||||
|
||||
// has any data been set for this component
|
||||
if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component']))
|
||||
if (isset($this->smartBox['joomla_component']) && UtilitiesArrayHelper::check($this->smartBox['joomla_component']))
|
||||
{
|
||||
// set the folder and move the files of each component to the folder
|
||||
return $this->smartCloner();
|
||||
@@ -205,7 +207,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
|
||||
// create the folders
|
||||
JFolder::create($this->packagePath);
|
||||
Folder::create($this->packagePath);
|
||||
|
||||
// update $pks with returned IDs
|
||||
$pks = array();
|
||||
@@ -293,14 +295,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
|
||||
// has any data been set for this component
|
||||
if (JCBArrayHelper::check($pks))
|
||||
if (UtilitiesArrayHelper::check($pks))
|
||||
{
|
||||
// load the linked stuff
|
||||
$this->getLinkedToComponents($pks);
|
||||
}
|
||||
|
||||
// has any data been set for this component
|
||||
if (isset($this->smartBox['joomla_component']) && JCBArrayHelper::check($this->smartBox['joomla_component']))
|
||||
if (isset($this->smartBox['joomla_component']) && UtilitiesArrayHelper::check($this->smartBox['joomla_component']))
|
||||
{
|
||||
// set the folder and move the files of each component to the folder
|
||||
return $this->smartExportBuilder();
|
||||
@@ -337,7 +339,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$this->setData($table, $pks, $field);
|
||||
}
|
||||
// add fields conditions and relations
|
||||
if (isset($this->smartIDs['admin_view']) && JCBArrayHelper::check($this->smartIDs['admin_view']))
|
||||
if (isset($this->smartIDs['admin_view']) && UtilitiesArrayHelper::check($this->smartIDs['admin_view']))
|
||||
{
|
||||
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
@@ -345,41 +347,41 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$this->setData('admin_custom_tabs', array_values($this->smartIDs['admin_view']), 'admin_view');
|
||||
}
|
||||
// add joomla module
|
||||
if (isset($this->smartIDs['joomla_module']) && JCBArrayHelper::check($this->smartIDs['joomla_module']))
|
||||
if (isset($this->smartIDs['joomla_module']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_module']))
|
||||
{
|
||||
$this->setData('joomla_module', array_values($this->smartIDs['joomla_module']), 'id');
|
||||
$this->setData('joomla_module_updates', array_values($this->smartIDs['joomla_module']), 'joomla_module');
|
||||
$this->setData('joomla_module_files_folders_urls', array_values($this->smartIDs['joomla_module']), 'joomla_module');
|
||||
}
|
||||
// add joomla plugin
|
||||
if (isset($this->smartIDs['joomla_plugin']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin']))
|
||||
if (isset($this->smartIDs['joomla_plugin']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_plugin']))
|
||||
{
|
||||
$this->setData('joomla_plugin', array_values($this->smartIDs['joomla_plugin']), 'id');
|
||||
$this->setData('joomla_plugin_updates', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin');
|
||||
$this->setData('joomla_plugin_files_folders_urls', array_values($this->smartIDs['joomla_plugin']), 'joomla_plugin');
|
||||
}
|
||||
// add validation rules
|
||||
if (isset($this->smartIDs['validation_rule']) && JCBArrayHelper::check($this->smartIDs['validation_rule']))
|
||||
if (isset($this->smartIDs['validation_rule']) && UtilitiesArrayHelper::check($this->smartIDs['validation_rule']))
|
||||
{
|
||||
$this->setData('validation_rule', array_values($this->smartIDs['validation_rule']), 'name');
|
||||
}
|
||||
// add field types
|
||||
if (isset($this->smartIDs['fieldtype']) && JCBArrayHelper::check($this->smartIDs['fieldtype']))
|
||||
if (isset($this->smartIDs['fieldtype']) && UtilitiesArrayHelper::check($this->smartIDs['fieldtype']))
|
||||
{
|
||||
$this->setData('fieldtype', array_values($this->smartIDs['fieldtype']), 'id');
|
||||
}
|
||||
// add templates
|
||||
if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template']))
|
||||
if (isset($this->smartIDs['template']) && UtilitiesArrayHelper::check($this->smartIDs['template']))
|
||||
{
|
||||
$this->setData('template', array_values($this->smartIDs['template']), 'id');
|
||||
}
|
||||
// add layouts
|
||||
if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout']))
|
||||
if (isset($this->smartIDs['layout']) && UtilitiesArrayHelper::check($this->smartIDs['layout']))
|
||||
{
|
||||
$this->setData('layout', array_values($this->smartIDs['layout']), 'id');
|
||||
}
|
||||
// add dynamic get
|
||||
if (isset($this->smartIDs['dynamic_get']) && JCBArrayHelper::check($this->smartIDs['dynamic_get']))
|
||||
if (isset($this->smartIDs['dynamic_get']) && UtilitiesArrayHelper::check($this->smartIDs['dynamic_get']))
|
||||
{
|
||||
$this->setData('dynamic_get', array_values($this->smartIDs['dynamic_get']), 'id');
|
||||
}
|
||||
@@ -387,49 +389,49 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
if ('clone' !== $this->activeType)
|
||||
{
|
||||
// add class_property
|
||||
if (isset($this->smartIDs['class_property']) && JCBArrayHelper::check($this->smartIDs['class_property']))
|
||||
if (isset($this->smartIDs['class_property']) && UtilitiesArrayHelper::check($this->smartIDs['class_property']))
|
||||
{
|
||||
$this->setData('class_property', array_values($this->smartIDs['class_property']), 'id');
|
||||
}
|
||||
// add class_method
|
||||
if (isset($this->smartIDs['class_method']) && JCBArrayHelper::check($this->smartIDs['class_method']))
|
||||
if (isset($this->smartIDs['class_method']) && UtilitiesArrayHelper::check($this->smartIDs['class_method']))
|
||||
{
|
||||
$this->setData('class_method', array_values($this->smartIDs['class_method']), 'id');
|
||||
}
|
||||
// add joomla_plugin_group
|
||||
if (isset($this->smartIDs['joomla_plugin_group']) && JCBArrayHelper::check($this->smartIDs['joomla_plugin_group']))
|
||||
if (isset($this->smartIDs['joomla_plugin_group']) && UtilitiesArrayHelper::check($this->smartIDs['joomla_plugin_group']))
|
||||
{
|
||||
$this->setData('joomla_plugin_group', array_values($this->smartIDs['joomla_plugin_group']), 'id');
|
||||
}
|
||||
// add class_extends
|
||||
if (isset($this->smartIDs['class_extends']) && JCBArrayHelper::check($this->smartIDs['class_extends']))
|
||||
if (isset($this->smartIDs['class_extends']) && UtilitiesArrayHelper::check($this->smartIDs['class_extends']))
|
||||
{
|
||||
$this->setData('class_extends', array_values($this->smartIDs['class_extends']), 'id');
|
||||
}
|
||||
// add snippets
|
||||
if (isset($this->smartIDs['snippet']) && JCBArrayHelper::check($this->smartIDs['snippet']))
|
||||
if (isset($this->smartIDs['snippet']) && UtilitiesArrayHelper::check($this->smartIDs['snippet']))
|
||||
{
|
||||
$this->setData('snippet', array_values($this->smartIDs['snippet']), 'id');
|
||||
}
|
||||
// add custom code
|
||||
if (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code']))
|
||||
if (isset($this->smartIDs['custom_code']) && UtilitiesArrayHelper::check($this->smartIDs['custom_code']))
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
|
||||
}
|
||||
// add placeholder
|
||||
if (isset($this->smartIDs['placeholder']) && JCBArrayHelper::check($this->smartIDs['placeholder']))
|
||||
if (isset($this->smartIDs['placeholder']) && UtilitiesArrayHelper::check($this->smartIDs['placeholder']))
|
||||
{
|
||||
$this->setData('placeholder', array_values($this->smartIDs['placeholder']), 'id');
|
||||
}
|
||||
// add powers
|
||||
if (isset($this->smartIDs['power']) && JCBArrayHelper::check($this->smartIDs['power']))
|
||||
if (isset($this->smartIDs['power']) && UtilitiesArrayHelper::check($this->smartIDs['power']))
|
||||
{
|
||||
$this->setData('power', array_values($this->smartIDs['power']), 'guid');
|
||||
}
|
||||
// set limiter
|
||||
$limit = 0;
|
||||
// and add those custom codes found in custom codes
|
||||
while (isset($this->smartIDs['custom_code']) && JCBArrayHelper::check($this->smartIDs['custom_code']) && $limit < 100)
|
||||
while (isset($this->smartIDs['custom_code']) && UtilitiesArrayHelper::check($this->smartIDs['custom_code']) && $limit < 100)
|
||||
{
|
||||
$this->setData('custom_code', array_values($this->smartIDs['custom_code']), 'id');
|
||||
// make sure we break
|
||||
@@ -446,7 +448,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
protected function getComponents($pks)
|
||||
{
|
||||
// setup the query
|
||||
if (JCBArrayHelper::check($pks))
|
||||
if (UtilitiesArrayHelper::check($pks))
|
||||
{
|
||||
// Get the user object.
|
||||
if (!ObjectHelper::check($this->user))
|
||||
@@ -485,7 +487,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
// load the items from db
|
||||
$items = $this->_db->loadObjectList();
|
||||
// check if we have items
|
||||
if (JCBArrayHelper::check($items))
|
||||
if (UtilitiesArrayHelper::check($items))
|
||||
{
|
||||
// set params
|
||||
if (!ObjectHelper::check($this->params))
|
||||
@@ -538,7 +540,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$value = json_decode($value, true);
|
||||
}
|
||||
// now update the fields
|
||||
if (JCBArrayHelper::check($value))
|
||||
if (UtilitiesArrayHelper::check($value))
|
||||
{
|
||||
foreach ($value as $id)
|
||||
{
|
||||
@@ -577,7 +579,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$values = json_decode($values, true);
|
||||
}
|
||||
// check that the array has values
|
||||
if (JCBArrayHelper::check($values))
|
||||
if (UtilitiesArrayHelper::check($values))
|
||||
{
|
||||
// check if the key is an array (targeting subform)
|
||||
if ('subform' === $type && $key)
|
||||
@@ -604,7 +606,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
}
|
||||
// only return if we set the ids
|
||||
if (JCBArrayHelper::check($bucket))
|
||||
if (UtilitiesArrayHelper::check($bucket))
|
||||
{
|
||||
// now set the values back
|
||||
return array_unique($bucket);
|
||||
@@ -616,7 +618,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$_key = explode('.', $key);
|
||||
foreach ($values as $value)
|
||||
{
|
||||
if (isset($value[$_key[0]]) && JCBArrayHelper::check($value[$_key[0]]))
|
||||
if (isset($value[$_key[0]]) && UtilitiesArrayHelper::check($value[$_key[0]]))
|
||||
{
|
||||
foreach ($value[$_key[0]] as $_value)
|
||||
{
|
||||
@@ -639,7 +641,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
}
|
||||
// only return if we set the ids
|
||||
if (JCBArrayHelper::check($bucket))
|
||||
if (UtilitiesArrayHelper::check($bucket))
|
||||
{
|
||||
// now set the values back
|
||||
return array_unique($bucket);
|
||||
@@ -676,11 +678,11 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
{
|
||||
foreach ($values[$key] as $k => $val)
|
||||
{
|
||||
if (strpos($k, 'power_') !== false && JCBArrayHelper::check($val))
|
||||
if (strpos($k, 'power_') !== false && UtilitiesArrayHelper::check($val))
|
||||
{
|
||||
foreach ($val as $v)
|
||||
{
|
||||
if (JCBArrayHelper::check($v) && isset($v['power']))
|
||||
if (UtilitiesArrayHelper::check($v) && isset($v['power']))
|
||||
{
|
||||
$bucket[$v['power']] = $v['power'];
|
||||
}
|
||||
@@ -688,7 +690,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
}
|
||||
// only return if we set the ids
|
||||
if (JCBArrayHelper::check($bucket))
|
||||
if (UtilitiesArrayHelper::check($bucket))
|
||||
{
|
||||
// now return the values back
|
||||
return array_values($bucket);
|
||||
@@ -718,7 +720,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
|
||||
// make sure we have an array of values
|
||||
if (!JCBArrayHelper::check($values, true) || !StringHelper::check($table) || !StringHelper::check($key))
|
||||
if (!UtilitiesArrayHelper::check($values, true) || !StringHelper::check($table) || !StringHelper::check($key))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -769,7 +771,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
// reset the search array (only search for template/layouts)
|
||||
$searchTLArray = array();
|
||||
// check if we have items
|
||||
if (JCBArrayHelper::check($items))
|
||||
if (UtilitiesArrayHelper::check($items))
|
||||
{
|
||||
// set search array if site/custom admin view
|
||||
if ('site_view' === $table || 'custom_admin_view' === $table)
|
||||
@@ -1018,7 +1020,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$fieldsSets[] = (int) $fields;
|
||||
}
|
||||
// get fields
|
||||
if (JCBArrayHelper::check($fieldsSets))
|
||||
if (UtilitiesArrayHelper::check($fieldsSets))
|
||||
{
|
||||
$this->setData('field', $fieldsSets, 'id');
|
||||
}
|
||||
@@ -1042,7 +1044,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
}
|
||||
// check if a search is required
|
||||
if (isset($searchTLArray) && JCBArrayHelper::check($searchTLArray)){
|
||||
if (isset($searchTLArray) && UtilitiesArrayHelper::check($searchTLArray)){
|
||||
|
||||
// add search array templates and layouts
|
||||
foreach ($searchTLArray as $scripter => $add)
|
||||
@@ -1198,7 +1200,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
protected function smartCloner()
|
||||
{
|
||||
// check if data is set
|
||||
if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox))
|
||||
if (isset($this->smartBox) && UtilitiesArrayHelper::check($this->smartBox))
|
||||
{
|
||||
// get the import_joomla_components
|
||||
$model = ComponentbuilderHelper::getModel('import_joomla_components');
|
||||
@@ -1256,7 +1258,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
protected function smartExportBuilder()
|
||||
{
|
||||
// check if data is set
|
||||
if (isset($this->smartBox) && JCBArrayHelper::check($this->smartBox))
|
||||
if (isset($this->smartBox) && UtilitiesArrayHelper::check($this->smartBox))
|
||||
{
|
||||
// set db data
|
||||
$data = serialize($this->smartBox);
|
||||
@@ -1271,7 +1273,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$this->info['source']['copyright'] = $this->params->get('export_copyright', null);
|
||||
|
||||
// lock the data if set
|
||||
if (JCBArrayHelper::check($this->key))
|
||||
if (UtilitiesArrayHelper::check($this->key))
|
||||
{
|
||||
// lock the data
|
||||
$this->key = md5(implode('', $this->key));
|
||||
@@ -1289,7 +1291,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$this->info['getKeyFrom']['copyright'] = $this->info['source']['copyright'];
|
||||
// add buy link if only one link is set
|
||||
if (isset($this->info['export_buy_link'])
|
||||
&& JCBArrayHelper::check($this->info['export_buy_link'])
|
||||
&& UtilitiesArrayHelper::check($this->info['export_buy_link'])
|
||||
&& count((array) $this->info['export_buy_link']) == 1)
|
||||
{
|
||||
$this->info['getKeyFrom']['buy_link'] = array_values($this->info['export_buy_link'])[0];
|
||||
@@ -1347,10 +1349,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$this->lockFiles();
|
||||
|
||||
// remove old zip files with the same name
|
||||
if (JFile::exists($this->zipPath))
|
||||
if (is_file($this->zipPath))
|
||||
{
|
||||
// remove file if found
|
||||
JFile::delete($this->zipPath);
|
||||
File::delete($this->zipPath);
|
||||
}
|
||||
|
||||
// zip the folder
|
||||
@@ -1372,7 +1374,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
|
||||
// remove the local file
|
||||
JFile::delete($this->zipPath);
|
||||
File::delete($this->zipPath);
|
||||
}
|
||||
|
||||
// remove the folder
|
||||
@@ -1431,7 +1433,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
chdir($tmpPath);
|
||||
|
||||
// get a list of files in the current directory tree (all)
|
||||
$files = JFolder::files('.', '.', true, true);
|
||||
$files = Folder::files('.', '.', true, true);
|
||||
|
||||
// read in the file content
|
||||
foreach ($files as $file)
|
||||
@@ -1455,7 +1457,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
protected function moveIt($paths, $type, $dynamic = false)
|
||||
{
|
||||
// make sure we have an array
|
||||
if (!JCBArrayHelper::check($paths))
|
||||
if (!UtilitiesArrayHelper::check($paths))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1486,7 +1488,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
if (!FileHelper::exists($tmpPath))
|
||||
{
|
||||
// create the folders if not found
|
||||
JFolder::create($tmpPath);
|
||||
Folder::create($tmpPath);
|
||||
}
|
||||
|
||||
// now move it
|
||||
@@ -1510,10 +1512,10 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$customFilePath = str_replace('//', '/', $this->customPath.'/'.$item);
|
||||
}
|
||||
// now check if file exist
|
||||
if (!JFile::exists($tmpFilePath) && JFile::exists($customFilePath))
|
||||
if (!is_file($tmpFilePath) && is_file($customFilePath))
|
||||
{
|
||||
// move the file to its place
|
||||
JFile::copy($customFilePath, $tmpFilePath);
|
||||
File::copy($customFilePath, $tmpFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1528,14 +1530,14 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
if (!FileHelper::exists($imageFolderPath))
|
||||
{
|
||||
// create the folders if not found
|
||||
JFolder::create($imageFolderPath);
|
||||
Folder::create($imageFolderPath);
|
||||
}
|
||||
$tmpImagePath = str_replace('//', '/', $this->packagePath.'/'.$item);
|
||||
$customImagePath = str_replace('//', '/', JPATH_ROOT.'/'.$item);
|
||||
if (!JFile::exists($tmpImagePath) && JFile::exists($customImagePath))
|
||||
if (!is_file($tmpImagePath) && is_file($customImagePath))
|
||||
{
|
||||
// move the file to its place
|
||||
JFile::copy($customImagePath, $tmpImagePath);
|
||||
File::copy($customImagePath, $tmpImagePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1557,7 +1559,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
if (!FileHelper::exists($tmpFolderPath) && FileHelper::exists($customFolderPath))
|
||||
{
|
||||
// move the folder to its place
|
||||
JFolder::copy($customFolderPath, $tmpFolderPath,'',true);
|
||||
Folder::copy($customFolderPath, $tmpFolderPath,'',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1656,27 +1658,27 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
$temp2 = GetHelper::allBetween($default, '$this->loadTemplate("','")');
|
||||
$templates = array();
|
||||
$again = array();
|
||||
if (JCBArrayHelper::check($temp1) && JCBArrayHelper::check($temp2))
|
||||
if (UtilitiesArrayHelper::check($temp1) && UtilitiesArrayHelper::check($temp2))
|
||||
{
|
||||
$templates = array_merge($temp1,$temp2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (JCBArrayHelper::check($temp1))
|
||||
if (UtilitiesArrayHelper::check($temp1))
|
||||
{
|
||||
$templates = $temp1;
|
||||
}
|
||||
elseif (JCBArrayHelper::check($temp2))
|
||||
elseif (UtilitiesArrayHelper::check($temp2))
|
||||
{
|
||||
$templates = $temp2;
|
||||
}
|
||||
}
|
||||
if (JCBArrayHelper::check($templates))
|
||||
if (UtilitiesArrayHelper::check($templates))
|
||||
{
|
||||
foreach ($templates as $template)
|
||||
{
|
||||
$data = $this->getDataWithAlias($template, 'template');
|
||||
if (JCBArrayHelper::check($data))
|
||||
if (UtilitiesArrayHelper::check($data))
|
||||
{
|
||||
if (!isset($this->smartIDs['template']) || !isset($this->smartIDs['template'][$data['id']]))
|
||||
{
|
||||
@@ -1691,27 +1693,27 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
// set the layout data
|
||||
$lay1 = GetHelper::allBetween($default, "LayoutHelper::render('","',");
|
||||
$lay2 = GetHelper::allBetween($default, 'LayoutHelper::render("','",');
|
||||
if (JCBArrayHelper::check($lay1) && JCBArrayHelper::check($lay2))
|
||||
if (UtilitiesArrayHelper::check($lay1) && UtilitiesArrayHelper::check($lay2))
|
||||
{
|
||||
$layouts = array_merge($lay1,$lay2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (JCBArrayHelper::check($lay1))
|
||||
if (UtilitiesArrayHelper::check($lay1))
|
||||
{
|
||||
$layouts = $lay1;
|
||||
}
|
||||
elseif (JCBArrayHelper::check($lay2))
|
||||
elseif (UtilitiesArrayHelper::check($lay2))
|
||||
{
|
||||
$layouts = $lay2;
|
||||
}
|
||||
}
|
||||
if (isset($layouts) && JCBArrayHelper::check($layouts))
|
||||
if (isset($layouts) && UtilitiesArrayHelper::check($layouts))
|
||||
{
|
||||
foreach ($layouts as $layout)
|
||||
{
|
||||
$data = $this->getDataWithAlias($layout, 'layout');
|
||||
if (JCBArrayHelper::check($data))
|
||||
if (UtilitiesArrayHelper::check($data))
|
||||
{
|
||||
if (!isset($this->smartIDs['layout']) || !isset($this->smartIDs['layout'][$data['id']]))
|
||||
{
|
||||
@@ -1723,7 +1725,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
}
|
||||
}
|
||||
}
|
||||
if (JCBArrayHelper::check($again))
|
||||
if (UtilitiesArrayHelper::check($again))
|
||||
{
|
||||
foreach ($again as $get)
|
||||
{
|
||||
@@ -1734,12 +1736,12 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
if ($user)
|
||||
{
|
||||
// add templates
|
||||
if (isset($this->smartIDs['template']) && JCBArrayHelper::check($this->smartIDs['template']))
|
||||
if (isset($this->smartIDs['template']) && UtilitiesArrayHelper::check($this->smartIDs['template']))
|
||||
{
|
||||
$this->setData('template', array_values($this->smartIDs['template']), 'id');
|
||||
}
|
||||
// add layouts
|
||||
if (isset($this->smartIDs['layout']) && JCBArrayHelper::check($this->smartIDs['layout']))
|
||||
if (isset($this->smartIDs['layout']) && UtilitiesArrayHelper::check($this->smartIDs['layout']))
|
||||
{
|
||||
$this->setData('layout', array_values($this->smartIDs['layout']), 'id');
|
||||
}
|
||||
@@ -1828,7 +1830,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
{
|
||||
// search the value to see if it has custom code
|
||||
$codeArray = GetHelper::allBetween($value, '[CUSTOMC' . 'ODE=',']');
|
||||
if (JCBArrayHelper::check($codeArray))
|
||||
if (UtilitiesArrayHelper::check($codeArray))
|
||||
{
|
||||
foreach ($codeArray as $func)
|
||||
{
|
||||
@@ -1864,12 +1866,12 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
elseif ('placeholder' === $type)
|
||||
{
|
||||
// check if we already have the placeholder search array
|
||||
if (!JCBArrayHelper::check($this->placeholderM) && !JCBArrayHelper::check($this->placeholderS))
|
||||
if (!UtilitiesArrayHelper::check($this->placeholderM) && !UtilitiesArrayHelper::check($this->placeholderS))
|
||||
{
|
||||
$this->placeholderS = ComponentbuilderHelper::getVars($type, 1, 'published', 'target');
|
||||
}
|
||||
// only continue search if placeholders found
|
||||
if (JCBArrayHelper::check($this->placeholderS))
|
||||
if (UtilitiesArrayHelper::check($this->placeholderS))
|
||||
{
|
||||
foreach ($this->placeholderS as $remove => $placeholder)
|
||||
{
|
||||
@@ -1932,7 +1934,7 @@ class ComponentbuilderModelJoomla_components extends ListModel
|
||||
{
|
||||
$items = $this->_db->loadObjectList();
|
||||
// check if we have items
|
||||
if (JCBArrayHelper::check($items))
|
||||
if (UtilitiesArrayHelper::check($items))
|
||||
{
|
||||
if (!isset($this->smartBox['language_translation']))
|
||||
{
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -204,7 +205,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -212,17 +213,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,7 +378,7 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_module__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_module__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -385,17 +386,17 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_module__'.$id);
|
||||
SessionHelper::set('joomla_module__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -181,7 +182,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -189,17 +190,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,7 +343,7 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
|
||||
if (($vdm = SessionHelper::get('joomla_plugin__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -350,17 +351,17 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
SessionHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -114,7 +115,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
|
||||
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -122,17 +123,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +194,7 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
|
||||
if (($vdm = SessionHelper::get('language_translation__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -201,17 +202,17 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
SessionHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -136,7 +137,7 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
|
||||
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -144,17 +145,17 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
SessionHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +222,7 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
|
||||
if (($vdm = SessionHelper::get('layout__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -229,17 +230,17 @@ class ComponentbuilderModelLayout extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
SessionHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -152,7 +153,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
|
||||
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -160,17 +161,17 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
SessionHelper::set('library__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,7 +240,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
|
||||
if (($vdm = SessionHelper::get('library__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -247,17 +248,17 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
SessionHelper::set('library__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -569,7 +570,7 @@ class ComponentbuilderModelLibrary extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -116,7 +117,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
|
||||
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -124,17 +125,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,7 +188,7 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
|
||||
if (($vdm = SessionHelper::get('placeholder__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -195,17 +196,17 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
SessionHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -162,7 +163,7 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
|
||||
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -170,17 +171,17 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
SessionHelper::set('power__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,7 +308,7 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('power__'.$id))
|
||||
if (($vdm = SessionHelper::get('power__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -315,17 +316,17 @@ class ComponentbuilderModelPower extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
ComponentbuilderHelper::set('power__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'power__'.$id);
|
||||
SessionHelper::set('power__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -490,7 +490,7 @@ class ComponentbuilderModelServer extends AdminModel
|
||||
// change to false
|
||||
$form->setFieldAttribute($requiredField, 'required', 'false');
|
||||
// also clear the data set
|
||||
$data[$requiredField] = '';
|
||||
unset($data[$requiredField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -183,7 +184,7 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -191,17 +192,17 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +353,7 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
|
||||
if (($vdm = SessionHelper::get('site_view__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -360,17 +361,17 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
SessionHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,6 +525,9 @@ class ComponentbuilderModelSite_view extends AdminModel
|
||||
}
|
||||
}
|
||||
|
||||
// update the ajax_input (sub form) layout
|
||||
$form->setFieldAttribute('ajax_input', 'layout', ComponentbuilderHelper::getSubformLayout('site_view', 'ajax_input'));
|
||||
|
||||
// update all editors to use this components global editor
|
||||
$global_editor = ComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
|
||||
// now get all the editor fields
|
||||
|
@@ -22,6 +22,8 @@ use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
|
||||
/**
|
||||
* Snippets List Model
|
||||
@@ -112,20 +114,20 @@ class ComponentbuilderModelSnippets extends ListModel
|
||||
// get the shared paths
|
||||
$this->fullPath = rtrim(ComponentbuilderHelper::getFolderPath('path', 'sharepath', Factory::getConfig()->get('tmp_path')), '/') . '/snippets';
|
||||
// remove old folder with the same name
|
||||
if (JFolder::exists($this->fullPath))
|
||||
if (is_dir($this->fullPath))
|
||||
{
|
||||
// remove if old folder is found
|
||||
ComponentbuilderHelper::removeFolder($this->fullPath);
|
||||
}
|
||||
// create the full path
|
||||
JFolder::create($this->fullPath);
|
||||
Folder::create($this->fullPath);
|
||||
// set zip path
|
||||
$this->zipPath = $this->fullPath .'.zip';
|
||||
// remove old zip files with the same name
|
||||
if (JFile::exists($this->zipPath))
|
||||
if (is_file($this->zipPath))
|
||||
{
|
||||
// remove file if found
|
||||
JFile::delete($this->zipPath);
|
||||
File::delete($this->zipPath);
|
||||
}
|
||||
// prep the item
|
||||
foreach($items as $item)
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -136,7 +137,7 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
|
||||
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -144,17 +145,17 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
SessionHelper::set('template__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +222,7 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
|
||||
if (($vdm = SessionHelper::get('template__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -229,17 +230,17 @@ class ComponentbuilderModelTemplate extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
SessionHelper::set('template__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
|
||||
use Joomla\String\StringHelper;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\Helper\TagsHelper;
|
||||
use VDM\Joomla\Utilities\SessionHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
@@ -119,7 +120,7 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
|
||||
if (($vdm = SessionHelper::get('validation_rule__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -127,17 +128,17 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
SessionHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,7 +191,7 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
$id = $item->id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
|
||||
if (($vdm = SessionHelper::get('validation_rule__'.$id)) !== null)
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
@@ -198,17 +199,17 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = UtilitiesStringHelper::random(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
SessionHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
SessionHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
SessionHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
|
||||
&& GuidHelper::valid($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user