1
0
mirror of https://github.com/flarum/core.git synced 2025-10-17 01:36:09 +02:00

Refactoring to drop extensions dir, see #774

satisfy nitpick
This commit is contained in:
Daniel Klabbers
2016-03-02 08:56:37 +01:00
parent 1b5b91c85b
commit 15c0a8c2db
3 changed files with 87 additions and 38 deletions

View File

@@ -96,8 +96,9 @@ class Extension implements Arrayable
*/
protected function assignId()
{
$segments = explode('/', $this->path);
$this->id = end($segments);
list($vendor, $package) = explode('/', $this->name);
$package = str_replace(['flarum-ext-', 'flarum-'], '', $package);
$this->id = "$vendor-$package";
}
/**