cvs: php4 /ext/standard url_scanner.c
| From: | Hartmut Holzgraefe | Date: | Tue, 01 Aug 2000 20:21:35 +0000 |
| Subject: | cvs: php4 /ext/standard url_scanner.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1010@lists.php.net to get a copy of this message | ||
hholzgra Tue Aug 1 13:21:35 2000 EDT
Modified files:
/php4/ext/standard url_scanner.c
Log:
typo fix
Index: php4/ext/standard/url_scanner.c
diff -u php4/ext/standard/url_scanner.c:1.19 php4/ext/standard/url_scanner.c:1.20
--- php4/ext/standard/url_scanner.c:1.19 Tue Aug 1 00:45:14 2000
+++ php4/ext/standard/url_scanner.c Tue Aug 1 13:21:35 2000
@@ -16,7 +16,7 @@
| Hartmut Holzgraefe <hartmut@six.de> |
+----------------------------------------------------------------------+
*/
-/* $Id: url_scanner.c,v 1.19 2000/08/01 07:45:14 hholzgra Exp $ */
+/* $Id: url_scanner.c,v 1.20 2000/08/01 20:21:35 hholzgra Exp $ */
#include "php.h"
@@ -46,21 +46,29 @@
if(!strcasecmp(tag,"a")&&!strcasecmp(attr,"href")) {
flag = 1;
- } else if(!strcasecmp(tag,"area")&&!strcasecmp(attr,"href")) {
+ } else if(!strcasecmp(tag,"area" ) && !strcasecmp(attr,"href" )) {
flag = 1;
- } else if(!strcasecmp(tag,"form")&&!strcasecmp(attr,"action")) {
+ } else if(!strcasecmp(tag,"form" ) && !strcasecmp(attr,"action" )) {
flag = 1;
- } else if(!strcasecmp(tag,"frame")&&!strcasecmp(attr,"source")) {
+ } else if(!strcasecmp(tag,"frame") && !strcasecmp(attr,"source" )) {
flag = 1;
- } else if(!strcasecmp(tag,"img")&&!strcasecmp(attr,"action")) {
+ } else if(!strcasecmp(tag,"img" ) && !strcasecmp(attr,"action" )) {
flag = 1;
}
if(flag) {
if(!strstr(val,buf))
{
- char *p = (char *)emalloc(strlen(buf)+2);
- *p=strchr(val,'?')?'&':'?';
- strcpy(p+1,buf);
+ char *p = (char *)emalloc(strlen(buf)+strlen(PG(arg_separator))+1);
+ int n;
+
+ if(strchr(val,'?')) {
+ strcpy(p,PG(arg_separator));
+ n=strlen(PG(arg_separator));
+ } else {
+ *p='?';
+ n=1;
+ }
+ strcpy(p+n,buf);
return p;
}
}