Added sharing of snippets option and started adding get snippets custom admin view gh-92. Fixed gh-153 published settings for categories.

This commit is contained in:
2017-11-16 06:37:32 +02:00
parent 1cc40dbfe4
commit f34e1b19f8
37 changed files with 1372 additions and 124 deletions

View File

@ -2881,6 +2881,7 @@ class Get
}
$gets = array();
$keys = array();
// first load all options
foreach ($lines as $line)
{
if (strpos($line,'AS') !== false)
@ -2896,13 +2897,16 @@ class Get
$get = $line;
$key = null;
}
// set the get and key
$get = trim($get);
$key = trim($key);
// only add the view
if ('a' != $as && 1 == $row_type && 'view' === $type && strpos('#'.$key,'#'.$view.'_') === false)
// only add the view (we must adapt this)
if (isset($this->getAsLookup[$method_key][$get]) && 'a' != $as && 1 == $row_type && 'view' === $type && strpos('#'.$key,'#'.$view.'_') === false)
{
// this is a problem (TODO) since we may want to not add the view name.
$key = $view.'_'.trim($key);
}
// continue only if we have get
if (ComponentbuilderHelper::checkString($get))
{
$gets[] = $this->db->quote($get);

View File

@ -910,7 +910,7 @@ class Structure extends Get
private function setJoomlaVersionData()
{
// set the version data
$versionData = json_decode(file_get_contents($this->templatePath.'/settings.json'));
$versionData = json_decode(ComponentbuilderHelper::getFileContents($this->templatePath.'/settings.json'));
// add custom folders
if ((isset($this->componentData->folders) && ComponentbuilderHelper::checkArray($this->componentData->folders)) || $this->addEximport || $this->uikit || $this->footable)
{

View File

@ -3742,7 +3742,7 @@ class Interpretation extends Fields
{
if (JFile::exists($file['path']))
{
$string = file_get_contents($file['path']);
$string = ComponentbuilderHelper::getFileContents($file['path']);
$buket['static'][] = $this->getInbetweenStrings($string);
}
}
@ -3754,7 +3754,7 @@ class Interpretation extends Fields
{
if (JFile::exists($doc['path']))
{
$string = file_get_contents($doc['path']);
$string = ComponentbuilderHelper::getFileContents($doc['path']);
$buket[$view][] = $this->getInbetweenStrings($string);
}
}

View File

@ -1305,7 +1305,7 @@ class Infusion extends Interpretation
// build xml path
$xmlPath = $this->componentPath . '/'. $this->fileContentStatic['###component###']. '.xml';
// get the content in xml
$componentXML = file_get_contents($xmlPath);
$componentXML = ComponentbuilderHelper::getFileContents($xmlPath);
// update the xml content
$componentXML = $this->setPlaceholders($componentXML, $replace);
// store the values back to xml