mirror of
https://github.com/flarum/core.git
synced 2025-07-24 18:21:33 +02:00
fixes #799, now properly assigning a id
This commit is contained in:
@@ -86,9 +86,18 @@ class Extension implements Arrayable
|
||||
*/
|
||||
public function __construct($path, $composerJson)
|
||||
{
|
||||
$this->id = end(explode('/', $path));
|
||||
$this->path = $path;
|
||||
$this->composerJson = $composerJson;
|
||||
$this->assignId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns the id for the extension used globally.
|
||||
*/
|
||||
protected function assignId()
|
||||
{
|
||||
$segments = explode('/', $this->path);
|
||||
$this->id = end($segments);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user