rename handle_static to static_files - stop confusing it with file handlers
@@ -24,7 +24,7 @@ class BrowserSearch extends Extension
|
||||
$search_title = $config->get_string(SetupConfig::TITLE);
|
||||
$search_form_url = make_link('post/list/{searchTerms}');
|
||||
$suggenton_url = make_link('browser_search/')."{searchTerms}";
|
||||
$icon_b64 = base64_encode(file_get_contents("ext/handle_static/static/favicon.ico"));
|
||||
$icon_b64 = base64_encode(file_get_contents("ext/static_files/static/favicon.ico"));
|
||||
|
||||
// Now for the XML
|
||||
$xml = "
|
||||
|
@@ -4,7 +4,7 @@ class IcoFileHandlerTest extends ShimmiePHPUnitTestCase
|
||||
public function testIcoHander()
|
||||
{
|
||||
$this->log_in_as_user();
|
||||
$image_id = $this->post_image("ext/handle_static/static/favicon.ico", "shimmie favicon");
|
||||
$image_id = $this->post_image("ext/static_files/static/favicon.ico", "shimmie favicon");
|
||||
|
||||
$page = $this->get_page("post/view/$image_id");
|
||||
$this->assertEquals(200, $page->code);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
class HandleStaticInfo extends ExtensionInfo
|
||||
class StaticFilesInfo extends ExtensionInfo
|
||||
{
|
||||
public const KEY = "handle_static";
|
||||
public const KEY = "static_files";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Static File Handler";
|
||||
@@ -10,6 +10,6 @@ class HandleStaticInfo extends ExtensionInfo
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $visibility = self::VISIBLE_ADMIN;
|
||||
public $description = 'If Shimmie can\'t handle a request, check static files ($theme/static/$filename, then ext/handle_static/static/$filename)';
|
||||
public $description = 'If Shimmie can\'t handle a request, check static files ($theme/static/$filename, then ext/static_files/static/$filename)';
|
||||
public $core = true;
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
class HandleStatic extends Extension
|
||||
class StaticFiles extends Extension
|
||||
{
|
||||
public function onPageRequest(PageRequestEvent $event)
|
||||
{
|
||||
@@ -12,7 +12,7 @@ class HandleStatic extends Extension
|
||||
$theme_name = $config->get_string(SetupConfig::THEME, "default");
|
||||
|
||||
$theme_file = "themes/$theme_name/static/$f_pagename";
|
||||
$static_file = "ext/handle_static/static/$f_pagename";
|
||||
$static_file = "ext/static_files/static/$f_pagename";
|
||||
|
||||
if (file_exists($theme_file) || file_exists($static_file)) {
|
||||
$filename = file_exists($theme_file) ? $theme_file : $static_file;
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
@@ -1,5 +1,5 @@
|
||||
<?php declare(strict_types=1);
|
||||
class HandleStaticTest extends ShimmiePHPUnitTestCase
|
||||
class StaticFilesTest extends ShimmiePHPUnitTestCase
|
||||
{
|
||||
public function testStaticHandler()
|
||||
{
|