|
From: Jirka P. <fi...@us...> - 2002-05-07 16:30:12
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv23976/phpbt
Modified Files:
bug.php
Log Message:
Added URI protocols.
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- bug.php 7 May 2002 12:54:50 -0000 1.102
+++ bug.php 7 May 2002 15:34:03 -0000 1.103
@@ -278,10 +278,15 @@
foreach ($_pv as $k => $v) {
$$k = $v;
if ($k == 'url') {
- if ($v == 'http://') $v = '';
- elseif ($v and substr($v,0,7) != 'http://') $v = 'http://'.$v;
- $url = $v;
+
+ if (($v == 'http://') || ($v == 'https://')) {
+ $v = '';
+ } elseif (($v) && (strtolower(substr($v,0,7)) != 'http://') && (strtolower(substr($v,0,8)) != 'https://') && (strtolower(substr($v,0,6)) != 'ftp://')) {
+ $v = 'http://'.$v;
+ }
+ $url = $v;
}
+
if (isset($buginfo[$k]) && stripslashes($buginfo[$k]) != stripslashes($v)) {
$changedfields[$k] = $v;
}
@@ -400,7 +405,9 @@
while (list($k,$v) = each($_pv)) $$k = $v;
- if ($url == 'http://') $url = '';
+ if ($url == 'http://') {
+ $url = '';
+ }
// Allow for removing of some items from the bug page
$priority = $priority ? $priority : 0;
|