cvs: bugtracker /includes template.php /template/generic/report index.php

From: Date: Tue, 05 Aug 2008 22:15:29 +0000
Subject: cvs: bugtracker /includes template.php /template/generic/report index.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2315@lists.php.net to get a copy of this message
bcarlyon Tue Aug 5 22:15:29 2008 UTC Modified files: /bugtracker/includes template.php /bugtracker/template/generic/report index.php Log: Corrected and updated my regex, will optimize into a array replace preg later http://cvs.php.net/viewvc.cgi/bugtracker/includes/template.php?r1=1.5&r2=1.6&diff_format=u Index: bugtracker/includes/template.php diff -u bugtracker/includes/template.php:1.5 bugtracker/includes/template.php:1.6 --- bugtracker/includes/template.php:1.5 Tue Aug 5 15:05:59 2008 +++ bugtracker/includes/template.php Tue Aug 5 22:15:28 2008 @@ -140,7 +140,15 @@ $this->logged_in(); //need to strip any existing {} - $this->html = preg_replace("[\{..*\}]", '', $this->html); +// $this->html = preg_replace("[\{[\w\d].*\}]", '', $this->html); +// $this->html = preg_replace("[\{[\w\d].*\}[\s]]", '', $this->html); + //strip error_ + $this->html = preg_replace("[\{ERROR_[\w\d]{0,15}\}]", '', $this->html); + //strip value="{}" + $this->html = preg_replace("[\"\{[\w\d].*\}\"]", '""', $this->html); + //strip >{}< + $this->html = preg_replace("[\>\{[\w\d].*\}\<]", '><', $this->html); + $this->html = preg_replace("[@]", '[cookies]', $this->html); echo $this->html; http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/report/index.php?r1=1.9&r2=1.10&diff_format=u Index: bugtracker/template/generic/report/index.php diff -u bugtracker/template/generic/report/index.php:1.9 bugtracker/template/generic/report/index.php:1.10 --- bugtracker/template/generic/report/index.php:1.9 Tue Aug 5 15:05:59 2008 +++ bugtracker/template/generic/report/index.php Tue Aug 5 22:15:29 2008 @@ -36,14 +36,18 @@ $content = '{DSP_FORM_ERROR}'; $content = $this->swap('dsp_form_error', $form_data['form_error'], $content); -$content .= '<form action="/report/report/" method="post" class="form"> - {IF LOGGED_IN} - You are Logged In - {ELSE LOGGED_IN} -Not logged in - {ENDIF LOGGED_IN} -'; -$content .= '</form>'; +$content .= ' +<form action="/report/report/" method="post" class="form"> + <div class="slim"> + {IF LOGGED_IN} + You are Logged In + {ELSE LOGGED_IN} + <label for="email">Email Address: {ERROR_EMAIL} </label> <input type="text" name="email" id="email" value="{EMAIL}" /> + <br /><br /> + {ENDIF LOGGED_IN} + <label for="php_version">PHP version: {ERROR_PHP_VERSION}</label> <select name="php_version" id="php_version"><option value="">--Please Select--</option>{PHP_VERSIONS}</select> + </div> +</form>'; $this->prehtml .= $content;

« previous php.webmaster (#2315) next »