Modified:
trunk/htdocs/core/Settings.example.php
trunk/htdocs/core/Utilities.php
trunk/htdocs/core/V2EXCore.php
trunk/htdocs/core/ValidatorCore.php
trunk/htdocs/core/WidgetCore.php
Log:
[Airmail] Support Gmail tagging format
Modified: trunk/htdocs/core/Settings.example.php
==============================================================================
--- trunk/htdocs/core/Settings.example.php (original)
+++ trunk/htdocs/core/Settings.example.php Tue Jan 8 15:35:12 2008
@@ -227,4 +227,6 @@
define('CDN_IMG', '/img/');
define('CDN_UI', '/');
define('CDN_P', '/img/');
+
+define('MIDGARD_BOT', 'v2ex...@gmail.com');
?>
Modified: trunk/htdocs/core/Utilities.php
==============================================================================
--- trunk/htdocs/core/Utilities.php (original)
+++ trunk/htdocs/core/Utilities.php Tue Jan 8 15:35:12 2008
@@ -767,7 +767,7 @@
}
function is_valid_email($email) {
- $regex = '/^[A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z.]{2,6}$/i';
+ $regex = '/^([a-z0-9]+\+)?[A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z.]{2,6}$/i';
return (preg_match($regex, $email));
}
Modified: trunk/htdocs/core/V2EXCore.php
==============================================================================
--- trunk/htdocs/core/V2EXCore.php (original)
+++ trunk/htdocs/core/V2EXCore.php Tue Jan 8 15:35:12 2008
@@ -3901,7 +3901,7 @@
echo('<tr><td width="150" align="right" class="section_odd">错失
次数</td><td class="section_odd" align="left">' . $_apc_cache_info['num_misses'] . '</td></tr>');
echo('<tr><td width="150" align="right" class="section_even">储存
的条目数量</td><td class="section_even" align="left">' . $_apc_cache_info['num_entries'] . '</td></tr>');
echo('<tr><td width="150" align="right" class="section_odd">插入
次数</td><td class="section_odd" align="left">' . $_apc_cache_info['num_inserts'] . '</td></tr>');
- echo('<tr><td width="150" align="right" class="section_even">剩余
可用缓存内存数量</td><td class="section_even" align="left">' .
intval($_apc_cache_info['mem_size'] / 1024) . 'KB</td></tr>');
+ echo('<tr><td width="150" align="right" class="section_even">缓存
中的文件尺寸</td><td class="section_even" align="left">' .
intval($_apc_cache_info['mem_size'] / 1024) . 'KB</td></tr>');
} else {
echo('<tr><td colspan="2" align="left"><div class="notify">');
_v_ico_silk('database_lightning');
Modified: trunk/htdocs/core/ValidatorCore.php
==============================================================================
--- trunk/htdocs/core/ValidatorCore.php (original)
+++ trunk/htdocs/core/ValidatorCore.php Tue Jan 8 15:35:12 2008
@@ -806,7 +806,7 @@
* Camino Example: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
en-US; rv:1.8b4) Gecko/20050914 Camino/1.0a1
* Firefox Example: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
* Firefox Example: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1) */
- if (preg_match('/Mozilla\/5\.0 \(([a-zA-Z0-9]+); U; ([0-9a-zA-Z\.\-
]+); [a-zA-Z\- ]*; rv:([0-9a-z\.]+)\) Gecko\/([0-9]+) (Camino|Firefox|
Firebird|Minefield|SeaMonkey|Thunderbird|Sunbird|
Epiphany)\/([0-9]+\.[0-9a-zA-Z\.]*)/', $ua, $z)) {
+ if (preg_match('/Mozilla\/5\.0 \(([a-zA-Z0-9]+); U; ([0-9a-zA-Z\.\-
]+); [a-zA-Z\- ]*; rv:([0-9a-z\.]+)\) Gecko\/([0-9]+) (Camino|Firefox|
Firebird|GranParadiso|Minefield|SeaMonkey|Thunderbird|Sunbird|
Epiphany)\/([0-9]+\.[0-9a-zA-Z\.]*)/', $ua, $z)) {
if ($z[1] == 'Windows' | preg_match('/X11/', $z[1])) {
$o['platform'] = $z[2];
if (preg_match('/(Linux)/', $o['platform'], $y)) {
Modified: trunk/htdocs/core/WidgetCore.php
==============================================================================
--- trunk/htdocs/core/WidgetCore.php (original)
+++ trunk/htdocs/core/WidgetCore.php Tue Jan 8 15:35:12 2008
@@ -49,10 +49,10 @@
switch (BABEL_LANG) {
case 'en_us':
default:
- echo("You've got things to say, your days are colorful, you care
about details which others ignore.<br /><br />Say it and the world is listening.");
+ echo("You've got things to say, your days are colorful, you care
about details which others ignore.<br /><br />Say it and the world is
listening.<br /><br />And you can talk to " . MIDGARD_BOT . " via <a
href=\"http://talk.google.com/\" target=\"_blank\">Gtalk</a> to update
your ING.");
break;
case 'zh_cn':
- echo('你有很多话要说。你每天的生活都很精彩。你
总能发现别人没有注意到的细节。<br /><br />那就尽情说
吧,这个世界在听。');
+ echo('你有很多话要说。你每天的生活都很精彩。你
总能发现别人没有注意到的细节。<br /><br />那就尽情说
吧,这个世界在听。<br /><br />你还可以通过在 <a
href="http://talk.google.com/">Gtalk</a> 或者其他 Jabber 客户端
中对 ' . MIDGARD_BOT . ' 说话来更新你的 ING。');
break;
}
_v_hr();