Add yet even more comments and tell what a lot of things do.
Improves readability a ton, trust me.
This commit is contained in:
parent
bc93e6d4c3
commit
ce46c8b6f5
2 changed files with 12 additions and 0 deletions
|
@ -75,13 +75,18 @@ class BlueprintExtensionController extends Controller
|
|||
$this->settings->set('blueprint::' . $key, $value);
|
||||
}
|
||||
|
||||
// Confirm that the database value changes have been applied.
|
||||
$this->bplib->notify("Your changes have been saved.");
|
||||
// Redirect back to the page the user was on.
|
||||
return redirect()->route('admin.extensions.blueprint.index');
|
||||
}
|
||||
}
|
||||
|
||||
class BlueprintAdminFormRequest extends AdminFormRequest
|
||||
{
|
||||
// Form validation for settings on the Blueprint admin page.
|
||||
// This is included in the controller directly as that
|
||||
// simplifies my work.
|
||||
public function rules(): array {
|
||||
return [
|
||||
'placeholder' => 'string',
|
||||
|
|
|
@ -811,6 +811,8 @@ fi
|
|||
if [[ $2 == "-init" ]]; then VCMD="y"
|
||||
if [[ $(cat .blueprint/data/internal/db/developer) != "true"* ]]; then quit_red "[FATAL] Developer mode is not enabled.";exit 1;fi
|
||||
|
||||
# To prevent accidental wiping of your dev directory, you are unable to initialize another extension
|
||||
# until you wipe the contents of the .blueprint/dev directory.
|
||||
if [[ -n $(find .blueprint/dev -maxdepth 1 -type f -not -name "README.md" -print -quit) ]]; then
|
||||
quit_red "[FATAL] Your development directory contains files. To protect you against accidental data loss, you are unable to initialize another extension unless you clear your .blueprint/dev folder."
|
||||
fi
|
||||
|
@ -828,6 +830,7 @@ if [[ $2 == "-init" ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
if [[ $REDO_NAME == true ]]; then
|
||||
# Ask again if response does not pass validation.
|
||||
ask_name
|
||||
fi
|
||||
}
|
||||
|
@ -853,6 +856,7 @@ if [[ $2 == "-init" ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
if [[ $REDO_IDENTIFIER == true ]]; then
|
||||
# Ask again if response does not pass validation.
|
||||
ask_identifier
|
||||
fi
|
||||
}
|
||||
|
@ -870,6 +874,7 @@ if [[ $2 == "-init" ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
if [[ $REDO_DESCRIPTION == true ]]; then
|
||||
# Ask again if response does not pass validation.
|
||||
ask_description
|
||||
fi
|
||||
}
|
||||
|
@ -887,6 +892,7 @@ if [[ $2 == "-init" ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
if [[ $REDO_VERSION == true ]]; then
|
||||
# Ask again if response does not pass validation.
|
||||
ask_version
|
||||
fi
|
||||
}
|
||||
|
@ -904,6 +910,7 @@ if [[ $2 == "-init" ]]; then VCMD="y"
|
|||
fi
|
||||
|
||||
if [[ $REDO_AUTHOR == true ]]; then
|
||||
# Ask again if response does not pass validation.
|
||||
ask_author
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue