Skip to content

Commit

Permalink
Remove locked property from composer.json manifest
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed May 10, 2022
1 parent 8678fc6 commit be92fda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/main/classes/ThemeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ protected function writeChildThemeMetaFile($path, $parentTheme, $themeConfig)
$composer = json_decode(File::get($metaPath), true) ?? [];

$composer['extra']['tastyigniter-theme'] = array_merge(
$composer['extra']['tastyigniter-theme'],
array_except($composer['extra']['tastyigniter-theme'], ['locked']),
array_except($config, ['description'])
);

Expand Down
6 changes: 6 additions & 0 deletions app/main/formwidgets/TemplateEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public function onSaveSource()
if ($this->manager->isLocked($this->model->code))
throw new ApplicationException(lang('system::lang.themes.alert_theme_locked'));

if (!$this->templateWidget)
return;

$fileName = sprintf('%s/%s', $this->templateType, $this->templateFile);
$data = post('Theme.source');

Expand Down Expand Up @@ -261,6 +264,9 @@ protected function wasTemplateModified()

protected function getTemplateModifiedTime()
{
if (!$this->templateWidget)
return null;

return optional($this->templateWidget->data)->fileSource->mTime;
}
}

0 comments on commit be92fda

Please sign in to comment.