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 70f8b4d..489064a 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 e10c7c9..5d48b9e 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 26ddc88..9c04534 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}");