From: Roland Häder Date: Thu, 7 Apr 2011 22:45:39 +0000 (+0000) Subject: Cleanups, re-initialization of stackers added: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=4f56649779457a04221f8ec97f81465156a7685b Cleanups, re-initialization of stackers added: - Moved patch_i.sh to contrib - Marked MissingMethodException as deprecated (old-lost exception) - Stackers can be forced to re-initialize (aka. "reset") --- diff --git a/inc/classes/exceptions/main/class_MissingMethodException.php b/inc/classes/exceptions/main/class_MissingMethodException.php index 0426106a..e33095c1 100644 --- a/inc/classes/exceptions/main/class_MissingMethodException.php +++ b/inc/classes/exceptions/main/class_MissingMethodException.php @@ -11,6 +11,7 @@ * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo Try to rewrite user/guest login classes and mark this exception as deprecated + * @deprecated Please do no longer use this exception * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php index b029e4e2..0251661d 100644 --- a/inc/classes/main/stacker/class_BaseStacker.php +++ b/inc/classes/main/stacker/class_BaseStacker.php @@ -48,12 +48,13 @@ class BaseStacker extends BaseFrameworkSystem { * Initializes given stacker * * @param $stackerName Name of the stack + * @param $forceReInit Force re-initialization * @return void * @throws AlreadyInitializedStackerException If the stack is already initialized */ - public final function initStacker ($stackerName) { + public final function initStacker ($stackerName, $forceReInit = false) { // Is the stack already initialized? - if ($this->isStackInitialized($stackerName)) { + if (($forceReInit === true) && ($this->isStackInitialized($stackerName))) { // Then throw the exception throw new AlreadyInitializedStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_ALREADY_INITIALIZED); } // END - if diff --git a/patch_i.sh b/patch_i.sh deleted file mode 100755 index 725fc72a..00000000 --- a/patch_i.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -patch -p0 < i || exit 10 -svn commit || exit 10 -rm i