Skip to content

Commit b6f4361

Browse files
authored
Merge pull request #1 from apphp/0.7.0
Fixed wrong path for search result
2 parents 672c9c9 + 4fd53aa commit b6f4361

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

classes/pages/SearchPages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function getFormattedResults($humanizeFunction = null): string {
358358
$resultText = preg_replace('@(' . preg_quote($safeKeyword, '/') . ')@si', '<strong class="bg-yellow">$1</strong>', htmlspecialchars($resultText, ENT_QUOTES, 'UTF-8'));
359359

360360
$result .= '<li style="margin-bottom:20px">';
361-
$result .= '<a href="' . htmlspecialchars($filedir, ENT_QUOTES, 'UTF-8') . '" target="_blank" rel="noopener noreferrer">' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '</a>';
361+
$result .= '<a href="' . trim(APP_URL, '/') . htmlspecialchars($filedir, ENT_QUOTES, 'UTF-8') . '" target="_blank" rel="noopener noreferrer">' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '</a>';
362362

363363
// Prepare breadcrumbs
364364
$filedirParts = explode('/', $filedir);

public/include/global.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

33
// Local
4-
//error_reporting(E_ALL);
4+
error_reporting(E_ALL);
5+
ini_set('display_errors', 1);
56
define('OS_APP_DIRECTORY', '');
7+
define('APP_MODE', 'local');
68
define('APP_PATH', '/var/www/');
79
define('APP_SEO_LINKS', true);
810
define('APP_URL', 'http://localhost:8088/');
@@ -11,7 +13,8 @@
1113
define('OPEN_AI_KEY', '');
1214

1315
// Prod
14-
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
16+
//error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
17+
//define('APP_MODE', 'production');
1518
//define("APP_PATH", '');
1619
//define("APP_SEO_LINKS", true);
1720
//define("APP_URL", "");

0 commit comments

Comments
 (0)