@@ -39,6 +39,9 @@ |
||
| 39 | 39 | return $dispatcher($request, new Response()); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $name |
|
| 44 | + */ |
|
| 42 | 45 | public function getRoute($name, array $data = array(), array $query = null) |
| 43 | 46 | { |
| 44 | 47 | return $this->getUrl($this['router']->getGenerator()->generate($name, $data)).($query ? '?'.http_build_query($query) : ''); |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | * |
| 127 | 127 | * @param array $data |
| 128 | 128 | * |
| 129 | - * @return string |
|
| 129 | + * @return integer |
|
| 130 | 130 | */ |
| 131 | 131 | protected function getId(array $data) |
| 132 | 132 | { |
@@ -66,7 +66,8 @@ discard block |
||
| 66 | 66 | <a class="button button-bookmarklet" href="javascript:<?= $bookmarklet ?>">Bookmarklet</a> |
| 67 | 67 | </p> |
| 68 | 68 | |
| 69 | - <?php else: ?> |
|
| 69 | + <?php else { |
|
| 70 | + : ?> |
|
| 70 | 71 | <p> |
| 71 | 72 | <?= $app->description ?> |
| 72 | 73 | </p> |
@@ -81,7 +82,9 @@ discard block |
||
| 81 | 82 | <?= $this->icon($entity->icon ?: 'file/folder_open') ?> |
| 82 | 83 | |
| 83 | 84 | <div> |
| 84 | - <h2><?= $entity->title; ?></h2> |
|
| 85 | + <h2><?= $entity->title; |
|
| 86 | +} |
|
| 87 | +?></h2> |
|
| 85 | 88 | |
| 86 | 89 | <?php if ($entity->description): ?> |
| 87 | 90 | <p><?= $entity->description; ?></p> |
@@ -39,11 +39,14 @@ discard block |
||
| 39 | 39 | <td<?= $sort === $name ? ' class="is-sorted"' : '' ?>> |
| 40 | 40 | <?php if ($td->get('editable')): ?> |
| 41 | 41 | <div class="format <?= $td->get('class') ?> ui-editable is-editable" data-src="<?= $app->getRoute('updateField', ['entity' => $entityName, 'id' => $id, 'field' => $name]) ?>"><?= $td->valToHtml() ?></div> |
| 42 | - <?php else: ?> |
|
| 42 | + <?php else { |
|
| 43 | + : ?> |
|
| 43 | 44 | <div class="format <?= $td->get('class') ?>"><?= $td->valToHtml() ?></div> |
| 44 | 45 | <?php endif ?> |
| 45 | 46 | </td> |
| 46 | - <?php endforeach; ?> |
|
| 47 | + <?php endforeach; |
|
| 48 | +} |
|
| 49 | +?> |
|
| 47 | 50 | </tr> |
| 48 | 51 | <?php endforeach; ?> |
| 49 | 52 | </tbody> |
@@ -60,10 +63,13 @@ discard block |
||
| 60 | 63 | </footer> |
| 61 | 64 | <?php endif; ?> |
| 62 | 65 | |
| 63 | - <?php else: ?> |
|
| 66 | + <?php else { |
|
| 67 | + : ?> |
|
| 64 | 68 | <div class="page-list-noresults"> |
| 65 | 69 | <p><?= p__('search', 'No items found') ?></p> |
| 66 | 70 | </div> |
| 67 | - <?php endif; ?> |
|
| 71 | + <?php endif; |
|
| 72 | +} |
|
| 73 | +?> |
|
| 68 | 74 | </div> |
| 69 | 75 | </article> |
@@ -29,14 +29,16 @@ |
||
| 29 | 29 | {
|
| 30 | 30 | foreach ( $_POST as $key => $value ) |
| 31 | 31 | {
|
| 32 | - if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) |
|
| 33 | - continue; |
|
| 32 | + if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) { |
|
| 33 | + continue; |
|
| 34 | + } |
|
| 34 | 35 | |
| 35 | - if ( get_magic_quotes_gpc() ) |
|
| 36 | - $value = htmlspecialchars( stripslashes((string)$value) ); |
|
| 37 | - else |
|
| 38 | - $value = htmlspecialchars( (string)$value ); |
|
| 39 | -?> |
|
| 36 | + if ( get_magic_quotes_gpc() ) { |
|
| 37 | + $value = htmlspecialchars( stripslashes((string)$value) ); |
|
| 38 | + } else { |
|
| 39 | + $value = htmlspecialchars( (string)$value ); |
|
| 40 | + } |
|
| 41 | + ?> |
|
| 40 | 42 | <tr> |
| 41 | 43 | <th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th> |
| 42 | 44 | <td><pre class="samples"><?php echo $value; ?></pre></td> |