From 0aec7eef7199bfd438b0e3fd4dcd76f610b7083c Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Wed, 6 Oct 2021 09:45:36 +0800 Subject: [PATCH] Fix View Source link broken in manual pages --- include/footer.inc | 13 +++++++++++-- include/shared-manual.inc | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/footer.inc b/include/footer.inc index 826795749d..48226443aa 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -68,8 +68,17 @@
  • Contact
  • Other PHP.net sites
  • Privacy policy
  • - -
  • View Source
  • + + +
  • View Source
  • diff --git a/include/shared-manual.inc b/include/shared-manual.inc index 25dc9ce485..577d852a8a 100644 --- a/include/shared-manual.inc +++ b/include/shared-manual.inc @@ -452,6 +452,7 @@ function manual_setup($setup) { $edit_url = "https://github.com/php/doc-{$source_lang}/blob/master/{$setup['source']['path']}"; } } + $__RELATED['edit_url'] = $edit_url; echo << @@ -513,7 +514,8 @@ function manual_footer() { echo ""; $config = array( 'related_menu' => $__RELATED['toc'], - 'related_menu_deprecated' => $__RELATED['toc_deprecated'] + 'related_menu_deprecated' => $__RELATED['toc_deprecated'], + 'view_source' => $__RELATED['edit_url'], ); site_footer($config); }