From: Roland Häder Date: Tue, 26 Aug 2008 00:12:05 +0000 (+0000) Subject: Code merge from ship-simu X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1fc59c41e4a5a4791dec393d4a69f0633f60fc15;p=hub.git Code merge from ship-simu --- diff --git a/inc/classes/main/actions/class_ b/inc/classes/main/actions/class_ index a34ccda26..90ff32340 100644 --- a/inc/classes/main/actions/class_ +++ b/inc/classes/main/actions/class_ @@ -51,6 +51,7 @@ class ???Action extends BaseAction implements Commandable { * @param $requestInstance An instance of a class with an Requestable interface * @param $responseInstance An instance of a class with an Responseable interface * @return void + * @todo 0% done */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { $this->partialStub("You have to implement me."); diff --git a/inc/classes/main/filter/class_ b/inc/classes/main/filter/class_ index 9027c5d18..4aff5132a 100644 --- a/inc/classes/main/filter/class_ +++ b/inc/classes/main/filter/class_ @@ -55,6 +55,7 @@ class ???Filter extends BaseFrameworkSystem implements Filterable { * @param $requestInstance An instance of a class with an Requestable interface * @param $responseInstance An instance of a class with an Responseable interface * @return void + * @todo 0% done */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Implement this! diff --git a/inc/classes/main/helper/captcha/class_ b/inc/classes/main/helper/captcha/class_ index 758b20565..5dca7ba2f 100644 --- a/inc/classes/main/helper/captcha/class_ +++ b/inc/classes/main/helper/captcha/class_ @@ -57,6 +57,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha { * Initiates the CAPTCHA * * @return void + * @todo 0% done */ public function initiateCaptcha () { $this->partialStub("Please implement this method."); @@ -66,6 +67,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha { * Render the CAPTCHA code * * @return void + * @todo 0% done */ public function renderCode () { $this->partialStub("Please implement this method."); diff --git a/inc/classes/main/helper/class_ b/inc/classes/main/helper/class_ index ba6cb0ee1..94f912f8c 100644 --- a/inc/classes/main/helper/class_ +++ b/inc/classes/main/helper/class_ @@ -52,6 +52,7 @@ class ???Helper extends BaseHelper { * Flush the content out,e g. to a template variable * * @return void + * @todo 0% done */ public function flushContent () { $this->partialStub("Please implement this method."); diff --git a/inc/classes/main/helper/web/class_ b/inc/classes/main/helper/web/class_ index 7c61ec832..635066acf 100644 --- a/inc/classes/main/helper/web/class_ +++ b/inc/classes/main/helper/web/class_ @@ -65,6 +65,7 @@ class Web???Helper extends BaseWebHelper implements HelpableTemplate { * Flush the content out,e g. to a template variable * * @return void + * @todo 0% done */ public function flushContent () { $this->partialStub("Please implement this method."); diff --git a/inc/classes/main/helper/web/links/class_WebLinkHelper.php b/inc/classes/main/helper/web/links/class_WebLinkHelper.php index 24fb844b2..40d9c6666 100644 --- a/inc/classes/main/helper/web/links/class_WebLinkHelper.php +++ b/inc/classes/main/helper/web/links/class_WebLinkHelper.php @@ -67,6 +67,27 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { return $helperInstance; } + /** + * Renders the link content (HTML code) with given link text and optional + * extra content + * + * @param $linkText Link text to set in link + * @param $extraContent Optional extra HTML content + * @return $linkContent Rendered text link content + */ + private function renderLinkContentWithTextExtraContent ($linkText, $extraContent="") { + // Construct link content + $linkContent = sprintf("%s", + $this->getLinkBase(), + $extraContent, + $linkText, + $linkText + ); + + // Return it + return $linkContent; + } + /** * Setter for link name * @@ -191,31 +212,46 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { // Check if a previous group was opened if (!$this->ifGroupOpenedPreviously()) { // No group was opened before! - throw new NoGroupOpenedException(array($this, $groupNote), self::EXCEPTION_GROUP_NOT_OPENED); + throw new NoGroupOpenedException(array($this, $linkAction."(".$linkText.")"), self::EXCEPTION_GROUP_NOT_OPENED); } // END - if // Default parameter seperator is & $seperator = "&"; - // Get link base - $linkBase = $this->getLinkBase(); - // Is there a question mark in? - $linkArray = explode("?", $linkBase); + $linkArray = explode("?", $this->getLinkBase()); if (count($linkArray) == 0) { // No question mark $seperator = "?"; - } + } // END - if - // Renders the link content - $linkContent = sprintf("%s", - $linkBase, + // Prepare action + $action = sprintf("%saction=%s", $seperator, - $linkAction, - $linkText, - $linkText + $linkAction ); + // Renders the link content + $linkContent = $this->renderLinkContentWithTextExtraContent($linkText, $action); + + // Add the content to the previous group + $this->addContentToPreviousGroup($linkContent); + } + + /** + * Adds a default link (no extra parameters) to the content with specified + * language id string. + * + * @param $languageId Language id string to use + * @return void + */ + public function addLinkWithTextById ($languageId) { + // Resolve the language string + $languageResolved = $this->getLanguageInstance()->getMessage($languageId); + + // Now add the link + $linkContent = $this->renderLinkContentWithTextExtraContent($languageResolved); + // Add the content to the previous group $this->addContentToPreviousGroup($linkContent); } diff --git a/inc/classes/main/mailer/class_ b/inc/classes/main/mailer/class_ index b3181c54a..5cf368f87 100644 --- a/inc/classes/main/mailer/class_ +++ b/inc/classes/main/mailer/class_ @@ -49,6 +49,7 @@ class ???Mailer extends BaseMailer implements DeliverableMail { * Deliver email to the recipient(s) * * @return void + * @todo 0% done */ public function deliverEmail() { $this->partialStub("You have to implement this method."); @@ -58,6 +59,7 @@ class ???Mailer extends BaseMailer implements DeliverableMail { * Send notification to the admin * * @return void + * @todo 0% done */ public function sendAdminNotification() { $this->partialStub("You have to implement this method."); diff --git a/inc/classes/main/points/class_UserPoints.php b/inc/classes/main/points/class_UserPoints.php index 6a9d88f17..17c22e254 100644 --- a/inc/classes/main/points/class_UserPoints.php +++ b/inc/classes/main/points/class_UserPoints.php @@ -58,6 +58,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable { * * @param $action The action or configuration entry plus prefix the user wants to perform * @return $hasRequired Wether the user has the required points + * @todo Finish loading part of points */ public function ifUserHasRequiredPoints ($action) { // Default is that everyone is poor... ;-) diff --git a/inc/classes/main/response/class_ImageResponse.php b/inc/classes/main/response/class_ImageResponse.php index 2329af7f3..71acb351d 100644 --- a/inc/classes/main/response/class_ImageResponse.php +++ b/inc/classes/main/response/class_ImageResponse.php @@ -145,6 +145,7 @@ class ImageResponse extends BaseFrameworkSystem implements Responseable { * @param $force Wether we shall force the output or abort if headers are * already sent with an exception * @return void + * @todo Add support for fatal messages in image response * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ diff --git a/inc/classes/main/user/member/class_Member.php b/inc/classes/main/user/member/class_Member.php index cdb98c1b9..141f1de38 100644 --- a/inc/classes/main/user/member/class_Member.php +++ b/inc/classes/main/user/member/class_Member.php @@ -94,6 +94,7 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea * * @param $requestInstance An instance of a Requestable class * @return $userInstance An instance of this user class + * @todo Add more ways over creating user classes */ public final static function createMemberByRequest (Requestable $requestInstance) { // Determine if by email or username