diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6ce1f..7c069c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ ### Docs - **template:** Add git commit hash in `CHANGELOG.md` (76bc527) +### Feat +- **ban_ips:** Store banned ip in components/Site (01084c9) + ### Refactor +- **Config:** Remove params `$throw` in Config()->get() (4acfcec) - **view:** Fix helper/username params (720f37e) diff --git a/framework/Http/View.php b/framework/Http/View.php index f9bae9b..20e415d 100644 --- a/framework/Http/View.php +++ b/framework/Http/View.php @@ -2,29 +2,30 @@ namespace Rid\Http; +use Rid\Base\BaseObject; + use League\Plates\Engine; -use League\Plates\Extension\URI; /** * Class View * @author Rhilip */ -class View +class View extends BaseObject { - protected $templates; + /** @var Engine */ + protected $_templates; - public function __construct($url = true) + public function onConstruct() { - $this->templates = new Engine(app()->getViewPath()); - if ($url) $this->templates->loadExtension(new URI(app()->request->server('path_info'))); - $this->templates->loadExtension(new \Rid\View\Conversion()); + $this->_templates = new Engine(app()->getViewPath()); + $this->_templates->loadExtension(new \Rid\View\Conversion()); } public function render($__template__, array $__data__ = null) { ob_start(); - echo $this->templates->render($__template__, $__data__); + echo $this->_templates->render($__template__, $__data__); return ob_get_clean(); } } diff --git a/migration/ridpt.sql b/migration/ridpt.sql index e23f55e..4eaf643 100644 --- a/migration/ridpt.sql +++ b/migration/ridpt.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 --- Generation Time: Aug 09, 2019 at 10:44 PM +-- Generation Time: Aug 10, 2019 at 11:21 AM -- Server version: 8.0.16 -- PHP Version: 7.3.7 @@ -742,9 +742,11 @@ TRUNCATE TABLE `site_config`; -- INSERT INTO `site_config` (`name`, `value`) VALUES +('authority.apply_for_links', '5'), ('authority.invite_manual_confirm', '70'), ('authority.invite_recycle_other_pending', '90'), ('authority.invite_recycle_self_pending', '70'), +('authority.manage_links', '80'), ('authority.manage_news', '80'), ('authority.manage_subtitles', '80'), ('authority.pass_invite_interval_check', '60'),