Skip to content

Commit 537fc9e

Browse files
committed
Revert "Use a fallback for default themes views"
This reverts commit 6c5c12a.
1 parent 6c5c12a commit 537fc9e

File tree

155 files changed

+7329
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+7329
-5
lines changed

featherbb/Controller/Install.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
namespace FeatherBB\Controller;
1111

12+
use FeatherBB\Core\Random;
1213
use FeatherBB\Core\Url;
1314
use FeatherBB\Core\Utils;
14-
use FeatherBB\Core\Random;
15-
use FeatherBB\Middleware\Core;
1615

1716
class Install
1817
{
@@ -166,7 +165,7 @@ public function create_config(array $data)
166165

167166
public function create_db(array $data)
168167
{
169-
Core::init_db($data);
168+
\FeatherBB\Core::init_db($data);
170169

171170
// Load appropriate language
172171
load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$data['default_lang'].'/install.mo');

featherbb/Core/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function getTemplatePathname($file)
194194
{
195195
$pathname = $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR);
196196
if (!is_file($pathname)) {
197-
$pathname = $this->app->forum_env['FEATHER_ROOT'] . 'featherbb/View/' . ltrim($file, DIRECTORY_SEPARATOR); // Fallback on default view
197+
$pathname = $this->app->forum_env['FEATHER_ROOT'] . 'view/' . ltrim($file, DIRECTORY_SEPARATOR); // Fallback on default view
198198
if (!is_file($pathname)) {
199199
throw new \RuntimeException("View cannot add template `$file` to stack because the template does not exist");
200200
}
@@ -251,7 +251,7 @@ protected function render($data = null, $nested = true)
251251

252252
public function setStyle($style)
253253
{
254-
if (!is_dir($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$style.'/')) {
254+
if (!is_dir($this->app->forum_env['FEATHER_ROOT'].'style/themes/'.$style.'/view/')) {
255255
throw new \InvalidArgumentException('The style '.$style.' doesn\'t exist');
256256
}
257257
$this->data->set('style', (string) $style);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)