[git] web/bugs.git branch master updated. 69530d5
| From: | vrana@php.net | Date: | Sat, 04 Feb 2012 05:32:49 +0000 |
| Subject: | [git] web/bugs.git branch master updated. 69530d5 | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-13022@lists.php.net to get a copy of this message | ||
The branch, master on web/bugs.git has been updated
via 69530d5691b39a906107c16eb828d7d39a8b6635 (commit)
via 4e4fb08f7e33d2423b51582c935d276f243cd285 (commit)
via 2fe54f624de43517004d18ec345e78d9106e0da9 (commit)
from c72a329d6d1e050c76f58d7ea985a5906039b45d (commit)
http://git.php.net/?p=web/bugs.git;a=log;h=69530d5691b39a906107c16eb828d7d39a8b6635;hp=c72a329d6d1e050c76f58d7ea985a5906039b45d
Summary of changes:
.gitignore | 1 +
include/functions.php | 7 +++++--
include/query.php | 2 +-
www/search.php | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
create mode 100644 .gitignore
-- Log ----------------------------------------
commit 69530d5691b39a906107c16eb828d7d39a8b6635
Author: Jakub Vrana <vrana@php.net>
Date: Fri Feb 3 21:21:52 2012 -0800
Ignore local config
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..62c5408
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+local_config.php
commit 4e4fb08f7e33d2423b51582c935d276f243cd285
Author: Jakub Vrana <vrana@php.net>
Date: Fri Feb 3 21:21:27 2012 -0800
Allow ' at ' in author e-mail, return empty result for invalid e-mails
diff --git a/include/functions.php b/include/functions.php
index 6ba26a7..41f34ca 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -269,14 +269,14 @@ function is_spam($string)
* turns "." into character entities that get interpreted as "dot".
*
* @param string $txt the email address to be obfuscated
- * @param string $format how the output will be displayed ('html', 'text')
+ * @param string $format how the output will be displayed ('html', 'text',
'reverse')
*
* @return string the altered email address
*/
function spam_protect($txt, $format = 'html')
{
/* php.net addresses are not protected! */
- if (preg_match('/^(.+)@php\.net/i', $txt)) {
+ if (preg_match('/^(.+)@php\.net$/i', $txt)) {
return $txt;
}
if ($format == 'html') {
@@ -289,6 +289,9 @@ function spam_protect($txt, $format = 'html')
'@' => ' at ',
'.' => ' dot ',
);
+ if ($format == 'reverse') {
+ $translate = array_flip($translate);
+ }
}
return strtr($txt, $translate);
}
diff --git a/include/query.php b/include/query.php
index ce2d349..d9045d3 100644
--- a/include/query.php
+++ b/include/query.php
@@ -45,7 +45,7 @@ $direction = (!empty($_GET['direction']) &&
$_GET['direction'] != 'DESC') ? 'ASC
$order_by = (!empty($_GET['order_by']) &&
array_key_exists($_GET['order_by'], $order_options)) ? $_GET['order_by'] :
'';
$reorder_by = (!empty($_GET['reorder_by']) &&
array_key_exists($_GET['reorder_by'], $order_options)) ? $_GET['reorder_by'] :
'';
$assign = !empty($_GET['assign']) ? $_GET['assign'] : '';
-$author_email = (!empty($_GET['author_email']) &&
is_valid_email($_GET['author_email'])) ? $_GET['author_email'] : '';
+$author_email = !empty($_GET['author_email']) ?
spam_protect($_GET['author_email'], 'reverse') : '';
$package_name = (isset($_GET['package_name']) &&
is_array($_GET['package_name'])) ? $_GET['package_name'] : array();
$package_nname = (isset($_GET['package_nname']) &&
is_array($_GET['package_nname'])) ? $_GET['package_nname'] : array();
commit 2fe54f624de43517004d18ec345e78d9106e0da9
Author: Jakub Vrana <vrana@php.net>
Date: Fri Feb 3 21:21:07 2012 -0800
Use @php.net in author email button
diff --git a/www/search.php b/www/search.php
index af65a18..a29197e 100644
--- a/www/search.php
+++ b/www/search.php
@@ -296,7 +296,7 @@ display_bug_error($warnings, 'warnings', 'WARNING:');
<?php
if (!empty($auth_user->handle)) {
$u = htmlspecialchars($auth_user->handle);
- echo "<input type=\"button\" value=\"set to $u\"
onclick=\"form.author_email.value='$u'\" />";
+ echo "<input type=\"button\" value=\"set to $u\"
onclick=\"form.author_email.value='$u@php.net'\" />";
}
?>
</td>
Thank you for your contribution.