Skip to content

Commit

Permalink
Fix router for built-in server, typos
Browse files Browse the repository at this point in the history
  • Loading branch information
zenn1989 committed Apr 1, 2018
1 parent a806b2b commit aff34eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Apps/View/Front/default/_layouts/default.php
Expand Up @@ -28,7 +28,7 @@

<?php
$navbar = $this->bootstrap()->navbar(['class' => 'navbar-expand-md navbar-dark bg-dark fixed-top'], true);
$navbar->brand(['text' => __('Home'), 'link' => ['main/index']]);
$navbar->brand(['text' => __('Home'), 'link' => ['/']]);
$navbar->menu('left', ['text' => __('News'), 'link' => ['content/list', ['news']]]);
$navbar->menu('left', ['text' => __('About'), 'link' => ['content/read', ['page', 'about-page']]]);
$navbar->menu('left', ['text' => __('Feedback'), 'link' => ['feedback/create']]);
Expand Down
2 changes: 1 addition & 1 deletion Apps/View/Front/default/profile/show.php
Expand Up @@ -81,7 +81,7 @@
$userMenu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs flex-column']);
if ($isSelf) {
$userMenu->menu(['link' => ['profile/feed'], 'text' => '<i class="fa fa-rss-square"></i> ' . __('Feed'), 'html' => true]);
$userMenu->menu(['link' => ['profile/avatar'], 'text' => '<i class="fa fa-camera"></i> ' . __('Picture'), 'html' => true]);
$userMenu->menu(['link' => ['profile/avatar'], 'text' => '<i class="fa fa-camera"></i> ' . __('Avatar'), 'html' => true]);
$userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-envelope"></i> ' . __('Messages') . ' <span class="badge pm-count-block">0</span>', 'html' => true]);
$userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true]);
} else if(\App::$User->isAuth()) {
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -24,7 +24,8 @@
"phpffcms/ffcms-console": "@dev",
"phpffcms/searchable": "@dev",
"phpffcms/language-flags": "1.*",
"phpffcms/ffcms-templex": "1.*",
"phpffcms/ffcms-templex": "@dev",
"phpffcms/ffcms-ckeditor": "1.*",
"bower-asset/jquery-validation": "1.*@stable",
"bower-asset/dropzone": "4.3.*@stable",
"studio-42/elfinder": " 2.1.*@stable",
Expand Down
3 changes: 2 additions & 1 deletion index.php
Expand Up @@ -13,7 +13,8 @@

// check if SAPI client == cli (php built-in dev server)
if (php_sapi_name() === 'cli-server') {
$path = root . DIRECTORY_SEPARATOR . ltrim($uriRequest, '/');
$clearPath = strtok($uriRequest, '?'); // fix file.css?version=1.2.3 or ?time marks
$path = root . DIRECTORY_SEPARATOR . ltrim($clearPath, '/');
// if static file exist
if (is_file($path)) {
// check if it looks like standalone php script
Expand Down

0 comments on commit aff34eb

Please sign in to comment.