Skip to content

Commit

Permalink
Future proofing
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Apr 13, 2022
1 parent 1627623 commit 8c4de0b
Show file tree
Hide file tree
Showing 11 changed files with 562 additions and 15 deletions.
4 changes: 3 additions & 1 deletion LICENCE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MIT license

Copyright (c) 2014-2022 Responsiv Pty Ltd, October CMS

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
Expand All @@ -16,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
6 changes: 1 addition & 5 deletions controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@
use Event;
use Config;
use Request;
use Response;
use BackendMenu;
use Cms\Classes\Layout;
use Cms\Classes\Theme;
use Cms\Classes\CmsObject;
use Cms\Classes\CmsCompoundObject;
use Cms\Widgets\TemplateList;
use System\Helpers\DateTime;
use Backend\Classes\Controller;
use RainLab\Pages\Widgets\PageList;
use RainLab\Pages\Widgets\MenuList;
use RainLab\Pages\Widgets\SnippetList;
use RainLab\Pages\Classes\Snippet;
use RainLab\Pages\Widgets\TemplateList;
use RainLab\Pages\Classes\Page as StaticPage;
use RainLab\Pages\Classes\Router;
use RainLab\Pages\Classes\Content;
use RainLab\Pages\Classes\MenuItem;
use RainLab\Pages\Plugin as PagesPlugin;
Expand Down
5 changes: 5 additions & 0 deletions lang/en/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
'saved' => 'The content has been successfully saved.',
'cant_save_to_dir' => 'Saving content files to the static-pages directory is not allowed.',
],
'template' => [
'order_by' => 'Order by',
'no_list_records' => 'No records found',
'delete_confirm' => 'Delete selected templates?',
],
'sidebar' => [
'add' => 'Add',
'search' => 'Search...',
Expand Down
3 changes: 0 additions & 3 deletions widgets/PageList.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?php namespace RainLab\Pages\Widgets;

use Str;
use Lang;
use Input;
use Request;
use Response;
use Backend\Classes\WidgetBase;
use RainLab\Pages\Classes\PageList as StaticPageList;
use Cms\Classes\Theme;
Expand Down
8 changes: 2 additions & 6 deletions widgets/SnippetList.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<?php namespace RainLab\Pages\Widgets;

use Backend\Classes\WidgetBase;
use RainLab\Pages\Classes\Snippet;
use RainLab\Pages\Classes\SnippetManager;
use Cms\Classes\Theme;
use Input;
use Response;
use Request;
use Str;
use Lang;

/**
* Snippet list widget.
Expand Down Expand Up @@ -97,7 +93,7 @@ protected function updateList()
protected function getThemeSessionKey($prefix)
{
return $prefix.$this->theme->getDirName();
}
}

protected function getSession($key = null, $default = null)
{
Expand All @@ -106,7 +102,7 @@ protected function getSession($key = null, $default = null)
return parent::getSession($key, $default);
}

protected function putSession($key, $value)
protected function putSession($key, $value)
{
return parent::putSession($this->getThemeSessionKey($key), $value);
}
Expand Down
Loading

0 comments on commit 8c4de0b

Please sign in to comment.