Payment introduced, minor rewrites
authorRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 18:28:05 +0000 (18:28 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 18:28:05 +0000 (18:28 +0000)
- Payment system introduced (not finished)
- Refill page prepared for payment system
- Methods addCriteria() first parameter is now in ", not in '
- Minor improvements

36 files changed:
.gitattributes
application/blog/config.php
application/ship-simu/config.php
application/ship-simu/main/actions/web/class_WebLoginRefillAction.php
application/ship-simu/main/commands/web/class_WebRefillFormCommand.php
application/ship-simu/main/goverment/class_SimplifiedGoverment.php
application/ship-simu/main/registration/class_ShipSimuRegistration.php
application/ship-simu/main/user/extended/class_ShipSimuMember.php
application/ship-simu/main/wrapper/class_CompanyDatabaseWrapper.php
application/ship-simu/templates/de/code/action_login_profile.ctp
application/ship-simu/templates/de/code/action_login_refill.ctp
application/shoutbox/config.php
application/todo/config.php
db/payments/.htaccess [new file with mode: 0644]
inc/classes/interfaces/discovery/.htaccess [new file with mode: 0644]
inc/classes/interfaces/discovery/class_Discoverable.php [new file with mode: 0644]
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/controller/class_BaseController.php
inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php [new file with mode: 0644]
inc/classes/main/debug/class_DebugConsoleOutput.php
inc/classes/main/debug/class_DebugWebOutput.php
inc/classes/main/discovery/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/class_ [new file with mode: 0644]
inc/classes/main/discovery/class_BaseDiscovery.php [new file with mode: 0644]
inc/classes/main/discovery/payment/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php [new file with mode: 0644]
inc/classes/main/filter/payment/.htaccess [new file with mode: 0644]
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php [new file with mode: 0644]
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/output/class_WebOutput.php
inc/classes/main/points/class_UserPoints.php
inc/classes/main/reader/class_DefaultNewsReader.php
inc/classes/main/resolver/action/class_BaseActionResolver.php
inc/classes/main/response/class_BaseResponse.php
inc/classes/main/user/member/class_Member.php

index e57ab49..fb12de8 100644 (file)
@@ -327,6 +327,7 @@ db/.htaccess -text
 db/company_user/.htaccess -text
 db/gov_user/.htaccess -text
 db/news/.htaccess -text
+db/payments/.htaccess -text
 db/user/.htaccess -text
 db/user_points/.htaccess -text
 devel/.htaccess -text
@@ -485,6 +486,8 @@ inc/classes/interfaces/database/middleware/.htaccess -text
 inc/classes/interfaces/database/middleware/class_DatabaseConnector.php -text
 inc/classes/interfaces/debug/.htaccess -text
 inc/classes/interfaces/debug/class_Debugger.php -text
+inc/classes/interfaces/discovery/.htaccess -text
+inc/classes/interfaces/discovery/class_Discoverable.php -text
 inc/classes/interfaces/filter/.htaccess -text
 inc/classes/interfaces/filter/class_Filterable.php -text
 inc/classes/interfaces/helper/.htaccess -text
@@ -609,12 +612,18 @@ inc/classes/main/database/databases/.htaccess -text
 inc/classes/main/database/databases/class_LocalFileDatabase.php -text
 inc/classes/main/database/wrapper/.htaccess -text
 inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php -text
+inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php -text
 inc/classes/main/debug/.htaccess -text
 inc/classes/main/debug/class_DebugConsoleOutput.php -text
 inc/classes/main/debug/class_DebugErrorLogOutput.php -text
 inc/classes/main/debug/class_DebugWebOutput.php -text
+inc/classes/main/discovery/.htaccess -text
+inc/classes/main/discovery/class_ -text
+inc/classes/main/discovery/class_BaseDiscovery.php -text
+inc/classes/main/discovery/payment/.htaccess -text
+inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php -text
 inc/classes/main/factories/.htaccess -text
 inc/classes/main/factories/cache/.htaccess -text
 inc/classes/main/factories/cache/class_CacheFactory.php -text
@@ -645,6 +654,8 @@ inc/classes/main/filter/news/class_NewsDownloadFilter.php -text
 inc/classes/main/filter/news/class_NewsProcessFilter.php -text
 inc/classes/main/filter/null/.htaccess -text
 inc/classes/main/filter/null/class_NullFilter.php -text
+inc/classes/main/filter/payment/.htaccess -text
+inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php -text
 inc/classes/main/filter/update/.htaccess -text
 inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php -text
 inc/classes/main/filter/update/class_UserUpdateFilter.php -text
index 2335879..a2900e6 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "BlogRegistration");
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "BlogUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "BlogGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "BlogLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "BlogLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "BlogLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "BlogProfileAction");
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: BLOG-REGISTER-CAPTCHA
 $cfg->setConfigEntry('blog_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: blog-USER-LOGIN-CAPTCHA
+// CFG: BLOG-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('blog_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: blog-GUEST-LOGIN-CAPTCHA
+// CFG: BLOG-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('blog_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: blog-REGISTER-CAPTCHA-SECURED
+// CFG: BLOG-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_register_captcha_secured', "Y");
 
-// CFG: blog-USER-LOGIN-CAPTCHA-SECURED
+// CFG: BLOG-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_user_login_captcha_secured', "Y");
 
-// CFG: blog-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: BLOG-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
index 6e60c09..0240453 100644 (file)
@@ -160,12 +160,18 @@ $cfg->setConfigEntry('captcha_register_verifier_filter', "GraphicalCodeCaptchaVe
 // CFG: CAPTCHA-REFILL-VERFIER-FILTER
 $cfg->setConfigEntry('captcha_refill_verifier_filter', "GraphicalCodeCaptchaVerifierFilter");
 
-// CFG: CONFIRM-CODE-VALIDATOR-FILTER
+// CFG: CONFIRM-CODE-VERIFIER-FILTER
 $cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter");
 
 // CFG: REFILL-PAGE-FILTER
 $cfg->setConfigEntry('refill_page_filter', "RefillPageFilter");
 
+// CFG: REFILL-REQUEST-CURRENCY-BOOK-FILTER
+$cfg->setConfigEntry('refill_request_currency_book_filter', "RefillRequestCurrencyBookFilter");
+
+// CFG: PAYMENT-DISCOVERY-FILTER
+$cfg->setConfigEntry('payment_discovery_filter', "PaymentDiscoveryFilter");
+
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
@@ -253,16 +259,19 @@ $cfg->setConfigEntry('company_db_wrapper_class', "CompanyDatabaseWrapper");
 // CFG: USER-POINTS-DB-WRAPPER-CLASS
 $cfg->setConfigEntry('user_points_db_wrapper_class', "UserPointsDatabaseWrapper");
 
-// CFG: USER-GOVERMENT-WRAPPER
+// CFG: USER-GOVERMENT-WRAPPER-CLASS
 $cfg->setConfigEntry('user_gov_wrapper_class', "UserGovermentDatabaseWrapper");
 
+// CFG: PAYMENT-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('payment_db_wrapper_class', "PaymentsDatabaseWrapper");
+
 // CFG EMAIl-TPL-RESEND-LINK
 $cfg->setConfigEntry('email_tpl_resend_link', "text");
 
-// CFG: MAIL-TEMPLATE-ENGINE
+// CFG: MAIL-TEMPLATE-CLASS
 $cfg->setConfigEntry('mail_template_class', "MailTemplateEngine");
 
-// CFG: IMAGE-TEMPLATE-ENGINE
+// CFG: IMAGE-TEMPLATE-CLASS
 $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine");
 
 // CFG: ADMIN-EMAIL
@@ -298,5 +307,8 @@ $cfg->setConfigEntry('refill_page_active', "Y");
 // CFG: REFILL-PAGE-MIN-CURRENCY-AMOUNT
 $cfg->setConfigEntry('refill_page_min_currency_amount', 1000);
 
+// CFG: LOGIN-FILL-PAYMENT-DISCOVERY
+$cfg->setConfigEntry('login_refill_payment_discovery', "LocalPaymentDiscovery");
+
 // [EOF]
 ?>
index 3120fac..77f18f5 100644 (file)
@@ -55,7 +55,7 @@ class WebLoginRefillAction extends BaseAction implements Commandable, Registerab
         * @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        Maybe add fetching company list of current user here?
+        * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Unfinished method
@@ -74,6 +74,9 @@ class WebLoginRefillAction extends BaseAction implements Commandable, Registerab
 
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
+
+               // Add payment discovery filter
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('payment_discovery_filter', array($this)));
        }
 }
 
index 25869cf..5cae379 100644 (file)
@@ -82,11 +82,20 @@ class WebRefillFormCommand extends BaseCommand implements Commandable {
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
+               // Verify password
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
+
                // Verify CAPTCHA code
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
 
                // Verify refill request
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter'));
+
+               // Prepare a filter based on the requested type we shall refill
+               $filterName = sprintf("refill_request_%s_book_filter", $requestInstance->getRequestElement('type'));
+
+               // Now, try to load that filter
+               $controllerInstance->addPostFilter(ObjectFactory::createObjectByConfiguredName($filterName));
        }
 }
 
index 0f0c4ca..ccdc373 100644 (file)
@@ -69,8 +69,8 @@ class SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-               $criteriaInstance->addCriteria('gov_uid', $this->getUserInstance()->getUserName());
-               $criteriaInstance->addCriteria('gov_activity_status', self::STATUS_STARTER_HELP);
+               $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserName());
+               $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
                $criteriaInstance->setLimit(1);
 
                // Get a wrapper instance
index 31e6e63..1ad9731 100644 (file)
@@ -187,7 +187,7 @@ class ShipSimuRegistration extends BaseRegistration {
                $criteriaInstance->addConfiguredCriteria(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $configEntry);
 
                // Include registration timestamp
-               $criteriaInstance->addCriteria('registered', date("Y-m-d H:i:s", time()));
+               $criteriaInstance->addCriteria("registered", date("Y-m-d H:i:s", time()));
        }
 }
 
index acbdb62..f2caaa8 100644 (file)
@@ -145,8 +145,8 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember {
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
-               $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
-               $updateInstance->addCriteria('last_action', $lastAction);
+               $updateInstance->addCriteria("last_activity", date("Y-m-d H:i:s", time()));
+               $updateInstance->addCriteria("last_action", $lastAction);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
index 752e409..ea221b9 100644 (file)
@@ -78,7 +78,7 @@ class CompanyDatabaseWrapper extends BaseDatabaseWrapper {
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the user primary key as a search criteria
-               $criteriaInstance->addCriteria('participant_id', $userInstance->getPrimaryKey());
+               $criteriaInstance->addCriteria("participant_id", $userInstance->getPrimaryKey());
                $criteriaInstance->setLimit(1);
 
                // Set company->user table
index 4d8f3dd..bb78982 100644 (file)
@@ -106,7 +106,7 @@ if ($helper->ifRulesHaveChanged()) {
 
 // Ask again for current account password
 $helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der &Auml;nderungen dein derzeitiges Passwort ein.");
-$helper->addFieldText('pass_old', "Altes Passwort:");
+$helper->addFieldText('pass_old', "Derzeitiges Passwort:");
 $helper->addInputPasswordField('pass_old');
 
 // Abschliessender Hinweis und Abschluss des Formulars
index b31d356..136794f 100644 (file)
@@ -2,6 +2,9 @@
 // Neue Helper-Instanz holen
 $helper = WebFormHelper::createWebFormHelper($this, 'refill_form');
 
+// Pre-fetch payment types
+$helper->prefetchValueInstance('payments');
+
 // Add form group
 $helper->addFormGroup('refill_form', "Bitte w&auml;hle aus, was du nachbestellen willst und gebe die Menge an.");
 
@@ -25,6 +28,11 @@ $helper->addInputSelectField('type', "");
 $helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
 $helper->addInputTextField('amount', 1000);
 
+// Ask again for current account password
+$helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der Nachbestellung dein derzeitiges Passwort ein.");
+$helper->addFieldText('pass_old', "Derzeitiges Passwort:");
+$helper->addInputPasswordField('pass_old');
+
 // CAPTCHA enbaled?
 if ($helper->ifFormSecuredWithCaptcha()) {
        $helper->addFormGroup('captcha_refill', "Bitte wiederhole den angezeigten Code:");
@@ -32,7 +40,7 @@ if ($helper->ifFormSecuredWithCaptcha()) {
 } // END - if
 
 // Submit button
-$helper->addFormGroup('buttons_refill', "Mit Absenden des Formulars wird deine Nachbestellung rechtskr&auml;ftig!");
+$helper->addFormGroup('buttons_refill', "Mit Absenden des Formulars wird deine Nachbestellung verbindlich!");
 $helper->addInputResetButton("Eingaben l&ouml;schen");
 $helper->addInputSubmitButton("Nachbestellung verbindlich aufgeben");
 $helper->flushContent();
index fa898c0..c77e1a3 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "ShoutBoxRegistration");
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "ShoutBoxUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "ShoutBoxGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "ShoutBoxLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "ShoutBoxLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "ShoutBoxLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "ShoutBoxProfileAction");
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: SHOUTBOX-REGISTER-CAPTCHA
 $cfg->setConfigEntry('shoutbox_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: shoutbox-USER-LOGIN-CAPTCHA
+// CFG: SHOUTBOX-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('shoutbox_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: shoutbox-GUEST-LOGIN-CAPTCHA
+// CFG: SHOUTBOX-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('shoutbox_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: shoutbox-REGISTER-CAPTCHA-SECURED
+// CFG: SHOUTBOX-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_register_captcha_secured', "Y");
 
-// CFG: shoutbox-USER-LOGIN-CAPTCHA-SECURED
+// CFG: SHOUTBOX-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_user_login_captcha_secured', "Y");
 
-// CFG: shoutbox-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: SHOUTBOX-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
index fcbf389..02f9e7b 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "ToDoRegistration");
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "ToDoUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "ToDoGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "ToDoLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "ToDoLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "ToDoLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "ToDoProfileAction");
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: TODO-REGISTER-CAPTCHA
 $cfg->setConfigEntry('todo_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: todo-USER-LOGIN-CAPTCHA
+// CFG: TODO-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('todo_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: todo-GUEST-LOGIN-CAPTCHA
+// CFG: TODO-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('todo_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: todo-REGISTER-CAPTCHA-SECURED
+// CFG: TODO-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_register_captcha_secured', "Y");
 
-// CFG: todo-USER-LOGIN-CAPTCHA-SECURED
+// CFG: TODO-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_user_login_captcha_secured', "Y");
 
-// CFG: todo-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: TODO-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
diff --git a/db/payments/.htaccess b/db/payments/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/discovery/.htaccess b/inc/classes/interfaces/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/discovery/class_Discoverable.php b/inc/classes/interfaces/discovery/class_Discoverable.php
new file mode 100644 (file)
index 0000000..8cc62fa
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * An interface for discovery
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Discoverable extends FrameworkInterface {
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       function discover (Requestable $requestInstance);
+}
+
+//
+?>
index 006a6b4..3dc4aad 100644 (file)
@@ -815,9 +815,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public function debugBackTrace () {
                // Sorry, there is no other way getting this nice backtrace
-               print "<pre>\n";
+               print("<pre>\n");
                debug_print_backtrace();
-               print "</pre>";
+               print("</pre>");
                exit;
        }
 
index 1c4d442..69fa4d1 100644 (file)
  */
 class BaseController extends BaseFrameworkSystem implements Registerable {
        /**
-        * Pre filter chain instance
+        * Generic filter chains
         */
-       private $preFilterChain = null;
-
-       /**
-        * Post filter chain instance
-        */
-       private $postFilterChain = null;
+       private $filterChains = array();
 
        /**
         * Protected constructor
@@ -49,14 +44,24 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
                $this->removeSystemArray();
 
                // Initialize both filter chains
-               $this->preFilterChain  = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
-               $this->postFilterChain = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+               $this->initFilterChain('pre');
+               $this->initFilterChain('post');
 
                // Add this controller to the registry
                Registry::getRegistry()->addInstance('controller', $this);
        }
 
        /**
+        * Private method to initialize a given filter chain
+        *
+        * @param       $filterChain    Name of the filter chain
+        * @return      void
+        */
+       private function initFilterChain ($filterChain) {
+               $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+       }
+
+       /**
         * Adds a filter to the pre filter chain
         *
         * @param       $filterInstance         An instance of a filter
@@ -64,7 +69,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPreFilter (Filterable $filterInstance) {
                // Add the pre filter
-               $this->preFilterChain->addFilter($filterInstance);
+               $this->filterChains['pre']->addFilter($filterInstance);
        }
 
        /**
@@ -75,7 +80,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPostFilter (Filterable $filterInstance) {
                // Add the post filter
-               $this->postFilterChain->addFilter($filterInstance);
+               $this->filterChains['post']->addFilter($filterInstance);
        }
 
        /**
@@ -87,7 +92,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all pre filters
-               $this->preFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['pre']->processFilters($requestInstance, $responseInstance);
        }
 
        /**
@@ -99,7 +104,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all post filters
-               $this->postFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['post']->processFilters($requestInstance, $responseInstance);
        }
 }
 
diff --git a/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php b/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php
new file mode 100644 (file)
index 0000000..52f3646
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ * A database wrapper for payments
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class PaymentsDatabaseWrapper extends BaseDatabaseWrapper {
+       // Constants for exceptions
+       const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
+
+       // Constants for database table names
+       const DB_TABLE_PAYMENTS = "payments";
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct() {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database wrapper by a provided user class
+        *
+        * @return      $wrapperInstance        An instance of the created wrapper class
+        */
+       public final static function createPaymentsDatabaseWrapper () {
+               // Get a new instance
+               $wrapperInstance = new PaymentsDatabaseWrapper();
+
+               // Set (primary!) table name
+               $wrapperInstance->setTableName(self::DB_TABLE_PAYMENTS);
+
+               // Return the instance
+               return $wrapperInstance;
+       }
+}
+
+// [EOF]
+?>
index b9db256..08e6d42 100644 (file)
@@ -52,7 +52,7 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
         * @return      void
         */
        public final function outputStream ($output) {
-               print(html_entity_decode(strip_tags($output)));
+               print(html_entity_decode(strip_tags(stripslashes($output))));
        }
 
        /**
index 268738a..433f68e 100644 (file)
@@ -54,7 +54,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre
        public final function outputStream ($output) {
                // Strip out <br />
                $output = str_replace("<br />", "", $output);
-               print($output."<br />\n");
+               print(stripslashes($output)."<br />\n");
        }
 
        /**
diff --git a/inc/classes/main/discovery/.htaccess b/inc/classes/main/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/class_ b/inc/classes/main/discovery/class_
new file mode 100644 (file)
index 0000000..05a2063
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class ???Discovery extends BaseDiscovery implements Discoverable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function create???Discovery () {
+               // Get an instance of this class
+               $discoveryInstance = new ???Discovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function discover (Requestable $requestInstance) {
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/class_BaseDiscovery.php b/inc/classes/main/discovery/class_BaseDiscovery.php
new file mode 100644 (file)
index 0000000..48164e1
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A general discovery class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseDiscovery extends BaseFrameworkSystem {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Private getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       protected final function getActionName () {
+               return $this->actionName;
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/payment/.htaccess b/inc/classes/main/discovery/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php b/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php
new file mode 100644 (file)
index 0000000..1c46a4f
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @param       $filterInstance         An instance of a filter
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function createLocalPaymentDiscovery (Filterable $filterInstance) {
+               // Get an instance of this class
+               $discoveryInstance = new LocalPaymentDiscovery();
+
+               // Set the action from filter
+               $discoveryInstance->setActionName($filterInstance->getActionName());
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function discover (Requestable $requestInstance) {
+               // Now get a search criteria and set app name and payment action as search critera
+               $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+               $criteriaInstance->addCriteria("app_name", $requestInstance->getRequestElement('app'));
+               $criteriaInstance->addCriteria("payment_action", $this->getActionName().'_action');
+               $criteriaInstance->setLimit(1);
+
+               // Get a wrapper instance
+               $wrapperInstance = ObjectFactory::createObjectByConfiguredName('payment_db_wrapper_class');
+
+               // Get result back
+               $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+               // Set the result instance
+               $this->setResultInstance($resultInstance);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/filter/payment/.htaccess b/inc/classes/main/filter/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php
new file mode 100644 (file)
index 0000000..3fc1d3d
--- /dev/null
@@ -0,0 +1,153 @@
+<?php
+/**
+ * A filter for payment discovery. This class discovers the payment type and
+ * returns an object holding all available payment system for the requested
+ * type.
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * Instance of a discovery class
+        */
+       private $discoveryInstance = null;
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @param       $actionInstance         A performable action
+        * @return      $filterInstance         An instance of this filter class
+        * @throws      NullPointerException    If the resolver is not set
+        */
+       public final static function createPaymentDiscoveryFilter (PerformableAction $actionInstance) {
+               // Get a new instance
+               $filterInstance = new PaymentDiscoveryFilter();
+
+               // Get resolver from action
+               $resolverInstance = $actionInstance->getResolverInstance();
+
+               // Is the resolver set?
+               if (is_null($resolverInstance)) {
+                       // Throw an exception here
+                       throw new NullPointerException($filterInstance, self::EXCEPTION_IS_NULL_POINTER);
+               } // END - if
+
+               // Get the action name from resolver
+               $actionName = $resolverInstance->getActionName();
+
+               // Store it away in this class
+               $filterInstance->setActionName($actionName);
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       public final function getActionName () {
+               return $this->actionName;
+       }
+
+       /**
+        * Protected setter for discovery instance
+        *
+        * @param       $discoveryInstance      A discovery instance
+        * @return      void
+        */
+       protected final function setDiscoveryInstance (Discoverable $discoveryInstance) {
+               $this->discoveryInstance = $discoveryInstance;
+       }
+
+       /**
+        * Protected getter for discovery instance
+        *
+        * @return      $discoveryInstance      A discovery instance
+        */
+       public final function getDiscoveryInstance () {
+               return $this->discoveryInstance;
+       }
+
+       /**
+        * Executes the filter with given request and response objects
+        *
+        * @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) {
+               // Try to get real discovery class
+               try {
+                       // Get an instance from the object factory
+                       $discoveryInstance = ObjectFactory::createObjectByConfiguredName($this->getActionName().'_payment_discovery', array($this));
+
+                       // Call the discovery method
+                       $discoveryInstance->discover($requestInstance);
+
+                       // Remember this instance if all wents fine
+                       $this->setDiscoveryInstance($discoveryInstance);
+               } catch (FrameworkException $e) {
+                       // Something bad happend
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('payment_error');
+                       $responseInstance->addFatalMessagePlain($e->getMessage());
+
+                       // Abort here
+                       return false;
+               }
+       }
+}
+
+// [EOF]
+?>
index 2f3502c..a188251 100644 (file)
@@ -634,8 +634,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                } // END - if
 
                // Render the content
-               $content = sprintf("<option value=\"%s\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
-                       $subName,
+               $content = sprintf("<option value=\"invalid\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
                        $subName,
                        $subValue
                );
index bcc1fc5..51f5dca 100644 (file)
@@ -95,7 +95,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
                        }
                } else {
                        // Output it to the console
-                       printf("%s\n", trim(html_entity_decode(strip_tags($outStream))));
+                       printf("%s\n", trim(html_entity_decode(strip_tags(stripslashes($outStream)))));
                }
        }
 
index 7a50805..e82c0b7 100644 (file)
@@ -84,7 +84,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer, Registera
         * @return      void
         */
        public final function output ($outStream=false) {
-               print($outStream);
+               print(stripslashes($outStream));
        }
 }
 
index 17c22e2..fb0f169 100644 (file)
@@ -72,7 +72,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable {
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-               $criteriaInstance->addCriteria('points_uid', $this->getUserInstance()->getUserName());
+               $criteriaInstance->addCriteria("points_uid", $this->getUserInstance()->getUserName());
                $criteriaInstance->setLimit(1);
 
                // Get result back
index 4e5dbb1..b0dbac6 100644 (file)
@@ -70,7 +70,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
-               $criteriaInstance->addCriteria('page', $page);
+               $criteriaInstance->addCriteria("page", $page);
 
                // Add limitation from config
                $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
index 0c7f268..eef7b46 100644 (file)
@@ -68,7 +68,7 @@ class BaseActionResolver extends BaseResolver {
         *
         * @return      $actionName     Last validated action name
         */
-       protected final function getActionName () {
+       public final function getActionName () {
                return $this->actionName;
        }
 
index 2ecfaa2..0c3a4c7 100644 (file)
@@ -133,6 +133,17 @@ class BaseResponse extends BaseFrameworkSystem {
        }
 
        /**
+        * Adds a plain fatal message id to the response
+        *
+        * @param       $message        The plain message we shall add
+        * @return      void
+        */
+       public final function addFatalMessagePlain ($message) {
+               // Adds the resolved message id to the fatal message list
+               $this->fatalMessages[] = $message;
+       }
+
+       /**
         * Flushs the cached HTTP response to the outer world
         *
         * @param       $force  Wether we shall force the output or abort if headers are
index 141f1de..726e850 100644 (file)
@@ -144,8 +144,8 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
-               $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
-               $updateInstance->addCriteria('last_action', $lastAction);
+               $updateInstance->addCriteria("last_activity", date("Y-m-d H:i:s", time()));
+               $updateInstance->addCriteria("last_action", $lastAction);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);