summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/common.php7
-rw-r--r--inc/init.php3
-rw-r--r--inc/lang/zh/lang.php3
-rw-r--r--inc/mail.php32
-rw-r--r--inc/media.php7
-rw-r--r--inc/template.php2
-rw-r--r--lib/images/fileicons/gif.pngbin1001 -> 1001 bytes
-rw-r--r--lib/images/fileicons/html.pngbin748 -> 748 bytes
-rw-r--r--lib/images/fileicons/jpg.pngbin1001 -> 1001 bytes
-rw-r--r--lib/images/fileicons/odg.pngbin788 -> 788 bytes
-rw-r--r--lib/images/fileicons/odp.pngbin744 -> 744 bytes
-rw-r--r--lib/images/fileicons/ods.pngbin749 -> 749 bytes
-rw-r--r--lib/images/fileicons/png.pngbin1001 -> 1001 bytes
-rw-r--r--lib/images/fileicons/sxc.pngbin749 -> 749 bytes
-rw-r--r--lib/images/fileicons/sxd.pngbin788 -> 788 bytes
-rw-r--r--lib/images/fileicons/sxw.pngbin577 -> 577 bytes
-rw-r--r--lib/images/fileicons/tgz.pngbin716 -> 716 bytes
-rw-r--r--lib/plugins/acl/lang/zh/lang.php1
-rw-r--r--lib/plugins/config/admin.php4
-rw-r--r--lib/plugins/config/lang/zh/lang.php3
-rw-r--r--lib/plugins/plugin/lang/zh/lang.php9
-rw-r--r--lib/plugins/popularity/lang/zh/lang.php1
-rw-r--r--lib/plugins/revert/lang/zh/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/zh/lang.php1
-rw-r--r--lib/tpl/default/rtl.css8
25 files changed, 63 insertions, 19 deletions
diff --git a/inc/common.php b/inc/common.php
index 3e760419f..881179f4b 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1134,12 +1134,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){
$subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject;
}
- $from = $conf['mailfrom'];
- $from = str_replace('@USER@',$_SERVER['REMOTE_USER'],$from);
- $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from);
- $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from);
-
- mail_send($to,$subject,$text,$from,'',$bcc);
+ mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc);
}
/**
diff --git a/inc/init.php b/inc/init.php
index bf7815178..ed4409729 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -220,6 +220,9 @@ if (!defined('NOSESSION')) {
auth_setup();
}
+// setup mail system
+mail_setup();
+
/**
* Checks paths from config file
*/
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 9488cffe1..f819aff9a 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -10,6 +10,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -62,7 +63,7 @@ $lang['email'] = 'E-Mail';
$lang['register'] = '注册';
$lang['profile'] = '用户信息';
$lang['badlogin'] = '对不起,用户名或密码错误。';
-$lang['minoredit'] = '轻微修改';
+$lang['minoredit'] = '细微修改';
$lang['draftdate'] = '草稿自动保存于';
$lang['nosecedit'] = '在您编辑期间本页刚被他人修改过,局部信息已过期,故载入全页。';
$lang['regmissing'] = '对不起,您必须填写所有的区域。';
diff --git a/inc/mail.php b/inc/mail.php
index 38232d110..fb163585a 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -30,7 +30,39 @@ if(!defined('QUOTEDPRINTABLE_EOL')) define('QUOTEDPRINTABLE_EOL',"\015\012");
if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-");
if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)');
+/**
+ * Prepare mailfrom replacement patterns
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function mail_setup(){
+ global $conf;
+ global $INFO;
+
+ $replace = array();
+
+ if(!empty($INFO['userinfo']['mail'])){
+ $replace['@MAIL@'] = $INFO['userinfo']['mail'];
+ }else{
+ $replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST);
+ }
+ if(!empty($_SERVER['REMOTE_USER'])){
+ $replace['@USER@'] = $_SERVER['REMOTE_USER'];
+ }else{
+ $replace['@USER@'] = 'noreply';
+ }
+
+ if(!empty($INFO['userinfo']['name'])){
+ $replace['@NAME@'] = $INFO['userinfo']['name'];
+ }else{
+ $replace['@NAME@'] = '';
+ }
+
+ $conf['mailfrom'] = str_replace(array_keys($replace),
+ array_values($replace),
+ $conf['mailfrom']);
+}
/**
* UTF-8 autoencoding replacement for PHPs mail function
diff --git a/inc/media.php b/inc/media.php
index 3dacd12b7..69441352b 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -407,14 +407,9 @@ function media_notify($id,$file,$mime){
$text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text);
$text = str_replace('@SIZE@',filesize_h(filesize($file)),$text);
- $from = $conf['mailfrom'];
- $from = str_replace('@USER@',$_SERVER['REMOTE_USER'],$from);
- $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from);
- $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from);
-
$subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id;
- mail_send($conf['notify'],$subject,$text,$from);
+ mail_send($conf['notify'],$subject,$text,$conf['mailfrom']);
}
/**
diff --git a/inc/template.php b/inc/template.php
index c2ce130ff..cb98c83d7 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -796,7 +796,7 @@ function tpl_userinfo(){
global $lang;
global $INFO;
if(isset($_SERVER['REMOTE_USER'])){
- print $lang['loggedinas'].': '.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')';
+ print $lang['loggedinas'].': '.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')';
return true;
}
return false;
diff --git a/lib/images/fileicons/gif.png b/lib/images/fileicons/gif.png
index b4c07a912..aa4cc23a5 100644
--- a/lib/images/fileicons/gif.png
+++ b/lib/images/fileicons/gif.png
Binary files differ
diff --git a/lib/images/fileicons/html.png b/lib/images/fileicons/html.png
index 672cbce42..1a6812185 100644
--- a/lib/images/fileicons/html.png
+++ b/lib/images/fileicons/html.png
Binary files differ
diff --git a/lib/images/fileicons/jpg.png b/lib/images/fileicons/jpg.png
index 1fb6cc1fb..aa4cc23a5 100644
--- a/lib/images/fileicons/jpg.png
+++ b/lib/images/fileicons/jpg.png
Binary files differ
diff --git a/lib/images/fileicons/odg.png b/lib/images/fileicons/odg.png
index 434f18262..74f6303d3 100644
--- a/lib/images/fileicons/odg.png
+++ b/lib/images/fileicons/odg.png
Binary files differ
diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png
index a5c77f845..2a94290d7 100644
--- a/lib/images/fileicons/odp.png
+++ b/lib/images/fileicons/odp.png
Binary files differ
diff --git a/lib/images/fileicons/ods.png b/lib/images/fileicons/ods.png
index 2ab1273f0..47f65c84d 100644
--- a/lib/images/fileicons/ods.png
+++ b/lib/images/fileicons/ods.png
Binary files differ
diff --git a/lib/images/fileicons/png.png b/lib/images/fileicons/png.png
index f0b5b00ee..aa4cc23a5 100644
--- a/lib/images/fileicons/png.png
+++ b/lib/images/fileicons/png.png
Binary files differ
diff --git a/lib/images/fileicons/sxc.png b/lib/images/fileicons/sxc.png
index 419c183c1..47f65c84d 100644
--- a/lib/images/fileicons/sxc.png
+++ b/lib/images/fileicons/sxc.png
Binary files differ
diff --git a/lib/images/fileicons/sxd.png b/lib/images/fileicons/sxd.png
index 5801bb23a..74f6303d3 100644
--- a/lib/images/fileicons/sxd.png
+++ b/lib/images/fileicons/sxd.png
Binary files differ
diff --git a/lib/images/fileicons/sxw.png b/lib/images/fileicons/sxw.png
index 6da97beb3..b0c21fc1f 100644
--- a/lib/images/fileicons/sxw.png
+++ b/lib/images/fileicons/sxw.png
Binary files differ
diff --git a/lib/images/fileicons/tgz.png b/lib/images/fileicons/tgz.png
index 141acf564..2426bd169 100644
--- a/lib/images/fileicons/tgz.png
+++ b/lib/images/fileicons/tgz.png
Binary files differ
diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php
index e806ad434..d79a78089 100644
--- a/lib/plugins/acl/lang/zh/lang.php
+++ b/lib/plugins/acl/lang/zh/lang.php
@@ -10,6 +10,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['admin_acl'] = '访问控制列表(ACL)管理器';
$lang['acl_group'] = '组';
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 49712b73f..d245d3fce 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -109,7 +109,11 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
elseif ($this->_changed)
ptln('<div class="success">'.$this->getLang('updated').'</div>');
+ // POST to script() instead of wl($ID) so config manager still works if
+ // rewrite config is broken. Add $ID as hidden field to remember
+ // current ID in most cases.
ptln('<form action="'.script().'" method="post">');
+ ptln('<input type="hidden" name="id" value="'.$ID.'" />');
formSecurityToken();
$this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php
index 6345451d5..0419968c7 100644
--- a/lib/plugins/config/lang/zh/lang.php
+++ b/lib/plugins/config/lang/zh/lang.php
@@ -10,6 +10,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['menu'] = '配置设置';
$lang['error'] = '由于非法参数,设置没有更新。请检查您做的改动并重新提交。
@@ -115,7 +116,7 @@ $lang['jpg_quality'] = 'JPG 压缩质量(0-100)';
$lang['subscribers'] = '启用页面订阅支持';
$lang['subscribe_time'] = '订阅列表和摘要发送的时间间隔(秒);这应当小于指定的最近更改保留时间(recent_days)。
';
-$lang['compress'] = '使 CSS 和 javascript 输出更紧密';
+$lang['compress'] = '使 CSS 和 javascript 的输出更紧密';
$lang['hidepages'] = '隐藏匹配的界面(正则表达式)';
$lang['send404'] = '发送 "HTTP 404/页面没有找到" 错误信息给不存在的页面';
$lang['sitemap'] = '生成 Google sitemap(天)';
diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php
index d5b456604..af2db4ee5 100644
--- a/lib/plugins/plugin/lang/zh/lang.php
+++ b/lib/plugins/plugin/lang/zh/lang.php
@@ -10,6 +10,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['menu'] = '插件管理器';
$lang['download'] = '下载并安装新的插件';
@@ -51,7 +52,7 @@ $lang['error_dircreate'] = '无法创建用于接收下载文件的';
$lang['error_decompress'] = '插件管理器无法解压下载的文件。这可能是由于下载出现错误,遇到这种情况,请您再次尝试;或者是压缩格式无法识别,遇到这种情况,您需要手动下载并安装该插件。';
$lang['error_copy'] = '尝试安装插件 <em>%s</em> 的相关文件时产生一个复制错误:磁盘空间已满或文件访问权限错误。这可能是由于一个安装了一部分的插件,并使得您的维基系统不稳定。';
$lang['error_delete'] = '尝试删除插件 <em>%s</em> 时产生一个错误。最有可能的情况是文件或路径的访问权限不够';
-$lang['enabled'] = '%s 插件开';
-$lang['notenabled'] = '%s插件打开失败,请检查文件权限。';
-$lang['disabled'] = '%s 插件关';
-$lang['notdisabled'] = '%s插件关闭失败,请检查文件权限。';
+$lang['enabled'] = '%s 插件启用';
+$lang['notenabled'] = '%s插件启用失败,请检查文件权限。';
+$lang['disabled'] = '%s 插件禁用';
+$lang['notdisabled'] = '%s插件禁用失败,请检查文件权限。';
diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php
index ee13b9f77..191b9c1af 100644
--- a/lib/plugins/popularity/lang/zh/lang.php
+++ b/lib/plugins/popularity/lang/zh/lang.php
@@ -9,6 +9,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['name'] = '人气反馈(载入可能需要一些时间)';
$lang['submit'] = '发送数据';
diff --git a/lib/plugins/revert/lang/zh/lang.php b/lib/plugins/revert/lang/zh/lang.php
index 36c8267d6..5ff1ed426 100644
--- a/lib/plugins/revert/lang/zh/lang.php
+++ b/lib/plugins/revert/lang/zh/lang.php
@@ -10,6 +10,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['menu'] = '还原管理器';
$lang['filter'] = '搜索包含垃圾信息的页面';
diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php
index bae5454d4..5836d3346 100644
--- a/lib/plugins/usermanager/lang/zh/lang.php
+++ b/lib/plugins/usermanager/lang/zh/lang.php
@@ -9,6 +9,7 @@
* @author mr.jinyi@gmail.com
* @author ben <ben@livetom.com>
* @author lainme <lainme993@gmail.com>
+ * @author caii <zhoucaiqi@gmail.com>
*/
$lang['menu'] = '用户管理器';
$lang['noauth'] = '(用户认证不可用)';
diff --git a/lib/tpl/default/rtl.css b/lib/tpl/default/rtl.css
index f66a670e0..e40dd966d 100644
--- a/lib/tpl/default/rtl.css
+++ b/lib/tpl/default/rtl.css
@@ -145,3 +145,11 @@ div.dokuwiki blockquote {
text-align: right;
}
+/* Search corrections */
+div.dokuwiki ul.search_quickhits li {
+ float: right;
+}
+
+div#qsearch__out {
+ text-align: right;
+}