Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor
/node_modules
/storage/rector
_ide_helper.php
.env
4 changes: 2 additions & 2 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Handler extends ExceptionHandler
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
public function report(\Throwable $e)
{
return parent::report($e);
}
Expand All @@ -44,7 +44,7 @@ public function report(Exception $e)
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
public function render($request, \Throwable $e)
{
return parent::render($request, $e);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/WikiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getPage($locale, $version = '', $dir = '', $page = '')
}

// Load the page if found
if ($requested_page) {
if ($requested_page !== '' && $requested_page !== '0') {
$sidebar_content_view = $locale . '.' . $version . '.sidebar';

view()->share([
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Kernel extends HttpKernel
*
* @var array
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
Expand Down
3 changes: 1 addition & 2 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ function () {
}
]);

Route::get('{locale}/{version?}/{dir?}/{page?}', 'WikiController@getPage')
Route::get('{locale}/{version?}/{dir?}/{page?}', [WikiController::class, 'getPage'])
->where('version', '[0-9\.]+');


Route::get('/test','WikiController@getTestPage');
18 changes: 16 additions & 2 deletions app/IP.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function headlineLink($url)
{
return sprintf(
'<a href="%s" class="headline-link" title="%s"><i class="fa fa-link"></i></a>&nbsp;',
$url,
url($url),
trans('global.link_to_headline')
);
}
Expand All @@ -94,6 +94,20 @@ public static function headlineLink($url)
*/
public static function devLink($issue_id)
{
return '<a href="https://development.invoiceplane.com/browse/' . $issue_id . '">' . $issue_id . '</a>';
// return '<a href="https://development.invoiceplane.com/browse/' . $issue_id . '">' . $issue_id . '</a>'; // origin
$arch = '';
$path = 'search?q=repo%3AInvoicePlane%2FInvoicePlane+' . $issue_id . '&type=pullrequests'; // commits
if (strpos($issue_id, 'IP') !== false) {
// Add search in web archives like : https://web.archive.org/web/*/https://development.invoiceplane.com/browse/IP-681*
$arch = ' - <a href="https://web.archive.org/web/*/https://development.invoiceplane.com/browse/' . $issue_id . '*">(Archive?)</a>';
}
elseif (strpos($issue_id, 'PR') !== false) {
$path = 'InvoicePlane/InvoicePlane/pull/' . ltrim($issue_id, 'PR');
}
elseif (strpos($issue_id, 'C') !== false) {
$path = 'InvoicePlane/InvoicePlane/commit/' . ltrim($issue_id, 'C');
}

return '<a href="https://github.com/' . $path . '">' . $issue_id . '</a>' . $arch;
}
}
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"laravel/framework": "5.3.*",
"predis/predis": "^1.1"
"php": ">=8.0.0",
"laravel/framework": "11.*",
"predis/predis": "*"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.1",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
"barryvdh/laravel-ide-helper": "*",
"fzaninotto/faker": "*",
"mockery/mockery": "*",
"phpunit/phpunit": "*",
"symfony/css-selector": "*",
"symfony/dom-crawler": "*",
"rector/rector": "^2.0",
"driftingly/rector-laravel": "*"
},
"autoload": {
"classmap": [
Expand Down
Loading