]> git.mxchange.org Git - shipsimu.git/commitdiff
Missing directory db/user/ added, rules checkbox filter finished, directory for filte...
authorRoland Häder <roland@mxchange.org>
Thu, 5 Jun 2008 13:01:51 +0000 (13:01 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 5 Jun 2008 13:01:51 +0000 (13:01 +0000)
.gitattributes
inc/classes/main/filter/checkboxes/class_RulesAcceptedFilter.php
inc/classes/main/filter/decorator/.htaccess [new file with mode: 0644]
inc/classes/main/response/class_HttpResponse.php

index 70f8b4da4b9cd64a7a36c43d8b041b45a99e833d..489064aebd1ed7a42824bffb2ecf511f651afb9d 100644 (file)
@@ -329,6 +329,7 @@ inc/classes/main/filter/checkboxes/class_RulesAcceptedFilter.php -text
 inc/classes/main/filter/class_ -text
 inc/classes/main/filter/class_AbstractFilterDecorator.php -text
 inc/classes/main/filter/class_FilterChain.php -text
+inc/classes/main/filter/decorator/.htaccess -text
 inc/classes/main/filter/null/.htaccess -text
 inc/classes/main/filter/null/class_NullFilter.php -text
 inc/classes/main/filter/validator/.htaccess -text
index e10c7c9084e0a0063409069210641f55d19d0bff..5d48b9e573a42babb6a5076e33313edd73c5afec 100644 (file)
@@ -65,8 +65,29 @@ class RulesAcceptedFilter extends BaseFrameworkSystem implements Filterable {
         * @return      void
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
-               // Implement this!
-               $this->partialStub("Please implement this method.");
+               // Get the "rules" value from request
+               $rules = $requestInstance->getRequestElement('rules');
+
+               // Was the "rules" value found in form? And is it set?
+               if (is_null($rules)) {
+                       // Not found in form so stop processing here
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('rules_unset');
+
+                       // Abort here
+                       return false;
+               } elseif ($rules != "1") {
+                       // Not set, must be "1"!
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('rules_unchecked');
+
+                       // Abort here
+                       return false;
+               }
        }
 }
 
diff --git a/inc/classes/main/filter/decorator/.htaccess b/inc/classes/main/filter/decorator/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index 26ddc886b2895a8430779dff7635f0b59f98c8df..9c04534522dba82a90010ebd9c1e8b4cbfce1d16 100644 (file)
@@ -167,7 +167,7 @@ class HttpResponse extends BaseFrameworkSystem implements Responseable {
                        $this->addHeader('Pragma:', 'no-cache'); // HTTP/1.0
 
                        // Define the charset to be used
-                       $this->addHeader('Content-Type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->readConfig('header_charset')));
+                       //$this->addHeader('Content-Type:', sprintf("text/html; charset=%s", $this->getConfigInstance()->readConfig('header_charset')));
 
                        foreach ($this->responseHeaders as $name=>$value) {
                                header("{$name}: {$value}");