Fixed gh-235 to insure that the public access switch for front-end views work. Resolved gh-236 to Auto save Name to System Name if blank. Added text area for private key of server. Fixed the getModel helper method. Fixed the batch methods. Maked a few tweaks to the compiler.
This commit is contained in:
@ -522,8 +522,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
$this->contentType = new JUcmType;
|
||||
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
}
|
||||
|
||||
@ -548,7 +546,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
}
|
||||
|
||||
$newIds = array();
|
||||
|
||||
// Parent exists so let's proceed
|
||||
while (!empty($pks))
|
||||
{
|
||||
@ -558,17 +555,11 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
$this->table->reset();
|
||||
|
||||
// only allow copy if user may edit this item.
|
||||
|
||||
if (!$this->user->authorise('core.edit', $contexts[$pk]))
|
||||
|
||||
{
|
||||
|
||||
// Not fatal error
|
||||
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
|
||||
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
// Check that the row actually exists
|
||||
@ -578,7 +569,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
{
|
||||
// Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -589,7 +579,11 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
}
|
||||
}
|
||||
|
||||
$this->table->name = $this->generateUniqe('name',$this->table->name);
|
||||
// Only for strings
|
||||
if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
|
||||
{
|
||||
$this->table->name = $this->generateUniqe('name',$this->table->name);
|
||||
}
|
||||
|
||||
// insert all set values
|
||||
if (ComponentbuilderHelper::checkArray($values))
|
||||
@ -671,8 +665,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
$this->user = JFactory::getUser();
|
||||
$this->table = $this->getTable();
|
||||
$this->tableClassName = get_class($this->table);
|
||||
$this->contentType = new JUcmType;
|
||||
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
}
|
||||
|
||||
@ -696,7 +688,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
if (!$this->user->authorise('core.edit', $contexts[$pk]))
|
||||
{
|
||||
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -707,7 +698,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
{
|
||||
// Fatal error
|
||||
$this->setError($error);
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user