[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#925068: doxygen: search.php uses <script language="php"> which is not supported by php7.0



Hi,

On Wed, 20 Mar 2019 18:52:04 +0100 Paolo Greppi <paolo.greppi@libpf.com>
wrote:
> Another option is to just backport the upstream fix.

I think this is probably the best option for both buster and stretch. As
much as I'd like to see a new doxygen version in buster, #919413 looks a
little too impactful to do now that the freeze has started.

I backported the upstream patch to the doxygen currently in buster, and
it applied perfectly. Attached a debdiff, and uploaded a built .deb to
<https://people.debian.org/~legoktm/doxygen/>.

What do you think about just uploading that? If that looks good, I can
also prep something for stretch as well.

Thanks,
-- Kunal

diff -Nru doxygen-1.8.13/debian/changelog doxygen-1.8.13/debian/changelog
--- doxygen-1.8.13/debian/changelog	2018-03-12 01:22:14.000000000 -0700
+++ doxygen-1.8.13/debian/changelog	2019-03-20 18:23:59.000000000 -0700
@@ -1,3 +1,10 @@
+doxygen (1.8.13-11) UNRELEASED; urgency=medium
+
+  * QA upload.
+  * Fix search.php to be compatible with PHP 7.0+. (Closes: #925068)
+
+ -- Kunal Mehta <legoktm@debian.org>  Wed, 20 Mar 2019 18:23:59 -0700
+
 doxygen (1.8.13-10) unstable; urgency=medium
 
   * Orphan the package. See: #888580.
diff -Nru doxygen-1.8.13/debian/patches/0008-added-PHP7-support-for-the-search-engine-on-HTML-out.patch doxygen-1.8.13/debian/patches/0008-added-PHP7-support-for-the-search-engine-on-HTML-out.patch
--- doxygen-1.8.13/debian/patches/0008-added-PHP7-support-for-the-search-engine-on-HTML-out.patch	1969-12-31 16:00:00.000000000 -0800
+++ doxygen-1.8.13/debian/patches/0008-added-PHP7-support-for-the-search-engine-on-HTML-out.patch	2019-03-20 18:22:41.000000000 -0700
@@ -0,0 +1,78 @@
+From: daMaex <damaex@live.de>
+Date: Thu, 22 Mar 2018 13:36:58 +0100
+Subject: added PHP7 support for the search engine on HTML output. See:
+ http://php.net/manual/en/language.basic-syntax.phptags.php
+
+---
+ src/htmlgen.cpp                      | 8 ++++----
+ templates/html/search_functions.php  | 4 ++--
+ templates/html/search_opensearch.php | 4 ++--
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
+index 8856baf..4873573 100644
+--- a/src/htmlgen.cpp
++++ b/src/htmlgen.cpp
+@@ -2267,7 +2267,7 @@ void HtmlGenerator::writeSearchPage()
+   if (cf.open(IO_WriteOnly))
+   {
+     FTextStream t(&cf);
+-    t << "<script language=\"php\">\n\n";
++    t << "<?php\n\n";
+     t << "$config = array(\n";
+     t << "  'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
+     t << "  'GENERATE_TREEVIEW' => " << (generateTreeView?"true":"false") << ",\n";
+@@ -2285,7 +2285,7 @@ void HtmlGenerator::writeSearchPage()
+     t << "  'split_bar' => \"" << substitute(substitute(writeSplitBarAsString("search",""), "\"","\\\""), "\n","\\n") << "\",\n";
+     t << "  'logo' => \"" << substitute(substitute(writeLogoAsString(""), "\"","\\\""), "\n","\\n") << "\",\n";
+     t << ");\n\n";
+-    t << "</script>\n";
++    t << "?>\n";
+   }
+ 
+   ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
+@@ -2314,10 +2314,10 @@ void HtmlGenerator::writeSearchPage()
+       t << "</div>" << endl;
+     }
+ 
+-    t << "<script language=\"php\">\n";
++    t << "<?php\n";
+     t << "require_once \"search_functions.php\";\n";
+     t << "main();\n";
+-    t << "</script>\n";
++    t << "?>\n";
+ 
+     // Write empty navigation path, to make footer connect properly
+     if (generateTreeView)
+diff --git a/templates/html/search_functions.php b/templates/html/search_functions.php
+index caa9e3b..7374de9 100644
+--- a/templates/html/search_functions.php
++++ b/templates/html/search_functions.php
+@@ -1,4 +1,4 @@
+-<script language="PHP">
++<?php
+ require_once "search_config.php";
+ 
+ function end_form($value)
+@@ -363,4 +363,4 @@ function main()
+   report_results($sorted);
+   end_page();
+ }
+-</script>
++?>
+diff --git a/templates/html/search_opensearch.php b/templates/html/search_opensearch.php
+index 58ee4ab..95c1c2c 100644
+--- a/templates/html/search_opensearch.php
++++ b/templates/html/search_opensearch.php
+@@ -1,4 +1,4 @@
+-<script language="PHP">
++<?php
+ require "search_functions.php";
+ 
+ $mode = array_key_exists('v', $_GET)?$_GET['v']:"";
+@@ -125,4 +125,4 @@ function invalid_format($query, array $results)
+   print "Search results for '$query':\n\n";
+   print_r($results);
+ }
+-</script>
++?>
diff -Nru doxygen-1.8.13/debian/patches/series doxygen-1.8.13/debian/patches/series
--- doxygen-1.8.13/debian/patches/series	2018-03-12 01:22:14.000000000 -0700
+++ doxygen-1.8.13/debian/patches/series	2019-03-20 18:23:02.000000000 -0700
@@ -10,3 +10,4 @@
 no-rpath.diff
 #issue759241.diff
 avoid-compass.diff
+0008-added-PHP7-support-for-the-search-engine-on-HTML-out.patch


Reply to: