@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Alpha\Model\Type\Integer; |
| 6 | 6 | use Alpha\Model\Type\Timestamp; |
| 7 | -use Alpha\Model\Type\Enum; |
|
| 8 | 7 | use Alpha\Model\Type\Relation; |
| 9 | 8 | use Alpha\Util\Config\ConfigProvider; |
| 10 | 9 | use Alpha\Util\Logging\Logger; |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Alpha\Model\Type\Boolean; |
| 9 | 9 | use Alpha\Model\Type\Relation; |
| 10 | 10 | use Alpha\Util\Logging\Logger; |
| 11 | -use Alpha\Util\Config\Configprovider; |
|
| 12 | 11 | use Alpha\Util\Http\Session\SessionProviderFactory; |
| 13 | 12 | use Alpha\Exception\ValidationException; |
| 14 | 13 | use Alpha\Exception\FileNotFoundException; |
@@ -2,15 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | require_once __DIR__.'/../vendor/autoload.php'; |
| 4 | 4 | |
| 5 | -use Alpha\Controller\Front\FrontController; |
|
| 6 | -use Alpha\Util\Config\ConfigProvider; |
|
| 7 | -use Alpha\Util\Http\Filter\ClientBlacklistFilter; |
|
| 8 | -use Alpha\Util\Http\Filter\IPBlacklistFilter; |
|
| 9 | -use Alpha\Util\Http\Filter\ClientTempBlacklistFilter; |
|
| 10 | -use Alpha\Util\Http\Request; |
|
| 11 | -use Alpha\Util\Http\Response; |
|
| 12 | -use Alpha\Exception\ResourceNotFoundException; |
|
| 13 | -use Alpha\Exception\ResourceNotAllowedException; |
|
| 5 | +use Alpha\Controller\Front\FrontController; |
|
| 6 | +use Alpha\Util\Config\ConfigProvider; |
|
| 7 | +use Alpha\Util\Http\Filter\ClientBlacklistFilter; |
|
| 8 | +use Alpha\Util\Http\Filter\IPBlacklistFilter; |
|
| 9 | +use Alpha\Util\Http\Filter\ClientTempBlacklistFilter; |
|
| 10 | +use Alpha\Util\Http\Request; |
|
| 11 | +use Alpha\Util\Http\Response; |
|
| 12 | +use Alpha\Exception\ResourceNotFoundException; |
|
| 13 | +use Alpha\Exception\ResourceNotAllowedException; |
|
| 14 | 14 | use Alpha\View\View; |
| 15 | 15 | |
| 16 | 16 | try {
|
@@ -42,8 +42,9 @@ |
||
| 42 | 42 | $response = new Response(403, View::renderErrorPage(403, $rnae->getMessage(), array('Content-Type' => 'text/html')));
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | -if ($config->get('security.http.header.x.frame.options') != '')
|
|
| 46 | - $response->getHeader('X-Frame-Options', $config->get('security.http.header.x.frame.options'));
|
|
| 45 | +if ($config->get('security.http.header.x.frame.options') != '') { |
|
| 46 | + $response->getHeader('X-Frame-Options', $config->get('security.http.header.x.frame.options')); |
|
| 47 | +} |
|
| 47 | 48 | |
| 48 | 49 | echo $response->send(); |
| 49 | 50 | |
@@ -158,14 +158,15 @@ discard block |
||
| 158 | 158 | # Reading alignement from header underline. |
| 159 | 159 | $separators = preg_split('/ *[|] */', $underline); |
| 160 | 160 | foreach ($separators as $n => $s) { |
| 161 | - if (preg_match('/^ *-+: *$/', $s)) |
|
| 162 | - $attr[$n] = $this->_doTable_makeAlignAttr('right'); |
|
| 163 | - else if (preg_match('/^ *:-+: *$/', $s)) |
|
| 164 | - $attr[$n] = $this->_doTable_makeAlignAttr('center'); |
|
| 165 | - else if (preg_match('/^ *:-+ *$/', $s)) |
|
| 166 | - $attr[$n] = $this->_doTable_makeAlignAttr('left'); |
|
| 167 | - else |
|
| 168 | - $attr[$n] = ''; |
|
| 161 | + if (preg_match('/^ *-+: *$/', $s)) { |
|
| 162 | + $attr[$n] = $this->_doTable_makeAlignAttr('right'); |
|
| 163 | + } else if (preg_match('/^ *:-+: *$/', $s)) { |
|
| 164 | + $attr[$n] = $this->_doTable_makeAlignAttr('center'); |
|
| 165 | + } else if (preg_match('/^ *:-+ *$/', $s)) { |
|
| 166 | + $attr[$n] = $this->_doTable_makeAlignAttr('left'); |
|
| 167 | + } else { |
|
| 168 | + $attr[$n] = ''; |
|
| 169 | + } |
|
| 169 | 170 | } |
| 170 | 171 | |
| 171 | 172 | # Parsing span elements, including code spans, character escapes, |
@@ -179,8 +180,9 @@ discard block |
||
| 179 | 180 | $text = "<table class=\"table table-bordered\">\n"; |
| 180 | 181 | $text .= "<thead>\n"; |
| 181 | 182 | $text .= "<tr>\n"; |
| 182 | - foreach ($headers as $n => $header) |
|
| 183 | - $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n"; |
|
| 183 | + foreach ($headers as $n => $header) { |
|
| 184 | + $text .= " <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n"; |
|
| 185 | + } |
|
| 184 | 186 | $text .= "</tr>\n"; |
| 185 | 187 | $text .= "</thead>\n"; |
| 186 | 188 | |
@@ -198,8 +200,9 @@ discard block |
||
| 198 | 200 | $row_cells = array_pad($row_cells, $col_count, ''); |
| 199 | 201 | |
| 200 | 202 | $text .= "<tr>\n"; |
| 201 | - foreach ($row_cells as $n => $cell) |
|
| 202 | - $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n"; |
|
| 203 | + foreach ($row_cells as $n => $cell) { |
|
| 204 | + $text .= " <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n"; |
|
| 205 | + } |
|
| 203 | 206 | $text .= "</tr>\n"; |
| 204 | 207 | } |
| 205 | 208 | $text .= "</tbody>\n"; |