summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2014-12-02 22:54:19 +0100
committerBenny Baumann <BenBE@geshi.org>2014-12-02 22:54:19 +0100
commit55a5d9d3ef49b51620154de77653367042b0c959 (patch)
tree91872d31fd3fb1b7b90f96cc332566295457a0a6
parent9244bbfbd96e78a71dac48b90e91380e79914082 (diff)
parent5ebb17ef9ebe7addc158e92b49c2ae9b5f2844dd (diff)
downloadcacert-devel-55a5d9d3ef49b51620154de77653367042b0c959.tar.gz
cacert-devel-55a5d9d3ef49b51620154de77653367042b0c959.tar.xz
cacert-devel-55a5d9d3ef49b51620154de77653367042b0c959.zip
Merge branch 'bug-1282' into testserver-stable
-rw-r--r--pages/account/48.php3
-rw-r--r--pages/account/49.php14
2 files changed, 11 insertions, 6 deletions
diff --git a/pages/account/48.php b/pages/account/48.php
index 8cdd7ac..67f2520 100644
--- a/pages/account/48.php
+++ b/pages/account/48.php
@@ -26,6 +26,9 @@
<td class="DataTD"><input type="text" name="domain" value="<?=array_key_exists('domain',$_POST)?sanitizeHTML($_POST['domain']):''?>"></td>
</tr>
<tr>
+ <td class="DataTD" colspan="2"><?=_("For search by ID use # prefix e.g. #123456")?></td>
+ </tr>
+ <tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
</tr>
</table>
diff --git a/pages/account/49.php b/pages/account/49.php
index e1e6206..9802917 100644
--- a/pages/account/49.php
+++ b/pages/account/49.php
@@ -19,14 +19,16 @@
$userid=0; if(array_key_exists('userid',$_GET)) $userid=intval($_GET['userid']);
if($userid <= 0)
{
- $domainsearch = $domain = mysql_real_escape_string(stripslashes($_POST['domain']));
- if(!strstr($domain, "%"))
+ $domainsearch = $domain = mysql_real_escape_string(trim(stripslashes($_POST['domain'])));
+ if(!strstr($domain, "%")) {
$domainsearch = "%$domain%";
- if(preg_match("/^\d+$/",$domain))
- $domainsearch = "";
+ }
+
//check if request is id if not set search ID to -1
- $domainid = intval($domain);
- if($domain !== $domainid){
+ if(preg_match('/^#(\d+)$/', $domain, $match)) {
+ $domainsearch = "";
+ $domainid = intval($match[1]);
+ } else {
$domainid = -1;
}