mirror of
https://github.com/typecho/typecho.git
synced 2025-01-29 10:21:11 +01:00
fix plugin namespace
This commit is contained in:
parent
7db5f3c873
commit
50dea3fc24
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace HellWorld;
|
||||
namespace HelloWorld;
|
||||
|
||||
use Typecho\Plugin\PluginInterface;
|
||||
use Typecho\Widget\Helper\Form;
|
||||
|
@ -348,10 +348,10 @@ class Plugin
|
||||
{
|
||||
switch (true) {
|
||||
case file_exists($pluginFileName = $path . '/' . $pluginName . '/Plugin.php'):
|
||||
$className = $pluginName . '_Plugin';
|
||||
$className = "\\{$pluginName}\Plugin";
|
||||
break;
|
||||
case file_exists($pluginFileName = $path . '/' . $pluginName . '.php'):
|
||||
$className = $pluginName;
|
||||
$className = "\\{$pluginName}";
|
||||
break;
|
||||
default:
|
||||
throw new PluginException('Missing Plugin ' . $pluginName, 404);
|
||||
|
@ -256,7 +256,7 @@ class Options extends Base
|
||||
*/
|
||||
public function pluginDir(?string $plugin = null): string
|
||||
{
|
||||
return Common::url($plugin, __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__);
|
||||
return __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user