Commit:    357382ac0069708e4a16f70ef49ab98f2d3388cf
Author:    Kalle Sommer Nielsen <[email protected]>         Tue, 25 Jul 2017 
17:31:43 +0200
Parents:   c7721e84a2664a744862d576cef60fcf5a6fce51
Branches:  master

Link:       
http://git.php.net/?p=web/bugs.git;a=commitdiff;h=357382ac0069708e4a16f70ef49ab98f2d3388cf

Log:
Implemented FR #51614 (Backtrace description improvements) (Also changed Win32 
> Windows)

Bugs:
https://bugs.php.net/51614

Changed paths:
  M  include/functions.php
  M  www/bugs-generating-backtrace-win32.php
  M  www/bugs-generating-backtrace.php


Diff:
diff --git a/include/functions.php b/include/functions.php
index a2db0dc..8a11df4 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1940,6 +1940,32 @@ function inline_content_menu($base_url, $current_action, 
array $menu)
        echo "</p>\n";
 }
 
+/**
+ * Inline content menu for backtraces
+ *
+ * Specify either 'Unix' or 'Windows' to select the current page
+ */
+function backtrace_inline_menu($platform)
+{
+       if ($platform != 'Unix' && $platform != 'Windows') {
+               return;
+       }
+
+       $buffer = '';
+
+       foreach (['Unix' => '', 'Windows' => '-win32'] as $platform_key => 
$platform_suffix) {
+               if ($platform_key == $platform) {
+                       $buffer .= sprintf('<strong>%s</strong> | ', 
$platform_key);
+               } else {
+                       $buffer .= sprintf('<a 
href="/bugs-generating-backtrace%s.php">%s</a> | ', $platform_suffix, 
$platform_key);
+               }
+       }
+
+       echo "<p>";
+       echo rtrim($buffer, ' | ');
+       echo "</p>\n";
+}
+
 function mailto_list(array $mails)
 {
        if(!$mails) {
diff --git a/www/bugs-generating-backtrace-win32.php 
b/www/bugs-generating-backtrace-win32.php
index 4487597..1b69578 100644
--- a/www/bugs-generating-backtrace-win32.php
+++ b/www/bugs-generating-backtrace-win32.php
@@ -4,10 +4,12 @@ require_once '../include/prepend.php';
 // Authenticate
 bugs_authenticate($user, $pw, $logged_in, $user_flags);
 
-response_header('Generating a backtrace on Win32');
+response_header('Generating a backtrace on Windows');
+
+backtrace_inline_menu('Windows');
 ?>
 
-<h1>Generating a backtrace, <u>with</u> a compiler, on Win32</h1>
+<h1>Generating a backtrace, <u>with</u> a compiler, on Windows</h1>
 
 <p>You'll need to install MS Visual Studio 2008, 2012 or later. You'll also 
need to</p>
 <ul>
@@ -43,7 +45,7 @@ KERNEL32! 77e81af6()
        Everything below is stolen from Pierre,
        
http://blog.thepimp.net/index.php/post/2007/06/10/debug-pack-or-how-to-generate-backtrack-on-windows-without-compiling
 -->
-<h1>Generating backtrace, <u>without</u> compiler, on Win32</h1>
+<h1>Generating backtrace, <u>without</u> compiler, on Windows</h1>
 <p>You'll need:</p>
 <ul>
 <li>A PHP <a href="http://windows.php.net/downloads/snaps/";>snapshot</a> or <a 
href="http://windows.php.net/download/";>stable</a> release</li>
diff --git a/www/bugs-generating-backtrace.php 
b/www/bugs-generating-backtrace.php
index 11817e3..90b3f14 100644
--- a/www/bugs-generating-backtrace.php
+++ b/www/bugs-generating-backtrace.php
@@ -5,6 +5,9 @@ require_once '../include/prepend.php';
 bugs_authenticate($user, $pw, $logged_in, $user_flags);
 
 response_header('Generating a gdb backtrace');
+
+backtrace_inline_menu('Unix');
+
 ?>
 
 <h1>Generating a gdb backtrace</h1>


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to