merge #40
: itsvic-dev/vic/no-folder-placeholders
chore: don't use `::f` placeholders
This commit is contained in:
commit
ed9ecf5744
4 changed files with 5 additions and 9 deletions
|
@ -145,7 +145,7 @@ class BlueprintAdminLibrary
|
|||
* [BlueprintExtensionLibrary documentation](https://blueprint.zip/docs/?page=documentation/$blueprint)
|
||||
*/
|
||||
public function extension($identifier): bool {
|
||||
if(str_contains($this->fileRead("::f/.blueprint/extensions/blueprint/private/db/installed_extensions"), $identifier.',')) {
|
||||
if(str_contains($this->fileRead(base_path(".blueprint/extensions/blueprint/private/db/installed_extensions")), $identifier.',')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -102,7 +102,7 @@ class BlueprintClientLibrary
|
|||
* [BlueprintExtensionLibrary documentation](https://blueprint.zip/docs/?page=documentation/$blueprint)
|
||||
*/
|
||||
public function extension($identifier): bool {
|
||||
if(str_contains($this->fileRead("::f/.blueprint/extensions/blueprint/private/db/installed_extensions"), $identifier.',')) {
|
||||
if(str_contains($this->fileRead(base_path(".blueprint/extensions/blueprint/private/db/installed_extensions")), $identifier.',')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Pterodactyl\BlueprintFramework\Services\PlaceholderService;
|
|||
class BlueprintPlaceholderService
|
||||
{
|
||||
public function version(): string { return "::v"; }
|
||||
public function folder(): string { return "::f"; }
|
||||
public function folder(): string { return base_path(); }
|
||||
public function installed(): string { return "NOTINSTALLED"; }
|
||||
public function api_url(): string { return "http://api.blueprint.zip:50000"; }
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
# This should allow Blueprint to run in Docker. Please note that changing the $FOLDER variable after running
|
||||
# the Blueprint installation script will not change anything in any files besides blueprint.sh.
|
||||
FOLDER="/var/www/pterodactyl" #;
|
||||
FOLDER="$(realpath $(dirname $0))" #;
|
||||
# Technically shouldn't be needed now, but I'm not going to touch this for now just in case it breaks stuff on Docker. -- @itsvic-dev
|
||||
DOCKERFOLDER="/app"
|
||||
|
||||
# This stores the webserver ownership user which Blueprint uses when applying webserver permissions.
|
||||
|
@ -222,11 +223,6 @@ if [[ $1 != "-bash" ]]; then
|
|||
php artisan storage:link &>> $BLUEPRINT__DEBUG
|
||||
|
||||
PRINT INFO "Replacing internal placeholders.."
|
||||
# Update folder placeholder on PlaceholderService and admin layout.
|
||||
# Should avoid doing stuff this way in the future!
|
||||
sed -i "s~::f~$FOLDER~g" $FOLDER/app/BlueprintFramework/Services/PlaceholderService/BlueprintPlaceholderService.php
|
||||
sed -i "s~::f~$FOLDER~g" $FOLDER/app/BlueprintFramework/Libraries/ExtensionLibrary/Admin/BlueprintAdminLibrary.php
|
||||
sed -i "s~::f~$FOLDER~g" $FOLDER/app/BlueprintFramework/Libraries/ExtensionLibrary/Client/BlueprintClientLibrary.php
|
||||
# Copy "Blueprint" extension page logo from assets.
|
||||
cp $FOLDER/.blueprint/assets/logo.jpg $FOLDER/.blueprint/extensions/blueprint/assets/logo.jpg
|
||||
|
||||
|
|
Loading…
Reference in a new issue