summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/DifferenceEngine.php10
-rw-r--r--inc/HTTPClient.php19
-rw-r--r--inc/IXR_Library.php11
-rw-r--r--inc/PassHash.class.php6
-rw-r--r--inc/RemoteAPICore.php768
-rw-r--r--inc/SafeFN.class.php23
-rw-r--r--inc/Sitemapper.php26
-rw-r--r--inc/TarLib.class.php4
-rw-r--r--inc/adLDAP.php20
-rw-r--r--inc/auth.php57
-rw-r--r--inc/auth/ad.class.php88
-rw-r--r--inc/auth/basic.class.php728
-rw-r--r--inc/auth/ldap.class.php5
-rw-r--r--inc/auth/mysql.class.php932
-rw-r--r--inc/auth/pgsql.class.php417
-rw-r--r--inc/auth/plain.class.php282
-rw-r--r--inc/changelog.php12
-rw-r--r--inc/cliopts.php10
-rw-r--r--inc/common.php18
-rw-r--r--inc/config_cascade.php2
-rw-r--r--inc/html.php51
-rw-r--r--inc/httputils.php8
-rw-r--r--inc/indexer.php28
-rw-r--r--inc/init.php30
-rw-r--r--inc/io.php2
-rw-r--r--inc/lang/af/lang.php2
-rw-r--r--inc/lang/ar/lang.php2
-rw-r--r--inc/lang/az/lang.php2
-rw-r--r--inc/lang/bg/lang.php74
-rw-r--r--inc/lang/bg/resetpwd.txt4
-rw-r--r--inc/lang/ca-valencia/lang.php2
-rw-r--r--inc/lang/ca/lang.php2
-rw-r--r--inc/lang/cs/lang.php8
-rw-r--r--inc/lang/da/lang.php2
-rw-r--r--inc/lang/de-informal/lang.php4
-rw-r--r--inc/lang/de/lang.php5
-rw-r--r--inc/lang/de/resetpwd.txt4
-rw-r--r--inc/lang/el/lang.php2
-rw-r--r--inc/lang/en/lang.php5
-rw-r--r--inc/lang/en/resetpwd.txt4
-rw-r--r--inc/lang/eo/lang.php2
-rw-r--r--inc/lang/es/lang.php2
-rw-r--r--inc/lang/et/lang.php2
-rw-r--r--inc/lang/eu/lang.php2
-rw-r--r--inc/lang/fa/lang.php2
-rw-r--r--inc/lang/fi/lang.php2
-rw-r--r--inc/lang/fo/lang.php2
-rw-r--r--inc/lang/fr/lang.php2
-rw-r--r--inc/lang/gl/lang.php2
-rw-r--r--inc/lang/he/lang.php2
-rw-r--r--inc/lang/hi/lang.php1
-rw-r--r--inc/lang/hr/lang.php2
-rw-r--r--inc/lang/hu/lang.php2
-rw-r--r--inc/lang/ia/lang.php2
-rw-r--r--inc/lang/id-ni/lang.php2
-rw-r--r--inc/lang/id/lang.php2
-rw-r--r--inc/lang/is/lang.php2
-rw-r--r--inc/lang/it/lang.php2
-rw-r--r--inc/lang/ja/lang.php10
-rw-r--r--inc/lang/ja/resetpwd.txt3
-rw-r--r--inc/lang/kk/lang.php2
-rw-r--r--inc/lang/km/lang.php2
-rw-r--r--inc/lang/ko/lang.php59
-rw-r--r--inc/lang/ko/resetpwd.txt3
-rw-r--r--inc/lang/la/lang.php2
-rw-r--r--inc/lang/lb/lang.php2
-rw-r--r--inc/lang/lt/lang.php2
-rw-r--r--inc/lang/lv/lang.php2
-rw-r--r--inc/lang/mk/lang.php2
-rw-r--r--inc/lang/mr/lang.php2
-rw-r--r--inc/lang/ne/lang.php2
-rw-r--r--inc/lang/nl/lang.php2
-rw-r--r--inc/lang/no/lang.php2
-rw-r--r--inc/lang/pl/lang.php2
-rw-r--r--inc/lang/pt-br/lang.php2
-rw-r--r--inc/lang/pt/lang.php2
-rw-r--r--inc/lang/ro/lang.php4
-rw-r--r--inc/lang/ru/lang.php105
-rw-r--r--inc/lang/sk/lang.php2
-rw-r--r--inc/lang/sl/lang.php2
-rw-r--r--inc/lang/sq/lang.php2
-rw-r--r--inc/lang/sr/lang.php2
-rw-r--r--inc/lang/sv/lang.php2
-rw-r--r--inc/lang/th/lang.php2
-rw-r--r--inc/lang/tr/lang.php2
-rw-r--r--inc/lang/uk/lang.php2
-rw-r--r--inc/lang/zh-tw/lang.php2
-rw-r--r--inc/lang/zh/lang.php2
-rw-r--r--inc/load.php5
-rw-r--r--inc/mail.php6
-rw-r--r--inc/media.php8
-rw-r--r--inc/pageutils.php8
-rw-r--r--inc/parser/metadata.php8
-rw-r--r--inc/parser/parser.php2
-rw-r--r--inc/parser/xhtml.php2
-rw-r--r--inc/plugincontroller.class.php1
-rw-r--r--inc/remote.php253
-rw-r--r--inc/template.php6
-rw-r--r--inc/toolbar.php2
-rw-r--r--inc/utf8.php2
100 files changed, 2708 insertions, 1541 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index 6e1d07382..01926b20c 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -29,7 +29,7 @@ class _DiffOp {
class _DiffOp_Copy extends _DiffOp {
var $type = 'copy';
-
+
function __construct($orig, $closing = false) {
if (!is_array($closing))
$closing = $orig;
@@ -44,7 +44,7 @@ class _DiffOp_Copy extends _DiffOp {
class _DiffOp_Delete extends _DiffOp {
var $type = 'delete';
-
+
function __construct($lines) {
$this->orig = $lines;
$this->closing = false;
@@ -57,7 +57,7 @@ class _DiffOp_Delete extends _DiffOp {
class _DiffOp_Add extends _DiffOp {
var $type = 'add';
-
+
function __construct($lines) {
$this->closing = $lines;
$this->orig = false;
@@ -70,7 +70,7 @@ class _DiffOp_Add extends _DiffOp {
class _DiffOp_Change extends _DiffOp {
var $type = 'change';
-
+
function __construct($orig, $closing) {
$this->orig = $orig;
$this->closing = $closing;
@@ -924,7 +924,7 @@ class WordLevelDiff extends MappedDiff {
}
class InlineWordLevelDiff extends MappedDiff {
-
+
function __construct($orig_lines, $closing_lines) {
list ($orig_words, $orig_stripped) = $this->_split($orig_lines);
list ($closing_words, $closing_stripped) = $this->_split($closing_lines);
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 641950348..26bee52a7 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -22,11 +22,11 @@ class DokuHTTPClient extends HTTPClient {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function DokuHTTPClient(){
+ function __construct(){
global $conf;
// call parent constructor
- $this->HTTPClient();
+ parent::__construct();
// set some values from the config
$this->proxy_host = $conf['proxy']['host'];
@@ -121,7 +121,7 @@ class HTTPClient {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function HTTPClient(){
+ function __construct(){
$this->agent = 'Mozilla/4.0 (compatible; DokuWiki HTTP Client; '.PHP_OS.')';
$this->timeout = 15;
$this->cookies = array();
@@ -580,13 +580,14 @@ class HTTPClient {
*/
function _parseHeaders($string){
$headers = array();
- if (!preg_match_all('/^\s*([\w-]+)\s*:\s*([\S \t]+)\s*$/m', $string,
- $matches, PREG_SET_ORDER)) {
- return $headers;
- }
- foreach($matches as $match){
- list(, $key, $val) = $match;
+ $lines = explode("\n",$string);
+ array_shift($lines); //skip first line (status)
+ foreach($lines as $line){
+ list($key, $val) = explode(':',$line,2);
+ $key = trim($key);
+ $val = trim($val);
$key = strtolower($key);
+ if(!$key) continue;
if(isset($headers[$key])){
if(is_array($headers[$key])){
$headers[$key][] = $val;
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php
index c8255e6d9..979dc4d16 100644
--- a/inc/IXR_Library.php
+++ b/inc/IXR_Library.php
@@ -302,11 +302,12 @@ class IXR_Server {
}
function serve($data = false) {
if (!$data) {
- global $HTTP_RAW_POST_DATA;
- if (!$HTTP_RAW_POST_DATA) {
+
+ $postData = trim(http_get_raw_post_data());
+ if (!$postData) {
die('XML-RPC server accepts POST requests only.');
}
- $data = $HTTP_RAW_POST_DATA;
+ $data = $postData;
}
$this->message = new IXR_Message($data);
if (!$this->message->parse()) {
@@ -439,7 +440,7 @@ EOD;
$method = $call['methodName'];
$params = $call['params'];
if ($method == 'system.multicall') {
- $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden');
+ $result = new IXR_Error(-32800, 'Recursive calls to system.multicall are forbidden');
} else {
$result = $this->call($method, $params);
}
@@ -501,7 +502,7 @@ class IXR_Client extends DokuHTTPClient {
var $xmlerror = false;
function IXR_Client($server, $path = false, $port = 80) {
- $this->DokuHTTPClient();
+ parent::__construct();
if (!$path) {
// Assume we have been given a URL instead
$this->posturl = $server;
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 2558f37c6..3fb1349d2 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -88,7 +88,9 @@ class PassHash {
public function gen_salt($len=32){
$salt = '';
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
- for($i=0;$i<$len;$i++) $salt .= $chars[mt_rand(0,61)];
+ for($i=0; $i<$len; $i++){
+ $salt .= $chars[mt_rand(0,61)];
+ }
return $salt;
}
@@ -427,7 +429,7 @@ class PassHash {
$this->gen_salt(22);
}
- return crypt($password, $salt);
+ return crypt($clear, $salt);
}
}
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
new file mode 100644
index 000000000..546832100
--- /dev/null
+++ b/inc/RemoteAPICore.php
@@ -0,0 +1,768 @@
+<?php
+
+/**
+ * Increased whenever the API is changed
+ */
+define('DOKU_API_VERSION', 7);
+
+class RemoteAPICore {
+
+ private $api;
+
+ public function __construct(RemoteAPI $api) {
+ $this->api = $api;
+ }
+
+ function __getRemoteInfo() {
+ return array(
+ 'dokuwiki.getVersion' => array(
+ 'args' => array(),
+ 'return' => 'string',
+ 'doc' => 'Returns the running DokuWiki version.'
+ ), 'dokuwiki.login' => array(
+ 'args' => array('string', 'string'),
+ 'return' => 'int',
+ 'doc' => 'Tries to login with the given credentials and sets auth cookies.',
+ 'public' => '1'
+ ), 'dokuwiki.getPagelist' => array(
+ 'args' => array('string', 'array'),
+ 'return' => 'array',
+ 'doc' => 'List all pages within the given namespace.',
+ 'name' => 'readNamespace'
+ ), 'dokuwiki.search' => array(
+ 'args' => array('string'),
+ 'return' => 'array',
+ 'doc' => 'Perform a fulltext search and return a list of matching pages'
+ ), 'dokuwiki.getTime' => array(
+ 'args' => array(),
+ 'return' => 'int',
+ 'doc' => 'Returns the current time at the remote wiki server as Unix timestamp.',
+ ), 'dokuwiki.setLocks' => array(
+ 'args' => array('array'),
+ 'return' => 'array',
+ 'doc' => 'Lock or unlock pages.'
+ ), 'dokuwiki.getTitle' => array(
+ 'args' => array(),
+ 'return' => 'string',
+ 'doc' => 'Returns the wiki title.',
+ 'public' => '1'
+ ), 'dokuwiki.appendPage' => array(
+ 'args' => array('string', 'string', 'array'),
+ 'return' => 'int',
+ 'doc' => 'Append text to a wiki page.'
+ ), 'wiki.getPage' => array(
+ 'args' => array('string'),
+ 'return' => 'string',
+ 'doc' => 'Get the raw Wiki text of page, latest version.',
+ 'name' => 'rawPage',
+ ), 'wiki.getPageVersion' => array(
+ 'args' => array('string', 'int'),
+ 'name' => 'rawPage',
+ 'return' => 'string',
+ 'doc' => 'Return a raw wiki page'
+ ), 'wiki.getPageHTML' => array(
+ 'args' => array('string'),
+ 'return' => 'string',
+ 'doc' => 'Return page in rendered HTML, latest version.',
+ 'name' => 'htmlPage'
+ ), 'wiki.getPageHTMLVersion' => array(
+ 'args' => array('string', 'int'),
+ 'return' => 'string',
+ 'doc' => 'Return page in rendered HTML.',
+ 'name' => 'htmlPage'
+ ), 'wiki.getAllPages' => array(
+ 'args' => array(),
+ 'return' => 'array',
+ 'doc' => 'Returns a list of all pages. The result is an array of utf8 pagenames.',
+ 'name' => 'listPages'
+ ), 'wiki.getAttachments' => array(
+ 'args' => array('string', 'array'),
+ 'return' => 'array',
+ 'doc' => 'Returns a list of all media files.',
+ 'name' => 'listAttachments'
+ ), 'wiki.getBackLinks' => array(
+ 'args' => array('string'),
+ 'return' => 'array',
+ 'doc' => 'Returns the pages that link to this page.',
+ 'name' => 'listBackLinks'
+ ), 'wiki.getPageInfo' => array(
+ 'args' => array('string'),
+ 'return' => 'array',
+ 'doc' => 'Returns a struct with infos about the page.',
+ 'name' => 'pageInfo'
+ ), 'wiki.getPageInfoVersion' => array(
+ 'args' => array('string', 'int'),
+ 'return' => 'array',
+ 'doc' => 'Returns a struct with infos about the page.',
+ 'name' => 'pageInfo'
+ ), 'wiki.getPageVersions' => array(
+ 'args' => array('string', 'int'),
+ 'return' => 'array',
+ 'doc' => 'Returns the available revisions of the page.',
+ 'name' => 'pageVersions'
+ ), 'wiki.putPage' => array(
+ 'args' => array('string', 'string', 'array'),
+ 'return' => 'int',
+ 'doc' => 'Saves a wiki page.'
+ ), 'wiki.listLinks' => array(
+ 'args' => array('string'),
+ 'return' => 'array',
+ 'doc' => 'Lists all links contained in a wiki page.'
+ ), 'wiki.getRecentChanges' => array(
+ 'args' => array('int'),
+ 'return' => 'array',
+ 'Returns a struct about all recent changes since given timestamp.'
+ ), 'wiki.getRecentMediaChanges' => array(
+ 'args' => array('int'),
+ 'return' => 'array',
+ 'Returns a struct about all recent media changes since given timestamp.'
+ ), 'wiki.aclCheck' => array(
+ 'args' => array('string'),
+ 'return' => 'int',
+ 'doc' => 'Returns the permissions of a given wiki page.'
+ ), 'wiki.putAttachment' => array(
+ 'args' => array('string', 'file', 'array'),
+ 'return' => 'array',
+ 'doc' => 'Upload a file to the wiki.'
+ ), 'wiki.deleteAttachment' => array(
+ 'args' => array('string'),
+ 'return' => 'int',
+ 'doc' => 'Delete a file from the wiki.'
+ ), 'wiki.getAttachment' => array(
+ 'args' => array('string'),
+ 'doc' => 'Return a media file',
+ 'return' => 'file',
+ 'name' => 'getAttachment',
+ ), 'wiki.getAttachmentInfo' => array(
+ 'args' => array('string'),
+ 'return' => 'array',
+ 'doc' => 'Returns a struct with infos about the attachment.'
+ ), 'dokuwiki.getXMLRPCAPIVersion' => array(
+ 'args' => array(),
+ 'name' => 'getAPIVersion',
+ 'return' => 'int',
+ 'doc' => 'Returns the XMLRPC API version.',
+ 'public' => '1',
+ ), 'wiki.getRPCVersionSupported' => array(
+ 'args' => array(),
+ 'name' => 'wiki_RPCVersion',
+ 'return' => 'int',
+ 'doc' => 'Returns 2 with the supported RPC API version.',
+ 'public' => '1'
+ ),
+
+ );
+ }
+
+ function getVersion() {
+ return getVersion();
+ }
+
+ function getTime() {
+ return time();
+ }
+
+ /**
+ * Return a raw wiki page
+ * @param string $id wiki page id
+ * @param string $rev revision number of the page
+ * @return page text.
+ */
+ function rawPage($id,$rev=''){
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ throw new RemoteAccessDeniedException('You are not allowed to read this file', 111);
+ }
+ $text = rawWiki($id,$rev);
+ if(!$text) {
+ return pageTemplate($id);
+ } else {
+ return $text;
+ }
+ }
+
+ /**
+ * Return a media file
+ *
+ * @author Gina Haeussge <osd@foosel.net>
+ * @param string $id file id
+ * @return media file
+ */
+ function getAttachment($id){
+ $id = cleanID($id);
+ if (auth_quickaclcheck(getNS($id).':*') < AUTH_READ) {
+ throw new RemoteAccessDeniedException('You are not allowed to read this file', 211);
+ }
+
+ $file = mediaFN($id);
+ if (!@ file_exists($file)) {
+ throw new RemoteException('The requested file does not exist', 221);
+ }
+
+ $data = io_readFile($file, false);
+ return $this->api->toFile($data);
+ }
+
+ /**
+ * Return info about a media file
+ *
+ * @author Gina Haeussge <osd@foosel.net>
+ */
+ function getAttachmentInfo($id){
+ $id = cleanID($id);
+ $info = array(
+ 'lastModified' => $this->api->toDate(0),
+ 'size' => 0,
+ );
+
+ $file = mediaFN($id);
+ if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){
+ $info['lastModified'] = $this->api->toDate(filemtime($file));
+ $info['size'] = filesize($file);
+ }
+
+ return $info;
+ }
+
+ /**
+ * Return a wiki page rendered to html
+ */
+ function htmlPage($id,$rev=''){
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111);
+ }
+ return p_wiki_xhtml($id,$rev,false);
+ }
+
+ /**
+ * List all pages - we use the indexer list here
+ */
+ function listPages(){
+ $list = array();
+ $pages = idx_get_indexer()->getPages();
+ $pages = array_filter(array_filter($pages,'isVisiblePage'),'page_exists');
+
+ foreach(array_keys($pages) as $idx) {
+ $perm = auth_quickaclcheck($pages[$idx]);
+ if($perm < AUTH_READ) {
+ continue;
+ }
+ $page = array();
+ $page['id'] = trim($pages[$idx]);
+ $page['perms'] = $perm;
+ $page['size'] = @filesize(wikiFN($pages[$idx]));
+ $page['lastModified'] = $this->api->toDate(@filemtime(wikiFN($pages[$idx])));
+ $list[] = $page;
+ }
+
+ return $list;
+ }
+
+ /**
+ * List all pages in the given namespace (and below)
+ */
+ function readNamespace($ns,$opts){
+ global $conf;
+
+ if(!is_array($opts)) $opts=array();
+
+ $ns = cleanID($ns);
+ $dir = utf8_encodeFN(str_replace(':', '/', $ns));
+ $data = array();
+ $opts['skipacl'] = 0; // no ACL skipping for XMLRPC
+ search($data, $conf['datadir'], 'search_allpages', $opts, $dir);
+ return $data;
+ }
+
+ /**
+ * List all pages in the given namespace (and below)
+ */
+ function search($query){
+ $regex = '';
+ $data = ft_pageSearch($query,$regex);
+ $pages = array();
+
+ // prepare additional data
+ $idx = 0;
+ foreach($data as $id => $score){
+ $file = wikiFN($id);
+
+ if($idx < FT_SNIPPET_NUMBER){
+ $snippet = ft_snippet($id,$regex);
+ $idx++;
+ }else{
+ $snippet = '';
+ }
+
+ $pages[] = array(
+ 'id' => $id,
+ 'score' => intval($score),
+ 'rev' => filemtime($file),
+ 'mtime' => filemtime($file),
+ 'size' => filesize($file),
+ 'snippet' => $snippet,
+ );
+ }
+ return $pages;
+ }
+
+ /**
+ * Returns the wiki title.
+ */
+ function getTitle(){
+ global $conf;
+ return $conf['title'];
+ }
+
+ /**
+ * List all media files.
+ *
+ * Available options are 'recursive' for also including the subnamespaces
+ * in the listing, and 'pattern' for filtering the returned files against
+ * a regular expression matching their name.
+ *
+ * @author Gina Haeussge <osd@foosel.net>
+ */
+ function listAttachments($ns, $options = array()) {
+ global $conf;
+
+ $ns = cleanID($ns);
+
+ if (!is_array($options)) $options = array();
+ $options['skipacl'] = 0; // no ACL skipping for XMLRPC
+
+
+ if(auth_quickaclcheck($ns.':*') >= AUTH_READ) {
+ $dir = utf8_encodeFN(str_replace(':', '/', $ns));
+
+ $data = array();
+ search($data, $conf['mediadir'], 'search_media', $options, $dir);
+ $len = count($data);
+ if(!$len) return array();
+
+ for($i=0; $i<$len; $i++) {
+ unset($data[$i]['meta']);
+ $data[$i]['lastModified'] = $this->api->toDate($data[$i]['mtime']);
+ }
+ return $data;
+ } else {
+ throw new RemoteAccessDeniedException('You are not allowed to list media files.', 215);
+ }
+ }
+
+ /**
+ * Return a list of backlinks
+ */
+ function listBackLinks($id){
+ return ft_backlinks(cleanID($id));
+ }
+
+ /**
+ * Return some basic data about a page
+ */
+ function pageInfo($id,$rev=''){
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111);
+ }
+ $file = wikiFN($id,$rev);
+ $time = @filemtime($file);
+ if(!$time){
+ throw new RemoteException(10, 'The requested page does not exist', 121);
+ }
+
+ $info = getRevisionInfo($id, $time, 1024);
+
+ $data = array(
+ 'name' => $id,
+ 'lastModified' => $this->api->toDate($time),
+ 'author' => (($info['user']) ? $info['user'] : $info['ip']),
+ 'version' => $time
+ );
+
+ return ($data);
+ }
+
+ /**
+ * Save a wiki page
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function putPage($id, $text, $params) {
+ global $TEXT;
+ global $lang;
+
+ $id = cleanID($id);
+ $TEXT = cleanText($text);
+ $sum = $params['sum'];
+ $minor = $params['minor'];
+
+ if(empty($id)) {
+ throw new RemoteException('Empty page ID', 131);
+ }
+
+ if(!page_exists($id) && trim($TEXT) == '' ) {
+ throw new RemoteException('Refusing to write an empty new wiki page', 132);
+ }
+
+ if(auth_quickaclcheck($id) < AUTH_EDIT) {
+ throw new RemoteAccessDeniedException('You are not allowed to edit this page', 112);
+ }
+
+ // Check, if page is locked
+ if(checklock($id)) {
+ throw new RemoteException('The page is currently locked', 133);
+ }
+
+ // SPAM check
+ if(checkwordblock()) {
+ throw new RemoteException('Positive wordblock check', 134);
+ }
+
+ // autoset summary on new pages
+ if(!page_exists($id) && empty($sum)) {
+ $sum = $lang['created'];
+ }
+
+ // autoset summary on deleted pages
+ if(page_exists($id) && empty($TEXT) && empty($sum)) {
+ $sum = $lang['deleted'];
+ }
+
+ lock($id);
+
+ saveWikiText($id,$TEXT,$sum,$minor);
+
+ unlock($id);
+
+ // run the indexer if page wasn't indexed yet
+ idx_addPage($id);
+
+ return 0;
+ }
+
+ /**
+ * Appends text to a wiki page.
+ */
+ function appendPage($id, $text, $params) {
+ $currentpage = $this->rawPage($id);
+ if (!is_string($currentpage)) {
+ return $currentpage;
+ }
+ return $this->putPage($id, $currentpage.$text, $params);
+ }
+
+ /**
+ * Uploads a file to the wiki.
+ *
+ * Michael Klier <chi@chimeric.de>
+ */
+ function putAttachment($id, $file, $params) {
+ $id = cleanID($id);
+ $auth = auth_quickaclcheck(getNS($id).':*');
+
+ if(!isset($id)) {
+ throw new RemoteException('Filename not given.', 231);
+ }
+
+ global $conf;
+
+ $ftmp = $conf['tmpdir'] . '/' . md5($id.clientIP());
+
+ // save temporary file
+ @unlink($ftmp);
+ io_saveFile($ftmp, $file);
+
+ $res = media_save(array('name' => $ftmp), $id, $params['ow'], $auth, 'rename');
+ if (is_array($res)) {
+ throw new RemoteException($res[0], -$res[1]);
+ } else {
+ return $res;
+ }
+ }
+
+ /**
+ * Deletes a file from the wiki.
+ *
+ * @author Gina Haeussge <osd@foosel.net>
+ */
+ function deleteAttachment($id){
+ $id = cleanID($id);
+ $auth = auth_quickaclcheck(getNS($id).':*');
+ $res = media_delete($id, $auth);
+ if ($res & DOKU_MEDIA_DELETED) {
+ return 0;
+ } elseif ($res & DOKU_MEDIA_NOT_AUTH) {
+ throw new RemoteAccessDeniedException('You don\'t have permissions to delete files.', 212);
+ } elseif ($res & DOKU_MEDIA_INUSE) {
+ throw new RemoteException('File is still referenced', 232);
+ } else {
+ throw new RemoteException('Could not delete file', 233);
+ }
+ }
+
+ /**
+ * Returns the permissions of a given wiki page
+ */
+ function aclCheck($id) {
+ $id = cleanID($id);
+ return auth_quickaclcheck($id);
+ }
+
+ /**
+ * Lists all links contained in a wiki page
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function listLinks($id) {
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_READ){
+ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111);
+ }
+ $links = array();
+
+ // resolve page instructions
+ $ins = p_cached_instructions(wikiFN($id));
+
+ // instantiate new Renderer - needed for interwiki links
+ include(DOKU_INC.'inc/parser/xhtml.php');
+ $Renderer = new Doku_Renderer_xhtml();
+ $Renderer->interwiki = getInterwiki();
+
+ // parse parse instructions
+ foreach($ins as $in) {
+ $link = array();
+ switch($in[0]) {
+ case 'internallink':
+ $link['type'] = 'local';
+ $link['page'] = $in[1][0];
+ $link['href'] = wl($in[1][0]);
+ array_push($links,$link);
+ break;
+ case 'externallink':
+ $link['type'] = 'extern';
+ $link['page'] = $in[1][0];
+ $link['href'] = $in[1][0];
+ array_push($links,$link);
+ break;
+ case 'interwikilink':
+ $url = $Renderer->_resolveInterWiki($in[1][2],$in[1][3]);
+ $link['type'] = 'extern';
+ $link['page'] = $url;
+ $link['href'] = $url;
+ array_push($links,$link);
+ break;
+ }
+ }
+
+ return ($links);
+ }
+
+ /**
+ * Returns a list of recent changes since give timestamp
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function getRecentChanges($timestamp) {
+ if(strlen($timestamp) != 10) {
+ throw new RemoteException('The provided value is not a valid timestamp', 311);
+ }
+
+ $recents = getRecentsSince($timestamp);
+
+ $changes = array();
+
+ foreach ($recents as $recent) {
+ $change = array();
+ $change['name'] = $recent['id'];
+ $change['lastModified'] = $this->api->toDate($recent['date']);
+ $change['author'] = $recent['user'];
+ $change['version'] = $recent['date'];
+ $change['perms'] = $recent['perms'];
+ $change['size'] = @filesize(wikiFN($recent['id']));
+ array_push($changes, $change);
+ }
+
+ if (!empty($changes)) {
+ return $changes;
+ } else {
+ // in case we still have nothing at this point
+ return new RemoteException('There are no changes in the specified timeframe', 321);
+ }
+ }
+
+ /**
+ * Returns a list of recent media changes since give timestamp
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function getRecentMediaChanges($timestamp) {
+ if(strlen($timestamp) != 10)
+ throw new RemoteException('The provided value is not a valid timestamp', 311);
+
+ $recents = getRecentsSince($timestamp, null, '', RECENTS_MEDIA_CHANGES);
+
+ $changes = array();
+
+ foreach ($recents as $recent) {
+ $change = array();
+ $change['name'] = $recent['id'];
+ $change['lastModified'] = $this->api->toDate($recent['date']);
+ $change['author'] = $recent['user'];
+ $change['version'] = $recent['date'];
+ $change['perms'] = $recent['perms'];
+ $change['size'] = @filesize(mediaFN($recent['id']));
+ array_push($changes, $change);
+ }
+
+ if (!empty($changes)) {
+ return $changes;
+ } else {
+ // in case we still have nothing at this point
+ throw new RemoteException('There are no changes in the specified timeframe', 321);
+ }
+ }
+
+ /**
+ * Returns a list of available revisions of a given wiki page
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function pageVersions($id, $first) {
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_READ) {
+ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111);
+ }
+ global $conf;
+
+ $versions = array();
+
+ if(empty($id)) {
+ throw new RemoteException('Empty page ID', 131);
+ }
+
+ $revisions = getRevisions($id, $first, $conf['recent']+1);
+
+ if(count($revisions)==0 && $first!=0) {
+ $first=0;
+ $revisions = getRevisions($id, $first, $conf['recent']+1);
+ }
+
+ if(count($revisions)>0 && $first==0) {
+ array_unshift($revisions, ''); // include current revision
+ array_pop($revisions); // remove extra log entry
+ }
+
+ if(count($revisions) > $conf['recent']) {
+ array_pop($revisions); // remove extra log entry
+ }
+
+ if(!empty($revisions)) {
+ foreach($revisions as $rev) {
+ $file = wikiFN($id,$rev);
+ $time = @filemtime($file);
+ // we check if the page actually exists, if this is not the
+ // case this can lead to less pages being returned than
+ // specified via $conf['recent']
+ if($time){
+ $info = getRevisionInfo($id, $time, 1024);
+ if(!empty($info)) {
+ $data['user'] = $info['user'];
+ $data['ip'] = $info['ip'];
+ $data['type'] = $info['type'];
+ $data['sum'] = $info['sum'];
+ $data['modified'] = $this->api->toDate($info['date']);
+ $data['version'] = $info['date'];
+ array_push($versions, $data);
+ }
+ }
+ }
+ return $versions;
+ } else {
+ return array();
+ }
+ }
+
+ /**
+ * The version of Wiki RPC API supported
+ */
+ function wiki_RPCVersion(){
+ return 2;
+ }
+
+
+ /**
+ * Locks or unlocks a given batch of pages
+ *
+ * Give an associative array with two keys: lock and unlock. Both should contain a
+ * list of pages to lock or unlock
+ *
+ * Returns an associative array with the keys locked, lockfail, unlocked and
+ * unlockfail, each containing lists of pages.
+ */
+ function setLocks($set){
+ $locked = array();
+ $lockfail = array();
+ $unlocked = array();
+ $unlockfail = array();
+
+ foreach((array) $set['lock'] as $id){
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_EDIT || checklock($id)){
+ $lockfail[] = $id;
+ }else{
+ lock($id);
+ $locked[] = $id;
+ }
+ }
+
+ foreach((array) $set['unlock'] as $id){
+ $id = cleanID($id);
+ if(auth_quickaclcheck($id) < AUTH_EDIT || !unlock($id)){
+ $unlockfail[] = $id;
+ }else{
+ $unlocked[] = $id;
+ }
+ }
+
+ return array(
+ 'locked' => $locked,
+ 'lockfail' => $lockfail,
+ 'unlocked' => $unlocked,
+ 'unlockfail' => $unlockfail,
+ );
+ }
+
+ function getAPIVersion(){
+ return DOKU_API_VERSION;
+ }
+
+ function login($user,$pass){
+ global $conf;
+ global $auth;
+ if(!$conf['useacl']) return 0;
+ if(!$auth) return 0;
+
+ @session_start(); // reopen session for login
+ if($auth->canDo('external')){
+ $ok = $auth->trustExternal($user,$pass,false);
+ }else{
+ $evdata = array(
+ 'user' => $user,
+ 'password' => $pass,
+ 'sticky' => false,
+ 'silent' => true,
+ );
+ $ok = trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper');
+ }
+ session_write_close(); // we're done with the session
+
+ return $ok;
+ }
+
+
+}
+
diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php
index 43b19e9ab..ab05b9eae 100644
--- a/inc/SafeFN.class.php
+++ b/inc/SafeFN.class.php
@@ -1,17 +1,17 @@
<?php
/**
- * Class to safely store UTF-8 in a Filename
+ * Class to safely store UTF-8 in a Filename
*
- * Encodes a utf8 string using only the following characters 0-9a-z_.-%
- * characters 0-9a-z in the original string are preserved, "plain".
- * all other characters are represented in a substring that starts
- * with '%' are "converted".
- * The transition from converted substrings to plain characters is
- * marked with a '.'
+ * Encodes a utf8 string using only the following characters 0-9a-z_.-%
+ * characters 0-9a-z in the original string are preserved, "plain".
+ * all other characters are represented in a substring that starts
+ * with '%' are "converted".
+ * The transition from converted substrings to plain characters is
+ * marked with a '.'
*
- * @author Christopher Smith
- * @date 2010-04-02
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @date 2010-04-02
*/
class SafeFN {
@@ -133,14 +133,15 @@ class SafeFN {
$converted = false;
foreach ($split as $sub) {
+ $len = strlen($sub);
if ($sub[0] != self::$pre_indicator) {
// plain (unconverted) characters, optionally starting with a post_indicator
// set initial value to skip any post_indicator
- for ($i=($converted?1:0); $i < strlen($sub); $i++) {
+ for ($i=($converted?1:0); $i < $len; $i++) {
$unicode[] = ord($sub[$i]);
}
$converted = false;
- } else if (strlen($sub)==1) {
+ } else if ($len==1) {
// a pre_indicator character in the real data
$unicode[] = ord($sub);
$converted = true;
diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php
index 4689b04a6..bbea73b52 100644
--- a/inc/Sitemapper.php
+++ b/inc/Sitemapper.php
@@ -10,7 +10,7 @@ if(!defined('DOKU_INC')) die('meh.');
/**
* A class for building sitemaps and pinging search engines with the sitemap URL.
- *
+ *
* @author Michael Hamann
*/
class Sitemapper {
@@ -55,7 +55,7 @@ class Sitemapper {
if(isHiddenPage($id)) continue;
if(auth_aclcheck($id,'','') < AUTH_READ) continue;
$item = SitemapItem::createFromID($id);
- if ($item !== NULL)
+ if ($item !== null)
$items[] = $item;
}
@@ -72,7 +72,7 @@ class Sitemapper {
/**
* Builds the sitemap XML string from the given array auf SitemapItems.
- *
+ *
* @param $items array The SitemapItems that shall be included in the sitemap.
* @return string The sitemap XML.
* @author Michael Hamann
@@ -92,7 +92,7 @@ class Sitemapper {
/**
* Helper function for getting the path to the sitemap file.
- *
+ *
* @return The path to the sitemap file.
* @author Michael Hamann
*/
@@ -108,9 +108,9 @@ class Sitemapper {
}
/**
- * Pings search engines with the sitemap url. Plugins can add or remove
+ * Pings search engines with the sitemap url. Plugins can add or remove
* urls to ping using the SITEMAP_PING event.
- *
+ *
* @author Michael Hamann
*/
public static function pingSearchEngines() {
@@ -145,7 +145,7 @@ class Sitemapper {
/**
* An item of a sitemap.
- *
+ *
* @author Michael Hamann
*/
class SitemapItem {
@@ -156,7 +156,7 @@ class SitemapItem {
/**
* Create a new item.
- *
+ *
* @param $url string The url of the item
* @param $lastmod int Timestamp of the last modification
* @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
@@ -171,7 +171,7 @@ class SitemapItem {
/**
* Helper function for creating an item for a wikipage id.
- *
+ *
* @param $id string A wikipage id.
* @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
@@ -180,22 +180,22 @@ class SitemapItem {
public static function createFromID($id, $changefreq = null, $priority = null) {
$id = trim($id);
$date = @filemtime(wikiFN($id));
- if(!$date) return NULL;
+ if(!$date) return null;
return new SitemapItem(wl($id, '', true), $date, $changefreq, $priority);
}
/**
* Get the XML representation of the sitemap item.
- *
+ *
* @return The XML representation.
*/
public function toXML() {
$result = ' <url>'.NL
.' <loc>'.hsc($this->url).'</loc>'.NL
.' <lastmod>'.date_iso8601($this->lastmod).'</lastmod>'.NL;
- if ($this->changefreq !== NULL)
+ if ($this->changefreq !== null)
$result .= ' <changefreq>'.hsc($this->changefreq).'</changefreq>'.NL;
- if ($this->priority !== NULL)
+ if ($this->priority !== null)
$result .= ' <priority>'.hsc($this->priority).'</priority>'.NL;
$result .= ' </url>'.NL;
return $result;
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
index 12418c48d..36c1fee83 100644
--- a/inc/TarLib.class.php
+++ b/inc/TarLib.class.php
@@ -108,7 +108,7 @@ class TarLib {
* represent the GZIP or BZIP compression level. 1 produce fast compression,
* and 9 produce smaller files. See the RFC 1952 for more infos.
*/
- function tarlib($p_filen = TarLib::ARCHIVE_DYNAMIC , $p_comptype = TarLib::COMPRESS_AUTO, $p_complevel = 9) {
+ function __construct($p_filen = TarLib::ARCHIVE_DYNAMIC , $p_comptype = TarLib::COMPRESS_AUTO, $p_complevel = 9) {
$this->_initerror = 0;
$this->_nomf = $p_filen;
$flag=0;
@@ -127,7 +127,7 @@ class TarLib {
}
switch($p_comptype) {
- case TarLib::COMPRESS_GZIP:
+ case TarLib::COMPRESS_GZIP:
if(!extension_loaded('zlib')) $this->_initerror = -1;
$this->_comptype = TarLib::COMPRESS_GZIP;
break;
diff --git a/inc/adLDAP.php b/inc/adLDAP.php
index a64096b85..24be6e475 100644
--- a/inc/adLDAP.php
+++ b/inc/adLDAP.php
@@ -1021,6 +1021,26 @@ class adLDAP {
}
/**
+ * Return info about the domain itself
+ *
+ * @authot Andreas Gohr <gohr@cosmocode.de>
+ * @param array $fields The fields to query
+ * @return array
+ */
+ public function domain_info($fields){
+ if (!$this->_bind){ return (false); }
+
+ $sr = ldap_read($this->_conn, $this->_base_dn, 'objectclass=*', $fields);
+ if (!$sr) {
+ return false;
+ }
+ $info = ldap_get_entries($this->_conn, $sr);
+ if(count($info)) return $info[0];
+
+ return false;
+ }
+
+ /**
* Determine a user's password expiry date
*
* @param string $username The username to query
diff --git a/inc/auth.php b/inc/auth.php
index 941dcb8d6..59ef1cb54 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -422,7 +422,7 @@ function auth_isadmin($user=null,$groups=null){
* @param $memberlist string commaseparated list of allowed users and groups
* @param $user string user to match against
* @param $groups array groups the user is member of
- * @returns bool true for membership acknowledged
+ * @return bool true for membership acknowledged
*/
function auth_isMember($memberlist,$user,array $groups){
global $auth;
@@ -677,7 +677,7 @@ function auth_sendPassword($user,$password){
if(empty($conf['mailprefix'])) {
$subject = $lang['regpwmail'];
- } else {
+ } else {
$subject = '['.$conf['mailprefix'].'] '.$lang['regpwmail'];
}
@@ -860,32 +860,59 @@ function act_resendpwd(){
$token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']);
if($token){
- // we're in token phase
+ // we're in token phase - get user info from token
$tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth';
if(!@file_exists($tfile)){
msg($lang['resendpwdbadauth'],-1);
+ unset($_REQUEST['pwauth']);
+ return false;
+ }
+ // token is only valid for 3 days
+ if( (time() - filemtime($tfile)) > (3*60*60*24) ){
+ msg($lang['resendpwdbadauth'],-1);
+ unset($_REQUEST['pwauth']);
+ @unlink($tfile);
return false;
}
+
$user = io_readfile($tfile);
- @unlink($tfile);
$userinfo = $auth->getUserData($user);
if(!$userinfo['mail']) {
msg($lang['resendpwdnouser'], -1);
return false;
}
- $pass = auth_pwgen();
- if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) {
- msg('error modifying user data',-1);
- return false;
- }
+ if(!$conf['autopasswd']){ // we let the user choose a password
+ // password given correctly?
+ if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false;
+ if($_REQUEST['pass'] != $_REQUEST['passchk']){
+ msg($lang['regbadpass'],-1);
+ return false;
+ }
+ $pass = $_REQUEST['pass'];
- if (auth_sendPassword($user,$pass)) {
- msg($lang['resendpwdsuccess'],1);
- } else {
- msg($lang['regmailfail'],-1);
+ if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) {
+ msg('error modifying user data',-1);
+ return false;
+ }
+
+ }else{ // autogenerate the password and send by mail
+
+ $pass = auth_pwgen();
+ if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) {
+ msg('error modifying user data',-1);
+ return false;
+ }
+
+ if (auth_sendPassword($user,$pass)) {
+ msg($lang['resendpwdsuccess'],1);
+ } else {
+ msg($lang['regmailfail'],-1);
+ }
}
+
+ @unlink($tfile);
return true;
} else {
@@ -922,10 +949,10 @@ function act_resendpwd(){
if(empty($conf['mailprefix'])) {
$subject = $lang['regpwmail'];
- } else {
+ } else {
$subject = '['.$conf['mailprefix'].'] '.$lang['regpwmail'];
}
-
+
if(mail_send($userinfo['name'].' <'.$userinfo['mail'].'>',
$subject,
$text,
diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php
index 1fddad243..bc4168527 100644
--- a/inc/auth/ad.class.php
+++ b/inc/auth/ad.class.php
@@ -26,15 +26,17 @@
* $conf['auth']['ad']['use_ssl'] = 1;
* $conf['auth']['ad']['use_tls'] = 1;
* $conf['auth']['ad']['debug'] = 1;
+ * // warn user about expiring password this many days in advance:
+ * $conf['auth']['ad']['expirywarn'] = 5;
*
* // get additional information to the userinfo array
* // add a list of comma separated ldap contact fields.
* $conf['auth']['ad']['additional'] = 'field1,field2';
*
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author James Van Lommel <jamesvl@gmail.com>
- * @link http://www.nosq.com/blog/2005/08/ldap-activedirectory-and-dokuwiki/
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author James Van Lommel <jamesvl@gmail.com>
+ * @link http://www.nosq.com/blog/2005/08/ldap-activedirectory-and-dokuwiki/
+ * @author Andreas Gohr <andi@splitbrain.org>
*/
require_once(DOKU_INC.'inc/adLDAP.php');
@@ -44,15 +46,15 @@ class auth_ad extends auth_basic {
var $opts = null;
var $adldap = null;
var $users = null;
+ var $msgshown = false;
/**
* Constructor
*/
- function auth_ad() {
+ function __construct() {
global $conf;
$this->cnf = $conf['auth']['ad'];
-
// additional information fields
if (isset($this->cnf['additional'])) {
$this->cnf['additional'] = str_replace(' ', '', $this->cnf['additional']);
@@ -69,21 +71,21 @@ class auth_ad extends auth_basic {
// Prepare SSO
if($_SERVER['REMOTE_USER'] && $this->cnf['sso']){
- // remove possible NTLM domain
- list($dom,$usr) = explode('\\',$_SERVER['REMOTE_USER'],2);
- if(!$usr) $usr = $dom;
+ // remove possible NTLM domain
+ list($dom,$usr) = explode('\\',$_SERVER['REMOTE_USER'],2);
+ if(!$usr) $usr = $dom;
- // remove possible Kerberos domain
- list($usr,$dom) = explode('@',$usr);
+ // remove possible Kerberos domain
+ list($usr,$dom) = explode('@',$usr);
- $dom = strtolower($dom);
- $_SERVER['REMOTE_USER'] = $usr;
+ $dom = strtolower($dom);
+ $_SERVER['REMOTE_USER'] = $usr;
- // we need to simulate a login
- if(empty($_COOKIE[DOKU_COOKIE])){
- $_REQUEST['u'] = $_SERVER['REMOTE_USER'];
- $_REQUEST['p'] = 'sso_only';
- }
+ // we need to simulate a login
+ if(empty($_COOKIE[DOKU_COOKIE])){
+ $_REQUEST['u'] = $_SERVER['REMOTE_USER'];
+ $_REQUEST['p'] = 'sso_only';
+ }
}
// prepare adLDAP standard configuration
@@ -144,11 +146,15 @@ class auth_ad extends auth_basic {
*
* @author James Van Lommel <james@nosq.com>
*/
- function getUserData($user){
+ function getUserData($user){
global $conf;
+ global $lang;
+ global $ID;
if(!$this->_init()) return false;
- $fields = array('mail','displayname','samaccountname');
+ if($user == '') return array();
+
+ $fields = array('mail','displayname','samaccountname','lastpwd','pwdlastset','useraccountcontrol');
// add additional fields to read
$fields = array_merge($fields, $this->cnf['additional']);
@@ -156,11 +162,19 @@ class auth_ad extends auth_basic {
//get info for given user
$result = $this->adldap->user_info($user, $fields);
+ if($result == false){
+ return array();
+ }
+
//general user info
- $info['name'] = $result[0]['displayname'][0];
- $info['mail'] = $result[0]['mail'][0];
- $info['uid'] = $result[0]['samaccountname'][0];
- $info['dn'] = $result[0]['dn'];
+ $info['name'] = $result[0]['displayname'][0];
+ $info['mail'] = $result[0]['mail'][0];
+ $info['uid'] = $result[0]['samaccountname'][0];
+ $info['dn'] = $result[0]['dn'];
+ //last password set (Windows counts from January 1st 1601)
+ $info['lastpwd'] = $result[0]['pwdlastset'][0] / 10000000 - 11644473600;
+ //will it expire?
+ $info['expires'] = !($result[0]['useraccountcontrol'][0] & 0x10000); //ADS_UF_DONT_EXPIRE_PASSWD
// additional information
foreach ($this->cnf['additional'] as $field) {
@@ -183,6 +197,29 @@ class auth_ad extends auth_basic {
$info['grps'][] = $conf['defaultgroup'];
}
+ // check expiry time
+ if($info['expires'] && $this->cnf['expirywarn']){
+ $result = $this->adldap->domain_info(array('maxpwdage')); // maximum pass age
+ $maxage = -1 * $result['maxpwdage'][0] / 10000000; // negative 100 nanosecs
+ $timeleft = $maxage - (time() - $info['lastpwd']);
+ $timeleft = round($timeleft/(24*60*60));
+ $info['expiresin'] = $timeleft;
+
+ // if this is the current user, warn him (once per request only)
+ if( ($_SERVER['REMOTE_USER'] == $user) &&
+ ($timeleft <= $this->cnf['expirywarn']) &&
+ !$this->msgshown
+ ){
+ $msg = sprintf($lang['authpwdexpire'],$timeleft);
+ if($this->canDo('modPass')){
+ $url = wl($ID,array('do'=>'profile'));
+ $msg .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>';
+ }
+ msg($msg);
+ $this->msgshown = true;
+ }
+ }
+
return $info;
}
@@ -259,7 +296,7 @@ class auth_ad extends auth_basic {
* @param $user nick of the user to be changed
* @param $changes array of field/value pairs to be changed
* @return bool
- */
+ */
function modifyUser($user, $changes) {
$return = true;
@@ -342,7 +379,6 @@ class auth_ad extends auth_basic {
function _constructPattern($filter) {
$this->_pattern = array();
foreach ($filter as $item => $pattern) {
-// $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters
$this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters
}
}
diff --git a/inc/auth/basic.class.php b/inc/auth/basic.class.php
index c7e7031bf..7c0a5f2c9 100644
--- a/inc/auth/basic.class.php
+++ b/inc/auth/basic.class.php
@@ -9,395 +9,393 @@
*/
class auth_basic {
+ var $success = true;
- var $success = true;
-
-
- /**
- * Posible things an auth backend module may be able to
- * do. The things a backend can do need to be set to true
- * in the constructor.
- */
- var $cando = array (
- 'addUser' => false, // can Users be created?
- 'delUser' => false, // can Users be deleted?
- 'modLogin' => false, // can login names be changed?
- 'modPass' => false, // can passwords be changed?
- 'modName' => false, // can real names be changed?
- 'modMail' => false, // can emails be changed?
- 'modGroups' => false, // can groups be changed?
- 'getUsers' => false, // can a (filtered) list of users be retrieved?
- 'getUserCount'=> false, // can the number of users be retrieved?
- 'getGroups' => false, // can a list of available groups be retrieved?
- 'external' => false, // does the module do external auth checking?
- 'logout' => true, // can the user logout again? (eg. not possible with HTTP auth)
- );
+ /**
+ * Posible things an auth backend module may be able to
+ * do. The things a backend can do need to be set to true
+ * in the constructor.
+ */
+ var $cando = array (
+ 'addUser' => false, // can Users be created?
+ 'delUser' => false, // can Users be deleted?
+ 'modLogin' => false, // can login names be changed?
+ 'modPass' => false, // can passwords be changed?
+ 'modName' => false, // can real names be changed?
+ 'modMail' => false, // can emails be changed?
+ 'modGroups' => false, // can groups be changed?
+ 'getUsers' => false, // can a (filtered) list of users be retrieved?
+ 'getUserCount'=> false, // can the number of users be retrieved?
+ 'getGroups' => false, // can a list of available groups be retrieved?
+ 'external' => false, // does the module do external auth checking?
+ 'logout' => true, // can the user logout again? (eg. not possible with HTTP auth)
+ );
+ /**
+ * Constructor.
+ *
+ * Carry out sanity checks to ensure the object is
+ * able to operate. Set capabilities in $this->cando
+ * array here
+ *
+ * Set $this->success to false if checks fail
+ *
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ */
+ function __construct() {
+ // the base class constructor does nothing, derived class
+ // constructors do the real work
+ }
- /**
- * Constructor.
- *
- * Carry out sanity checks to ensure the object is
- * able to operate. Set capabilities in $this->cando
- * array here
- *
- * Set $this->success to false if checks fail
- *
- * @author Christopher Smith <chris@jalakai.co.uk>
- */
- function auth_basic() {
- // the base class constructor does nothing, derived class
- // constructors do the real work
- }
+ /**
+ * Capability check. [ DO NOT OVERRIDE ]
+ *
+ * Checks the capabilities set in the $this->cando array and
+ * some pseudo capabilities (shortcutting access to multiple
+ * ones)
+ *
+ * ususal capabilities start with lowercase letter
+ * shortcut capabilities start with uppercase letter
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @return bool
+ */
+ function canDo($cap) {
+ switch($cap){
+ case 'Profile':
+ // can at least one of the user's properties be changed?
+ return ( $this->cando['modPass'] ||
+ $this->cando['modName'] ||
+ $this->cando['modMail'] );
+ break;
+ case 'UserMod':
+ // can at least anything be changed?
+ return ( $this->cando['modPass'] ||
+ $this->cando['modName'] ||
+ $this->cando['modMail'] ||
+ $this->cando['modLogin'] ||
+ $this->cando['modGroups'] ||
+ $this->cando['modMail'] );
+ break;
+ default:
+ // print a helping message for developers
+ if(!isset($this->cando[$cap])){
+ msg("Check for unknown capability '$cap' - Do you use an outdated Plugin?",-1);
+ }
+ return $this->cando[$cap];
+ }
+ }
- /**
- * Capability check. [ DO NOT OVERRIDE ]
- *
- * Checks the capabilities set in the $this->cando array and
- * some pseudo capabilities (shortcutting access to multiple
- * ones)
- *
- * ususal capabilities start with lowercase letter
- * shortcut capabilities start with uppercase letter
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @return bool
- */
- function canDo($cap) {
- switch($cap){
- case 'Profile':
- // can at least one of the user's properties be changed?
- return ( $this->cando['modPass'] ||
- $this->cando['modName'] ||
- $this->cando['modMail'] );
- break;
- case 'UserMod':
- // can at least anything be changed?
- return ( $this->cando['modPass'] ||
- $this->cando['modName'] ||
- $this->cando['modMail'] ||
- $this->cando['modLogin'] ||
- $this->cando['modGroups'] ||
- $this->cando['modMail'] );
- break;
- default:
- // print a helping message for developers
- if(!isset($this->cando[$cap])){
- msg("Check for unknown capability '$cap' - Do you use an outdated Plugin?",-1);
+ /**
+ * Trigger the AUTH_USERDATA_CHANGE event and call the modification function. [ DO NOT OVERRIDE ]
+ *
+ * You should use this function instead of calling createUser, modifyUser or
+ * deleteUsers directly. The event handlers can prevent the modification, for
+ * example for enforcing a user name schema.
+ *
+ * @author Gabriel Birke <birke@d-scribe.de>
+ * @param string $type Modification type ('create', 'modify', 'delete')
+ * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type
+ * @return mixed Result from the modification function or false if an event handler has canceled the action
+ */
+ function triggerUserMod($type, $params) {
+ $validTypes = array(
+ 'create' => 'createUser',
+ 'modify' => 'modifyUser',
+ 'delete' => 'deleteUsers'
+ );
+ if(empty($validTypes[$type]))
+ return false;
+ $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null);
+ $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata);
+ if ($evt->advise_before(true)) {
+ $result = call_user_func_array(array($this, $validTypes[$type]), $params);
+ $evt->data['modification_result'] = $result;
}
- return $this->cando[$cap];
+ $evt->advise_after();
+ unset($evt);
+ return $result;
}
- }
- /**
- * Trigger the AUTH_USERDATA_CHANGE event and call the modification function. [ DO NOT OVERRIDE ]
- *
- * You should use this function instead of calling createUser, modifyUser or
- * deleteUsers directly. The event handlers can prevent the modification, for
- * example for enforcing a user name schema.
- *
- * @author Gabriel Birke <birke@d-scribe.de>
- * @param string $type Modification type ('create', 'modify', 'delete')
- * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type
- * @return mixed Result from the modification function or false if an event handler has canceled the action
- */
- function triggerUserMod($type, $params)
- {
- $validTypes = array(
- 'create' => 'createUser',
- 'modify' => 'modifyUser',
- 'delete' => 'deleteUsers'
- );
- if(empty($validTypes[$type]))
- return false;
- $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null);
- $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata);
- if ($evt->advise_before(true)) {
- $result = call_user_func_array(array($this, $validTypes[$type]), $params);
- $evt->data['modification_result'] = $result;
+ /**
+ * Log off the current user [ OPTIONAL ]
+ *
+ * Is run in addition to the ususal logoff method. Should
+ * only be needed when trustExternal is implemented.
+ *
+ * @see auth_logoff()
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function logOff(){
}
- $evt->advise_after();
- unset($evt);
- return $result;
- }
- /**
- * Log off the current user [ OPTIONAL ]
- *
- * Is run in addition to the ususal logoff method. Should
- * only be needed when trustExternal is implemented.
- *
- * @see auth_logoff()
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function logOff(){
- }
+ /**
+ * Do all authentication [ OPTIONAL ]
+ *
+ * Set $this->cando['external'] = true when implemented
+ *
+ * If this function is implemented it will be used to
+ * authenticate a user - all other DokuWiki internals
+ * will not be used for authenticating, thus
+ * implementing the checkPass() function is not needed
+ * anymore.
+ *
+ * The function can be used to authenticate against third
+ * party cookies or Apache auth mechanisms and replaces
+ * the auth_login() function
+ *
+ * The function will be called with or without a set
+ * username. If the Username is given it was called
+ * from the login form and the given credentials might
+ * need to be checked. If no username was given it
+ * the function needs to check if the user is logged in
+ * by other means (cookie, environment).
+ *
+ * The function needs to set some globals needed by
+ * DokuWiki like auth_login() does.
+ *
+ * @see auth_login()
+ * @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $user Username
+ * @param string $pass Cleartext Password
+ * @param bool $sticky Cookie should not expire
+ * @return bool true on successful auth
+ */
+ function trustExternal($user,$pass,$sticky=false){
+ /* some example:
+
+ global $USERINFO;
+ global $conf;
+ $sticky ? $sticky = true : $sticky = false; //sanity check
+
+ // do the checking here
- /**
- * Do all authentication [ OPTIONAL ]
- *
- * Set $this->cando['external'] = true when implemented
- *
- * If this function is implemented it will be used to
- * authenticate a user - all other DokuWiki internals
- * will not be used for authenticating, thus
- * implementing the checkPass() function is not needed
- * anymore.
- *
- * The function can be used to authenticate against third
- * party cookies or Apache auth mechanisms and replaces
- * the auth_login() function
- *
- * The function will be called with or without a set
- * username. If the Username is given it was called
- * from the login form and the given credentials might
- * need to be checked. If no username was given it
- * the function needs to check if the user is logged in
- * by other means (cookie, environment).
- *
- * The function needs to set some globals needed by
- * DokuWiki like auth_login() does.
- *
- * @see auth_login()
- * @author Andreas Gohr <andi@splitbrain.org>
- *
- * @param string $user Username
- * @param string $pass Cleartext Password
- * @param bool $sticky Cookie should not expire
- * @return bool true on successful auth
- */
- function trustExternal($user,$pass,$sticky=false){
-# // some example:
-#
-# global $USERINFO;
-# global $conf;
-# $sticky ? $sticky = true : $sticky = false; //sanity check
-#
-# // do the checking here
-#
-# // set the globals if authed
-# $USERINFO['name'] = 'FIXME';
-# $USERINFO['mail'] = 'FIXME';
-# $USERINFO['grps'] = array('FIXME');
-# $_SERVER['REMOTE_USER'] = $user;
-# $_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
-# $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass;
-# $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
-# return true;
- }
+ // set the globals if authed
+ $USERINFO['name'] = 'FIXME';
+ $USERINFO['mail'] = 'FIXME';
+ $USERINFO['grps'] = array('FIXME');
+ $_SERVER['REMOTE_USER'] = $user;
+ $_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
+ $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass;
+ $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO;
+ return true;
- /**
- * Check user+password [ MUST BE OVERRIDDEN ]
- *
- * Checks if the given user exists and the given
- * plaintext password is correct
- *
- * May be ommited if trustExternal is used.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @return bool
- */
- function checkPass($user,$pass){
- msg("no valid authorisation system in use", -1);
- return false;
- }
+ */
+ }
+
+ /**
+ * Check user+password [ MUST BE OVERRIDDEN ]
+ *
+ * Checks if the given user exists and the given
+ * plaintext password is correct
+ *
+ * May be ommited if trustExternal is used.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @return bool
+ */
+ function checkPass($user,$pass){
+ msg("no valid authorisation system in use", -1);
+ return false;
+ }
- /**
- * Return user info [ MUST BE OVERRIDDEN ]
- *
- * Returns info about the given user needs to contain
- * at least these fields:
- *
- * name string full name of the user
- * mail string email addres of the user
- * grps array list of groups the user is in
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @return array containing user data or false
- */
- function getUserData($user) {
- if(!$this->cando['external']) msg("no valid authorisation system in use", -1);
- return false;
- }
+ /**
+ * Return user info [ MUST BE OVERRIDDEN ]
+ *
+ * Returns info about the given user needs to contain
+ * at least these fields:
+ *
+ * name string full name of the user
+ * mail string email addres of the user
+ * grps array list of groups the user is in
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @return array containing user data or false
+ */
+ function getUserData($user) {
+ if(!$this->cando['external']) msg("no valid authorisation system in use", -1);
+ return false;
+ }
- /**
- * Create a new User [implement only where required/possible]
- *
- * Returns false if the user already exists, null when an error
- * occurred and true if everything went well.
- *
- * The new user HAS TO be added to the default group by this
- * function!
- *
- * Set addUser capability when implemented
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function createUser($user,$pass,$name,$mail,$grps=null){
- msg("authorisation method does not allow creation of new users", -1);
- return null;
- }
+ /**
+ * Create a new User [implement only where required/possible]
+ *
+ * Returns false if the user already exists, null when an error
+ * occurred and true if everything went well.
+ *
+ * The new user HAS TO be added to the default group by this
+ * function!
+ *
+ * Set addUser capability when implemented
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function createUser($user,$pass,$name,$mail,$grps=null){
+ msg("authorisation method does not allow creation of new users", -1);
+ return null;
+ }
- /**
- * Modify user data [implement only where required/possible]
- *
- * Set the mod* capabilities according to the implemented features
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- * @param $user nick of the user to be changed
- * @param $changes array of field/value pairs to be changed (password will be clear text)
- * @return bool
- */
- function modifyUser($user, $changes) {
- msg("authorisation method does not allow modifying of user data", -1);
- return false;
- }
+ /**
+ * Modify user data [implement only where required/possible]
+ *
+ * Set the mod* capabilities according to the implemented features
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @param $user nick of the user to be changed
+ * @param $changes array of field/value pairs to be changed (password will be clear text)
+ * @return bool
+ */
+ function modifyUser($user, $changes) {
+ msg("authorisation method does not allow modifying of user data", -1);
+ return false;
+ }
- /**
- * Delete one or more users [implement only where required/possible]
- *
- * Set delUser capability when implemented
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- * @param array $users
- * @return int number of users deleted
- */
- function deleteUsers($users) {
- msg("authorisation method does not allow deleting of users", -1);
- return false;
- }
+ /**
+ * Delete one or more users [implement only where required/possible]
+ *
+ * Set delUser capability when implemented
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @param array $users
+ * @return int number of users deleted
+ */
+ function deleteUsers($users) {
+ msg("authorisation method does not allow deleting of users", -1);
+ return false;
+ }
- /**
- * Return a count of the number of user which meet $filter criteria
- * [should be implemented whenever retrieveUsers is implemented]
- *
- * Set getUserCount capability when implemented
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- */
- function getUserCount($filter=array()) {
- msg("authorisation method does not provide user counts", -1);
- return 0;
- }
+ /**
+ * Return a count of the number of user which meet $filter criteria
+ * [should be implemented whenever retrieveUsers is implemented]
+ *
+ * Set getUserCount capability when implemented
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ */
+ function getUserCount($filter=array()) {
+ msg("authorisation method does not provide user counts", -1);
+ return 0;
+ }
- /**
- * Bulk retrieval of user data [implement only where required/possible]
- *
- * Set getUsers capability when implemented
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- * @param start index of first user to be returned
- * @param limit max number of users to be returned
- * @param filter array of field/pattern pairs, null for no filter
- * @return array of userinfo (refer getUserData for internal userinfo details)
- */
- function retrieveUsers($start=0,$limit=-1,$filter=null) {
- msg("authorisation method does not support mass retrieval of user data", -1);
- return array();
- }
+ /**
+ * Bulk retrieval of user data [implement only where required/possible]
+ *
+ * Set getUsers capability when implemented
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @param start index of first user to be returned
+ * @param limit max number of users to be returned
+ * @param filter array of field/pattern pairs, null for no filter
+ * @return array of userinfo (refer getUserData for internal userinfo details)
+ */
+ function retrieveUsers($start=0,$limit=-1,$filter=null) {
+ msg("authorisation method does not support mass retrieval of user data", -1);
+ return array();
+ }
- /**
- * Define a group [implement only where required/possible]
- *
- * Set addGroup capability when implemented
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- * @return bool
- */
- function addGroup($group) {
- msg("authorisation method does not support independent group creation", -1);
- return false;
- }
+ /**
+ * Define a group [implement only where required/possible]
+ *
+ * Set addGroup capability when implemented
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @return bool
+ */
+ function addGroup($group) {
+ msg("authorisation method does not support independent group creation", -1);
+ return false;
+ }
- /**
- * Retrieve groups [implement only where required/possible]
- *
- * Set getGroups capability when implemented
- *
- * @author Chris Smith <chris@jalakai.co.uk>
- * @return array
- */
- function retrieveGroups($start=0,$limit=0) {
- msg("authorisation method does not support group list retrieval", -1);
- return array();
- }
+ /**
+ * Retrieve groups [implement only where required/possible]
+ *
+ * Set getGroups capability when implemented
+ *
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @return array
+ */
+ function retrieveGroups($start=0,$limit=0) {
+ msg("authorisation method does not support group list retrieval", -1);
+ return array();
+ }
- /**
- * Return case sensitivity of the backend [OPTIONAL]
- *
- * When your backend is caseinsensitive (eg. you can login with USER and
- * user) then you need to overwrite this method and return false
- */
- function isCaseSensitive(){
- return true;
- }
+ /**
+ * Return case sensitivity of the backend [OPTIONAL]
+ *
+ * When your backend is caseinsensitive (eg. you can login with USER and
+ * user) then you need to overwrite this method and return false
+ */
+ function isCaseSensitive(){
+ return true;
+ }
- /**
- * Sanitize a given username [OPTIONAL]
- *
- * This function is applied to any user name that is given to
- * the backend and should also be applied to any user name within
- * the backend before returning it somewhere.
- *
- * This should be used to enforce username restrictions.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @param string $user - username
- * @param string - the cleaned username
- */
- function cleanUser($user){
- return $user;
- }
+ /**
+ * Sanitize a given username [OPTIONAL]
+ *
+ * This function is applied to any user name that is given to
+ * the backend and should also be applied to any user name within
+ * the backend before returning it somewhere.
+ *
+ * This should be used to enforce username restrictions.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $user - username
+ * @param string - the cleaned username
+ */
+ function cleanUser($user){
+ return $user;
+ }
- /**
- * Sanitize a given groupname [OPTIONAL]
- *
- * This function is applied to any groupname that is given to
- * the backend and should also be applied to any groupname within
- * the backend before returning it somewhere.
- *
- * This should be used to enforce groupname restrictions.
- *
- * Groupnames are to be passed without a leading '@' here.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @param string $group - groupname
- * @param string - the cleaned groupname
- */
- function cleanGroup($group){
- return $group;
- }
+ /**
+ * Sanitize a given groupname [OPTIONAL]
+ *
+ * This function is applied to any groupname that is given to
+ * the backend and should also be applied to any groupname within
+ * the backend before returning it somewhere.
+ *
+ * This should be used to enforce groupname restrictions.
+ *
+ * Groupnames are to be passed without a leading '@' here.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $group - groupname
+ * @param string - the cleaned groupname
+ */
+ function cleanGroup($group){
+ return $group;
+ }
- /**
- * Check Session Cache validity [implement only where required/possible]
- *
- * DokuWiki caches user info in the user's session for the timespan defined
- * in $conf['auth_security_timeout'].
- *
- * This makes sure slow authentication backends do not slow down DokuWiki.
- * This also means that changes to the user database will not be reflected
- * on currently logged in users.
- *
- * To accommodate for this, the user manager plugin will touch a reference
- * file whenever a change is submitted. This function compares the filetime
- * of this reference file with the time stored in the session.
- *
- * This reference file mechanism does not reflect changes done directly in
- * the backend's database through other means than the user manager plugin.
- *
- * Fast backends might want to return always false, to force rechecks on
- * each page load. Others might want to use their own checking here. If
- * unsure, do not override.
- *
- * @param string $user - The username
- * @author Andreas Gohr <andi@splitbrain.org>
- * @return bool
- */
- function useSessionCache($user){
- global $conf;
- return ($_SESSION[DOKU_COOKIE]['auth']['time'] >= @filemtime($conf['cachedir'].'/sessionpurge'));
- }
+ /**
+ * Check Session Cache validity [implement only where required/possible]
+ *
+ * DokuWiki caches user info in the user's session for the timespan defined
+ * in $conf['auth_security_timeout'].
+ *
+ * This makes sure slow authentication backends do not slow down DokuWiki.
+ * This also means that changes to the user database will not be reflected
+ * on currently logged in users.
+ *
+ * To accommodate for this, the user manager plugin will touch a reference
+ * file whenever a change is submitted. This function compares the filetime
+ * of this reference file with the time stored in the session.
+ *
+ * This reference file mechanism does not reflect changes done directly in
+ * the backend's database through other means than the user manager plugin.
+ *
+ * Fast backends might want to return always false, to force rechecks on
+ * each page load. Others might want to use their own checking here. If
+ * unsure, do not override.
+ *
+ * @param string $user - The username
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @return bool
+ */
+ function useSessionCache($user){
+ global $conf;
+ return ($_SESSION[DOKU_COOKIE]['auth']['time'] >= @filemtime($conf['cachedir'].'/sessionpurge'));
+ }
}
//Setup VIM: ex: et ts=2 :
diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php
index 8eb411995..a6a15ee3d 100644
--- a/inc/auth/ldap.class.php
+++ b/inc/auth/ldap.class.php
@@ -15,7 +15,7 @@ class auth_ldap extends auth_basic {
/**
* Constructor
*/
- function auth_ldap(){
+ function __construct(){
global $conf;
$this->cnf = $conf['auth']['ldap'];
@@ -307,8 +307,6 @@ class auth_ldap extends auth_basic {
}
}
return $result;
-
-
}
/**
@@ -360,7 +358,6 @@ class auth_ldap extends auth_basic {
function _constructPattern($filter) {
$this->_pattern = array();
foreach ($filter as $item => $pattern) {
-// $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters
$this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters
}
}
diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php
index 653c725a3..9dcf82a87 100644
--- a/inc/auth/mysql.class.php
+++ b/inc/auth/mysql.class.php
@@ -6,7 +6,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
* @author Matthias Grimm <matthias.grimmm@sourceforge.net>
-*/
+ */
class auth_mysql extends auth_basic {
@@ -25,65 +25,74 @@ class auth_mysql extends auth_basic {
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
- function auth_mysql() {
- global $conf;
- $this->cnf = $conf['auth']['mysql'];
-
- if (method_exists($this, 'auth_basic'))
- parent::auth_basic();
-
- if(!function_exists('mysql_connect')) {
- if ($this->cnf['debug'])
- msg("MySQL err: PHP MySQL extension not found.",-1,__LINE__,__FILE__);
- $this->success = false;
- return;
- }
-
- // default to UTF-8, you rarely want something else
- if(!isset($this->cnf['charset'])) $this->cnf['charset'] = 'utf8';
-
- $this->defaultgroup = $conf['defaultgroup'];
-
- // set capabilities based upon config strings set
- if (empty($this->cnf['server']) || empty($this->cnf['user']) ||
- !isset($this->cnf['password']) || empty($this->cnf['database'])){
- if ($this->cnf['debug'])
- msg("MySQL err: insufficient configuration.",-1,__LINE__,__FILE__);
- $this->success = false;
- return;
- }
-
- $this->cando['addUser'] = $this->_chkcnf(array('getUserInfo',
- 'getGroups',
- 'addUser',
- 'getUserID',
- 'getGroupID',
- 'addGroup',
- 'addUserGroup'),true);
- $this->cando['delUser'] = $this->_chkcnf(array('getUserID',
- 'delUser',
- 'delUserRefs'),true);
- $this->cando['modLogin'] = $this->_chkcnf(array('getUserID',
- 'updateUser',
- 'UpdateTarget'),true);
- $this->cando['modPass'] = $this->cando['modLogin'];
- $this->cando['modName'] = $this->cando['modLogin'];
- $this->cando['modMail'] = $this->cando['modLogin'];
- $this->cando['modGroups'] = $this->_chkcnf(array('getUserID',
- 'getGroups',
- 'getGroupID',
- 'addGroup',
- 'addUserGroup',
- 'delGroup',
- 'getGroupID',
- 'delUserGroup'),true);
- /* getGroups is not yet supported
- $this->cando['getGroups'] = $this->_chkcnf(array('getGroups',
- 'getGroupID'),false); */
- $this->cando['getUsers'] = $this->_chkcnf(array('getUsers',
- 'getUserInfo',
- 'getGroups'),false);
- $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'),false);
+ function __construct() {
+ global $conf;
+ $this->cnf = $conf['auth']['mysql'];
+
+ if (method_exists($this, 'auth_basic')){
+ parent::__construct();
+ }
+
+ if(!function_exists('mysql_connect')) {
+ if ($this->cnf['debug']){
+ msg("MySQL err: PHP MySQL extension not found.",-1,__LINE__,__FILE__);
+ }
+ $this->success = false;
+ return;
+ }
+
+ // default to UTF-8, you rarely want something else
+ if(!isset($this->cnf['charset'])) $this->cnf['charset'] = 'utf8';
+
+ $this->defaultgroup = $conf['defaultgroup'];
+
+ // set capabilities based upon config strings set
+ if (empty($this->cnf['server']) || empty($this->cnf['user']) ||
+ !isset($this->cnf['password']) || empty($this->cnf['database'])){
+
+ if ($this->cnf['debug']){
+ msg("MySQL err: insufficient configuration.",-1,__LINE__,__FILE__);
+ }
+ $this->success = false;
+ return;
+ }
+
+ $this->cando['addUser'] = $this->_chkcnf(array(
+ 'getUserInfo',
+ 'getGroups',
+ 'addUser',
+ 'getUserID',
+ 'getGroupID',
+ 'addGroup',
+ 'addUserGroup'),true);
+ $this->cando['delUser'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'delUser',
+ 'delUserRefs'),true);
+ $this->cando['modLogin'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'updateUser',
+ 'UpdateTarget'),true);
+ $this->cando['modPass'] = $this->cando['modLogin'];
+ $this->cando['modName'] = $this->cando['modLogin'];
+ $this->cando['modMail'] = $this->cando['modLogin'];
+ $this->cando['modGroups'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'getGroups',
+ 'getGroupID',
+ 'addGroup',
+ 'addUserGroup',
+ 'delGroup',
+ 'getGroupID',
+ 'delUserGroup'),true);
+ /* getGroups is not yet supported
+ $this->cando['getGroups'] = $this->_chkcnf(array('getGroups',
+ 'getGroupID'),false); */
+ $this->cando['getUsers'] = $this->_chkcnf(array(
+ 'getUsers',
+ 'getUserInfo',
+ 'getGroups'),false);
+ $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'),false);
}
/**
@@ -93,17 +102,17 @@ class auth_mysql extends auth_basic {
* @return bool
*/
function _chkcnf($keys, $wop=false){
- foreach ($keys as $key){
- if (empty($this->cnf[$key])) return false;
- }
+ foreach ($keys as $key){
+ if (empty($this->cnf[$key])) return false;
+ }
- /* write operation and lock array filled with tables names? */
- if ($wop && (!is_array($this->cnf['TablesToLock']) ||
- !count($this->cnf['TablesToLock']))){
- return false;
- }
+ /* write operation and lock array filled with tables names? */
+ if ($wop && (!is_array($this->cnf['TablesToLock']) ||
+ !count($this->cnf['TablesToLock']))){
+ return false;
+ }
- return true;
+ return true;
}
/**
@@ -122,23 +131,23 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function checkPass($user,$pass){
- $rc = false;
-
- if($this->_openDB()) {
- $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['checkPass']);
- $sql = str_replace('%{pass}',$this->_escape($pass),$sql);
- $sql = str_replace('%{dgroup}',$this->_escape($this->defaultgroup),$sql);
- $result = $this->_queryDB($sql);
-
- if($result !== false && count($result) == 1) {
- if($this->cnf['forwardClearPass'] == 1)
- $rc = true;
- else
- $rc = auth_verifyPassword($pass,$result[0]['pass']);
+ $rc = false;
+
+ if($this->_openDB()) {
+ $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['checkPass']);
+ $sql = str_replace('%{pass}',$this->_escape($pass),$sql);
+ $sql = str_replace('%{dgroup}',$this->_escape($this->defaultgroup),$sql);
+ $result = $this->_queryDB($sql);
+
+ if($result !== false && count($result) == 1) {
+ if($this->cnf['forwardClearPass'] == 1)
+ $rc = true;
+ else
+ $rc = auth_verifyPassword($pass,$result[0]['pass']);
+ }
+ $this->_closeDB();
}
- $this->_closeDB();
- }
- return $rc;
+ return $rc;
}
/**
@@ -156,14 +165,14 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function getUserData($user){
- if($this->_openDB()) {
- $this->_lockTables("READ");
- $info = $this->_getUserInfo($user);
- $this->_unlockTables();
- $this->_closeDB();
- } else
- $info = false;
- return $info;
+ if($this->_openDB()) {
+ $this->_lockTables("READ");
+ $info = $this->_getUserInfo($user);
+ $this->_unlockTables();
+ $this->_closeDB();
+ } else
+ $info = false;
+ return $info;
}
/**
@@ -186,22 +195,22 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function createUser($user,$pwd,$name,$mail,$grps=null){
- if($this->_openDB()) {
- if (($info = $this->_getUserInfo($user)) !== false)
- return false; // user already exists
-
- // set defaultgroup if no groups were given
- if ($grps == null)
- $grps = array($this->defaultgroup);
-
- $this->_lockTables("WRITE");
- $pwd = $this->cnf['forwardClearPass'] ? $pwd : auth_cryptPassword($pwd);
- $rc = $this->_addUser($user,$pwd,$name,$mail,$grps);
- $this->_unlockTables();
- $this->_closeDB();
- if ($rc) return true;
- }
- return null; // return error
+ if($this->_openDB()) {
+ if (($info = $this->_getUserInfo($user)) !== false)
+ return false; // user already exists
+
+ // set defaultgroup if no groups were given
+ if ($grps == null)
+ $grps = array($this->defaultgroup);
+
+ $this->_lockTables("WRITE");
+ $pwd = $this->cnf['forwardClearPass'] ? $pwd : auth_cryptPassword($pwd);
+ $rc = $this->_addUser($user,$pwd,$name,$mail,$grps);
+ $this->_unlockTables();
+ $this->_closeDB();
+ if ($rc) return true;
+ }
+ return null; // return error
}
/**
@@ -233,36 +242,36 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function modifyUser($user, $changes) {
- $rc = false;
+ $rc = false;
- if (!is_array($changes) || !count($changes))
- return true; // nothing to change
+ if (!is_array($changes) || !count($changes))
+ return true; // nothing to change
- if($this->_openDB()) {
- $this->_lockTables("WRITE");
+ if($this->_openDB()) {
+ $this->_lockTables("WRITE");
- if (($uid = $this->_getUserID($user))) {
- $rc = $this->_updateUserInfo($changes, $uid);
+ if (($uid = $this->_getUserID($user))) {
+ $rc = $this->_updateUserInfo($changes, $uid);
- if ($rc && isset($changes['grps']) && $this->cando['modGroups']) {
- $groups = $this->_getGroups($user);
- $grpadd = array_diff($changes['grps'], $groups);
- $grpdel = array_diff($groups, $changes['grps']);
+ if ($rc && isset($changes['grps']) && $this->cando['modGroups']) {
+ $groups = $this->_getGroups($user);
+ $grpadd = array_diff($changes['grps'], $groups);
+ $grpdel = array_diff($groups, $changes['grps']);
- foreach($grpadd as $group)
- if (($this->_addUserToGroup($user, $group, 1)) == false)
- $rc = false;
+ foreach($grpadd as $group)
+ if (($this->_addUserToGroup($user, $group, 1)) == false)
+ $rc = false;
- foreach($grpdel as $group)
- if (($this->_delUserFromGroup($user, $group)) == false)
- $rc = false;
- }
- }
+ foreach($grpdel as $group)
+ if (($this->_delUserFromGroup($user, $group)) == false)
+ $rc = false;
+ }
+ }
- $this->_unlockTables();
- $this->_closeDB();
- }
- return $rc;
+ $this->_unlockTables();
+ $this->_closeDB();
+ }
+ return $rc;
}
/**
@@ -277,20 +286,20 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function deleteUsers($users) {
- $count = 0;
-
- if($this->_openDB()) {
- if (is_array($users) && count($users)) {
- $this->_lockTables("WRITE");
- foreach ($users as $user) {
- if ($this->_delUser($user))
- $count++;
- }
- $this->_unlockTables();
- }
- $this->_closeDB();
- }
- return $count;
+ $count = 0;
+
+ if($this->_openDB()) {
+ if (is_array($users) && count($users)) {
+ $this->_lockTables("WRITE");
+ foreach ($users as $user) {
+ if ($this->_delUser($user))
+ $count++;
+ }
+ $this->_unlockTables();
+ }
+ $this->_closeDB();
+ }
+ return $count;
}
/**
@@ -304,23 +313,23 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function getUserCount($filter=array()) {
- $rc = 0;
-
- if($this->_openDB()) {
- $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
-
- if ($this->dbver >= 4) {
- $sql = substr($sql, 6); /* remove 'SELECT' or 'select' */
- $sql = "SELECT SQL_CALC_FOUND_ROWS".$sql." LIMIT 1";
- $this->_queryDB($sql);
- $result = $this->_queryDB("SELECT FOUND_ROWS()");
- $rc = $result[0]['FOUND_ROWS()'];
- } else if (($result = $this->_queryDB($sql)))
- $rc = count($result);
-
- $this->_closeDB();
- }
- return $rc;
+ $rc = 0;
+
+ if($this->_openDB()) {
+ $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
+
+ if ($this->dbver >= 4) {
+ $sql = substr($sql, 6); /* remove 'SELECT' or 'select' */
+ $sql = "SELECT SQL_CALC_FOUND_ROWS".$sql." LIMIT 1";
+ $this->_queryDB($sql);
+ $result = $this->_queryDB("SELECT FOUND_ROWS()");
+ $rc = $result[0]['FOUND_ROWS()'];
+ } else if (($result = $this->_queryDB($sql)))
+ $rc = count($result);
+
+ $this->_closeDB();
+ }
+ return $rc;
}
/**
@@ -334,24 +343,24 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function retrieveUsers($first=0,$limit=10,$filter=array()) {
- $out = array();
-
- if($this->_openDB()) {
- $this->_lockTables("READ");
- $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
- $sql .= " ".$this->cnf['SortOrder']." LIMIT $first, $limit";
- $result = $this->_queryDB($sql);
+ $out = array();
+
+ if($this->_openDB()) {
+ $this->_lockTables("READ");
+ $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
+ $sql .= " ".$this->cnf['SortOrder']." LIMIT $first, $limit";
+ $result = $this->_queryDB($sql);
+
+ if (!empty($result)) {
+ foreach ($result as $user)
+ if (($info = $this->_getUserInfo($user['user'])))
+ $out[$user['user']] = $info;
+ }
- if (!empty($result)) {
- foreach ($result as $user)
- if (($info = $this->_getUserInfo($user['user'])))
- $out[$user['user']] = $info;
+ $this->_unlockTables();
+ $this->_closeDB();
}
-
- $this->_unlockTables();
- $this->_closeDB();
- }
- return $out;
+ return $out;
}
/**
@@ -364,15 +373,15 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function joinGroup($user, $group) {
- $rc = false;
-
- if ($this->_openDB()) {
- $this->_lockTables("WRITE");
- $rc = $this->_addUserToGroup($user, $group);
- $this->_unlockTables();
- $this->_closeDB();
- }
- return $rc;
+ $rc = false;
+
+ if ($this->_openDB()) {
+ $this->_lockTables("WRITE");
+ $rc = $this->_addUserToGroup($user, $group);
+ $this->_unlockTables();
+ $this->_closeDB();
+ }
+ return $rc;
}
/**
@@ -385,16 +394,16 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function leaveGroup($user, $group) {
- $rc = false;
-
- if ($this->_openDB()) {
- $this->_lockTables("WRITE");
- $uid = $this->_getUserID($user);
- $rc = $this->_delUserFromGroup($user, $group);
- $this->_unlockTables();
- $this->_closeDB();
- }
- return $rc;
+ $rc = false;
+
+ if ($this->_openDB()) {
+ $this->_lockTables("WRITE");
+ $uid = $this->_getUserID($user);
+ $rc = $this->_delUserFromGroup($user, $group);
+ $this->_unlockTables();
+ $this->_closeDB();
+ }
+ return $rc;
}
/**
@@ -422,36 +431,36 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _addUserToGroup($user, $group, $force=0) {
- $newgroup = 0;
-
- if (($this->dbcon) && ($user)) {
- $gid = $this->_getGroupID($group);
- if (!$gid) {
- if ($force) { // create missing groups
- $sql = str_replace('%{group}',$this->_escape($group),$this->cnf['addGroup']);
- $gid = $this->_modifyDB($sql);
- $newgroup = 1; // group newly created
- }
- if (!$gid) return false; // group didn't exist and can't be created
- }
-
- $sql = $this->cnf['addUserGroup'];
- if(strpos($sql,'%{uid}') !== false){
- $uid = $this->_getUserID($user);
- $sql = str_replace('%{uid}', $this->_escape($uid),$sql);
- }
- $sql = str_replace('%{user}', $this->_escape($user),$sql);
- $sql = str_replace('%{gid}', $this->_escape($gid),$sql);
- $sql = str_replace('%{group}',$this->_escape($group),$sql);
- if ($this->_modifyDB($sql) !== false) return true;
+ $newgroup = 0;
+
+ if (($this->dbcon) && ($user)) {
+ $gid = $this->_getGroupID($group);
+ if (!$gid) {
+ if ($force) { // create missing groups
+ $sql = str_replace('%{group}',$this->_escape($group),$this->cnf['addGroup']);
+ $gid = $this->_modifyDB($sql);
+ $newgroup = 1; // group newly created
+ }
+ if (!$gid) return false; // group didn't exist and can't be created
+ }
- if ($newgroup) { // remove previously created group on error
- $sql = str_replace('%{gid}', $this->_escape($gid),$this->cnf['delGroup']);
- $sql = str_replace('%{group}',$this->_escape($group),$sql);
- $this->_modifyDB($sql);
+ $sql = $this->cnf['addUserGroup'];
+ if(strpos($sql,'%{uid}') !== false){
+ $uid = $this->_getUserID($user);
+ $sql = str_replace('%{uid}', $this->_escape($uid),$sql);
+ }
+ $sql = str_replace('%{user}', $this->_escape($user),$sql);
+ $sql = str_replace('%{gid}', $this->_escape($gid),$sql);
+ $sql = str_replace('%{group}',$this->_escape($group),$sql);
+ if ($this->_modifyDB($sql) !== false) return true;
+
+ if ($newgroup) { // remove previously created group on error
+ $sql = str_replace('%{gid}', $this->_escape($gid),$this->cnf['delGroup']);
+ $sql = str_replace('%{group}',$this->_escape($group),$sql);
+ $this->_modifyDB($sql);
+ }
}
- }
- return false;
+ return false;
}
/**
@@ -464,24 +473,23 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _delUserFromGroup($user, $group) {
- $rc = false;
+ $rc = false;
-
- if (($this->dbcon) && ($user)) {
- $sql = $this->cnf['delUserGroup'];
- if(strpos($sql,'%{uid}') !== false){
- $uid = $this->_getUserID($user);
- $sql = str_replace('%{uid}', $this->_escape($uid),$sql);
- }
- $gid = $this->_getGroupID($group);
- if ($gid) {
- $sql = str_replace('%{user}', $this->_escape($user),$sql);
- $sql = str_replace('%{gid}', $this->_escape($gid),$sql);
- $sql = str_replace('%{group}',$this->_escape($group),$sql);
- $rc = $this->_modifyDB($sql) == 0 ? true : false;
+ if (($this->dbcon) && ($user)) {
+ $sql = $this->cnf['delUserGroup'];
+ if(strpos($sql,'%{uid}') !== false){
+ $uid = $this->_getUserID($user);
+ $sql = str_replace('%{uid}', $this->_escape($uid),$sql);
+ }
+ $gid = $this->_getGroupID($group);
+ if ($gid) {
+ $sql = str_replace('%{user}', $this->_escape($user),$sql);
+ $sql = str_replace('%{gid}', $this->_escape($gid),$sql);
+ $sql = str_replace('%{group}',$this->_escape($group),$sql);
+ $rc = $this->_modifyDB($sql) == 0 ? true : false;
+ }
}
- }
- return $rc;
+ return $rc;
}
/**
@@ -498,19 +506,19 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _getGroups($user) {
- $groups = array();
+ $groups = array();
- if($this->dbcon) {
- $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getGroups']);
- $result = $this->_queryDB($sql);
+ if($this->dbcon) {
+ $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getGroups']);
+ $result = $this->_queryDB($sql);
- if($result !== false && count($result)) {
- foreach($result as $row)
- $groups[] = $row['group'];
+ if($result !== false && count($result)) {
+ foreach($result as $row)
+ $groups[] = $row['group'];
+ }
+ return $groups;
}
- return $groups;
- }
- return false;
+ return false;
}
/**
@@ -526,12 +534,12 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _getUserID($user) {
- if($this->dbcon) {
- $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getUserID']);
- $result = $this->_queryDB($sql);
- return $result === false ? false : $result[0]['id'];
- }
- return false;
+ if($this->dbcon) {
+ $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getUserID']);
+ $result = $this->_queryDB($sql);
+ return $result === false ? false : $result[0]['id'];
+ }
+ return false;
}
/**
@@ -553,33 +561,33 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _addUser($user,$pwd,$name,$mail,$grps){
- if($this->dbcon && is_array($grps)) {
- $sql = str_replace('%{user}', $this->_escape($user),$this->cnf['addUser']);
- $sql = str_replace('%{pass}', $this->_escape($pwd),$sql);
- $sql = str_replace('%{name}', $this->_escape($name),$sql);
- $sql = str_replace('%{email}',$this->_escape($mail),$sql);
- $uid = $this->_modifyDB($sql);
-
- if ($uid) {
- foreach($grps as $group) {
- $gid = $this->_addUserToGroup($user, $group, 1);
- if ($gid === false) break;
- }
-
- if ($gid) return true;
- else {
- /* remove the new user and all group relations if a group can't
- * be assigned. Newly created groups will remain in the database
- * and won't be removed. This might create orphaned groups but
- * is not a big issue so we ignore this problem here.
- */
- $this->_delUser($user);
- if ($this->cnf['debug'])
- msg ("MySQL err: Adding user '$user' to group '$group' failed.",-1,__LINE__,__FILE__);
- }
+ if($this->dbcon && is_array($grps)) {
+ $sql = str_replace('%{user}', $this->_escape($user),$this->cnf['addUser']);
+ $sql = str_replace('%{pass}', $this->_escape($pwd),$sql);
+ $sql = str_replace('%{name}', $this->_escape($name),$sql);
+ $sql = str_replace('%{email}',$this->_escape($mail),$sql);
+ $uid = $this->_modifyDB($sql);
+
+ if ($uid) {
+ foreach($grps as $group) {
+ $gid = $this->_addUserToGroup($user, $group, 1);
+ if ($gid === false) break;
+ }
+
+ if ($gid) return true;
+ else {
+ /* remove the new user and all group relations if a group can't
+ * be assigned. Newly created groups will remain in the database
+ * and won't be removed. This might create orphaned groups but
+ * is not a big issue so we ignore this problem here.
+ */
+ $this->_delUser($user);
+ if ($this->cnf['debug'])
+ msg ("MySQL err: Adding user '$user' to group '$group' failed.",-1,__LINE__,__FILE__);
+ }
+ }
}
- }
- return false;
+ return false;
}
/**
@@ -595,18 +603,18 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _delUser($user) {
- if($this->dbcon) {
- $uid = $this->_getUserID($user);
- if ($uid) {
- $sql = str_replace('%{uid}',$this->_escape($uid),$this->cnf['delUserRefs']);
- $this->_modifyDB($sql);
- $sql = str_replace('%{uid}',$this->_escape($uid),$this->cnf['delUser']);
- $sql = str_replace('%{user}', $this->_escape($user),$sql);
- $this->_modifyDB($sql);
- return true;
- }
- }
- return false;
+ if($this->dbcon) {
+ $uid = $this->_getUserID($user);
+ if ($uid) {
+ $sql = str_replace('%{uid}',$this->_escape($uid),$this->cnf['delUserRefs']);
+ $this->_modifyDB($sql);
+ $sql = str_replace('%{uid}',$this->_escape($uid),$this->cnf['delUser']);
+ $sql = str_replace('%{user}', $this->_escape($user),$sql);
+ $this->_modifyDB($sql);
+ return true;
+ }
+ }
+ return false;
}
/**
@@ -623,14 +631,14 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _getUserInfo($user){
- $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getUserInfo']);
- $result = $this->_queryDB($sql);
- if($result !== false && count($result)) {
- $info = $result[0];
- $info['grps'] = $this->_getGroups($user);
- return $info;
- }
- return false;
+ $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getUserInfo']);
+ $result = $this->_queryDB($sql);
+ if($result !== false && count($result)) {
+ $info = $result[0];
+ $info['grps'] = $this->_getGroups($user);
+ return $info;
+ }
+ return false;
}
/**
@@ -653,43 +661,43 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _updateUserInfo($changes, $uid) {
- $sql = $this->cnf['updateUser']." ";
- $cnt = 0;
- $err = 0;
-
- if($this->dbcon) {
- foreach ($changes as $item => $value) {
- if ($item == 'user') {
- if (($this->_getUserID($changes['user']))) {
- $err = 1; /* new username already exists */
- break; /* abort update */
+ $sql = $this->cnf['updateUser']." ";
+ $cnt = 0;
+ $err = 0;
+
+ if($this->dbcon) {
+ foreach ($changes as $item => $value) {
+ if ($item == 'user') {
+ if (($this->_getUserID($changes['user']))) {
+ $err = 1; /* new username already exists */
+ break; /* abort update */
+ }
+ if ($cnt++ > 0) $sql .= ", ";
+ $sql .= str_replace('%{user}',$value,$this->cnf['UpdateLogin']);
+ } else if ($item == 'name') {
+ if ($cnt++ > 0) $sql .= ", ";
+ $sql .= str_replace('%{name}',$value,$this->cnf['UpdateName']);
+ } else if ($item == 'pass') {
+ if (!$this->cnf['forwardClearPass'])
+ $value = auth_cryptPassword($value);
+ if ($cnt++ > 0) $sql .= ", ";
+ $sql .= str_replace('%{pass}',$value,$this->cnf['UpdatePass']);
+ } else if ($item == 'mail') {
+ if ($cnt++ > 0) $sql .= ", ";
+ $sql .= str_replace('%{email}',$value,$this->cnf['UpdateEmail']);
+ }
}
- if ($cnt++ > 0) $sql .= ", ";
- $sql .= str_replace('%{user}',$value,$this->cnf['UpdateLogin']);
- } else if ($item == 'name') {
- if ($cnt++ > 0) $sql .= ", ";
- $sql .= str_replace('%{name}',$value,$this->cnf['UpdateName']);
- } else if ($item == 'pass') {
- if (!$this->cnf['forwardClearPass'])
- $value = auth_cryptPassword($value);
- if ($cnt++ > 0) $sql .= ", ";
- $sql .= str_replace('%{pass}',$value,$this->cnf['UpdatePass']);
- } else if ($item == 'mail') {
- if ($cnt++ > 0) $sql .= ", ";
- $sql .= str_replace('%{email}',$value,$this->cnf['UpdateEmail']);
- }
- }
-
- if ($err == 0) {
- if ($cnt > 0) {
- $sql .= " ".str_replace('%{uid}', $uid, $this->cnf['UpdateTarget']);
- if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp.
- $this->_modifyDB($sql);
- }
- return true;
- }
- }
- return false;
+
+ if ($err == 0) {
+ if ($cnt > 0) {
+ $sql .= " ".str_replace('%{uid}', $uid, $this->cnf['UpdateTarget']);
+ if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp.
+ $this->_modifyDB($sql);
+ }
+ return true;
+ }
+ }
+ return false;
}
/**
@@ -705,12 +713,12 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _getGroupID($group) {
- if($this->dbcon) {
- $sql = str_replace('%{group}',$this->_escape($group),$this->cnf['getGroupID']);
- $result = $this->_queryDB($sql);
- return $result === false ? false : $result[0]['id'];
- }
- return false;
+ if($this->dbcon) {
+ $sql = str_replace('%{group}',$this->_escape($group),$this->cnf['getGroupID']);
+ $result = $this->_queryDB($sql);
+ return $result === false ? false : $result[0]['id'];
+ }
+ return false;
}
/**
@@ -723,32 +731,32 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _openDB() {
- if (!$this->dbcon) {
- $con = @mysql_connect ($this->cnf['server'], $this->cnf['user'], $this->cnf['password']);
- if ($con) {
- if ((mysql_select_db($this->cnf['database'], $con))) {
- if ((preg_match("/^(\d+)\.(\d+)\.(\d+).*/", mysql_get_server_info ($con), $result)) == 1) {
- $this->dbver = $result[1];
- $this->dbrev = $result[2];
- $this->dbsub = $result[3];
- }
- $this->dbcon = $con;
- if(!empty($this->cnf['charset'])){
- mysql_query('SET CHARACTER SET "' . $this->cnf['charset'] . '"', $con);
- }
- return true; // connection and database successfully opened
- } else {
- mysql_close ($con);
- if ($this->cnf['debug'])
- msg("MySQL err: No access to database {$this->cnf['database']}.",-1,__LINE__,__FILE__);
- }
- } else if ($this->cnf['debug'])
- msg ("MySQL err: Connection to {$this->cnf['user']}@{$this->cnf['server']} not possible.",
- -1,__LINE__,__FILE__);
-
- return false; // connection failed
- }
- return true; // connection already open
+ if (!$this->dbcon) {
+ $con = @mysql_connect ($this->cnf['server'], $this->cnf['user'], $this->cnf['password']);
+ if ($con) {
+ if ((mysql_select_db($this->cnf['database'], $con))) {
+ if ((preg_match("/^(\d+)\.(\d+)\.(\d+).*/", mysql_get_server_info ($con), $result)) == 1) {
+ $this->dbver = $result[1];
+ $this->dbrev = $result[2];
+ $this->dbsub = $result[3];
+ }
+ $this->dbcon = $con;
+ if(!empty($this->cnf['charset'])){
+ mysql_query('SET CHARACTER SET "' . $this->cnf['charset'] . '"', $con);
+ }
+ return true; // connection and database successfully opened
+ } else {
+ mysql_close ($con);
+ if ($this->cnf['debug'])
+ msg("MySQL err: No access to database {$this->cnf['database']}.",-1,__LINE__,__FILE__);
+ }
+ } else if ($this->cnf['debug'])
+ msg ("MySQL err: Connection to {$this->cnf['user']}@{$this->cnf['server']} not possible.",
+ -1,__LINE__,__FILE__);
+
+ return false; // connection failed
+ }
+ return true; // connection already open
}
/**
@@ -757,10 +765,10 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _closeDB() {
- if ($this->dbcon) {
- mysql_close ($this->dbcon);
- $this->dbcon = 0;
- }
+ if ($this->dbcon) {
+ mysql_close ($this->dbcon);
+ $this->dbcon = 0;
+ }
}
/**
@@ -776,23 +784,23 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _queryDB($query) {
- if($this->cnf['debug'] >= 2){
- msg('MySQL query: '.hsc($query),0,__LINE__,__FILE__);
- }
-
- $resultarray = array();
- if ($this->dbcon) {
- $result = @mysql_query($query,$this->dbcon);
- if ($result) {
- while (($t = mysql_fetch_assoc($result)) !== false)
- $resultarray[]=$t;
- mysql_free_result ($result);
- return $resultarray;
- }
- if ($this->cnf['debug'])
- msg('MySQL err: '.mysql_error($this->dbcon),-1,__LINE__,__FILE__);
- }
- return false;
+ if($this->cnf['debug'] >= 2){
+ msg('MySQL query: '.hsc($query),0,__LINE__,__FILE__);
+ }
+
+ $resultarray = array();
+ if ($this->dbcon) {
+ $result = @mysql_query($query,$this->dbcon);
+ if ($result) {
+ while (($t = mysql_fetch_assoc($result)) !== false)
+ $resultarray[]=$t;
+ mysql_free_result ($result);
+ return $resultarray;
+ }
+ if ($this->cnf['debug'])
+ msg('MySQL err: '.mysql_error($this->dbcon),-1,__LINE__,__FILE__);
+ }
+ return false;
}
/**
@@ -807,16 +815,16 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _modifyDB($query) {
- if ($this->dbcon) {
- $result = @mysql_query($query,$this->dbcon);
- if ($result) {
- $rc = mysql_insert_id($this->dbcon); //give back ID on insert
- if ($rc !== false) return $rc;
- }
- if ($this->cnf['debug'])
- msg('MySQL err: '.mysql_error($this->dbcon),-1,__LINE__,__FILE__);
- }
- return false;
+ if ($this->dbcon) {
+ $result = @mysql_query($query,$this->dbcon);
+ if ($result) {
+ $rc = mysql_insert_id($this->dbcon); //give back ID on insert
+ if ($rc !== false) return $rc;
+ }
+ if ($this->cnf['debug'])
+ msg('MySQL err: '.mysql_error($this->dbcon),-1,__LINE__,__FILE__);
+ }
+ return false;
}
/**
@@ -838,21 +846,21 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _lockTables($mode) {
- if ($this->dbcon) {
- if (is_array($this->cnf['TablesToLock']) && !empty($this->cnf['TablesToLock'])) {
- if ($mode == "READ" || $mode == "WRITE") {
- $sql = "LOCK TABLES ";
- $cnt = 0;
- foreach ($this->cnf['TablesToLock'] as $table) {
- if ($cnt++ != 0) $sql .= ", ";
- $sql .= "$table $mode";
+ if ($this->dbcon) {
+ if (is_array($this->cnf['TablesToLock']) && !empty($this->cnf['TablesToLock'])) {
+ if ($mode == "READ" || $mode == "WRITE") {
+ $sql = "LOCK TABLES ";
+ $cnt = 0;
+ foreach ($this->cnf['TablesToLock'] as $table) {
+ if ($cnt++ != 0) $sql .= ", ";
+ $sql .= "$table $mode";
+ }
+ $this->_modifyDB($sql);
+ return true;
+ }
}
- $this->_modifyDB($sql);
- return true;
- }
}
- }
- return false;
+ return false;
}
/**
@@ -862,11 +870,11 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _unlockTables() {
- if ($this->dbcon) {
- $this->_modifyDB("UNLOCK TABLES");
- return true;
- }
- return false;
+ if ($this->dbcon) {
+ $this->_modifyDB("UNLOCK TABLES");
+ return true;
+ }
+ return false;
}
/**
@@ -882,38 +890,38 @@ class auth_mysql extends auth_basic {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _createSQLFilter($sql, $filter) {
- $SQLfilter = "";
- $cnt = 0;
-
- if ($this->dbcon) {
- foreach ($filter as $item => $pattern) {
- $tmp = '%'.$this->_escape($pattern).'%';
- if ($item == 'user') {
- if ($cnt++ > 0) $SQLfilter .= " AND ";
- $SQLfilter .= str_replace('%{user}',$tmp,$this->cnf['FilterLogin']);
- } else if ($item == 'name') {
- if ($cnt++ > 0) $SQLfilter .= " AND ";
- $SQLfilter .= str_replace('%{name}',$tmp,$this->cnf['FilterName']);
- } else if ($item == 'mail') {
- if ($cnt++ > 0) $SQLfilter .= " AND ";
- $SQLfilter .= str_replace('%{email}',$tmp,$this->cnf['FilterEmail']);
- } else if ($item == 'grps') {
- if ($cnt++ > 0) $SQLfilter .= " AND ";
- $SQLfilter .= str_replace('%{group}',$tmp,$this->cnf['FilterGroup']);
- }
- }
-
- // we have to check SQLfilter here and must not use $cnt because if
- // any of cnf['Filter????'] is not defined, a malformed SQL string
- // would be generated.
-
- if (strlen($SQLfilter)) {
- $glue = strpos(strtolower($sql),"where") ? " AND " : " WHERE ";
- $sql = $sql.$glue.$SQLfilter;
- }
- }
-
- return $sql;
+ $SQLfilter = "";
+ $cnt = 0;
+
+ if ($this->dbcon) {
+ foreach ($filter as $item => $pattern) {
+ $tmp = '%'.$this->_escape($pattern).'%';
+ if ($item == 'user') {
+ if ($cnt++ > 0) $SQLfilter .= " AND ";
+ $SQLfilter .= str_replace('%{user}',$tmp,$this->cnf['FilterLogin']);
+ } else if ($item == 'name') {
+ if ($cnt++ > 0) $SQLfilter .= " AND ";
+ $SQLfilter .= str_replace('%{name}',$tmp,$this->cnf['FilterName']);
+ } else if ($item == 'mail') {
+ if ($cnt++ > 0) $SQLfilter .= " AND ";
+ $SQLfilter .= str_replace('%{email}',$tmp,$this->cnf['FilterEmail']);
+ } else if ($item == 'grps') {
+ if ($cnt++ > 0) $SQLfilter .= " AND ";
+ $SQLfilter .= str_replace('%{group}',$tmp,$this->cnf['FilterGroup']);
+ }
+ }
+
+ // we have to check SQLfilter here and must not use $cnt because if
+ // any of cnf['Filter????'] is not defined, a malformed SQL string
+ // would be generated.
+
+ if (strlen($SQLfilter)) {
+ $glue = strpos(strtolower($sql),"where") ? " AND " : " WHERE ";
+ $sql = $sql.$glue.$SQLfilter;
+ }
+ }
+
+ return $sql;
}
/**
@@ -924,15 +932,15 @@ class auth_mysql extends auth_basic {
* @param boolean $like Escape wildcard chars as well?
*/
function _escape($string,$like=false){
- if($this->dbcon){
- $string = mysql_real_escape_string($string, $this->dbcon);
- }else{
- $string = addslashes($string);
- }
- if($like){
- $string = addcslashes($string,'%_');
- }
- return $string;
+ if($this->dbcon){
+ $string = mysql_real_escape_string($string, $this->dbcon);
+ }else{
+ $string = addslashes($string);
+ }
+ if($like){
+ $string = addcslashes($string,'%_');
+ }
+ return $string;
}
}
diff --git a/inc/auth/pgsql.class.php b/inc/auth/pgsql.class.php
index cf8bf7600..b422b100d 100644
--- a/inc/auth/pgsql.class.php
+++ b/inc/auth/pgsql.class.php
@@ -9,7 +9,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
* @author Matthias Grimm <matthias.grimmm@sourceforge.net>
-*/
+ */
require_once(DOKU_INC.'inc/auth/mysql.class.php');
@@ -24,63 +24,72 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function auth_pgsql() {
- global $conf;
- $this->cnf = $conf['auth']['pgsql'];
- if(!$this->cnf['port']) $this->cnf['port'] = 5432;
-
- if (method_exists($this, 'auth_basic'))
- parent::auth_basic();
-
- if(!function_exists('pg_connect')) {
- if ($this->cnf['debug'])
- msg("PgSQL err: PHP Postgres extension not found.",-1);
- $this->success = false;
- return;
- }
-
- $this->defaultgroup = $conf['defaultgroup'];
-
- // set capabilities based upon config strings set
- if (empty($this->cnf['user']) ||
- empty($this->cnf['password']) || empty($this->cnf['database'])){
- if ($this->cnf['debug'])
- msg("PgSQL err: insufficient configuration.",-1,__LINE__,__FILE__);
- $this->success = false;
- return;
- }
-
- $this->cando['addUser'] = $this->_chkcnf(array('getUserInfo',
- 'getGroups',
- 'addUser',
- 'getUserID',
- 'getGroupID',
- 'addGroup',
- 'addUserGroup'));
- $this->cando['delUser'] = $this->_chkcnf(array('getUserID',
- 'delUser',
- 'delUserRefs'));
- $this->cando['modLogin'] = $this->_chkcnf(array('getUserID',
- 'updateUser',
- 'UpdateTarget'));
- $this->cando['modPass'] = $this->cando['modLogin'];
- $this->cando['modName'] = $this->cando['modLogin'];
- $this->cando['modMail'] = $this->cando['modLogin'];
- $this->cando['modGroups'] = $this->_chkcnf(array('getUserID',
- 'getGroups',
- 'getGroupID',
- 'addGroup',
- 'addUserGroup',
- 'delGroup',
- 'getGroupID',
- 'delUserGroup'));
- /* getGroups is not yet supported
- $this->cando['getGroups'] = $this->_chkcnf(array('getGroups',
- 'getGroupID')); */
- $this->cando['getUsers'] = $this->_chkcnf(array('getUsers',
- 'getUserInfo',
- 'getGroups'));
- $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'));
+ function __construct() {
+ global $conf;
+ $this->cnf = $conf['auth']['pgsql'];
+ if(!$this->cnf['port']){
+ $this->cnf['port'] = 5432;
+ }
+
+ if (method_exists($this, 'auth_basic')){
+ parent::auth_basic();
+ }
+
+ if(!function_exists('pg_connect')) {
+ if ($this->cnf['debug'])
+ msg("PgSQL err: PHP Postgres extension not found.",-1);
+ $this->success = false;
+ return;
+ }
+
+ $this->defaultgroup = $conf['defaultgroup'];
+
+ // set capabilities based upon config strings set
+ if (empty($this->cnf['user']) ||
+ empty($this->cnf['password']) || empty($this->cnf['database'])){
+ if ($this->cnf['debug']){
+ msg("PgSQL err: insufficient configuration.",-1,__LINE__,__FILE__);
+ }
+ $this->success = false;
+ return;
+ }
+
+ $this->cando['addUser'] = $this->_chkcnf(array(
+ 'getUserInfo',
+ 'getGroups',
+ 'addUser',
+ 'getUserID',
+ 'getGroupID',
+ 'addGroup',
+ 'addUserGroup'));
+ $this->cando['delUser'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'delUser',
+ 'delUserRefs'));
+ $this->cando['modLogin'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'updateUser',
+ 'UpdateTarget'));
+ $this->cando['modPass'] = $this->cando['modLogin'];
+ $this->cando['modName'] = $this->cando['modLogin'];
+ $this->cando['modMail'] = $this->cando['modLogin'];
+ $this->cando['modGroups'] = $this->_chkcnf(array(
+ 'getUserID',
+ 'getGroups',
+ 'getGroupID',
+ 'addGroup',
+ 'addUserGroup',
+ 'delGroup',
+ 'getGroupID',
+ 'delUserGroup'));
+ /* getGroups is not yet supported
+ $this->cando['getGroups'] = $this->_chkcnf(array('getGroups',
+ 'getGroupID')); */
+ $this->cando['getUsers'] = $this->_chkcnf(array(
+ 'getUsers',
+ 'getUserInfo',
+ 'getGroups'));
+ $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'));
}
/**
@@ -90,10 +99,10 @@ class auth_pgsql extends auth_mysql {
* @return bool
*/
function _chkcnf($keys, $wop=false){
- foreach ($keys as $key){
- if (empty($this->cnf[$key])) return false;
- }
- return true;
+ foreach ($keys as $key){
+ if (empty($this->cnf[$key])) return false;
+ }
+ return true;
}
// @inherit function checkPass($user,$pass)
@@ -114,18 +123,18 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function getUserCount($filter=array()) {
- $rc = 0;
+ $rc = 0;
- if($this->_openDB()) {
- $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
+ if($this->_openDB()) {
+ $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
- // no equivalent of SQL_CALC_FOUND_ROWS in pgsql?
- if (($result = $this->_queryDB($sql))){
- $rc = count($result);
+ // no equivalent of SQL_CALC_FOUND_ROWS in pgsql?
+ if (($result = $this->_queryDB($sql))){
+ $rc = count($result);
+ }
+ $this->_closeDB();
}
- $this->_closeDB();
- }
- return $rc;
+ return $rc;
}
/**
@@ -139,22 +148,22 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function retrieveUsers($first=0,$limit=10,$filter=array()) {
- $out = array();
-
- if($this->_openDB()) {
- $this->_lockTables("READ");
- $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
- $sql .= " ".$this->cnf['SortOrder']." LIMIT $limit OFFSET $first";
- $result = $this->_queryDB($sql);
-
- foreach ($result as $user)
- if (($info = $this->_getUserInfo($user['user'])))
- $out[$user['user']] = $info;
-
- $this->_unlockTables();
- $this->_closeDB();
- }
- return $out;
+ $out = array();
+
+ if($this->_openDB()) {
+ $this->_lockTables("READ");
+ $sql = $this->_createSQLFilter($this->cnf['getUsers'], $filter);
+ $sql .= " ".$this->cnf['SortOrder']." LIMIT $limit OFFSET $first";
+ $result = $this->_queryDB($sql);
+
+ foreach ($result as $user)
+ if (($info = $this->_getUserInfo($user['user'])))
+ $out[$user['user']] = $info;
+
+ $this->_unlockTables();
+ $this->_closeDB();
+ }
+ return $out;
}
// @inherit function joinGroup($user, $group)
@@ -177,38 +186,38 @@ class auth_pgsql extends auth_mysql {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _addUserToGroup($user, $group, $force=0) {
- $newgroup = 0;
-
- if (($this->dbcon) && ($user)) {
- $gid = $this->_getGroupID($group);
- if (!$gid) {
- if ($force) { // create missing groups
- $sql = str_replace('%{group}',addslashes($group),$this->cnf['addGroup']);
- $this->_modifyDB($sql);
- //group should now exists try again to fetch it
- $gid = $this->_getGroupID($group);
- $newgroup = 1; // group newly created
- }
- }
- if (!$gid) return false; // group didn't exist and can't be created
+ $newgroup = 0;
- $sql = $this->cnf['addUserGroup'];
- if(strpos($sql,'%{uid}') !== false){
- $uid = $this->_getUserID($user);
- $sql = str_replace('%{uid}', addslashes($uid), $sql);
- }
- $sql = str_replace('%{user}', addslashes($user),$sql);
- $sql = str_replace('%{gid}', addslashes($gid),$sql);
- $sql = str_replace('%{group}',addslashes($group),$sql);
- if ($this->_modifyDB($sql) !== false) return true;
-
- if ($newgroup) { // remove previously created group on error
- $sql = str_replace('%{gid}', addslashes($gid),$this->cnf['delGroup']);
- $sql = str_replace('%{group}',addslashes($group),$sql);
- $this->_modifyDB($sql);
+ if (($this->dbcon) && ($user)) {
+ $gid = $this->_getGroupID($group);
+ if (!$gid) {
+ if ($force) { // create missing groups
+ $sql = str_replace('%{group}',addslashes($group),$this->cnf['addGroup']);
+ $this->_modifyDB($sql);
+ //group should now exists try again to fetch it
+ $gid = $this->_getGroupID($group);
+ $newgroup = 1; // group newly created
+ }
+ }
+ if (!$gid) return false; // group didn't exist and can't be created
+
+ $sql = $this->cnf['addUserGroup'];
+ if(strpos($sql,'%{uid}') !== false){
+ $uid = $this->_getUserID($user);
+ $sql = str_replace('%{uid}', addslashes($uid), $sql);
+ }
+ $sql = str_replace('%{user}', addslashes($user),$sql);
+ $sql = str_replace('%{gid}', addslashes($gid),$sql);
+ $sql = str_replace('%{group}',addslashes($group),$sql);
+ if ($this->_modifyDB($sql) !== false) return true;
+
+ if ($newgroup) { // remove previously created group on error
+ $sql = str_replace('%{gid}', addslashes($gid),$this->cnf['delGroup']);
+ $sql = str_replace('%{group}',addslashes($group),$sql);
+ $this->_modifyDB($sql);
+ }
}
- }
- return false;
+ return false;
}
// @inherit function _delUserFromGroup($user $group)
@@ -234,37 +243,37 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _addUser($user,$pwd,$name,$mail,$grps){
- if($this->dbcon && is_array($grps)) {
- $sql = str_replace('%{user}', addslashes($user),$this->cnf['addUser']);
- $sql = str_replace('%{pass}', addslashes($pwd),$sql);
- $sql = str_replace('%{name}', addslashes($name),$sql);
- $sql = str_replace('%{email}',addslashes($mail),$sql);
- if($this->_modifyDB($sql)){
- $uid = $this->_getUserID($user);
- }else{
- return false;
+ if($this->dbcon && is_array($grps)) {
+ $sql = str_replace('%{user}', addslashes($user),$this->cnf['addUser']);
+ $sql = str_replace('%{pass}', addslashes($pwd),$sql);
+ $sql = str_replace('%{name}', addslashes($name),$sql);
+ $sql = str_replace('%{email}',addslashes($mail),$sql);
+ if($this->_modifyDB($sql)){
+ $uid = $this->_getUserID($user);
+ }else{
+ return false;
+ }
+
+ if ($uid) {
+ foreach($grps as $group) {
+ $gid = $this->_addUserToGroup($user, $group, 1);
+ if ($gid === false) break;
+ }
+
+ if ($gid) return true;
+ else {
+ /* remove the new user and all group relations if a group can't
+ * be assigned. Newly created groups will remain in the database
+ * and won't be removed. This might create orphaned groups but
+ * is not a big issue so we ignore this problem here.
+ */
+ $this->_delUser($user);
+ if ($this->cnf['debug'])
+ msg("PgSQL err: Adding user '$user' to group '$group' failed.",-1,__LINE__,__FILE__);
+ }
+ }
}
-
- if ($uid) {
- foreach($grps as $group) {
- $gid = $this->_addUserToGroup($user, $group, 1);
- if ($gid === false) break;
- }
-
- if ($gid) return true;
- else {
- /* remove the new user and all group relations if a group can't
- * be assigned. Newly created groups will remain in the database
- * and won't be removed. This might create orphaned groups but
- * is not a big issue so we ignore this problem here.
- */
- $this->_delUser($user);
- if ($this->cnf['debug'])
- msg("PgSQL err: Adding user '$user' to group '$group' failed.",-1,__LINE__,__FILE__);
- }
- }
- }
- return false;
+ return false;
}
// @inherit function _delUser($user)
@@ -282,24 +291,24 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _openDB() {
- if (!$this->dbcon) {
- $dsn = $this->cnf['server'] ? 'host='.$this->cnf['server'] : '';
- $dsn .= ' port='.$this->cnf['port'];
- $dsn .= ' dbname='.$this->cnf['database'];
- $dsn .= ' user='.$this->cnf['user'];
- $dsn .= ' password='.$this->cnf['password'];
-
- $con = @pg_connect($dsn);
- if ($con) {
- $this->dbcon = $con;
- return true; // connection and database successfully opened
- } else if ($this->cnf['debug']){
- msg ("PgSQL err: Connection to {$this->cnf['user']}@{$this->cnf['server']} not possible.",
- -1,__LINE__,__FILE__);
+ if (!$this->dbcon) {
+ $dsn = $this->cnf['server'] ? 'host='.$this->cnf['server'] : '';
+ $dsn .= ' port='.$this->cnf['port'];
+ $dsn .= ' dbname='.$this->cnf['database'];
+ $dsn .= ' user='.$this->cnf['user'];
+ $dsn .= ' password='.$this->cnf['password'];
+
+ $con = @pg_connect($dsn);
+ if ($con) {
+ $this->dbcon = $con;
+ return true; // connection and database successfully opened
+ } else if ($this->cnf['debug']){
+ msg ("PgSQL err: Connection to {$this->cnf['user']}@{$this->cnf['server']} not possible.",
+ -1,__LINE__,__FILE__);
+ }
+ return false; // connection failed
}
- return false; // connection failed
- }
- return true; // connection already open
+ return true; // connection already open
}
/**
@@ -308,10 +317,10 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _closeDB() {
- if ($this->dbcon) {
- pg_close ($this->dbcon);
- $this->dbcon = 0;
- }
+ if ($this->dbcon) {
+ pg_close ($this->dbcon);
+ $this->dbcon = 0;
+ }
}
/**
@@ -327,17 +336,17 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _queryDB($query) {
- if ($this->dbcon) {
- $result = @pg_query($this->dbcon,$query);
- if ($result) {
- while (($t = pg_fetch_assoc($result)) !== false)
- $resultarray[]=$t;
- pg_free_result ($result);
- return $resultarray;
- }elseif ($this->cnf['debug'])
- msg('PgSQL err: '.pg_last_error($this->dbcon),-1,__LINE__,__FILE__);
- }
- return false;
+ if ($this->dbcon) {
+ $result = @pg_query($this->dbcon,$query);
+ if ($result) {
+ while (($t = pg_fetch_assoc($result)) !== false)
+ $resultarray[]=$t;
+ pg_free_result ($result);
+ return $resultarray;
+ }elseif ($this->cnf['debug'])
+ msg('PgSQL err: '.pg_last_error($this->dbcon),-1,__LINE__,__FILE__);
+ }
+ return false;
}
/**
@@ -347,17 +356,17 @@ class auth_pgsql extends auth_mysql {
* @author Andreas Gohr
*/
function _modifyDB($query) {
- if ($this->dbcon) {
- $result = @pg_query($this->dbcon,$query);
- if ($result) {
- pg_free_result ($result);
- return true;
- }
- if ($this->cnf['debug']){
- msg('PgSQL err: '.pg_last_error($this->dbcon),-1,__LINE__,__FILE__);
+ if ($this->dbcon) {
+ $result = @pg_query($this->dbcon,$query);
+ if ($result) {
+ pg_free_result ($result);
+ return true;
+ }
+ if ($this->cnf['debug']){
+ msg('PgSQL err: '.pg_last_error($this->dbcon),-1,__LINE__,__FILE__);
+ }
}
- }
- return false;
+ return false;
}
/**
@@ -367,11 +376,11 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _lockTables($mode) {
- if ($this->dbcon) {
- $this->_modifyDB('BEGIN');
- return true;
- }
- return false;
+ if ($this->dbcon) {
+ $this->_modifyDB('BEGIN');
+ return true;
+ }
+ return false;
}
/**
@@ -380,11 +389,11 @@ class auth_pgsql extends auth_mysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
function _unlockTables() {
- if ($this->dbcon) {
- $this->_modifyDB('COMMIT');
- return true;
- }
- return false;
+ if ($this->dbcon) {
+ $this->_modifyDB('COMMIT');
+ return true;
+ }
+ return false;
}
// @inherit function _createSQLFilter($sql, $filter)
@@ -398,11 +407,11 @@ class auth_pgsql extends auth_mysql {
* @param boolean $like Escape wildcard chars as well?
*/
function _escape($string,$like=false){
- $string = pg_escape_string($string);
- if($like){
- $string = addcslashes($string,'%_');
- }
- return $string;
+ $string = pg_escape_string($string);
+ if($like){
+ $string = addcslashes($string,'%_');
+ }
+ return $string;
}
}
diff --git a/inc/auth/plain.class.php b/inc/auth/plain.class.php
index 3941190e9..e682d2522 100644
--- a/inc/auth/plain.class.php
+++ b/inc/auth/plain.class.php
@@ -20,24 +20,24 @@ class auth_plain extends auth_basic {
*
* @author Christopher Smith <chris@jalakai.co.uk>
*/
- function auth_plain() {
- global $config_cascade;
-
- if (!@is_readable($config_cascade['plainauth.users']['default'])){
- $this->success = false;
- }else{
- if(@is_writable($config_cascade['plainauth.users']['default'])){
- $this->cando['addUser'] = true;
- $this->cando['delUser'] = true;
- $this->cando['modLogin'] = true;
- $this->cando['modPass'] = true;
- $this->cando['modName'] = true;
- $this->cando['modMail'] = true;
- $this->cando['modGroups'] = true;
+ function __construct() {
+ global $config_cascade;
+
+ if (!@is_readable($config_cascade['plainauth.users']['default'])){
+ $this->success = false;
+ }else{
+ if(@is_writable($config_cascade['plainauth.users']['default'])){
+ $this->cando['addUser'] = true;
+ $this->cando['delUser'] = true;
+ $this->cando['modLogin'] = true;
+ $this->cando['modPass'] = true;
+ $this->cando['modName'] = true;
+ $this->cando['modMail'] = true;
+ $this->cando['modGroups'] = true;
+ }
+ $this->cando['getUsers'] = true;
+ $this->cando['getUserCount'] = true;
}
- $this->cando['getUsers'] = true;
- $this->cando['getUserCount'] = true;
- }
}
/**
@@ -51,10 +51,10 @@ class auth_plain extends auth_basic {
*/
function checkPass($user,$pass){
- $userinfo = $this->getUserData($user);
- if ($userinfo === false) return false;
+ $userinfo = $this->getUserData($user);
+ if ($userinfo === false) return false;
- return auth_verifyPassword($pass,$this->users[$user]['pass']);
+ return auth_verifyPassword($pass,$this->users[$user]['pass']);
}
/**
@@ -71,8 +71,8 @@ class auth_plain extends auth_basic {
*/
function getUserData($user){
- if($this->users === null) $this->_loadUserData();
- return isset($this->users[$user]) ? $this->users[$user] : false;
+ if($this->users === null) $this->_loadUserData();
+ return isset($this->users[$user]) ? $this->users[$user] : false;
}
/**
@@ -88,29 +88,29 @@ class auth_plain extends auth_basic {
* @author Chris Smith <chris@jalakai.co.uk>
*/
function createUser($user,$pwd,$name,$mail,$grps=null){
- global $conf;
- global $config_cascade;
+ global $conf;
+ global $config_cascade;
- // user mustn't already exist
- if ($this->getUserData($user) !== false) return false;
+ // user mustn't already exist
+ if ($this->getUserData($user) !== false) return false;
- $pass = auth_cryptPassword($pwd);
+ $pass = auth_cryptPassword($pwd);
- // set default group if no groups specified
- if (!is_array($grps)) $grps = array($conf['defaultgroup']);
+ // set default group if no groups specified
+ if (!is_array($grps)) $grps = array($conf['defaultgroup']);
- // prepare user line
- $groups = join(',',$grps);
- $userline = join(':',array($user,$pass,$name,$mail,$groups))."\n";
+ // prepare user line
+ $groups = join(',',$grps);
+ $userline = join(':',array($user,$pass,$name,$mail,$groups))."\n";
- if (io_saveFile($config_cascade['plainauth.users']['default'],$userline,true)) {
- $this->users[$user] = compact('pass','name','mail','grps');
- return $pwd;
- }
+ if (io_saveFile($config_cascade['plainauth.users']['default'],$userline,true)) {
+ $this->users[$user] = compact('pass','name','mail','grps');
+ return $pwd;
+ }
- msg('The '.$config_cascade['plainauth.users']['default'].
- ' file is not writable. Please inform the Wiki-Admin',-1);
- return null;
+ msg('The '.$config_cascade['plainauth.users']['default'].
+ ' file is not writable. Please inform the Wiki-Admin',-1);
+ return null;
}
/**
@@ -122,78 +122,78 @@ class auth_plain extends auth_basic {
* @return bool
*/
function modifyUser($user, $changes) {
- global $conf;
- global $ACT;
- global $INFO;
- global $config_cascade;
-
- // sanity checks, user must already exist and there must be something to change
- if (($userinfo = $this->getUserData($user)) === false) return false;
- if (!is_array($changes) || !count($changes)) return true;
-
- // update userinfo with new data, remembering to encrypt any password
- $newuser = $user;
- foreach ($changes as $field => $value) {
- if ($field == 'user') {
- $newuser = $value;
- continue;
+ global $conf;
+ global $ACT;
+ global $INFO;
+ global $config_cascade;
+
+ // sanity checks, user must already exist and there must be something to change
+ if (($userinfo = $this->getUserData($user)) === false) return false;
+ if (!is_array($changes) || !count($changes)) return true;
+
+ // update userinfo with new data, remembering to encrypt any password
+ $newuser = $user;
+ foreach ($changes as $field => $value) {
+ if ($field == 'user') {
+ $newuser = $value;
+ continue;
+ }
+ if ($field == 'pass') $value = auth_cryptPassword($value);
+ $userinfo[$field] = $value;
+ }
+
+ $groups = join(',',$userinfo['grps']);
+ $userline = join(':',array($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $groups))."\n";
+
+ if (!$this->deleteUsers(array($user))) {
+ msg('Unable to modify user data. Please inform the Wiki-Admin',-1);
+ return false;
+ }
+
+ if (!io_saveFile($config_cascade['plainauth.users']['default'],$userline,true)) {
+ msg('There was an error modifying your user data. You should register again.',-1);
+ // FIXME, user has been deleted but not recreated, should force a logout and redirect to login page
+ $ACT == 'register';
+ return false;
}
- if ($field == 'pass') $value = auth_cryptPassword($value);
- $userinfo[$field] = $value;
- }
-
- $groups = join(',',$userinfo['grps']);
- $userline = join(':',array($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $groups))."\n";
-
- if (!$this->deleteUsers(array($user))) {
- msg('Unable to modify user data. Please inform the Wiki-Admin',-1);
- return false;
- }
-
- if (!io_saveFile($config_cascade['plainauth.users']['default'],$userline,true)) {
- msg('There was an error modifying your user data. You should register again.',-1);
- // FIXME, user has been deleted but not recreated, should force a logout and redirect to login page
- $ACT == 'register';
- return false;
- }
-
- $this->users[$newuser] = $userinfo;
- return true;
+
+ $this->users[$newuser] = $userinfo;
+ return true;
}
/**
- * Remove one or more users from the list of registered users
+ * Remove one or more users from the list of registered users
*
- * @author Christopher Smith <chris@jalakai.co.uk>
- * @param array $users array of users to be deleted
- * @return int the number of users deleted
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @param array $users array of users to be deleted
+ * @return int the number of users deleted
*/
function deleteUsers($users) {
- global $config_cascade;
+ global $config_cascade;
- if (!is_array($users) || empty($users)) return 0;
+ if (!is_array($users) || empty($users)) return 0;
- if ($this->users === null) $this->_loadUserData();
+ if ($this->users === null) $this->_loadUserData();
- $deleted = array();
- foreach ($users as $user) {
- if (isset($this->users[$user])) $deleted[] = preg_quote($user,'/');
- }
+ $deleted = array();
+ foreach ($users as $user) {
+ if (isset($this->users[$user])) $deleted[] = preg_quote($user,'/');
+ }
- if (empty($deleted)) return 0;
+ if (empty($deleted)) return 0;
- $pattern = '/^('.join('|',$deleted).'):/';
+ $pattern = '/^('.join('|',$deleted).'):/';
- if (io_deleteFromFile($config_cascade['plainauth.users']['default'],$pattern,true)) {
- foreach ($deleted as $user) unset($this->users[$user]);
- return count($deleted);
- }
+ if (io_deleteFromFile($config_cascade['plainauth.users']['default'],$pattern,true)) {
+ foreach ($deleted as $user) unset($this->users[$user]);
+ return count($deleted);
+ }
- // problem deleting, reload the user list and count the difference
- $count = count($this->users);
- $this->_loadUserData();
- $count -= count($this->users);
- return $count;
+ // problem deleting, reload the user list and count the difference
+ $count = count($this->users);
+ $this->_loadUserData();
+ $count -= count($this->users);
+ return $count;
}
/**
@@ -203,18 +203,18 @@ class auth_plain extends auth_basic {
*/
function getUserCount($filter=array()) {
- if($this->users === null) $this->_loadUserData();
+ if($this->users === null) $this->_loadUserData();
- if (!count($filter)) return count($this->users);
+ if (!count($filter)) return count($this->users);
- $count = 0;
- $this->_constructPattern($filter);
+ $count = 0;
+ $this->_constructPattern($filter);
- foreach ($this->users as $user => $info) {
- $count += $this->_filter($user, $info);
- }
+ foreach ($this->users as $user => $info) {
+ $count += $this->_filter($user, $info);
+ }
- return $count;
+ return $count;
}
/**
@@ -228,27 +228,27 @@ class auth_plain extends auth_basic {
*/
function retrieveUsers($start=0,$limit=0,$filter=array()) {
- if ($this->users === null) $this->_loadUserData();
+ if ($this->users === null) $this->_loadUserData();
- ksort($this->users);
+ ksort($this->users);
- $i = 0;
- $count = 0;
- $out = array();
- $this->_constructPattern($filter);
+ $i = 0;
+ $count = 0;
+ $out = array();
+ $this->_constructPattern($filter);
- foreach ($this->users as $user => $info) {
- if ($this->_filter($user, $info)) {
- if ($i >= $start) {
- $out[$user] = $info;
- $count++;
- if (($limit > 0) && ($count >= $limit)) break;
- }
- $i++;
+ foreach ($this->users as $user => $info) {
+ if ($this->_filter($user, $info)) {
+ if ($i >= $start) {
+ $out[$user] = $info;
+ $count++;
+ if (($limit > 0) && ($count >= $limit)) break;
+ }
+ $i++;
+ }
}
- }
- return $out;
+ return $out;
}
/**
@@ -275,26 +275,26 @@ class auth_plain extends auth_basic {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function _loadUserData(){
- global $config_cascade;
+ global $config_cascade;
- $this->users = array();
+ $this->users = array();
- if(!@file_exists($config_cascade['plainauth.users']['default'])) return;
+ if(!@file_exists($config_cascade['plainauth.users']['default'])) return;
- $lines = file($config_cascade['plainauth.users']['default']);
- foreach($lines as $line){
- $line = preg_replace('/#.*$/','',$line); //ignore comments
- $line = trim($line);
- if(empty($line)) continue;
+ $lines = file($config_cascade['plainauth.users']['default']);
+ foreach($lines as $line){
+ $line = preg_replace('/#.*$/','',$line); //ignore comments
+ $line = trim($line);
+ if(empty($line)) continue;
- $row = explode(":",$line,5);
- $groups = array_values(array_filter(explode(",",$row[4])));
+ $row = explode(":",$line,5);
+ $groups = array_values(array_filter(explode(",",$row[4])));
- $this->users[$row[0]]['pass'] = $row[1];
- $this->users[$row[0]]['name'] = urldecode($row[2]);
- $this->users[$row[0]]['mail'] = $row[3];
- $this->users[$row[0]]['grps'] = $groups;
- }
+ $this->users[$row[0]]['pass'] = $row[1];
+ $this->users[$row[0]]['name'] = urldecode($row[2]);
+ $this->users[$row[0]]['mail'] = $row[3];
+ $this->users[$row[0]]['grps'] = $groups;
+ }
}
/**
@@ -317,11 +317,11 @@ class auth_plain extends auth_basic {
}
function _constructPattern($filter) {
- $this->_pattern = array();
- foreach ($filter as $item => $pattern) {
-// $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters
- $this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters
- }
+ $this->_pattern = array();
+ foreach ($filter as $item => $pattern) {
+ // $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters
+ $this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters
+ }
}
}
diff --git a/inc/changelog.php b/inc/changelog.php
index 60f9b8657..24583b341 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -188,7 +188,7 @@ function getRecents($first,$num,$ns='',$flags=0){
// handle lines
while ($lines_position >= 0 || (($flags & RECENTS_MEDIA_PAGES_MIXED) && $media_lines_position >=0)) {
if (empty($rec) && $lines_position >= 0) {
- $rec = _handleRecent(@$lines[$lines_position], $ns, $flags & ~RECENTS_MEDIA_CHANGES, $seen);
+ $rec = _handleRecent(@$lines[$lines_position], $ns, $flags, $seen);
if (!$rec) {
$lines_position --;
continue;
@@ -197,8 +197,8 @@ function getRecents($first,$num,$ns='',$flags=0){
if (($flags & RECENTS_MEDIA_PAGES_MIXED) && empty($media_rec) && $media_lines_position >= 0) {
$media_rec = _handleRecent(@$media_lines[$media_lines_position], $ns, $flags | RECENTS_MEDIA_CHANGES, $seen);
if (!$media_rec) {
- $media_lines_position --;
- continue;
+ $media_lines_position --;
+ continue;
}
}
if (($flags & RECENTS_MEDIA_PAGES_MIXED) && @$media_rec['date'] >= @$rec['date']) {
@@ -320,8 +320,10 @@ function _handleRecent($line,$ns,$flags,&$seen){
if ($recent['perms'] < AUTH_READ) return false;
// check existance
- $fn = (($flags & RECENTS_MEDIA_CHANGES) ? mediaFN($recent['id']) : wikiFN($recent['id']));
- if((!@file_exists($fn)) && ($flags & RECENTS_SKIP_DELETED)) return false;
+ if($flags & RECENTS_SKIP_DELETED){
+ $fn = (($flags & RECENTS_MEDIA_CHANGES) ? mediaFN($recent['id']) : wikiFN($recent['id']));
+ if(!@file_exists($fn)) return false;
+ }
return $recent;
}
diff --git a/inc/cliopts.php b/inc/cliopts.php
index 588f0bc6d..9cea686a2 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -6,7 +6,7 @@
*
* Copyright (c) 1997-2004 The PHP Group
*
- * LICENSE: This source file is subject to the New BSD license that is
+ * LICENSE: This source file is subject to the New BSD license that is
* available through the world-wide-web at the following URI:
* http://www.opensource.org/licenses/bsd-license.php. If you did not receive
* a copy of the New BSD License and are unable to obtain it through the web,
@@ -297,9 +297,8 @@ class Doku_Cli_Opts {
* @access private
* @return bool
*/
- function _isShortOpt($arg)
- {
- return strlen($arg) == 2 && $arg[0] == '-'
+ function _isShortOpt($arg){
+ return strlen($arg) == 2 && $arg[0] == '-'
&& preg_match('/[a-zA-Z]/', $arg[1]);
}
@@ -311,8 +310,7 @@ class Doku_Cli_Opts {
* @access private
* @return bool
*/
- function _isLongOpt($arg)
- {
+ function _isLongOpt($arg){
return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' &&
preg_match('/[a-zA-Z]+$/', substr($arg, 2));
}
diff --git a/inc/common.php b/inc/common.php
index 0c769c50d..0a75f2eab 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1290,14 +1290,14 @@ function dformat($dt=null,$format=''){
*
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
+ * @param int $int_date: current date in UNIX timestamp
*/
function date_iso8601($int_date) {
- //$int_date: current date in UNIX timestamp
- $date_mod = date('Y-m-d\TH:i:s', $int_date);
- $pre_timezone = date('O', $int_date);
- $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
- $date_mod .= $time_zone;
- return $date_mod;
+ $date_mod = date('Y-m-d\TH:i:s', $int_date);
+ $pre_timezone = date('O', $int_date);
+ $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
+ $date_mod .= $time_zone;
+ return $date_mod;
}
/**
@@ -1558,10 +1558,14 @@ function valid_input_set($param, $valid_values, $array, $exc = '') {
}
}
+/**
+ * Read a preference from the DokuWiki cookie
+ */
function get_doku_pref($pref, $default) {
if (strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) {
$parts = explode('#', $_COOKIE['DOKU_PREFS']);
- for ($i = 0; $i < count($parts); $i+=2){
+ $cnt = count($parts);
+ for ($i = 0; $i < $cnt; $i+=2){
if ($parts[$i] == $pref) {
return $parts[$i+1];
}
diff --git a/inc/config_cascade.php b/inc/config_cascade.php
index 443114f52..79567fc56 100644
--- a/inc/config_cascade.php
+++ b/inc/config_cascade.php
@@ -64,7 +64,7 @@ $config_cascade = array_merge(
'plainauth.users' => array(
'default' => DOKU_CONF.'users.auth.php',
),
-
+
'plugins' => array(
'local' => array(DOKU_CONF.'plugins.local.php'),
'protected' => array(
diff --git a/inc/html.php b/inc/html.php
index ece26d136..b233e1d92 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1141,8 +1141,6 @@ function html_diff($text='',$intro=true,$type=null){
$tdf = new TableDiffFormatter();
}
-
-
if($intro) print p_locale_xhtml('diff');
if (!$text) {
@@ -1165,7 +1163,6 @@ function html_diff($text='',$intro=true,$type=null){
$form->addElement(form_makeButton('submit', 'diff','Go'));
$form->printForm();
-
$diffurl = wl($ID, array(
'do' => 'diff',
'rev2[0]' => $l_rev,
@@ -1663,26 +1660,46 @@ function html_admin(){
* Form to request a new password for an existing account
*
* @author Benoit Chesneau <benoit@bchesneau.info>
+ * @author Andreas Gohr <gohr@cosmocode.de>
*/
function html_resendpwd() {
global $lang;
global $conf;
global $ID;
- print p_locale_xhtml('resendpwd');
- print '<div class="centeralign">'.NL;
- $form = new Doku_Form(array('id' => 'dw__resendpwd'));
- $form->startFieldset($lang['resendpwd']);
- $form->addHidden('do', 'resendpwd');
- $form->addHidden('save', '1');
- $form->addElement(form_makeTag('br'));
- $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block'));
- $form->addElement(form_makeTag('br'));
- $form->addElement(form_makeTag('br'));
- $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
- $form->endFieldset();
- html_form('resendpwd', $form);
- print '</div>'.NL;
+ $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']);
+
+ if(!$conf['autopasswd'] && $token){
+ print p_locale_xhtml('resetpwd');
+ print '<div class="centeralign">'.NL;
+ $form = new Doku_Form(array('id' => 'dw__resendpwd'));
+ $form->startFieldset($lang['btn_resendpwd']);
+ $form->addHidden('token', $token);
+ $form->addHidden('do', 'resendpwd');
+
+ $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50')));
+ $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50')));
+
+ $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
+ $form->endFieldset();
+ html_form('resendpwd', $form);
+ print '</div>'.NL;
+ }else{
+ print p_locale_xhtml('resendpwd');
+ print '<div class="centeralign">'.NL;
+ $form = new Doku_Form(array('id' => 'dw__resendpwd'));
+ $form->startFieldset($lang['resendpwd']);
+ $form->addHidden('do', 'resendpwd');
+ $form->addHidden('save', '1');
+ $form->addElement(form_makeTag('br'));
+ $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block'));
+ $form->addElement(form_makeTag('br'));
+ $form->addElement(form_makeTag('br'));
+ $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
+ $form->endFieldset();
+ html_form('resendpwd', $form);
+ print '</div>'.NL;
+ }
}
/**
diff --git a/inc/httputils.php b/inc/httputils.php
index 0ad97a9a1..b815f3ca6 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -249,3 +249,11 @@ function http_cached_finish($file, $content) {
print $content;
}
}
+
+function http_get_raw_post_data() {
+ static $postData = null;
+ if ($postData === null) {
+ $postData = file_get_contents('php://input');
+ }
+ return $postData;
+}
diff --git a/inc/indexer.php b/inc/indexer.php
index 9d8d6f99b..80d2651c2 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -291,7 +291,6 @@ class Doku_Indexer {
$val_idx = array();
}
-
foreach ($values as $val) {
$val = (string)$val;
if ($val !== "") {
@@ -351,7 +350,7 @@ class Doku_Indexer {
return "locked";
// load known documents
- $pid = $this->getIndexKey('page', '', $page);
+ $pid = $this->addIndexKey('page', '', $page);
if ($pid === false) {
$this->unlock();
return false;
@@ -389,6 +388,7 @@ class Doku_Indexer {
$val_idx = explode(':', $this->getIndexKey($metaname.'_p', '', $pid));
$meta_idx = $this->getIndex($metaname.'_i', '');
foreach ($val_idx as $id) {
+ if ($id === '') continue;
$meta_idx[$id] = $this->updateTuple($meta_idx[$id], $pid, 0);
}
$this->saveIndex($metaname.'_i', '', $meta_idx);
@@ -1174,18 +1174,8 @@ function & idx_get_stopwords() {
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_addPage($page, $verbose=false, $force=false) {
- // check if indexing needed
$idxtag = metaFN($page,'.indexed');
- if(!$force && @file_exists($idxtag)){
- if(trim(io_readFile($idxtag)) == idx_get_version()){
- $last = @filemtime($idxtag);
- if($last > @filemtime(wikiFN($page))){
- if ($verbose) print("Indexer: index for $page up to date".DOKU_LF);
- return false;
- }
- }
- }
-
+ // check if page was deleted but is still in the index
if (!page_exists($page)) {
if (!@file_exists($idxtag)) {
if ($verbose) print("Indexer: $page does not exist, ignoring".DOKU_LF);
@@ -1200,6 +1190,18 @@ function idx_addPage($page, $verbose=false, $force=false) {
@unlink($idxtag);
return $result;
}
+
+ // check if indexing needed
+ if(!$force && @file_exists($idxtag)){
+ if(trim(io_readFile($idxtag)) == idx_get_version()){
+ $last = @filemtime($idxtag);
+ if($last > @filemtime(wikiFN($page))){
+ if ($verbose) print("Indexer: index for $page up to date".DOKU_LF);
+ return false;
+ }
+ }
+ }
+
$indexenabled = p_get_metadata($page, 'internal index', METADATA_RENDER_UNLIMITED);
if ($indexenabled === false) {
$result = false;
diff --git a/inc/init.php b/inc/init.php
index 3aab0587b..d57e12d7b 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -69,16 +69,6 @@ foreach (array('default','local','protected') as $config_group) {
}
}
-//prepare language array
-global $lang;
-$lang = array();
-
-//load the language files
-require_once(DOKU_INC.'inc/lang/en/lang.php');
-if ( $conf['lang'] && $conf['lang'] != 'en' ) {
- require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
-}
-
//prepare license array()
global $license;
$license = array();
@@ -200,7 +190,7 @@ init_paths();
init_files();
// setup plugin controller class (can be overwritten in preload.php)
-$plugin_types = array('admin','syntax','action','renderer', 'helper');
+$plugin_types = array('admin','syntax','action','renderer', 'helper','remote');
global $plugin_controller_class, $plugin_controller;
if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Controller';
@@ -214,6 +204,10 @@ $plugin_controller = new $plugin_controller_class();
global $EVENT_HANDLER;
$EVENT_HANDLER = new Doku_Event_Handler();
+$local = $conf['lang'];
+trigger_event('INIT_LANG_LOAD', $local, 'init_lang', true);
+
+
// setup authentication system
if (!defined('NOSESSION')) {
auth_setup();
@@ -256,6 +250,20 @@ function init_paths(){
$conf['media_changelog'] = $conf['metadir'].'/_media.changes';
}
+function init_lang($langCode) {
+ //prepare language array
+ global $lang;
+ $lang = array();
+
+ //load the language files
+ require_once(DOKU_INC.'inc/lang/en/lang.php');
+ if ($langCode && $langCode != 'en') {
+ if (file_exists(DOKU_INC."inc/lang/$langCode/lang.php")) {
+ require_once(DOKU_INC."inc/lang/$langCode/lang.php");
+ }
+ }
+}
+
/**
* Checks the existance of certain files and creates them if missing.
*/
diff --git a/inc/io.php b/inc/io.php
index 034ac650e..c76d2f44c 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -63,7 +63,7 @@ function io_sweepNS($id,$basedir='datadir'){
*/
function io_readWikiPage($file, $id, $rev=false) {
if (empty($rev)) { $rev = false; }
- $data = array(array($file, false), getNS($id), noNS($id), $rev);
+ $data = array(array($file, true), getNS($id), noNS($id), $rev);
return trigger_event('IO_WIKIPAGE_READ', $data, '_io_readWikiPage_action', false);
}
diff --git a/inc/lang/af/lang.php b/inc/lang/af/lang.php
index 16e9a2822..6de891a63 100644
--- a/inc/lang/af/lang.php
+++ b/inc/lang/af/lang.php
@@ -25,7 +25,6 @@ $lang['btn_back'] = 'Terug';
$lang['btn_backlink'] = 'Wat skakel hierheen';
$lang['btn_subscribe'] = 'Hou bladsy dop';
$lang['btn_unsubscribe'] = 'Verwyder van bladsy dophoulys';
-$lang['btn_resendpwd'] = 'E-pos nuwe wagwoord';
$lang['btn_register'] = 'Skep gerus \'n rekening';
$lang['loggedinas'] = 'Ingeteken as';
$lang['user'] = 'Gebruikernaam';
@@ -43,7 +42,6 @@ $lang['regsuccess2'] = 'Rekening geskep';
$lang['regbadpass'] = 'Die ingetikte wagwoorde is nie dieselfde nie.';
$lang['regpwmail'] = 'Jo DokuWiki wagwoord';
$lang['profnoempty'] = 'Jy moet \'n name en a e-posadres in sit';
-$lang['resendpwd'] = 'Stuir vir a niwe wagwoord';
$lang['resendpwdmissing'] = 'Jammer, jy moet ales in fil';
$lang['resendpwdconfirm'] = '\'n Bevestigingpos is gestuur na die gekose e-posadres.';
$lang['resendpwdsuccess'] = 'Jou nuive wagwoord was deur e-pos gesteur';
diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php
index 11c111505..af92243c9 100644
--- a/inc/lang/ar/lang.php
+++ b/inc/lang/ar/lang.php
@@ -42,7 +42,6 @@ $lang['btn_backtomedia'] = 'ارجع إلى اختيار ملف الوسا
$lang['btn_subscribe'] = 'ادر الاشتراكات';
$lang['btn_profile'] = 'حدث الملف الشخصي';
$lang['btn_reset'] = 'صفّر';
-$lang['btn_resendpwd'] = 'ارسل كلمة سر جديدة';
$lang['btn_draft'] = 'حرر المسودة';
$lang['btn_recover'] = 'استرجع المسودة';
$lang['btn_draftdel'] = 'احذف المسوّدة';
@@ -77,7 +76,6 @@ $lang['profnoempty'] = 'غير مسموح باسم مستخدم أو
$lang['profchanged'] = 'حُدث الملف الشخصي للمستخدم بنجاح.';
$lang['pwdforget'] = 'أنسيت كلمة السر؟ احصل على واحدة جديدة';
$lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.';
-$lang['resendpwd'] = 'إرسال كلمة مرور';
$lang['resendpwdmissing'] = 'عذراّ، يجب أن تملأ كل الحقول.';
$lang['resendpwdnouser'] = 'عذراً، لم نجد المستخدم هذا في قاعدة بياناتنا.';
$lang['resendpwdbadauth'] = 'عذراً، رمز التفعيل هذا غير صحيح. نأكد من استخدامك كامل وصلة التأكيد.';
diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php
index 25b44efdc..fff6f34b7 100644
--- a/inc/lang/az/lang.php
+++ b/inc/lang/az/lang.php
@@ -40,7 +40,6 @@ $lang['btn_subscribe'] = 'Abunə ol (bütün dəyişiklər)';
$lang['btn_unsubscribe'] = 'Abunəlikdən çıx (bütün dəyişiklər)';
$lang['btn_profile'] = 'Profil';
$lang['btn_reset'] = 'Boşalt';
-$lang['btn_resendpwd'] = 'Yeni şifrəni göndər';
$lang['btn_draft'] = 'Qaralamada düzəliş etmək';
$lang['btn_recover'] = 'Qaralamanı qaytar';
$lang['btn_draftdel'] = 'Qaralamanı sil';
@@ -75,7 +74,6 @@ $lang['profnoempty'] = 'istifadəci adı və e-mail ünvanı boş ola
$lang['profchanged'] = 'İstifadəçi profili uğurla yeniləndi.';
$lang['pwdforget'] = 'Şifrəni yaddan çıxartmısız? Buyurun yenisini əldə edin';
$lang['resendna'] = 'Bu wiki şifrəni yenidən göndərməyi dəstəkləmir.';
-$lang['resendpwd'] = 'Yeni şifrəni göndər:';
$lang['resendpwdmissing'] = 'Formanın bütün xanəlırini doldurun.';
$lang['resendpwdnouser'] = 'Verilənlər bazasında bu ad ilə istifadəçi tapılmadı.';
$lang['resendpwdbadauth'] = 'Ativləşdirmə kodu səhvdir. Link-i tam olaraq köçürdüyünüzü yoxlayın. ';
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index b21fed9af..7a246024d 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -9,11 +9,12 @@
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '“';
-$lang['doublequoteclosing'] = '”';
-$lang['singlequoteopening'] = '‘';
-$lang['singlequoteclosing'] = '’';
-$lang['apostrophe'] = '’';
+$lang['doublequoteopening'] = '“'; //&ldquo;
+$lang['doublequoteclosing'] = '”'; //&rdquo;
+$lang['singlequoteopening'] = '‘'; //&lsquo;
+$lang['singlequoteclosing'] = '’'; //&rsquo;
+$lang['apostrophe'] = '’'; //&rsquo;
+
$lang['btn_edit'] = 'Редактиране';
$lang['btn_source'] = 'Преглед на кода';
$lang['btn_show'] = 'Преглед на страницата';
@@ -41,14 +42,15 @@ $lang['btn_backtomedia'] = 'Назад към избора на файл';
$lang['btn_subscribe'] = 'Абонаменти';
$lang['btn_profile'] = 'Профил';
$lang['btn_reset'] = 'Изчистване';
-$lang['btn_resendpwd'] = 'Пращане на нова парола';
-$lang['btn_draft'] = 'Редактиране на чернова';
-$lang['btn_recover'] = 'Възстановяване на чернова';
-$lang['btn_draftdel'] = 'Изтриване на чернова';
+$lang['btn_resendpwd'] = 'Задаване на нова парола';
+$lang['btn_draft'] = 'Редактиране на черновата';
+$lang['btn_recover'] = 'Възстановяване на черновата';
+$lang['btn_draftdel'] = 'Изтриване на черновата';
$lang['btn_revert'] = 'Възстановяване';
$lang['btn_register'] = 'Регистриране';
$lang['btn_apply'] = 'Прилагане';
$lang['btn_media'] = 'Диспечер на файлове';
+
$lang['loggedinas'] = 'Вписани сте като';
$lang['user'] = 'Потребител';
$lang['pass'] = 'Парола';
@@ -60,9 +62,10 @@ $lang['fullname'] = 'Истинско име';
$lang['email'] = 'Електронна поща';
$lang['profile'] = 'Потребителски профил';
$lang['badlogin'] = 'Грешно потребителско име или парола.';
-$lang['minoredit'] = 'Незначителни промени';
-$lang['draftdate'] = 'Черновата е автоматично записана на';
+$lang['minoredit'] = 'Промените са незначителни';
+$lang['draftdate'] = 'Черновата е автоматично записана на'; // full dformat date will be added
$lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.';
+
$lang['regmissing'] = 'Моля, попълнете всички полета.';
$lang['reguexists'] = 'Вече съществува потребител с избраното име.';
$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.';
@@ -72,20 +75,24 @@ $lang['regbadmail'] = 'Въведеният адрес изглежд
$lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново.';
$lang['regpwmail'] = 'Паролата ви за DokuWiki';
$lang['reghere'] = 'Все още нямате профил? Направете си';
+
$lang['profna'] = 'Wiki-то не поддържа промяна на профила';
$lang['profnochange'] = 'Няма промени.';
$lang['profnoempty'] = 'Въвеждането на име и ел. поща е задължително';
$lang['profchanged'] = 'Потребителският профил е обновен успешно.';
+
$lang['pwdforget'] = 'Забравили сте паролата си? Получете нова';
$lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.';
-$lang['resendpwd'] = 'Изпращане на нова парола за';
+$lang['resendpwd'] = 'Задаване на нова парола за';
$lang['resendpwdmissing'] = 'Моля, попълнете всички полета.';
$lang['resendpwdnouser'] = 'Потребителят не е намерен в базата от данни.';
$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целия линк за потвърждение.';
$lang['resendpwdconfirm'] = 'Линк за потвърждение е пратен по електронната поща.';
$lang['resendpwdsuccess'] = 'Новата ви паролата е пратена по електронната поща.';
+
$lang['license'] = 'Ако не е посочено друго, съдържанието на Wiki-то е лицензирано под следния лиценз:';
-$lang['licenseok'] = 'Бележка: Редактирайки страницата, вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:';
+$lang['licenseok'] = 'Бележка: Редактирайки страницата, Вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:';
+
$lang['searchmedia'] = 'Търсене на файл: ';
$lang['searchmedia_in'] = 'Търсене в %s';
$lang['txt_upload'] = 'Изберете файл за качване';
@@ -93,6 +100,7 @@ $lang['txt_filename'] = 'Качи като (незадължителн
$lang['txt_overwrt'] = 'Презапиши съществуващите файлове';
$lang['lockedby'] = 'В момента е заключена от';
$lang['lockexpire'] = 'Ще бъде отключена на';
+
$lang['js']['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.';
$lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?';
$lang['js']['searchmedia'] = 'Търсене на файлове';
@@ -119,8 +127,7 @@ $lang['js']['medialeft'] = 'Подреди изображението от
$lang['js']['mediaright'] = 'Подреди изображението отдясно.';
$lang['js']['mediacenter'] = 'Подреди изображението по средата.';
$lang['js']['medianoalign'] = 'Без подреждане.';
-$lang['js']['nosmblinks'] = 'Връзките към Windows shares работят само под Internet Explorer.
-Можете да копирате и поставите връзката.';
+$lang['js']['nosmblinks'] = 'Връзките към Windows shares работят само под Internet Explorer.<br />Можете да копирате и поставите връзката.';
$lang['js']['linkwiz'] = 'Помощник за препратки';
$lang['js']['linkto'] = 'Препратка към: ';
$lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?';
@@ -135,8 +142,10 @@ $lang['js']['media_done_btn'] = 'Готово';
$lang['js']['media_drop'] = 'Влачете и пуснете файливе тук, за да бъдат качени';
$lang['js']['media_cancel'] = 'премахване';
$lang['js']['media_overwrt'] = 'Презапиши съществуващите файлове';
+
$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: ';
$lang['nothingfound'] = 'Нищо не е открито.';
+
$lang['mediaselect'] = 'Файлове';
$lang['fileupload'] = 'Качване на файлове';
$lang['uploadsucc'] = 'Качването е успешно';
@@ -161,6 +170,7 @@ $lang['mediaextchange'] = 'Разширението на файла е с
$lang['reference'] = 'Връзки за';
$lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:';
$lang['ref_hidden'] = 'Някои връзки са към страници, които нямате права да четете';
+
$lang['hits'] = 'Съвпадения';
$lang['quickhits'] = 'Съвпадащи имена на страници';
$lang['toc'] = 'Съдържание';
@@ -184,15 +194,23 @@ $lang['external_edit'] = 'външна редакция';
$lang['summary'] = 'Обобщение';
$lang['noflash'] = 'Необходим е <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> за изобразяване на съдържанието.';
$lang['download'] = 'Изтегляне на фрагмент';
+$lang['tools'] = 'Инструменти';
+$lang['user_tools'] = 'Инструменти за потребители';
+$lang['site_tools'] = 'Инструменти за сайта';
+$lang['page_tools'] = 'Инструменти за страници';
+$lang['skip_to_content'] = 'към съдържанието';
+
$lang['mail_newpage'] = 'добавена страница: ';
$lang['mail_changed'] = 'променена страница: ';
$lang['mail_subscribe_list'] = 'променени страници в именно пространство: ';
$lang['mail_new_user'] = 'нов потребител: ';
$lang['mail_upload'] = 'качен файл: ';
+
$lang['changes_type'] = 'Преглед на променените';
$lang['pages_changes'] = 'Страници';
$lang['media_changes'] = 'Файлове';
$lang['both_changes'] = 'Страници и файлове';
+
$lang['qb_bold'] = 'Удебелен текст';
$lang['qb_italic'] = 'Курсив текст';
$lang['qb_underl'] = 'Подчертан текст';
@@ -217,8 +235,11 @@ $lang['qb_media'] = 'Добавяне на изображения
$lang['qb_sig'] = 'Вмъкване на подпис';
$lang['qb_smileys'] = 'Усмивчици';
$lang['qb_chars'] = 'Специални знаци';
+
$lang['upperns'] = 'към майчиното именно пространство';
+
$lang['admin_register'] = 'Добавяне на нов потребител';
+
$lang['metaedit'] = 'Редактиране на метаданни';
$lang['metasaveerr'] = 'Записването на метаданните се провали';
$lang['metasaveok'] = 'Метаданните са запазени успешно';
@@ -236,6 +257,7 @@ $lang['img_keywords'] = 'Ключови думи';
$lang['img_width'] = 'Ширина';
$lang['img_height'] = 'Височина';
$lang['img_manager'] = 'Преглед в диспечера на файлове';
+
$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s';
$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s';
$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.';
@@ -243,6 +265,7 @@ $lang['subscr_unsubscribe_success'] = '%s е премахнат от списъ
$lang['subscr_unsubscribe_error'] = 'Грешка при премахването на %s от списъка с абониралите се за %s';
$lang['subscr_already_subscribed'] = '%s е вече абониран за %s';
$lang['subscr_not_subscribed'] = '%s не е абониран за %s';
+// Manage page for subscriptions
$lang['subscr_m_not_subscribed'] = 'Не сте абониран за текущата страницата или именно пространство.';
$lang['subscr_m_new_header'] = 'Добави абонамент';
$lang['subscr_m_current_header'] = 'Текущи абонаменти';
@@ -252,15 +275,22 @@ $lang['subscr_m_receive'] = 'Получаване';
$lang['subscr_style_every'] = 'на ел. писмо при всяка промяна';
$lang['subscr_style_digest'] = 'на ел. писмо с обобщение на промените във всяка страница (всеки %.2f дни)';
$lang['subscr_style_list'] = 'на списък с променените страници от последното ел. писмо (всеки %.2f дни)';
+
+/* auth.class language support */
$lang['authmodfailed'] = 'Лоша настройки за удостоверяване. Моля, уведомете администратора на Wiki страницата.';
$lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.';
+$lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препорачително е да я смените по-скоро.';
+
+/* installer strings */
$lang['i_chooselang'] = 'Изберете вашия изик';
$lang['i_installer'] = 'Инсталатор на DokuWiki';
$lang['i_wikiname'] = 'Име на Wiki-то';
$lang['i_enableacl'] = 'Ползване на списък за достъп (ACL) [препоръчително]';
$lang['i_superuser'] = 'Супер потребител';
$lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.';
-$lang['i_modified'] = 'Поради мерки за сигурност инсталаторът работи само с нови и непроменени инсталационни файлове. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталиране на Dokuwiki</a>.';
+$lang['i_modified'] = 'Поради мерки за сигурност инсталаторът работи само с нови и непроменени инсталационни файлове.
+ Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталиране на Dokuwiki</a>.';
+
$lang['i_funcna'] = 'PHP функцията <code>%s</code> не е достъпна. Може би е забранена от доставчика на хостинг.';
$lang['i_phpver'] = 'Инсталираната версия <code>%s</code> на PHP е по-стара от необходимата <code>%s</code>. Актуализирайте PHP инсталацията.';
$lang['i_permfail'] = '<code>%s</code> не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!';
@@ -269,13 +299,16 @@ $lang['i_writeerr'] = '<code>%s</code> не можа да бъде с
$lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - непозволена или празна стойност';
$lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към <a href="doku.php">Вашето ново DokuWiki</a>.';
-$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате <a href="doku.php">Вашето ново DokuWiki</a>.';
+
+$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно,
+ за да можете да ползвате <a href="doku.php">Вашето ново DokuWiki</a>.';
$lang['i_policy'] = 'Първоначална политика за достъп';
$lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)';
$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани пишат и качват)';
$lang['i_pol2'] = 'Затворено Wiki (само регистрирани четат, пишат и качват)';
$lang['i_retry'] = 'Повторен опит';
$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието:';
+
$lang['recent_global'] = 'В момента преглеждате промените в именно пространство <b>%s</b>. Може да прегледате и <a href="%s">промените в цялото Wiki</a>.';
$lang['years'] = 'преди %d години';
$lang['months'] = 'преди %d месеца';
@@ -284,7 +317,9 @@ $lang['days'] = 'преди %d дни';
$lang['hours'] = 'преди %d часа';
$lang['minutes'] = 'преди %d минути';
$lang['seconds'] = 'преди %d секунди';
-$lang['wordblock'] = 'Направените от вас промени не са съхранени, защото съдържат забранен текст (SPAM).';
+
+$lang['wordblock'] = 'Направените от Вас промени не са съхранени, защото съдържат забранен текст (SPAM).';
+
$lang['media_uploadtab'] = 'Качване';
$lang['media_searchtab'] = 'Търсене';
$lang['media_file'] = 'Файл';
@@ -308,4 +343,7 @@ $lang['media_perm_read'] = 'За съжаление нямате дост
$lang['media_perm_upload'] = 'За съжаление нямате достатъчно права, за да можете да качите файла.';
$lang['media_update'] = 'Качване на нова версия';
$lang['media_restore'] = 'Възстановяване на тази версия';
+
$lang['plugin_install_err'] = 'Неправилно инсталирана приставка. Моля, преименувайте директорията \'%s\' на \'%s\'.';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/bg/resetpwd.txt b/inc/lang/bg/resetpwd.txt
new file mode 100644
index 000000000..caa4adfdc
--- /dev/null
+++ b/inc/lang/bg/resetpwd.txt
@@ -0,0 +1,4 @@
+====== Задаване на нова парола ======
+
+Моля, въведете нова парола за вашия акаунт в Wiki страницата.
+
diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php
index 6317197ed..e299f6427 100644
--- a/inc/lang/ca-valencia/lang.php
+++ b/inc/lang/ca-valencia/lang.php
@@ -41,7 +41,6 @@ $lang['btn_subscribe'] = 'Subscriure\'s a la pàgina';
$lang['btn_unsubscribe'] = 'Desubscriure\'s de la pàgina';
$lang['btn_profile'] = 'Actualisar perfil';
$lang['btn_reset'] = 'Reiniciar';
-$lang['btn_resendpwd'] = 'Enviar contrasenya nova';
$lang['btn_draft'] = 'Editar borrador';
$lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Borrar borrador';
@@ -76,7 +75,6 @@ $lang['profnoempty'] = 'No es permet deixar el nom o la direcció de c
$lang['profchanged'] = 'Perfil de l\'usuari actualisat.';
$lang['pwdforget'] = '¿Ha oblidat la contrasenya? Demane\'n una nova';
$lang['resendna'] = 'Este wiki no permet reenviar la contrasenya.';
-$lang['resendpwd'] = 'Enviar contrasenya nova per a';
$lang['resendpwdmissing'] = 'Disculpe, pero deu omplir tots els camps.';
$lang['resendpwdnouser'] = 'Disculpe, pero no trobem ad est usuari en la base de senyes.';
$lang['resendpwdbadauth'] = 'Disculpe, pero este còdic d\'autenticació no es vàlit. Verifique que haja utilisat el víncul de confirmació sancer.';
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index 81ef2c7fe..3a1412617 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -41,7 +41,6 @@ $lang['btn_subscribe'] = 'Subscripció a canvis d\'aquesta pàgina';
$lang['btn_unsubscribe'] = 'Cancel·la subscripció a pàgina';
$lang['btn_profile'] = 'Actualització del perfil';
$lang['btn_reset'] = 'Reinicia';
-$lang['btn_resendpwd'] = 'Envia nova contrasenya';
$lang['btn_draft'] = 'Edita esborrany';
$lang['btn_recover'] = 'Recupera esborrany';
$lang['btn_draftdel'] = 'Suprimeix esborrany';
@@ -76,7 +75,6 @@ $lang['profnoempty'] = 'No es pot deixar en blanc el nom o l\'adreça
$lang['profchanged'] = 'El perfil d\'usuari s\'ha actualitzat correctament.';
$lang['pwdforget'] = 'Heu oblidat la contrasenya? Podeu obtenir-ne una de nova.';
$lang['resendna'] = 'Aquest wiki no permet tornar a enviar la contrasenya.';
-$lang['resendpwd'] = 'Enviament d\'una nova contrasenya per a';
$lang['resendpwdmissing'] = 'Heu d\'emplenar tots els camps.';
$lang['resendpwdnouser'] = 'No s\'ha pogut trobar aquest usuari a la base de dades.';
$lang['resendpwdbadauth'] = 'Aquest codi d\'autenticació no és vàlid. Assegureu-vos d\'utilitzar l\'enllaç de confirmació complet.';
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index badd57ac5..608beafd8 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -11,6 +11,7 @@
* @author Lefty <lefty@multihost.cz>
* @author Vojta Beran <xmamut@email.cz>
* @author zbynek.krivka@seznam.cz
+ * @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -46,7 +47,6 @@ $lang['btn_backtomedia'] = 'Zpět do Výběru dokumentu';
$lang['btn_subscribe'] = 'Odebírat emailem změny stránky';
$lang['btn_profile'] = 'Upravit profil';
$lang['btn_reset'] = 'Reset';
-$lang['btn_resendpwd'] = 'Zaslat nové heslo';
$lang['btn_draft'] = 'Upravit koncept';
$lang['btn_recover'] = 'Obnovit koncept';
$lang['btn_draftdel'] = 'Vymazat koncept';
@@ -83,7 +83,6 @@ $lang['profnoempty'] = 'Nelze zadat prázdné jméno nebo mailová adr
$lang['profchanged'] = 'Uživatelský profil změněn.';
$lang['pwdforget'] = 'Zapomněli jste heslo? Nechte si zaslat nové';
$lang['resendna'] = 'Tato wiki neumožňuje zasílání nových hesel.';
-$lang['resendpwd'] = 'Odeslat nové heslo pro uživatele';
$lang['resendpwdmissing'] = 'Musíte vyplnit všechny položky.';
$lang['resendpwdnouser'] = 'Bohužel takový uživatel v systému není.';
$lang['resendpwdbadauth'] = 'Autorizační kód není platný. Zadali jste opravdu celý odkaz na potvrzovací stránku?';
@@ -190,6 +189,11 @@ $lang['external_edit'] = 'upraveno mimo DokuWiki';
$lang['summary'] = 'Komentář k úpravám';
$lang['noflash'] = 'Pro přehrání obsahu potřebujete <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.';
$lang['download'] = 'Stáhnout snippet';
+$lang['tools'] = 'Nástroje';
+$lang['user_tools'] = 'Uživatelské nástroje';
+$lang['site_tools'] = 'Nástroje pro tento web';
+$lang['page_tools'] = 'Nástroje pro stránku';
+$lang['skip_to_content'] = 'jít k obsahu';
$lang['mail_newpage'] = 'nová stránka:';
$lang['mail_changed'] = 'změna stránky:';
$lang['mail_subscribe_list'] = 'stránky změněné ve jmenném prostoru:';
diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php
index e8a4e3fe9..641ea6552 100644
--- a/inc/lang/da/lang.php
+++ b/inc/lang/da/lang.php
@@ -48,7 +48,6 @@ $lang['btn_backtomedia'] = 'Tilbage til valg af mediefil';
$lang['btn_subscribe'] = 'Abonnér på ændringer';
$lang['btn_profile'] = 'Opdatér profil';
$lang['btn_reset'] = 'Nulstil';
-$lang['btn_resendpwd'] = 'Send ny adgangskode';
$lang['btn_draft'] = 'Redigér kladde';
$lang['btn_recover'] = 'Gendan kladde';
$lang['btn_draftdel'] = 'Slet kladde';
@@ -83,7 +82,6 @@ $lang['profnoempty'] = 'Tomt navn eller e-mail adresse er ikke tilladt
$lang['profchanged'] = 'Brugerprofil opdateret korrekt.';
$lang['pwdforget'] = 'Har du glemt dit adgangskode? Få et nyt';
$lang['resendna'] = 'Denne wiki understøtter ikke udsendelse af nyt adgangskode.';
-$lang['resendpwd'] = 'Send nyt adgangskode for';
$lang['resendpwdmissing'] = 'Du skal udfylde alle felter.';
$lang['resendpwdnouser'] = 'Vi kan ikke finde denne bruger i vores database.';
$lang['resendpwdbadauth'] = 'Beklager, denne autoriseringskode er ikke gyldig. Kontroller venligst at du benyttede det fulde link til bekræftelse.';
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index eca04bbc4..093125aa6 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -54,7 +54,7 @@ $lang['btn_backtomedia'] = 'Zurück zur Dateiauswahl';
$lang['btn_subscribe'] = 'Aboverwaltung';
$lang['btn_profile'] = 'Benutzerprofil';
$lang['btn_reset'] = 'Zurücksetzen';
-$lang['btn_resendpwd'] = 'Sende neues Passwort';
+$lang['btn_resendpwd'] = 'Setze neues Passwort';
$lang['btn_draft'] = 'Entwurf bearbeiten';
$lang['btn_recover'] = 'Entwurf wiederherstellen';
$lang['btn_draftdel'] = 'Entwurf löschen';
@@ -91,7 +91,7 @@ $lang['profnoempty'] = 'Es muss ein Name oder eine E-Mail Adresse ange
$lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.';
$lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an';
$lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.';
-$lang['resendpwd'] = 'Neues Passwort senden für';
+$lang['resendpwd'] = 'Neues Passwort setzen für';
$lang['resendpwdmissing'] = 'Es tut mir Leid, aber du musst alle Felder ausfüllen.';
$lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.';
$lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stelle sicher, dass du den kompletten Bestätigungslink verwendet haben.';
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index f36c9949c..63ffd3008 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -56,7 +56,7 @@ $lang['btn_backtomedia'] = 'Zurück zur Dateiauswahl';
$lang['btn_subscribe'] = 'Aboverwaltung';
$lang['btn_profile'] = 'Benutzerprofil';
$lang['btn_reset'] = 'Zurücksetzen';
-$lang['btn_resendpwd'] = 'Sende neues Passwort';
+$lang['btn_resendpwd'] = 'Setze neues Passwort';
$lang['btn_draft'] = 'Entwurf bearbeiten';
$lang['btn_recover'] = 'Entwurf wiederherstellen';
$lang['btn_draftdel'] = 'Entwurf löschen';
@@ -93,7 +93,7 @@ $lang['profnoempty'] = 'Es muss ein Name und eine E-Mail-Adresse angeg
$lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.';
$lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an';
$lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.';
-$lang['resendpwd'] = 'Neues Passwort senden für';
+$lang['resendpwd'] = 'Neues Passwort setzen für';
$lang['resendpwdmissing'] = 'Es tut mir Leid, aber Sie müssen alle Felder ausfüllen.';
$lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.';
$lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stellen Sie sicher, dass Sie den kompletten Bestätigungslink verwendet haben.';
@@ -273,6 +273,7 @@ $lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede ver
$lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)';
$lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wenden Sie sich an den Systembetreuer.';
$lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wenden Sie sich an den Systembetreuer.';
+$lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab, Sie sollten es bald ändern.';
$lang['i_chooselang'] = 'Wählen Sie Ihre Sprache';
$lang['i_installer'] = 'DokuWiki Installation';
$lang['i_wikiname'] = 'Wiki-Name';
diff --git a/inc/lang/de/resetpwd.txt b/inc/lang/de/resetpwd.txt
new file mode 100644
index 000000000..a0a55c67a
--- /dev/null
+++ b/inc/lang/de/resetpwd.txt
@@ -0,0 +1,4 @@
+====== Neues Passwort setzen ======
+
+Bitte geben Sie ein neues Passwort für Ihren Wiki-Zugang ein.
+
diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php
index 34a7d36e8..95f1a1ea5 100644
--- a/inc/lang/el/lang.php
+++ b/inc/lang/el/lang.php
@@ -43,7 +43,6 @@ $lang['btn_backtomedia'] = 'Επιστροφή στην επιλογή α
$lang['btn_subscribe'] = 'Εγγραφή σε λήψη ενημερώσεων σελίδας';
$lang['btn_profile'] = 'Επεξεργασία προφίλ';
$lang['btn_reset'] = 'Ακύρωση';
-$lang['btn_resendpwd'] = 'Αποστολή νέου κωδικού';
$lang['btn_draft'] = 'Επεξεργασία αυτόματα αποθηκευμένης σελίδας';
$lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας';
$lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'Δεν επιτρέπεται κενό όνο
$lang['profchanged'] = 'Το προφίλ χρήστη τροποποιήθηκε επιτυχώς.';
$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας; Αποκτήστε νέο.';
$lang['resendna'] = 'Αυτό το wiki δεν υποστηρίζει την εκ\' νέου αποστολή κωδικών.';
-$lang['resendpwd'] = 'Αποστολή νέων κωδικών για τον χρήστη';
$lang['resendpwdmissing'] = 'Πρέπει να συμπληρώσετε όλα τα πεδία.';
$lang['resendpwdnouser'] = 'Αυτός ο χρήστης δεν υπάρχει στα αρχεία μας.';
$lang['resendpwdbadauth'] = 'Αυτός ο κωδικός ενεργοποίησης δεν είναι έγκυρος.';
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 24974ea5e..2ba220e64 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -43,7 +43,7 @@ $lang['btn_backtomedia'] = 'Back to Mediafile Selection';
$lang['btn_subscribe'] = 'Manage Subscriptions';
$lang['btn_profile'] = 'Update Profile';
$lang['btn_reset'] = 'Reset';
-$lang['btn_resendpwd'] = 'Send new password';
+$lang['btn_resendpwd'] = 'Set new password';
$lang['btn_draft'] = 'Edit draft';
$lang['btn_recover'] = 'Recover draft';
$lang['btn_draftdel'] = 'Delete draft';
@@ -84,7 +84,7 @@ $lang['profchanged'] = 'User profile successfully updated.';
$lang['pwdforget'] = 'Forgotten your password? Get a new one';
$lang['resendna'] = 'This wiki does not support password resending.';
-$lang['resendpwd'] = 'Send new password for';
+$lang['resendpwd'] = 'Set new password for';
$lang['resendpwdmissing'] = 'Sorry, you must fill in all fields.';
$lang['resendpwdnouser'] = 'Sorry, we can\'t find this user in our database.';
$lang['resendpwdbadauth'] = 'Sorry, this auth code is not valid. Make sure you used the complete confirmation link.';
@@ -280,6 +280,7 @@ $lang['subscr_style_list'] = 'list of changed pages since last email (e
/* auth.class language support */
$lang['authmodfailed'] = 'Bad user authentication configuration. Please inform your Wiki Admin.';
$lang['authtempfail'] = 'User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.';
+$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.';
/* installer strings */
$lang['i_chooselang'] = 'Choose your language';
diff --git a/inc/lang/en/resetpwd.txt b/inc/lang/en/resetpwd.txt
new file mode 100644
index 000000000..993b48765
--- /dev/null
+++ b/inc/lang/en/resetpwd.txt
@@ -0,0 +1,4 @@
+====== Set new password ======
+
+Please enter a new password for your account in this wiki.
+
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index c8148c772..41c6b80d1 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero';
$lang['btn_subscribe'] = 'Aliĝi al paĝaj modifoj';
$lang['btn_profile'] = 'Ĝisdatigi profilon';
$lang['btn_reset'] = 'Rekomenci';
-$lang['btn_resendpwd'] = 'Sendi novan pasvorton';
$lang['btn_draft'] = 'Redakti skizon';
$lang['btn_recover'] = 'Restarigi skizon';
$lang['btn_draftdel'] = 'Forigi skizon';
@@ -82,7 +81,6 @@ $lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata
$lang['profchanged'] = 'La profilo de la uzanto estas sukcese ĝisdatigita.';
$lang['pwdforget'] = 'Ĉu vi forgesis vian pasvorton? Prenu novan';
$lang['resendna'] = 'Tiu ĉi vikio ne ebligas resendon de la pasvortoj.';
-$lang['resendpwd'] = 'Sendi novan pasvorton al';
$lang['resendpwdmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.';
$lang['resendpwdnouser'] = 'Pardonu, ni ne trovas tiun uzanton en nia datenbazo.';
$lang['resendpwdbadauth'] = 'Pardonu, tiu aŭtentiga kodo ne validas. Certiĝu, ke vi uzis la kompletan konfirmigan ligilon.';
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index 28ff17a16..ee3da258b 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -61,7 +61,6 @@ $lang['btn_backtomedia'] = 'Volver a la selección de archivos multimedia'
$lang['btn_subscribe'] = 'Suscribirse a cambios de la página';
$lang['btn_profile'] = 'Actualizar perfil';
$lang['btn_reset'] = 'Restablecer';
-$lang['btn_resendpwd'] = 'Enviar nueva contraseña';
$lang['btn_draft'] = 'Editar borrador';
$lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Eliminar borrador';
@@ -98,7 +97,6 @@ $lang['profnoempty'] = 'No se permite que el nombre o la dirección de
$lang['profchanged'] = 'Se actualizó correctamente el perfil del usuario.';
$lang['pwdforget'] = '¿Has olvidado tu contraseña? Consigue una nueva';
$lang['resendna'] = 'Este wiki no brinda la posibilidad de reenvío de contraseña.';
-$lang['resendpwd'] = 'Enviar una nueva contraseña para';
$lang['resendpwdmissing'] = 'Lo siento, debes completar todos los campos.';
$lang['resendpwdnouser'] = 'Lo siento, no se encuentra este usuario en nuestra base de datos.';
$lang['resendpwdbadauth'] = 'Lo siento, este código de autenticación no es válido. Asegúrate de haber usado el enlace de confirmación entero.';
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index 5d882f165..5e5caa1c8 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -43,7 +43,6 @@ $lang['btn_backtomedia'] = 'Tagasi faili valikusse';
$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)';
$lang['btn_profile'] = 'Minu info';
$lang['btn_reset'] = 'Taasta';
-$lang['btn_resendpwd'] = 'Saada uus parool';
$lang['btn_draft'] = 'Toimeta mustandit';
$lang['btn_recover'] = 'Taata mustand';
$lang['btn_draftdel'] = 'Kustuta mustand';
@@ -79,7 +78,6 @@ $lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.';
$lang['profchanged'] = 'Kasutaja info edukalt muudetud';
$lang['pwdforget'] = 'Unustasid parooli? Tee uus';
$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.';
-$lang['resendpwd'] = 'Saada uus parool';
$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.';
$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.';
$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.';
diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php
index 367dfb5b5..f7a517fe4 100644
--- a/inc/lang/eu/lang.php
+++ b/inc/lang/eu/lang.php
@@ -40,7 +40,6 @@ $lang['btn_backtomedia'] = 'Atzera Multimedia Fitxategiaren Aukeraketara';
$lang['btn_subscribe'] = 'Harpidetu Orri Aldaketetara';
$lang['btn_profile'] = 'Eguneratu Profila ';
$lang['btn_reset'] = 'Aldaketak Desegin';
-$lang['btn_resendpwd'] = 'Pasahitz berria bidali';
$lang['btn_draft'] = 'Editatu zirriborroa';
$lang['btn_recover'] = 'Berreskuratu zirriborroa';
$lang['btn_draftdel'] = 'Ezabatu zirriborroa';
@@ -75,7 +74,6 @@ $lang['profnoempty'] = 'Izen edota e-posta hutsa ez dago onartua.';
$lang['profchanged'] = 'Erabiltzaile profila arrakastaz eguneratua.';
$lang['pwdforget'] = 'Pasahitza ahaztu duzu? Eskuratu berri bat';
$lang['resendna'] = 'Wiki honek ez du pasahitz berbidalketa onartzen.';
-$lang['resendpwd'] = 'Bidali pasahitz berria honentzat:';
$lang['resendpwdmissing'] = 'Barkatu, eremu guztiak bete behar dituzu.';
$lang['resendpwdnouser'] = 'Barkatu, ez dugu erabiltzaile hori datu-basean aurkitzen';
$lang['resendpwdbadauth'] = 'Barkatu, kautotze kodea ez da baliozkoa. Ziurtatu baieztapen esteka osoa erabili duzula.';
diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php
index 6609d243d..c55c3efdd 100644
--- a/inc/lang/fa/lang.php
+++ b/inc/lang/fa/lang.php
@@ -47,7 +47,6 @@ $lang['btn_backtomedia'] = 'بازگشت به انتخاب فایل';
$lang['btn_subscribe'] = 'عضویت در تغییرات صفحه';
$lang['btn_profile'] = 'به روز رسانی پروفایل';
$lang['btn_reset'] = 'بازنشاندن';
-$lang['btn_resendpwd'] = 'یک گذرواژه‌ی جدید برای شما فرستاده شود';
$lang['btn_draft'] = 'ویرایش پیش‌نویس';
$lang['btn_recover'] = 'بازیابی پیش‌نویس';
$lang['btn_draftdel'] = 'حذف پیش‌نویس';
@@ -82,7 +81,6 @@ $lang['profnoempty'] = 'نام و آدرس ایمیل باید پر ش
$lang['profchanged'] = 'پروفایل کاربر با موفقیت به روز شد';
$lang['pwdforget'] = 'گذرواژه‌ی خود را فراموش کرده‌اید؟ جدید دریافت کنید';
$lang['resendna'] = 'این ویکی ارسال مجدد گذرواژه را پشتیبانی نمی‌کند';
-$lang['resendpwd'] = 'گذرواژه‌ی جدید ارسال شد';
$lang['resendpwdmissing'] = 'متاسفم، شما باید تمام قسمت‌ها را پر کنید';
$lang['resendpwdnouser'] = 'متاسفم، ما نتوانستیم این نام کاربری را در بانک خود پیدا کنیم';
$lang['resendpwdbadauth'] = 'متاسفم، کد شناسایی معتبر نیست. از صحت لینک تاییدیه اطمینان حاصل کنید.';
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index eb2f57b0e..ce15f68d0 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -43,7 +43,6 @@ $lang['btn_backtomedia'] = 'Takaisin mediatiedostojen valintaan';
$lang['btn_subscribe'] = 'Tilaa muutokset';
$lang['btn_profile'] = 'Päivitä profiili';
$lang['btn_reset'] = 'Tyhjennä';
-$lang['btn_resendpwd'] = 'Lähetä uusi salasana';
$lang['btn_draft'] = 'Muokkaa luonnosta';
$lang['btn_recover'] = 'Palauta luonnos';
$lang['btn_draftdel'] = 'Poista luonnos';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'Tyhjä nimi tai sähköpostiosoite ei ole sall
$lang['profchanged'] = 'Käyttäjän profiilin päivitys onnistui.';
$lang['pwdforget'] = 'Unohtuiko salasana? Hanki uusi';
$lang['resendna'] = 'Tämä wiki ei tue salasanan uudelleenlähettämistä.';
-$lang['resendpwd'] = 'Lähetä uusi salasana käyttäjälle';
$lang['resendpwdmissing'] = 'Kaikki kentät on täytettävä.';
$lang['resendpwdnouser'] = 'Käyttäjää ei löydy tietokannastamme.';
$lang['resendpwdbadauth'] = 'Tunnistuskoodi on virheellinen. Varmista, että käytit koko varmistuslinkkiä.';
diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php
index 4cb895f72..14ec8c56b 100644
--- a/inc/lang/fo/lang.php
+++ b/inc/lang/fo/lang.php
@@ -40,7 +40,6 @@ $lang['btn_backtomedia'] = 'Aftur til val av miðlafílu';
$lang['btn_subscribe'] = 'Tilmelda broytingar';
$lang['btn_profile'] = 'Dagføra vangamynd';
$lang['btn_reset'] = 'Nullstilla';
-$lang['btn_resendpwd'] = 'Send nýtt loyniorð';
$lang['btn_draft'] = 'Broyt kladdu';
$lang['btn_recover'] = 'Endurbygg kladdu';
$lang['btn_draftdel'] = 'Sletta';
@@ -75,7 +74,6 @@ $lang['profnoempty'] = 'Tómt navn ella t-post adressa er ikki loyvt.'
$lang['profchanged'] = 'Brúkara vangamynd dagført rætt.';
$lang['pwdforget'] = 'Gloymt títt loyniorð? Fá eitt nýtt';
$lang['resendna'] = 'Tað er ikki møguligt at fá sent nýtt loyniorð við hesu wiki.';
-$lang['resendpwd'] = 'Send nýtt loyniorð til';
$lang['resendpwdmissing'] = 'Tú skal filla út øll økir.';
$lang['resendpwdnouser'] = 'Vit kunna ikki finna hendan brúkara í okkara dátagrunni.';
$lang['resendpwdbadauth'] = 'Hald til góðar, hendan góðkenningar kodan er ikki gildug. Kanna eftir at tú nýtti tað fulfíggjaðu góðkenningarleinkjuna';
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index 309ac22e3..140c584c3 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -58,7 +58,6 @@ $lang['btn_backtomedia'] = 'Retour à la sélection du fichier média';
$lang['btn_subscribe'] = 'S\'abonner à la page';
$lang['btn_profile'] = 'Mettre à jour le profil';
$lang['btn_reset'] = 'Réinitialiser';
-$lang['btn_resendpwd'] = 'Envoyer le mot de passe';
$lang['btn_draft'] = 'Modifier le brouillon';
$lang['btn_recover'] = 'Récupérer le brouillon';
$lang['btn_draftdel'] = 'Effacer le brouillon';
@@ -95,7 +94,6 @@ $lang['profnoempty'] = 'Un nom ou une adresse de courriel vide n\'est
$lang['profchanged'] = 'Mise à jour du profil réussie.';
$lang['pwdforget'] = 'Mot de passe oublié ? Faites-vous envoyer votre mot de passe ';
$lang['resendna'] = 'Ce wiki ne permet pas le renvoi de mot de passe.';
-$lang['resendpwd'] = 'Renvoyer le mot de passe de';
$lang['resendpwdmissing'] = 'Désolé, vous devez remplir tous les champs.';
$lang['resendpwdnouser'] = 'Désolé, cet utilisateur est introuvable dans notre base.';
$lang['resendpwdbadauth'] = 'Désolé, ce code d\'authentification est invalide. Assurez-vous d\'avoir utilisé le lien de confirmation.';
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index 329820333..9636d6c15 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -40,7 +40,6 @@ $lang['btn_backtomedia'] = 'Volver á Selección de Arquivos-Media';
$lang['btn_subscribe'] = 'Avísame dos trocos na páxina';
$lang['btn_profile'] = 'Actualizar Perfil';
$lang['btn_reset'] = 'Reiniciar';
-$lang['btn_resendpwd'] = 'Envíame un novo contrasinal';
$lang['btn_draft'] = 'Editar borrador';
$lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Eliminar borrador';
@@ -77,7 +76,6 @@ $lang['profnoempty'] = 'Non se permite un nome ou un enderezo de corre
$lang['profchanged'] = 'Perfil de usuario actualizado correctamente.';
$lang['pwdforget'] = 'Esqueceches o teu contrasinal? Consegue un novo';
$lang['resendna'] = 'Este wiki non permite o reenvío de contrasinais.';
-$lang['resendpwd'] = 'Enviar novo contrasinal para';
$lang['resendpwdmissing'] = 'Sentímolo, tes que cubrir todos os campos.';
$lang['resendpwdnouser'] = 'Sentímolo, non atopamos este usuario no noso banco de datos.';
$lang['resendpwdbadauth'] = 'Sentímolo, mais este código de autorización non é válido. Asegúrate de que usaches a ligazón completa de confirmación.';
diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php
index 1c0c82212..00eb4549b 100644
--- a/inc/lang/he/lang.php
+++ b/inc/lang/he/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = 'חזרה לבחירת קובץ מדיה';
$lang['btn_subscribe'] = 'מעקב אחרי שינוים';
$lang['btn_profile'] = 'עדכון הפרופיל';
$lang['btn_reset'] = 'איפוס';
-$lang['btn_resendpwd'] = 'שליחת ססמה חדשה';
$lang['btn_draft'] = 'עריכת טיוטה';
$lang['btn_recover'] = 'שחזור טיוטה';
$lang['btn_draftdel'] = 'מחיקת טיוטה';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'השם וכתובת הדוא״ל לא יכול
$lang['profchanged'] = 'הפרופיל עודכן בהצלחה';
$lang['pwdforget'] = 'שכחת את הססמה שלך? ניתן לקבל חדשה';
$lang['resendna'] = 'הוויקי הזה אינו תומך בחידוש ססמה';
-$lang['resendpwd'] = 'שליחת ססמה חדשה עבור';
$lang['resendpwdmissing'] = 'עליך למלא את כל השדות, עמך הסליחה.';
$lang['resendpwdnouser'] = 'משתמש בשם זה לא נמצא במסד הנתונים, עמך הסליחה.';
$lang['resendpwdbadauth'] = 'קוד אימות זה אינו תקף. יש לוודא כי נעשה שימוש בקישור האימות המלא, עמך הסליחה.';
diff --git a/inc/lang/hi/lang.php b/inc/lang/hi/lang.php
index 2a9e20a9e..893457066 100644
--- a/inc/lang/hi/lang.php
+++ b/inc/lang/hi/lang.php
@@ -59,7 +59,6 @@ $lang['regpwmail'] = 'आपकी डोकुविकी का
$lang['reghere'] = 'आपके पास अभी तक कोई खाता नहीं है? बस एक लें |';
$lang['profna'] = 'यह विकी प्रोफ़ाइल संशोधन का समर्थन नहीं करता |';
$lang['profnochange'] = 'कोई परिवर्तन नहीं, कुछ नहीं करना |';
-$lang['resendpwd'] = 'नवगुप्तशब्द भेजें';
$lang['resendpwdmissing'] = 'छमा करें, आपको सारे रिक्त स्थान भरने पड़ेंगे |';
$lang['resendpwdsuccess'] = 'आपका नवगुप्तशब्द ईमेल द्वारा सम्प्रेषित कर दिया गया है |';
$lang['txt_upload'] = 'अपलोड करने के लिए फ़ाइल चुनें';
diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php
index 79a6cc3b0..a0438d915 100644
--- a/inc/lang/hr/lang.php
+++ b/inc/lang/hr/lang.php
@@ -42,7 +42,6 @@ $lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik';
$lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta';
$lang['btn_profile'] = 'Ažuriraj profil';
$lang['btn_reset'] = 'Poništi promjene';
-$lang['btn_resendpwd'] = 'Pošalji novu lozinku';
$lang['btn_draft'] = 'Uredi nacrt dokumenta';
$lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta';
$lang['btn_draftdel'] = 'Obriši nacrt dokumenta';
@@ -77,7 +76,6 @@ $lang['profnoempty'] = 'Prazno korisničko ime ili email nisu dopušte
$lang['profchanged'] = 'Korisnički profil je uspješno izmijenjen.';
$lang['pwdforget'] = 'Izgubili ste lozinku? Zatražite novu';
$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke emailom.';
-$lang['resendpwd'] = 'Poslati novu lozinku za';
$lang['resendpwdmissing'] = 'Ispunite sva polja.';
$lang['resendpwdnouser'] = 'Nije moguće pronaći korisnika.';
$lang['resendpwdbadauth'] = 'Neispravan autorizacijski kod. Provjerite da li ste koristili potpun potvrdni link.';
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index a44fd9317..671b225f2 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = 'Vissza a médiafájlok kezeléséhez';
$lang['btn_subscribe'] = 'Oldalváltozások-hírlevél feliratkozás';
$lang['btn_profile'] = 'Személyes beállítások';
$lang['btn_reset'] = 'Alaphelyzet';
-$lang['btn_resendpwd'] = 'Új jelszó küldése';
$lang['btn_draft'] = 'Piszkozat szerkesztése';
$lang['btn_recover'] = 'Piszkozat folytatása';
$lang['btn_draftdel'] = 'Piszkozat törlése';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'A név és e-mail mező nem maradhat üresen!'
$lang['profchanged'] = 'A személyes beállítások változtatása megtörtént.';
$lang['pwdforget'] = 'Elfelejtetted a jelszavad? Itt kérhetsz újat';
$lang['resendna'] = 'Ez a wiki nem támogatja a jelszó újraküldést.';
-$lang['resendpwd'] = 'Új jelszó kiküldése ennek a felhasználónak';
$lang['resendpwdmissing'] = 'Sajnáljuk, az összes mezőt ki kell töltened.';
$lang['resendpwdnouser'] = 'Sajnáljuk, ilyen azonosítójú felhasználónk nem létezik.';
$lang['resendpwdbadauth'] = 'Sajnáljuk, ez a megerősítő kód nem helyes. Biztos, hogy a teljes megerősítés linket beírtad pontosan?';
diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php
index c336d8541..d7be1eff3 100644
--- a/inc/lang/ia/lang.php
+++ b/inc/lang/ia/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = 'Retornar al selection de files multimedia';
$lang['btn_subscribe'] = 'Gerer subscriptiones';
$lang['btn_profile'] = 'Actualisar profilo';
$lang['btn_reset'] = 'Reinitialisar';
-$lang['btn_resendpwd'] = 'Inviar nove contrasigno';
$lang['btn_draft'] = 'Modificar version provisori';
$lang['btn_recover'] = 'Recuperar version provisori';
$lang['btn_draftdel'] = 'Deler version provisori';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'Un nomine o adresse de e-mail vacue non es per
$lang['profchanged'] = 'Actualisation del profilo de usator succedite.';
$lang['pwdforget'] = 'Contrasigno oblidate? Obtene un altere';
$lang['resendna'] = 'Iste wiki non supporta le invio de un nove contrasigno.';
-$lang['resendpwd'] = 'Inviar nove contrasigno pro';
$lang['resendpwdmissing'] = 'Es necessari completar tote le campos.';
$lang['resendpwdnouser'] = 'Iste usator non ha essite trovate in le base de datos.';
$lang['resendpwdbadauth'] = 'Iste codice de authentication non es valide. Assecura te que tu ha usate le ligamine de confirmation complete.';
diff --git a/inc/lang/id-ni/lang.php b/inc/lang/id-ni/lang.php
index 9c04f0259..1a4d03498 100644
--- a/inc/lang/id-ni/lang.php
+++ b/inc/lang/id-ni/lang.php
@@ -38,7 +38,6 @@ $lang['btn_backlink'] = 'Link fangawuli';
$lang['btn_backtomedia'] = 'Angawuli ba filianö Mediafile';
$lang['btn_profile'] = 'Famohouni pörofile';
$lang['btn_reset'] = 'Fawu\'a';
-$lang['btn_resendpwd'] = 'Fa\'ohe\'ö kode sibohou';
$lang['btn_draft'] = 'Fawu\'a wanura';
$lang['btn_draftdel'] = 'Heta zura';
$lang['btn_register'] = 'Fasura\'ö';
@@ -69,7 +68,6 @@ $lang['profnoempty'] = 'Lö tetehegö na lö hadöi töi ma imele.';
$lang['profchanged'] = 'Pörofile zangoguna\'ö no tebohouni.';
$lang['pwdforget'] = 'Hadia olifu\'ö kode? Fuli halö kode';
$lang['resendna'] = 'Lö tetehegi ba wiki da\'a wama\'ohe\'ö kode dua kali.';
-$lang['resendpwd'] = 'Tefa\'ohe\'ö kode sibahou khö';
$lang['resendpwdmissing'] = 'Bologö dödöu, si lö tola lö\'ö öfo\'ösi fefu nahia si tohöna.';
$lang['resendpwdnouser'] = 'Bologö dödöu, lö masöndra zangoguna da\'a ba database.';
$lang['resendpwdconfirm'] = 'No tefaohe\'ö link famaduhu\'ö ba imele.';
diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php
index 9df252225..2302d4f6f 100644
--- a/inc/lang/id/lang.php
+++ b/inc/lang/id/lang.php
@@ -42,7 +42,6 @@ $lang['btn_subscribe'] = 'Ikuti Perubahan';
$lang['btn_unsubscribe'] = 'Berhenti Ikuti Perubahan';
$lang['btn_profile'] = 'Ubah Profil';
$lang['btn_reset'] = 'Reset';
-$lang['btn_resendpwd'] = 'Kirim password baru';
$lang['btn_draft'] = 'Edit draft';
$lang['btn_draftdel'] = 'Hapus draft';
$lang['btn_register'] = 'Daftar';
@@ -74,7 +73,6 @@ $lang['profnoempty'] = 'Mohon mengisikan nama atau alamat email.';
$lang['profchanged'] = 'Profil User berhasil diubah.';
$lang['pwdforget'] = 'Lupa Password? Dapatkan yang baru';
$lang['resendna'] = 'Wiki ini tidak mendukung pengiriman ulang password.';
-$lang['resendpwd'] = 'Kirim password baru untuk';
$lang['resendpwdmissing'] = 'Maaf, Anda harus mengisikan semua field.';
$lang['resendpwdnouser'] = 'Maaf, user ini tidak ditemukan.';
$lang['resendpwdbadauth'] = 'Maaf, kode autentikasi tidak valid. Pastikan Anda menggunakan keseluruhan link konfirmasi.';
diff --git a/inc/lang/is/lang.php b/inc/lang/is/lang.php
index caf098ee6..be20da6b3 100644
--- a/inc/lang/is/lang.php
+++ b/inc/lang/is/lang.php
@@ -47,7 +47,6 @@ $lang['btn_subscribe'] = 'Vakta';
$lang['btn_unsubscribe'] = 'Afvakta';
$lang['btn_profile'] = 'Uppfæra notanda';
$lang['btn_reset'] = 'Endurstilla';
-$lang['btn_resendpwd'] = 'Senda nýtt aðgangsorð með tölvupósti';
$lang['btn_draft'] = 'Breyta uppkasti';
$lang['btn_recover'] = 'Endurheimta uppkast';
$lang['btn_draftdel'] = 'Eyða uppkasti';
@@ -82,7 +81,6 @@ $lang['profnoempty'] = 'Það er ekki leyfilegt að skilja nafn og pó
$lang['profchanged'] = 'Notendaupplýsingum breytt';
$lang['pwdforget'] = 'Gleymt aðgangsorð? Fáðu nýtt';
$lang['resendna'] = 'Þessi wiki styður ekki endursendingar aðgangsorðs';
-$lang['resendpwd'] = 'Senda nýtt aðgangsorð fyrir';
$lang['resendpwdmissing'] = 'Afsakið, þú verður að út eyðublaðið allt';
$lang['resendpwdnouser'] = 'Afsakið, notandi finnst ekki.';
$lang['resendpwdbadauth'] = 'Afsakið, þessi sannvottunorð er ekki gild. Gakktu úr skugga um að þú notaðir að ljúka staðfesting hlekkur.';
diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php
index dfe7818e9..eda33898b 100644
--- a/inc/lang/it/lang.php
+++ b/inc/lang/it/lang.php
@@ -48,7 +48,6 @@ $lang['btn_backtomedia'] = 'Torna alla selezione file';
$lang['btn_subscribe'] = 'Sottoscrivi modifiche';
$lang['btn_profile'] = 'Aggiorna profilo';
$lang['btn_reset'] = 'Annulla';
-$lang['btn_resendpwd'] = 'Invia nuova password';
$lang['btn_draft'] = 'Modifica bozza';
$lang['btn_recover'] = 'Ripristina bozza';
$lang['btn_draftdel'] = 'Elimina bozza';
@@ -83,7 +82,6 @@ $lang['profnoempty'] = 'Nome o indirizzo email vuoti non sono consenti
$lang['profchanged'] = 'Aggiornamento del profilo utente riuscito.';
$lang['pwdforget'] = 'Hai dimenticato la password? Richiedine una nuova';
$lang['resendna'] = 'Questo wiki non supporta l\'invio di nuove password.';
-$lang['resendpwd'] = 'Invia nuova password per';
$lang['resendpwdmissing'] = 'Devi riempire tutti i campi.';
$lang['resendpwdnouser'] = 'Impossibile trovare questo utente nel database.';
$lang['resendpwdbadauth'] = 'Spiacenti, questo codice di autorizzazione non è valido. Assicurati di aver usato il link completo di conferma.';
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index 0c428ad64..057fa5a54 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -7,6 +7,7 @@
* @author Ikuo Obataya <i.obataya@gmail.com>
* @author Daniel Dupriest <kououken@gmail.com>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
+ * @author Taisuke Shimamoto <dentostar@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -42,7 +43,7 @@ $lang['btn_backtomedia'] = 'メディアファイル選択に戻る';
$lang['btn_subscribe'] = '変更履歴配信の登録';
$lang['btn_profile'] = 'ユーザー情報の更新';
$lang['btn_reset'] = 'リセット';
-$lang['btn_resendpwd'] = 'パスワード再発行';
+$lang['btn_resendpwd'] = '新しいパスワードをセット';
$lang['btn_draft'] = 'ドラフトを編集';
$lang['btn_recover'] = 'ドラフトを復元';
$lang['btn_draftdel'] = 'ドラフトを削除';
@@ -79,7 +80,7 @@ $lang['profnoempty'] = 'ユーザー名とメールアドレスを入
$lang['profchanged'] = 'ユーザー情報は更新されました。';
$lang['pwdforget'] = 'パスワードをお忘れですか?パスワード再発行';
$lang['resendna'] = 'パスワードの再発行は出来ません。';
-$lang['resendpwd'] = '新しいパスワードを送信します:';
+$lang['resendpwd'] = '新しいパスワードをセット';
$lang['resendpwdmissing'] = '全ての項目を入力して下さい。';
$lang['resendpwdnouser'] = '入力されたユーザーが見つかりませんでした。';
$lang['resendpwdbadauth'] = '申し訳ありません。この確認コードは有効ではありません。メール内に記載されたリンクを確認してください。';
@@ -185,6 +186,11 @@ $lang['external_edit'] = '外部編集';
$lang['summary'] = '編集の概要';
$lang['noflash'] = 'この内容を表示するためには <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> が必要です。';
$lang['download'] = 'この部分をダウンロード';
+$lang['tools'] = 'ツール';
+$lang['user_tools'] = 'ユーザ用ツール';
+$lang['site_tools'] = 'サイト用ツール';
+$lang['page_tools'] = 'ページ用ツール';
+$lang['skip_to_content'] = '内容へ移動';
$lang['mail_newpage'] = '文書の追加:';
$lang['mail_changed'] = '文書の変更:';
$lang['mail_subscribe_list'] = '名前空間内でページが変更:';
diff --git a/inc/lang/ja/resetpwd.txt b/inc/lang/ja/resetpwd.txt
new file mode 100644
index 000000000..a414af991
--- /dev/null
+++ b/inc/lang/ja/resetpwd.txt
@@ -0,0 +1,3 @@
+====== 新しいパスワードをセット ======
+
+このWikiでの、あなたのアカウント用の新しいパスワードを入力して下さい \ No newline at end of file
diff --git a/inc/lang/kk/lang.php b/inc/lang/kk/lang.php
index 9738ae51c..3ff5ae455 100644
--- a/inc/lang/kk/lang.php
+++ b/inc/lang/kk/lang.php
@@ -38,7 +38,6 @@ $lang['btn_backtomedia'] = 'Медиафайлды таңдауға қай
$lang['btn_subscribe'] = 'Жазылуларды басқару';
$lang['btn_profile'] = 'Профильді жаңарту';
$lang['btn_reset'] = 'Түсіру';
-$lang['btn_resendpwd'] = 'Жаңа құпиясөзді жіберу';
$lang['btn_draft'] = 'Шимайды өңдеу';
$lang['btn_recover'] = 'Шимайды қайтару';
$lang['btn_draftdel'] = 'Шимайды өшіру';
@@ -73,7 +72,6 @@ $lang['profnoempty'] = 'Бос есім не email рұқсат еті
$lang['profchanged'] = 'Пайдаланушы профилі сәтті жаңартылған.';
$lang['pwdforget'] = 'Құпиясөзіңізді ұмыттыңызба? Жаңадан біреуін алыңыз';
$lang['resendna'] = 'Бұл wiki құпиясөзді қайта жіберуді қолдамайды.';
-$lang['resendpwd'] = 'Келесіге жаңа құпиясөзді жіберу ';
$lang['resendpwdmissing'] = 'Кешіріңіз, барлық тармақтары толтыруыңыз керек.';
$lang['resendpwdnouser'] = 'Кешіріңіз, бұл пайдаланушыны дерекқорымызда тапқан жоқпыз.';
$lang['resendpwdbadauth'] = 'Кешіріңіз, бұл түпнұсқалық коды бұрыс. Толық растау сілтемені пайдалануыңызды тексеріңіз.';
diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php
index 68587e90f..6a5fa223f 100644
--- a/inc/lang/km/lang.php
+++ b/inc/lang/km/lang.php
@@ -39,7 +39,6 @@ $lang['btn_subscribe'] = 'ដាក់ដំណឹងផ្លស់ប្ត
$lang['btn_unsubscribe'] = 'ដកដំណឹងផ្លស់ប្តូរ';
$lang['btn_profile'] = 'កែប្រវត្តិរូប';
$lang['btn_reset'] = 'កមណត់ឡើងរិញ';
-$lang['btn_resendpwd'] = 'ផ្ញើពាក្សសម្ងាត់';
$lang['btn_draft'] = 'កែគំរោង';
$lang['btn_recover'] = 'ស្រោះគំរោងឡើង';
$lang['btn_draftdel'] = 'លុបគំរោង';
@@ -76,7 +75,6 @@ $lang['profchanged'] = 'ប្រវត្តិរូបអ្នកប្រ
$lang['pwdforget'] = 'ភ្លិចពាក្សសម្ងាត់ យកមួយទាត។';
$lang['resendna'] = 'វីគីនេះមិនឧបរំផ្ញើពាក្សសម្ងាតម្ដងទៀតទេ។';
-$lang['resendpwd'] = 'ផ្ញើពាក្សសម្ងាតឲ្យ';
$lang['resendpwdmissing'] = 'សុំអាទោស​ អ្នកត្រវបំពេញវាល។';
$lang['resendpwdnouser'] = 'សុំអាទោស​ យាងរកអ្នកប្រើមិនឃើងទេ។';
$lang['resendpwdbadauth'] = 'សុំអាទោស​ រហស្សលេខអនុញ្ញាតពំអាចប្រើបានទេ។ ខ្សែបន្ត';
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index b0664e7f4..84fdb3c48 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -8,6 +8,7 @@
* @author dongnak@gmail.com
* @author Song Younghwan <purluno@gmail.com>
* @author Seung-Chul Yoo <dryoo@live.com>
+ * @author erial2@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,13 +44,15 @@ $lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기';
$lang['btn_subscribe'] = '구독 신청';
$lang['btn_profile'] = '개인정보 변경';
$lang['btn_reset'] = '초기화';
-$lang['btn_resendpwd'] = '새 패스워드 보내기';
+$lang['btn_resendpwd'] = '새 암호 설정';
$lang['btn_draft'] = '문서초안 편집';
$lang['btn_recover'] = '문서초안 복구';
$lang['btn_draftdel'] = '문서초안 삭제';
$lang['btn_revert'] = '복원';
$lang['btn_register'] = '등록';
-$lang['loggedinas'] = '다음 사용자로 로그인';
+$lang['btn_apply'] = '적용';
+$lang['btn_media'] = '미디어 관리';
+$lang['loggedinas'] = '다른 사용자로 로그인';
$lang['user'] = '사용자';
$lang['pass'] = '패스워드';
$lang['newpass'] = '새로운 패스워드';
@@ -78,7 +81,7 @@ $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니
$lang['profchanged'] = '개인정보 변경이 성공했습니다.';
$lang['pwdforget'] = '패스워드를 잊어버린 경우 새로 발급받을 수 있습니다.';
$lang['resendna'] = '이 위키는 패스워드 재발급을 지원하지 않습니다.';
-$lang['resendpwd'] = '새로운 패스워드를 보냅니다.';
+$lang['resendpwd'] = '새 암호 다음으로 전송 : ';
$lang['resendpwdmissing'] = '새로운 패스워드를 입력해야햡니다.';
$lang['resendpwdnouser'] = '등록된 사용자가 아닙니다. 다시 확인 바랍니다.';
$lang['resendpwdbadauth'] = '인증 코드가 틀립니다. 잘못된 링크인지 확인 바랍니다.';
@@ -93,7 +96,7 @@ $lang['txt_filename'] = '업로드 파일 이름을 입력합니다.(
$lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.';
$lang['lockedby'] = '현재 잠금 사용자';
$lang['lockexpire'] = '잠금 해제 시간';
-$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.';
+$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.';
$lang['js']['notsavedyet'] = '저장하지 않은 변경은 지워집니다.
계속하시겠습니까?';
$lang['js']['searchmedia'] = '파일 찾기';
@@ -125,6 +128,17 @@ $lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인
$lang['js']['linkwiz'] = '링크 마법사';
$lang['js']['linkto'] = '다음으로 연결:';
$lang['js']['del_confirm'] = '정말로 선택된 항목(들)을 삭제하시겠습니까?';
+$lang['js']['restore_confirm'] = '정말 이 버전으로 되돌리시겠습니까?';
+$lang['js']['media_diff'] = '차이점 보기 :';
+$lang['js']['media_diff_both'] = '나란히 보기';
+$lang['js']['media_diff_opacity'] = '겹쳐 보기';
+$lang['js']['media_diff_portions'] = '쪼개 보기';
+$lang['js']['media_select'] = '파일 선택';
+$lang['js']['media_upload_btn'] = '업로드';
+$lang['js']['media_done_btn'] = '완료';
+$lang['js']['media_drop'] = '업로드할 파일을 끌어넣으세요';
+$lang['js']['media_cancel'] = '삭제';
+$lang['js']['media_overwrt'] = '이미있는 파일 덮어쓰기';
$lang['rssfailed'] = 'feed 가져오기 실패: ';
$lang['nothingfound'] = '아무 것도 없습니다.';
$lang['mediaselect'] = '미디어 파일 선택';
@@ -174,11 +188,20 @@ $lang['external_edit'] = '외부 편집기';
$lang['summary'] = '편집 요약';
$lang['noflash'] = '이 컨텐츠를 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>이 필요합니다.';
$lang['download'] = '조각 다운로드';
+$lang['tools'] = '도구';
+$lang['user_tools'] = '사용자 도구';
+$lang['site_tools'] = '사이트 도구';
+$lang['page_tools'] = '페이지 도구';
+$lang['skip_to_content'] = '컨텐츠 넘기기';
$lang['mail_newpage'] = '페이지 추가:';
$lang['mail_changed'] = '페이지 변경:';
$lang['mail_subscribe_list'] = '네임스페이스에서 변경된 페이지:';
$lang['mail_new_user'] = '새로운 사용자:';
$lang['mail_upload'] = '파일 첨부:';
+$lang['changes_type'] = '차이점 보기';
+$lang['pages_changes'] = '페이지';
+$lang['media_changes'] = '미디어 파일';
+$lang['both_changes'] = '미디어 파일과 페이지 양쪽';
$lang['qb_bold'] = '굵은 글';
$lang['qb_italic'] = '이탤릭체 글';
$lang['qb_underl'] = '밑줄 그어진 글';
@@ -219,6 +242,9 @@ $lang['img_copyr'] = '저작권';
$lang['img_format'] = '포맷';
$lang['img_camera'] = '카메라';
$lang['img_keywords'] = '키워드';
+$lang['img_width'] = '너비';
+$lang['img_height'] = '높이';
+$lang['img_manager'] = '미디어 관리자에서 보기';
$lang['subscr_subscribe_success'] = '%s을(를) 구독목록 %s에 추가하였습니다';
$lang['subscr_subscribe_error'] = '%s을(를) 구독목록 %s에 추가하는데 실패했습니다';
$lang['subscr_subscribe_noaddress'] = '등록된 주소가 없기 때문에 구독목록에 등록되지 않았습니다';
@@ -237,6 +263,7 @@ $lang['subscr_style_digest'] = '각 페이지의 변화를 요약 (매 %.2f
$lang['subscr_style_list'] = '마지막 이메일 이후 변화된 페이지의 목록 (매 %.2f 일 마다)';
$lang['authmodfailed'] = '잘못된 사용자 인증 설정입니다. 관리자에게 문의하기 바랍니다.';
$lang['authtempfail'] = '사용자 인증이 일시적으로 불가능합니다. 만일 계속해서 문제가 발생하면 관리자에게 문의하기 바랍니다.';
+$lang['authpwdexpire'] = '현재 암호를 설정하신지 %d 일이 지났습니다. 새로 설정해주시기 바랍니다.';
$lang['i_chooselang'] = '사용하는 언어를 선택합니다.';
$lang['i_installer'] = 'DokuWiki 설치';
$lang['i_wikiname'] = '위키 이름';
@@ -271,3 +298,27 @@ $lang['hours'] = '%d 시간 전';
$lang['minutes'] = '%d 분 전';
$lang['seconds'] = '%d 초 전';
$lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장되지 않았습니다.';
+$lang['media_uploadtab'] = '업로드';
+$lang['media_searchtab'] = '검색';
+$lang['media_file'] = '파일';
+$lang['media_viewtab'] = '보기';
+$lang['media_edittab'] = '수정';
+$lang['media_historytab'] = '변경사항';
+$lang['media_list_thumbs'] = '썸네일';
+$lang['media_list_rows'] = '목록';
+$lang['media_sort_name'] = '이름';
+$lang['media_sort_date'] = '날짜';
+$lang['media_namespaces'] = '네임스페이스 선택';
+$lang['media_files'] = '%s 의 파일';
+$lang['media_upload'] = '%s 에 업로드';
+$lang['media_search'] = '%s 를 검색';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s 의 %s';
+$lang['media_edit'] = '%s 수정';
+$lang['media_history'] = '%s 변경사항';
+$lang['media_meta_edited'] = '메타데이터 수정됨';
+$lang['media_perm_read'] = '죄송합니다, 이 파일을 읽을 권한이 없습니다.';
+$lang['media_perm_upload'] = '죄송합니다. 파일을 업로드할 권한이 없습니다.';
+$lang['media_update'] = '새 버전 올리기';
+$lang['media_restore'] = '이 버전으로 되돌리기';
+$lang['plugin_install_err'] = '플러그인 설치가 비정상적으로 이뤄졌습니다. 플러그인 디렉토리 \'%s\'를 \'%s\'로 변경하십시오.';
diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt
new file mode 100644
index 000000000..b84674b82
--- /dev/null
+++ b/inc/lang/ko/resetpwd.txt
@@ -0,0 +1,3 @@
+====== 새 암호 설정 ======
+
+이 위키의 계정의 새 암호를 입력해주세요. \ No newline at end of file
diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php
index 25102d583..3970f453a 100644
--- a/inc/lang/la/lang.php
+++ b/inc/lang/la/lang.php
@@ -44,7 +44,6 @@ $lang['btn_backtomedia'] = 'Ad media redire';
$lang['btn_subscribe'] = 'Custodire';
$lang['btn_profile'] = 'Tabellam nouare';
$lang['btn_reset'] = 'Abrogare';
-$lang['btn_resendpwd'] = 'Tesseram nouam cursu interretiali petere';
$lang['btn_draft'] = 'Propositum recensere';
$lang['btn_recover'] = 'Propositum reficere';
$lang['btn_draftdel'] = 'Propositum delere';
@@ -79,7 +78,6 @@ $lang['profnoempty'] = 'Omnes campi complendi sunt.';
$lang['profchanged'] = 'Tabella Sodalis feliciter nouatur';
$lang['pwdforget'] = 'Tesseram amisistine? Nouam petere';
$lang['resendna'] = 'Tesseram non mutare potest.';
-$lang['resendpwd'] = 'Tesseram mitte';
$lang['resendpwdmissing'] = 'Omnes campi complendi sunt.';
$lang['resendpwdnouser'] = 'In tabellis Sodalium nomen non inuentum est.';
$lang['resendpwdbadauth'] = 'Tesseram non legitima est.';
diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php
index d16d1a0c3..e6409b7ff 100644
--- a/inc/lang/lb/lang.php
+++ b/inc/lang/lb/lang.php
@@ -37,7 +37,6 @@ $lang['btn_backlink'] = 'Linker zeréck';
$lang['btn_backtomedia'] = 'Zeréck bei d\'Auswiel vun de Mediadateien';
$lang['btn_profile'] = 'Profil aktualiséieren';
$lang['btn_reset'] = 'Zerécksetzen';
-$lang['btn_resendpwd'] = 'Nei Passwuert schécken';
$lang['btn_draft'] = 'Entworf änneren';
$lang['btn_recover'] = 'Entworf zeréckhuelen';
$lang['btn_draftdel'] = 'Entworf läschen';
@@ -71,7 +70,6 @@ $lang['profnoempty'] = 'En eidele Numm oder Emailadress ass net erlaab
$lang['profchanged'] = 'Benotzerprofil erfollegräicht aktualiséiert.';
$lang['pwdforget'] = 'Passwuert vergiess? Fro der e Neit';
$lang['resendna'] = 'Dëse Wiki ënnerstëtzt net d\'Neiverschécke vu Passwieder.';
-$lang['resendpwd'] = 'Nei Passwuert schécke fir';
$lang['resendpwdmissing'] = 'Du muss all Felder ausfëllen.';
$lang['resendpwdnouser'] = 'Kann dëse Benotzer net an der Datebank fannen.';
$lang['resendpwdbadauth'] = 'Den "Auth"-Code ass ongëlteg. Kuck no obs de dee ganze Konfirmationslink benotzt hues.';
diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php
index 50fb3194b..13ff8c305 100644
--- a/inc/lang/lt/lang.php
+++ b/inc/lang/lt/lang.php
@@ -43,7 +43,6 @@ $lang['btn_subscribe'] = 'Užsisakyti keitimų prenumeratą';
$lang['btn_unsubscribe'] = 'Atsisakyti keitimų prenumeratos';
$lang['btn_profile'] = 'Atnaujinti profilį';
$lang['btn_reset'] = 'Atstata';
-$lang['btn_resendpwd'] = 'Išsiųsti naują slaptažodį';
$lang['btn_draft'] = 'Redaguoti juodraštį';
$lang['btn_recover'] = 'Atkurti juodraštį';
$lang['btn_draftdel'] = 'Šalinti juodraštį';
@@ -77,7 +76,6 @@ $lang['profnoempty'] = 'Tuščias vardo arba el. pašto adreso laukas
$lang['profchanged'] = 'Vartotojo profilis sėkmingai atnaujintas.';
$lang['pwdforget'] = 'Pamiršote slaptažodį? Gaukite naują';
$lang['resendna'] = 'Ši vikisvetainė neleidžia persiųsti slaptažodžių.';
-$lang['resendpwd'] = 'Atsiųsti naują slaptažodį';
$lang['resendpwdmissing'] = 'Jūs turite užpildyti visus laukus.';
$lang['resendpwdnouser'] = 'Tokio vartotojo nėra duomenų bazėje.';
$lang['resendpwdbadauth'] = 'Atsiprašome, bet šis tapatybės nustatymo kodas netinkamas. Įsitikinkite, kad panaudojote pilną patvirtinimo nuorodą.';
diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php
index f88302f2f..b02e7f471 100644
--- a/inc/lang/lv/lang.php
+++ b/inc/lang/lv/lang.php
@@ -39,7 +39,6 @@ $lang['btn_backtomedia'] = 'Atpakaļ uz mēdiju failu izvēli';
$lang['btn_subscribe'] = 'Abonēt izmaiņu paziņojumus';
$lang['btn_profile'] = 'Labot savu profilu';
$lang['btn_reset'] = 'Atsaukt izmaiņas';
-$lang['btn_resendpwd'] = 'Nosūtīt jaunu paroli';
$lang['btn_draft'] = 'Labot melnrakstu';
$lang['btn_recover'] = 'Atjaunot melnrakstu';
$lang['btn_draftdel'] = 'Dzēst melnrakstu';
@@ -76,7 +75,6 @@ $lang['profnoempty'] = 'Bez vārda vai e-pasta adreses nevar.';
$lang['profchanged'] = 'Profils veiksmīgi izlabots.';
$lang['pwdforget'] = 'Aizmirsi paroli? Saņem jaunu';
$lang['resendna'] = 'Paroļu izsūtīšanu nepiedāvāju.';
-$lang['resendpwd'] = 'Nosūtīt jaunu paroli lietotājam';
$lang['resendpwdmissing'] = 'Atvaino, jāizpilda visas ailes.';
$lang['resendpwdnouser'] = 'Atvaino, tāda lietotāja nav.';
$lang['resendpwdbadauth'] = 'Atvaino, šis autorizācijas kods nav derīgs. Pārliecinies, ka lietoji pilnu apstiprināšanas adresi.';
diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php
index 6614444d0..62400063c 100644
--- a/inc/lang/mk/lang.php
+++ b/inc/lang/mk/lang.php
@@ -42,7 +42,6 @@ $lang['btn_backtomedia'] = 'Назад до изборот за медиа
$lang['btn_subscribe'] = 'Менаџирај претплати';
$lang['btn_profile'] = 'Ажурирај профил';
$lang['btn_reset'] = 'Ресет';
-$lang['btn_resendpwd'] = 'Испрати нов пасворд';
$lang['btn_draft'] = 'Уреди скица';
$lang['btn_recover'] = 'Поврати скица';
$lang['btn_draftdel'] = 'Избриши скица';
@@ -77,7 +76,6 @@ $lang['profnoempty'] = 'Празно име или адреса за
$lang['profchanged'] = 'Корисничкиот профил е успешно ажуриран.';
$lang['pwdforget'] = 'Ја заборавивте лозинката? Добијте нова';
$lang['resendna'] = 'Ова вики не поддржува повторно испраќање на лозинка.';
-$lang['resendpwd'] = 'Испрати нова лозинка за';
$lang['resendpwdmissing'] = 'Жалам, морате да ги пополните сите полиња.';
$lang['resendpwdnouser'] = 'Жалам, таков корисник не постои во нашата база со податоци.';
$lang['resendpwdbadauth'] = 'Жалам, овај код за валидација не е валиден. Проверете повторно дали ја искористивте целосната врска за потврда.';
diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php
index 314a319cd..96323394d 100644
--- a/inc/lang/mr/lang.php
+++ b/inc/lang/mr/lang.php
@@ -47,7 +47,6 @@ $lang['btn_subscribe'] = 'पृष्ठाच्या बदलां
$lang['btn_unsubscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) बंद करा';
$lang['btn_profile'] = 'प्रोफाइल अद्ययावत करा';
$lang['btn_reset'] = 'रिसेट';
-$lang['btn_resendpwd'] = 'कृपया परवलीचा नवीन शब्द माझ्या इमेल पत्त्यावर पाठविणे.';
$lang['btn_draft'] = 'प्रत संपादन';
$lang['btn_recover'] = 'प्रत परत मिळवा';
$lang['btn_draftdel'] = 'प्रत रद्द';
@@ -82,7 +81,6 @@ $lang['profchanged'] = 'सदस्याची प्रोफाइ
$lang['pwdforget'] = 'परवलीचा शब्द विसरला आहे का? नविन मागवा.';
$lang['resendna'] = 'ह्या विकी मधे परवलीचा शब्द परत पाथाव्न्याची सुविधा नाही.';
$lang['resendpwd'] = 'नविन परवली इच्छुक';
-$lang['resendpwdmissing'] = 'कृपया सर्व रकाने भरा.';
$lang['resendpwdnouser'] = 'माफ़ करा, हा सदस्य आमच्या माहितिसंग्रहात सापडला नाही.';
$lang['resendpwdbadauth'] = 'माफ़ करा, हा अधिकार कोड बरोबर नाही. कृपया आपण पूर्ण शिकामोर्तबाची लिंक वापरल्याची खात्री करा.';
$lang['resendpwdconfirm'] = 'शिक्कामोर्तबाची लिंक ईमेल द्वारा पाठवली आहे.';
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index 21f979753..82ca389f7 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -40,7 +40,6 @@ $lang['btn_subscribe'] = 'पृष्ठ परिवर्तन ग
$lang['btn_unsubscribe'] = 'पृष्ठ परिवर्तन अग्राह्य गर्नुहोस्';
$lang['btn_profile'] = 'प्रोफाइल अध्यावधिक गर्नुहोस् ';
$lang['btn_reset'] = 'पूर्वरुपमा फर्काउनुहोस';
-$lang['btn_resendpwd'] = 'नयाँ प्रवेश शव्द(पासवर्ड) पठाउनुहोस् ';
$lang['btn_draft'] = ' ड्राफ्ट सम्पादन गर्नुहोस् ';
$lang['btn_recover'] = 'पहिलेको ड्राफ्ट हासिल गर्नुहोस ';
$lang['btn_draftdel'] = ' ड्राफ्ट मेटाउनुहोस् ';
@@ -75,7 +74,6 @@ $lang['profchanged'] = 'प्रयोगकर्ताको प्
$lang['pwdforget'] = 'आफ्नो पासवर्ड भुल्नु भयो ? नयाँ हासिल गर्नुहोस् ';
$lang['resendna'] = 'यो विकिबाट प्रवेशशव्द पठाउन समर्थित छैन ।';
$lang['resendpwd'] = 'नयाँ प्रवेशशव्द पठाउनुहोस् ';
-$lang['resendpwdmissing'] = 'माफ गर्नुहोस् , तपाईले सबै ठाउ भर्नुपर्छ। ';
$lang['resendpwdnouser'] = 'माफ गर्नुहोस्, हाम्रो डेटावेसमा यो प्रयोगकर्ता भेटिएन ।';
$lang['resendpwdbadauth'] = 'माफ गर्नुहोस् , यो अनुमति चिन्ह गलत छ। तपाईले पूरै जानकारी लिङ्क प्रयोग गर्नु पर्नेछ। ';
$lang['resendpwdconfirm'] = 'तपाईको इमेलमा कन्फरमेशन लिङ्क पठाइएको छ। ';
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index 64d7d89f7..4644f5e5d 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -51,7 +51,6 @@ $lang['btn_backtomedia'] = 'Terug naar Bestandsselectie';
$lang['btn_subscribe'] = 'Inschrijven wijzigingen';
$lang['btn_profile'] = 'Profiel aanpassen';
$lang['btn_reset'] = 'Wissen';
-$lang['btn_resendpwd'] = 'Stuur een nieuw wachtwoord';
$lang['btn_draft'] = 'Bewerk concept';
$lang['btn_recover'] = 'Herstel concept';
$lang['btn_draftdel'] = 'Verwijder concept';
@@ -88,7 +87,6 @@ $lang['profnoempty'] = 'Een lege gebruikersnaam of e-mailadres is niet
$lang['profchanged'] = 'Gebruikersprofiel succesvol aangepast';
$lang['pwdforget'] = 'Je wachtwoord vergeten? Vraag een nieuw wachtwoord aan';
$lang['resendna'] = 'Deze wiki ondersteunt het verzenden van wachtwoorden niet';
-$lang['resendpwd'] = 'Stuur een nieuw wachtwoord voor';
$lang['resendpwdmissing'] = 'Sorry, je moet alle velden invullen.';
$lang['resendpwdnouser'] = 'Sorry, we kunnen deze gebruikersnaam niet vinden in onze database.';
$lang['resendpwdbadauth'] = 'Sorry, deze authentiecatiecode is niet geldig. Controleer of je de volledige bevestigings-link hebt gebruikt.';
diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php
index 5dd5f6ea7..97ef741ef 100644
--- a/inc/lang/no/lang.php
+++ b/inc/lang/no/lang.php
@@ -53,7 +53,6 @@ $lang['btn_backtomedia'] = 'Tilbake til valg av mediafil';
$lang['btn_subscribe'] = 'Abonnér på endringer';
$lang['btn_profile'] = 'Oppdater profil';
$lang['btn_reset'] = 'Tilbakestill';
-$lang['btn_resendpwd'] = 'Send nytt passord';
$lang['btn_draft'] = 'Rediger kladd';
$lang['btn_recover'] = 'Gjennvinn kladd';
$lang['btn_draftdel'] = 'Slett kladd';
@@ -90,7 +89,6 @@ $lang['profnoempty'] = 'Tomt navn- eller e-postfelt er ikke tillatt.';
$lang['profchanged'] = 'Brukerprofilen ble vellykket oppdatert.';
$lang['pwdforget'] = 'Glemt passordet ditt? Få deg et nytt';
$lang['resendna'] = 'Denne wikien støtter ikke nyutsending av passord.';
-$lang['resendpwd'] = 'Send nytt passord for';
$lang['resendpwdmissing'] = 'Beklager, du må fylle inn alle felt.';
$lang['resendpwdnouser'] = 'Beklager, vi kan ikke finne denne brukeren i vår database.';
$lang['resendpwdbadauth'] = 'Beklager, denne autorisasjonskoden er ikke gyldig. Sjekk at du brukte hele bekreftelseslenken.';
diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php
index 42af3d3c4..3bde240d9 100644
--- a/inc/lang/pl/lang.php
+++ b/inc/lang/pl/lang.php
@@ -48,7 +48,6 @@ $lang['btn_backtomedia'] = 'Powrót do wyboru pliku';
$lang['btn_subscribe'] = 'Subskrybuj zmiany';
$lang['btn_profile'] = 'Aktualizuj profil';
$lang['btn_reset'] = 'Resetuj';
-$lang['btn_resendpwd'] = 'Prześlij nowe hasło';
$lang['btn_draft'] = 'Edytuj szkic';
$lang['btn_recover'] = 'Przywróć szkic';
$lang['btn_draftdel'] = 'Usuń szkic';
@@ -85,7 +84,6 @@ $lang['profnoempty'] = 'Pusta nazwa lub adres e-mail nie dozwolone.';
$lang['profchanged'] = 'Zaktualizowano profil użytkownika.';
$lang['pwdforget'] = 'Nie pamiętasz hasła? Zdobądź nowe!';
$lang['resendna'] = 'To wiki nie pozwala na powtórne przesyłanie hasła.';
-$lang['resendpwd'] = 'Prześlij nowe hasło dla';
$lang['resendpwdmissing'] = 'Wypełnij wszystkie pola.';
$lang['resendpwdnouser'] = 'Nie można znaleźć tego użytkownika w bazie danych.';
$lang['resendpwdbadauth'] = 'Błędny kod autoryzacji! Upewnij się, że użyłeś(aś) właściwego odnośnika.';
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index e4dc50ddc..d6dc8f96b 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -54,7 +54,6 @@ $lang['btn_backtomedia'] = 'Voltar à seleção do arquivo de mídia';
$lang['btn_subscribe'] = 'Monitorar alterações';
$lang['btn_profile'] = 'Atualizar o perfil';
$lang['btn_reset'] = 'Limpar';
-$lang['btn_resendpwd'] = 'Envie-me uma nova senha';
$lang['btn_draft'] = 'Editar o rascunho';
$lang['btn_recover'] = 'Recuperar o rascunho';
$lang['btn_draftdel'] = 'Excluir o rascunho';
@@ -89,7 +88,6 @@ $lang['profnoempty'] = 'Não são permitidos nomes ou endereços de e-
$lang['profchanged'] = 'O perfil do usuário foi atualizado com sucesso.';
$lang['pwdforget'] = 'Esqueceu sua senha? Solicite outra';
$lang['resendna'] = 'Esse wiki não tem suporte para o reenvio de senhas.';
-$lang['resendpwd'] = 'Enviar a nova senha para';
$lang['resendpwdmissing'] = 'Desculpe, você deve preencher todos os campos.';
$lang['resendpwdnouser'] = 'Desculpe, não foi possível encontrar esse usuário no nosso banco de dados.';
$lang['resendpwdbadauth'] = 'Desculpe, esse código de autorização é inválido. Certifique-se de que você usou o link de confirmação inteiro.';
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index a96598fc3..a0b0f57e8 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = 'Voltar à Selecção de Media';
$lang['btn_subscribe'] = 'Subscrever Alterações';
$lang['btn_profile'] = 'Actualizar Perfil';
$lang['btn_reset'] = 'Limpar';
-$lang['btn_resendpwd'] = 'Enviar nova senha';
$lang['btn_draft'] = 'Editar rascunho';
$lang['btn_recover'] = 'Recuperar rascunho';
$lang['btn_draftdel'] = 'Apagar rascunho';
@@ -86,7 +85,6 @@ $lang['profchanged'] = 'Perfil do utilizador actualizado com sucesso.'
$lang['pwdforget'] = 'Esqueceu a sua senha? Pedir nova senha';
$lang['resendna'] = 'Este wiki não suporta reenvio de senhas.';
-$lang['resendpwd'] = 'Enviar nova senha para';
$lang['resendpwdmissing'] = 'É preciso preencher todos os campos.';
$lang['resendpwdnouser'] = 'Não foi possível encontrar este utilizador.';
$lang['resendpwdbadauth'] = 'O código de autenticação não é válido. Por favor, assegure-se de que o link de confirmação está completo.';
diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php
index 96a3d7970..21a6ecef4 100644
--- a/inc/lang/ro/lang.php
+++ b/inc/lang/ro/lang.php
@@ -8,7 +8,7 @@
* @author Emanuel-Emeric Andrași <n30@mandrivausers.ro>
* @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro>
* @author Marius OLAR <olarmariusalex@gmail.com>
- * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro>
+ * @author Marius Olar <olarmariusalex@yahoo.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -44,7 +44,6 @@ $lang['btn_backtomedia'] = 'Înapoi la Selecţia Mediafile';
$lang['btn_subscribe'] = 'Subscrie Modificarea Paginii';
$lang['btn_profile'] = 'Actualizează Profil';
$lang['btn_reset'] = 'Resetează';
-$lang['btn_resendpwd'] = 'Trimite parola nouă';
$lang['btn_draft'] = 'Editează schiţă';
$lang['btn_recover'] = 'Recuperează schiţă';
$lang['btn_draftdel'] = 'Şterge schiţă';
@@ -81,7 +80,6 @@ $lang['profnoempty'] = 'Nu sunt admise numele sau adresa de email neco
$lang['profchanged'] = 'Profilul de utilizator a fost actualizat succes.';
$lang['pwdforget'] = 'Parola uitată? Luaţi una nouă';
$lang['resendna'] = 'Această wiki nu suportă retrimiterea parolei.';
-$lang['resendpwd'] = 'Trimite parola nouă pentru';
$lang['resendpwdmissing'] = 'Ne pare rău, trebuie completate toate câmpurile.';
$lang['resendpwdnouser'] = 'Ne pare rău, acest utilizator nu poate fi găsit în baza de date.';
$lang['resendpwdbadauth'] = 'Ne pare rău, acest cod de autorizare nu este corect. Verificaţi dacă aţi folosit tot link-ul de confirmare.';
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 10fca5477..94af441b7 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -19,15 +19,15 @@
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Ladyko Andrey <fylh@succexy.spb.ru>
* @author Eugene <windy.wanderer@gmail.com>
+ * @author Johnny Utah <pcpa@cyberpunk.su>
*/
$lang['encoding'] = ' utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '«'; //&ldquo;
-$lang['doublequoteclosing'] = '»'; //&rdquo;
-$lang['singlequoteopening'] = '„'; //&lsquo;
-$lang['singlequoteclosing'] = '“'; //&rsquo;
-$lang['apostrophe'] = '’'; //&rsquo;
-
+$lang['doublequoteopening'] = '«';
+$lang['doublequoteclosing'] = '»';
+$lang['singlequoteopening'] = '„';
+$lang['singlequoteclosing'] = '“';
+$lang['apostrophe'] = '’';
$lang['btn_edit'] = 'Править страницу';
$lang['btn_source'] = 'Показать исходный текст';
$lang['btn_show'] = 'Показать страницу';
@@ -55,7 +55,6 @@ $lang['btn_backtomedia'] = 'Вернуться к выбору медиа
$lang['btn_subscribe'] = 'Подписаться (все правки)';
$lang['btn_profile'] = 'Профиль';
$lang['btn_reset'] = 'Сброс';
-$lang['btn_resendpwd'] = 'Выслать новый пароль';
$lang['btn_draft'] = 'Править черновик';
$lang['btn_recover'] = 'Восстановить черновик';
$lang['btn_draftdel'] = 'Удалить черновик';
@@ -63,7 +62,6 @@ $lang['btn_revert'] = 'Восстановить';
$lang['btn_register'] = 'Зарегистрироваться';
$lang['btn_apply'] = 'Применить';
$lang['btn_media'] = 'Media Manager';
-
$lang['loggedinas'] = 'Зашли как';
$lang['user'] = 'Логин';
$lang['pass'] = 'Пароль';
@@ -78,7 +76,6 @@ $lang['badlogin'] = 'Извините, неверное имя по
$lang['minoredit'] = 'Небольшие изменения';
$lang['draftdate'] = 'Черновик сохранён';
$lang['nosecedit'] = 'За это время страница была изменена и информация о секции устарела. Загружена полная версия страницы.';
-
$lang['regmissing'] = 'Извините, вам следует заполнить все поля.';
$lang['reguexists'] = 'Извините, пользователь с таким логином уже существует.';
$lang['regsuccess'] = 'Пользователь создан, пароль выслан на адрес электронной почты.';
@@ -88,24 +85,19 @@ $lang['regbadmail'] = 'Данный вами адрес электр
$lang['regbadpass'] = 'Два введённых пароля не идентичны. Пожалуйста, попробуйте ещё раз.';
$lang['regpwmail'] = 'Ваш пароль для системы «ДокуВики»';
$lang['reghere'] = 'У вас ещё нет аккаунта? Зарегистрируйтесь';
-
$lang['profna'] = 'Данная вики не поддерживает изменение профиля';
$lang['profnochange'] = 'Изменений не было внесено, профиль не обновлён.';
$lang['profnoempty'] = 'Логин и адрес электронной почты не могут быть пустыми.';
$lang['profchanged'] = 'Профиль пользователя успешно обновлён.';
-
$lang['pwdforget'] = 'Забыли пароль? Получите новый';
$lang['resendna'] = 'Данная вики не поддерживает повторную отправку пароля.';
-$lang['resendpwd'] = 'Выслать пароль для';
$lang['resendpwdmissing'] = 'Вы должны заполнить все поля формы.';
$lang['resendpwdnouser'] = 'Пользователь с таким логином не обнаружен в нашей базе данных.';
$lang['resendpwdbadauth'] = 'Извините, неверный код авторизации. Убедитесь, что вы полностью скопировали ссылку. ';
$lang['resendpwdconfirm'] = 'Ссылка для подтверждения пароля была выслана по электронной почте. ';
$lang['resendpwdsuccess'] = 'Ваш новый пароль был выслан по электронной почте.';
-
$lang['license'] = 'За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:';
$lang['licenseok'] = 'Примечание: редактируя эту страницу, вы соглашаетесь на использование своего вклада на условиях следующей лицензии:';
-
$lang['searchmedia'] = 'Поиск по имени файла:';
$lang['searchmedia_in'] = 'Поиск в %s';
$lang['txt_upload'] = 'Выберите файл для загрузки';
@@ -113,7 +105,7 @@ $lang['txt_filename'] = 'Введите имя файла в вики (
$lang['txt_overwrt'] = 'Перезаписать существующий файл';
$lang['lockedby'] = 'В данный момент заблокирован';
$lang['lockexpire'] = 'Блокировка истекает в';
-$lang['js']['willexpire'] = 'Ваша блокировка редактирования этой страницы истекает в течение минуты.\nЧтобы избежать конфликтов и сбросить таймер блокировки, нажмите кнопку просмотра.';
+$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течении минуты.\nЧтобы предотвратить конфликты используйте кнопку "Просмотр" для сброса таймера блокировки.';
$lang['js']['notsavedyet'] = 'Несохранённые изменения будут потеряны. Вы действительно хотите продолжить?';
$lang['js']['searchmedia'] = 'Поиск файлов';
$lang['js']['keepopen'] = 'Не закрывать окно после выбора';
@@ -143,22 +135,19 @@ $lang['js']['nosmblinks'] = 'Ссылка на сетевые катало
$lang['js']['linkwiz'] = 'Мастер ссылок';
$lang['js']['linkto'] = 'Ссылка на:';
$lang['js']['del_confirm'] = 'Вы на самом деле желаете удалить выбранное?';
-$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течении минуты.\nЧтобы предотвратить конфликты используйте кнопку "Просмотр" для сброса таймера блокировки.';
-$lang['js']['restore_confirm'] = 'Действительно восстановить эту версию?';
-$lang['js']['media_diff'] = 'Просмотр отличий:';
-$lang['js']['media_diff_both'] = 'Рядом';
-$lang['js']['media_diff_opacity'] = 'Наложением';
+$lang['js']['restore_confirm'] = 'Действительно восстановить эту версию?';
+$lang['js']['media_diff'] = 'Просмотр отличий:';
+$lang['js']['media_diff_both'] = 'Рядом';
+$lang['js']['media_diff_opacity'] = 'Наложением';
$lang['js']['media_diff_portions'] = 'Частями';
-$lang['js']['media_select'] = 'Выбрать файлы…';
-$lang['js']['media_upload_btn'] = 'Загрузить';
-$lang['js']['media_done_btn'] = 'Готово';
-$lang['js']['media_drop'] = 'Переместите файлы сюда для загрузки';
-$lang['js']['media_cancel'] = 'отменить';
-$lang['js']['media_overwrt'] = 'Перезаписать существующие файлы';
-
+$lang['js']['media_select'] = 'Выбрать файлы…';
+$lang['js']['media_upload_btn'] = 'Загрузить';
+$lang['js']['media_done_btn'] = 'Готово';
+$lang['js']['media_drop'] = 'Переместите файлы сюда для загрузки';
+$lang['js']['media_cancel'] = 'отменить';
+$lang['js']['media_overwrt'] = 'Перезаписать существующие файлы';
$lang['rssfailed'] = 'Произошла ошибка при получении следующей новостной ленты: ';
$lang['nothingfound'] = 'Ничего не найдено.';
-
$lang['mediaselect'] = 'Выбор медиафайла';
$lang['fileupload'] = 'Загрузка медиафайла';
$lang['uploadsucc'] = 'Загрузка произведена успешно';
@@ -183,7 +172,6 @@ $lang['mediaextchange'] = 'Расширение изменилось: с
$lang['reference'] = 'Ссылки для';
$lang['ref_inuse'] = 'Этот файл не может быть удалён, так как он используется на следующих страницах:';
$lang['ref_hidden'] = 'Некоторые ссылки находятся на страницах, на чтение которых у вас нет прав доступа';
-
$lang['hits'] = 'соответствий';
$lang['quickhits'] = 'Соответствия в названиях страниц';
$lang['toc'] = 'Содержание';
@@ -207,18 +195,20 @@ $lang['external_edit'] = 'внешнее изменение';
$lang['summary'] = 'Сводка изменений';
$lang['noflash'] = 'Для просмотра этого содержимого требуется <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.';
$lang['download'] = 'Скачать код';
-
+$lang['tools'] = 'Инструменты';
+$lang['user_tools'] = 'Инструменты пользователя';
+$lang['site_tools'] = 'Инструменты сайта';
+$lang['page_tools'] = 'Инструменты страницы';
+$lang['skip_to_content'] = 'Перейти к содержанию';
$lang['mail_newpage'] = 'страница добавлена:';
$lang['mail_changed'] = 'страница изменена:';
$lang['mail_subscribe_list'] = 'изменились страницы в пространстве имён:';
$lang['mail_new_user'] = 'новый пользователь:';
$lang['mail_upload'] = 'файл закачан:';
-
$lang['changes_type'] = 'Посмотреть изменения';
$lang['pages_changes'] = 'Страниц';
$lang['media_changes'] = 'Медиа файлов';
$lang['both_changes'] = 'И страниц и медиа файлов';
-
$lang['qb_bold'] = 'Полужирный';
$lang['qb_italic'] = 'Курсив';
$lang['qb_underl'] = 'Подчёркнутый';
@@ -243,11 +233,8 @@ $lang['qb_media'] = 'Добавить изображения или
$lang['qb_sig'] = 'Вставить подпись';
$lang['qb_smileys'] = 'Смайлики';
$lang['qb_chars'] = 'Специальные символы';
-
$lang['upperns'] = 'Перейти в родительское пространство имён';
-
$lang['admin_register'] = 'Добавить пользователя';
-
$lang['metaedit'] = 'Править метаданные';
$lang['metasaveerr'] = 'Ошибка записи метаданных';
$lang['metasaveok'] = 'Метаданные сохранены';
@@ -265,30 +252,24 @@ $lang['img_keywords'] = 'Ключевые слова';
$lang['img_width'] = 'Ширина';
$lang['img_height'] = 'Высота';
$lang['img_manager'] = 'Просмотр в media manager';
-
-$lang['subscr_subscribe_success'] = 'Добавлен %s в подписку на %s';
-$lang['subscr_subscribe_error'] = 'Невозможно добавить %s в подписку на %s';
+$lang['subscr_subscribe_success'] = 'Добавлен %s в подписку на %s';
+$lang['subscr_subscribe_error'] = 'Невозможно добавить %s в подписку на %s';
$lang['subscr_subscribe_noaddress'] = 'Нет адреса электронной почты, сопоставленного с вашей учётной записью. Вы не можете подписаться на рассылку';
$lang['subscr_unsubscribe_success'] = 'Удалён %s из подписки на %s';
-$lang['subscr_unsubscribe_error'] = 'Ошибка удаления %s из подписки на %s';
-$lang['subscr_already_subscribed'] = '%s уже подписан на %s';
-$lang['subscr_not_subscribed'] = '%s не подписан на %s';
-// Manage page for subscriptions
-$lang['subscr_m_not_subscribed'] = 'Вы не подписаны на текущую страницу или пространство имён.';
-$lang['subscr_m_new_header'] = 'Добавить подписку';
-$lang['subscr_m_current_header'] = 'Текущие подписки';
-$lang['subscr_m_unsubscribe'] = 'Отменить подписку';
-$lang['subscr_m_subscribe'] = 'Подписаться';
-$lang['subscr_m_receive'] = 'Получить';
-$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
-$lang['subscr_style_digest'] = 'сводка изменений по каждой странице';
-$lang['subscr_style_list'] = 'перечислять изменившиеся страницы с прошлого уведомления';
-
-/* auth.class language support */
+$lang['subscr_unsubscribe_error'] = 'Ошибка удаления %s из подписки на %s';
+$lang['subscr_already_subscribed'] = '%s уже подписан на %s';
+$lang['subscr_not_subscribed'] = '%s не подписан на %s';
+$lang['subscr_m_not_subscribed'] = 'Вы не подписаны на текущую страницу или пространство имён.';
+$lang['subscr_m_new_header'] = 'Добавить подписку';
+$lang['subscr_m_current_header'] = 'Текущие подписки';
+$lang['subscr_m_unsubscribe'] = 'Отменить подписку';
+$lang['subscr_m_subscribe'] = 'Подписаться';
+$lang['subscr_m_receive'] = 'Получить';
+$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
+$lang['subscr_style_digest'] = 'сводка изменений по каждой странице';
+$lang['subscr_style_list'] = 'перечислять изменившиеся страницы с прошлого уведомления';
$lang['authmodfailed'] = 'Неправильная конфигурация аутентификации пользователя. Пожалуйста, сообщите об этом своему администратору вики.';
$lang['authtempfail'] = 'Аутентификация пользователей временно недоступна. Если проблема продолжается какое-то время, пожалуйста, сообщите об этом своему администратору вики.';
-
-/* installer strings */
$lang['i_chooselang'] = 'Выберите свой язык/Choose your language';
$lang['i_installer'] = 'Установка «ДокуВики»';
$lang['i_wikiname'] = 'Название вики';
@@ -314,7 +295,6 @@ $lang['i_pol1'] = 'Общедоступная вики (чтен
$lang['i_pol2'] = 'Закрытая вики (чтение, запись и загрузка файлов только для зарегистрированных пользователей)';
$lang['i_retry'] = 'Повторить попытку';
$lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики:';
-
$lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён <b>%s</b>. Вы можете также <a href="%s">просмотреть недавние изменения во всей вики</a>.';
$lang['years'] = '%d лет назад';
$lang['months'] = '%d месяц(ев) назад';
@@ -323,24 +303,29 @@ $lang['days'] = '%d дней назад';
$lang['hours'] = '%d час(ов) назад';
$lang['minutes'] = '%d минут назад';
$lang['seconds'] = '%d секунд назад';
-
$lang['wordblock'] = 'Ваши изменения не сохранены, поскольку они содержат блокируемые слова (спам).';
-
$lang['media_uploadtab'] = 'Загрузка';
$lang['media_searchtab'] = 'Поиск';
+$lang['media_file'] = 'Файл';
$lang['media_viewtab'] = 'Просмотр';
$lang['media_edittab'] = 'Правка';
$lang['media_historytab'] = 'История';
+$lang['media_list_thumbs'] = 'Миниатюры';
+$lang['media_list_rows'] = 'Строки';
$lang['media_sort_name'] = 'Сортировка по имени';
$lang['media_sort_date'] = 'Сортировка по дате';
+$lang['media_namespaces'] = 'Выберите каталог';
+$lang['media_files'] = 'Файлы в %s';
$lang['media_upload'] = 'Загрузка в пространство имён <strong>%s</strong>.';
$lang['media_search'] = 'Поиск в пространстве имён <strong>%s</strong>.';
$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s в %s
+';
$lang['media_edit'] = 'Правка %s';
+$lang['media_history'] = 'История %s';
$lang['media_meta_edited'] = 'метаданные изменены';
$lang['media_perm_read'] = 'Извините, у Вас недостаточно прав для чтения файлов.';
$lang['media_perm_upload'] = 'Извините, у Вас недостаточно прав для загрузки файлов.';
$lang['media_update'] = 'Загрузить новую версию';
$lang['media_restore'] = 'Восстановить эту версию';
-
-$lang['plugin_install_err'] = "Плагин установлен некорректно. Переименуйте папку плагина из '%s' в '%s'.";
+$lang['plugin_install_err'] = 'Плагин установлен некорректно. Переименуйте папку плагина из \'%s\' в \'%s\'.';
diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php
index 117da91d4..85e899b06 100644
--- a/inc/lang/sk/lang.php
+++ b/inc/lang/sk/lang.php
@@ -42,7 +42,6 @@ $lang['btn_backtomedia'] = 'Späť na výber súboru';
$lang['btn_subscribe'] = 'Sledovať zmeny';
$lang['btn_profile'] = 'Aktualizovať profil';
$lang['btn_reset'] = 'Zrušiť';
-$lang['btn_resendpwd'] = 'Poslať nové heslo';
$lang['btn_draft'] = 'Upraviť koncept';
$lang['btn_recover'] = 'Obnoviť koncept';
$lang['btn_draftdel'] = 'Zmazať koncept';
@@ -79,7 +78,6 @@ $lang['profnoempty'] = 'Prázdne meno alebo mailová adresa nie sú po
$lang['profchanged'] = 'Užívateľský účet úspešne zmenený.';
$lang['pwdforget'] = 'Zabudli ste heslo? Získajte nové!';
$lang['resendna'] = 'Táto wiki nepodporuje opätovné zasielanie hesla.';
-$lang['resendpwd'] = 'Pošli nové heslo pre';
$lang['resendpwdmissing'] = 'Prepáčte, musíte vyplniť všetky polia.';
$lang['resendpwdnouser'] = 'Prepáčte, nemôžeme nájsť zadaného užívateľa v databáze.';
$lang['resendpwdbadauth'] = 'Prepáčte, tento autorizačný kód nie je platný. Uistite sa, či ste použili celý autorizačný odkaz.';
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index 00a349af6..b34ab67e4 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -43,7 +43,6 @@ $lang['btn_backtomedia'] = 'Nazaj na izbiro predstavnih datotek';
$lang['btn_subscribe'] = 'Urejanje naročnin';
$lang['btn_profile'] = 'Posodobi profil';
$lang['btn_reset'] = 'Ponastavi';
-$lang['btn_resendpwd'] = 'Pošlji novo geslo';
$lang['btn_draft'] = 'Uredi osnutek';
$lang['btn_recover'] = 'Obnovi osnutek';
$lang['btn_draftdel'] = 'Izbriši osnutek';
@@ -80,7 +79,6 @@ $lang['profnoempty'] = 'Prazno polje elektronskega naslova ali imena n
$lang['profchanged'] = 'Uporabniški profil je uspešno posodobljen.';
$lang['pwdforget'] = 'Ali ste pozabili geslo? Pridobite si novo geslo.';
$lang['resendna'] = 'DokuWiki ne podpira možnosti ponovnega pošiljanja gesel.';
-$lang['resendpwd'] = 'Pošlji novo geslo za';
$lang['resendpwdmissing'] = 'Izpolniti je treba vsa polja.';
$lang['resendpwdnouser'] = 'Podanega uporabniškega imena v podatkovni zbirki ni mogoče najti.';
$lang['resendpwdbadauth'] = 'Koda za overitev ni prava. Prepričajte se, da ste uporabili celotno povezavo za potrditev.';
diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php
index 569256b52..0e56b89d9 100644
--- a/inc/lang/sq/lang.php
+++ b/inc/lang/sq/lang.php
@@ -44,7 +44,6 @@ $lang['btn_backtomedia'] = 'Mbrapa tek Përzgjedhja e Media-ve';
$lang['btn_subscribe'] = 'Menaxho Abonimet';
$lang['btn_profile'] = 'Përditëso Profilin';
$lang['btn_reset'] = 'Rivendos';
-$lang['btn_resendpwd'] = 'Dërgo fjalëkalim të ri';
$lang['btn_draft'] = 'Redakto skicën';
$lang['btn_recover'] = 'Rekupero skicën';
$lang['btn_draftdel'] = 'Fshi skicën';
@@ -79,7 +78,6 @@ $lang['profnoempty'] = 'Një emër bosh ose adresë email-i bosh nuk l
$lang['profchanged'] = 'Profili i përdoruesit u përditësua me sukses.';
$lang['pwdforget'] = 'E harruat fjalëkalimin? Merni një të ri';
$lang['resendna'] = 'Ky wiki nuk e lejon ridërgimin e fjalëkalimeve.';
-$lang['resendpwd'] = 'Dërgo një fjalëkalim të ri për';
$lang['resendpwdmissing'] = 'Na vjen keq, duhet t\'i plotësoni të gjitha fushat.';
$lang['resendpwdnouser'] = 'Na vjen keq, nuk mund ta gjejmë këtë përdorues në bazën tonë të të dhënave.';
$lang['resendpwdbadauth'] = 'Na vjen keq, ky kod autorizimi nuk është i vlefshëm. Sigurohuni që përdoret linkun e plotë të konfirmimit.';
diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php
index 3b2d2939c..a53f14ac9 100644
--- a/inc/lang/sr/lang.php
+++ b/inc/lang/sr/lang.php
@@ -41,7 +41,6 @@ $lang['btn_backtomedia'] = 'Врати се на избор медијск
$lang['btn_subscribe'] = 'Пријави се на измене';
$lang['btn_profile'] = 'Ажурирај профил';
$lang['btn_reset'] = 'Поништи';
-$lang['btn_resendpwd'] = 'Пошаљи нову лозинку';
$lang['btn_draft'] = 'Измени нацрт';
$lang['btn_recover'] = 'Опорави нацрт';
$lang['btn_draftdel'] = 'Обриши нацрт';
@@ -76,7 +75,6 @@ $lang['profnoempty'] = 'Није дозвољено оставити
$lang['profchanged'] = 'Кориснички профил је ажуриран.';
$lang['pwdforget'] = 'Заборавили сте лозинку? Направите нову';
$lang['resendna'] = 'Овај вики не дозвољава слање лозинки.';
-$lang['resendpwd'] = 'Пошаљи нову лозинку за';
$lang['resendpwdmissing'] = 'Жао ми је, сва поља морају бити попуњена.';
$lang['resendpwdnouser'] = 'Жао ми је, овај корисник не постоји у нашој бази.';
$lang['resendpwdbadauth'] = 'Жао ми је, потврдни код није исправан. Проверите да ли сте користили комплетан потврдни линк.';
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 8601829d2..0c8f3276d 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -52,7 +52,6 @@ $lang['btn_backtomedia'] = 'Tillbaka till val av Mediafil';
$lang['btn_subscribe'] = 'Prenumerera på ändringar';
$lang['btn_profile'] = 'Uppdatera profil';
$lang['btn_reset'] = 'Återställ';
-$lang['btn_resendpwd'] = 'Skicka nytt lösenord';
$lang['btn_draft'] = 'Redigera utkast';
$lang['btn_recover'] = 'Återskapa utkast';
$lang['btn_draftdel'] = 'Radera utkast';
@@ -87,7 +86,6 @@ $lang['profnoempty'] = 'Namn och e-postadress måste fyllas i.';
$lang['profchanged'] = 'Användarprofilen uppdaterad.';
$lang['pwdforget'] = 'Glömt ditt lösenord? Ordna ett nytt';
$lang['resendna'] = 'Den här wikin stödjer inte utskick av lösenord.';
-$lang['resendpwd'] = 'Skicka nytt lösenord för';
$lang['resendpwdmissing'] = 'Du måste fylla i alla fält.';
$lang['resendpwdnouser'] = 'Den här användaren hittas inte i databasen.';
$lang['resendpwdbadauth'] = 'Den här verifieringskoden är inte giltig. Kontrollera att du använde hela verifieringslänken.';
diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php
index 4ac6d7247..c9d526436 100644
--- a/inc/lang/th/lang.php
+++ b/inc/lang/th/lang.php
@@ -48,7 +48,6 @@ $lang['btn_subscribe'] = 'เฝ้าดู';
$lang['btn_unsubscribe'] = 'เลิกเฝ้าดู';
$lang['btn_profile'] = 'แก้ข้อมูลผู้ใช้';
$lang['btn_reset'] = 'เริ่มใหม่';
-$lang['btn_resendpwd'] = 'ลืมรหัส ส่งให้ใหม่ทางอีเมล';
$lang['btn_draft'] = 'แก้ไขเอกสารฉบับร่าง';
$lang['btn_recover'] = 'กู้คืนเอกสารฉบับร่าง';
$lang['btn_draftdel'] = 'ลบเอกสารฉบับร่าง';
@@ -83,7 +82,6 @@ $lang['profnoempty'] = 'ไม่อนุญาติให้เว
$lang['profchanged'] = 'ปรับปรุงข้อมูลส่วนตัวผู้ใช้สำเร็จ';
$lang['pwdforget'] = 'ลืมรหัสผ่านหรือ? เอาอันใหม่สิ';
$lang['resendna'] = 'วิกินี้ไม่รองรับการส่งรหัสผ่านซ้ำ';
-$lang['resendpwd'] = 'ส่งรหัสผ่านใหม่ให้กับ';
$lang['resendpwdmissing'] = 'ขออภัย, คุณต้องกรอกทุกช่อง';
$lang['resendpwdnouser'] = 'ขออภัย, เราไม่พบผู้ใช้คนนี้ในฐานข้อมูลของเรา';
$lang['resendpwdbadauth'] = 'ขออภัย, รหัสนี้ยังใช้ไม่ได้ กรุณาตรวจสอบว่าคุณกดลิ้งค์ยืนยันแล้ว';
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index cbadde849..77518ac36 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -43,7 +43,6 @@ $lang['btn_backtomedia'] = 'Çokluortam dosyası seçimine dön';
$lang['btn_subscribe'] = 'Sayfa Değişikliklerini Bildir';
$lang['btn_profile'] = 'Kullanıcı Bilgilerini Güncelle';
$lang['btn_reset'] = 'Sıfırla';
-$lang['btn_resendpwd'] = 'Yeni parola gönder';
$lang['btn_draft'] = 'Taslağı düzenle';
$lang['btn_recover'] = 'Taslağı geri yükle';
$lang['btn_draftdel'] = 'Taslağı sil';
@@ -78,7 +77,6 @@ $lang['profnoempty'] = 'Boş isim veya e-posta adresine izin verilmiyo
$lang['profchanged'] = 'Kullanıcı bilgileri başarıyla değiştirildi.';
$lang['pwdforget'] = 'Parolanızı mı unuttunuz? Yeni bir parola alın';
$lang['resendna'] = 'Bu wiki parolayı tekrar göndermeyi desteklememektedir.';
-$lang['resendpwd'] = 'Yeni parolayı gönder:';
$lang['resendpwdmissing'] = 'Üzgünüz, tüm alanları doldurmalısınız.';
$lang['resendpwdnouser'] = 'Üzgünüz, veritabanımızda bu kullanıcıyı bulamadık.';
$lang['resendpwdbadauth'] = 'Üzgünüz, bu doğrulama kodu doğru değil. Doğrulama linkini tam olarak kullandığınıza emin olun.';
diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php
index 18bee589d..28756e2a1 100644
--- a/inc/lang/uk/lang.php
+++ b/inc/lang/uk/lang.php
@@ -44,7 +44,6 @@ $lang['btn_backtomedia'] = 'Назад до вибору медіа-фай
$lang['btn_subscribe'] = 'Підписатися';
$lang['btn_profile'] = 'Оновити профіль';
$lang['btn_reset'] = 'Очистити';
-$lang['btn_resendpwd'] = 'Надіслати новий пароль';
$lang['btn_draft'] = 'Редагувати чернетку';
$lang['btn_recover'] = 'Відновити чернетку';
$lang['btn_draftdel'] = 'Знищити чернетку';
@@ -79,7 +78,6 @@ $lang['profnoempty'] = 'Ім’я або e-mail не можуть бу
$lang['profchanged'] = 'Профіль успішно змінено.';
$lang['pwdforget'] = 'Забули пароль? Отримайте новий';
$lang['resendna'] = 'Ця Вікі не підтримує повторне відправлення пароля.';
-$lang['resendpwd'] = 'Надіслати пароль для';
$lang['resendpwdmissing'] = 'Необхідно заповнити усі поля.';
$lang['resendpwdnouser'] = 'Такий користувач не існує.';
$lang['resendpwdbadauth'] = 'Код автентифікації невірний. Перевірте, чи ви використали повне посилання для підтвердження.';
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index 3a126105b..bbbbb71a6 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -45,7 +45,6 @@ $lang['btn_backtomedia'] = '重新選擇圖檔';
$lang['btn_subscribe'] = '訂閱更動通知';
$lang['btn_profile'] = '更新個人資料';
$lang['btn_reset'] = '資料重設';
-$lang['btn_resendpwd'] = '寄新密碼';
$lang['btn_draft'] = '編輯草稿';
$lang['btn_recover'] = '復原草稿';
$lang['btn_draftdel'] = '捨棄草稿';
@@ -82,7 +81,6 @@ $lang['profnoempty'] = '帳號或 email 地址不可空白!';
$lang['profchanged'] = '個人資料已成功更新囉。';
$lang['pwdforget'] = '忘記密碼了?索取新密碼!';
$lang['resendna'] = '本維基不開放重寄密碼';
-$lang['resendpwd'] = '寄新密碼給';
$lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。';
$lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者';
$lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用了完整的確認連結。';
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 8fffc5ed2..9d125ce44 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -50,7 +50,6 @@ $lang['btn_backtomedia'] = '返回到媒体文件选择工具';
$lang['btn_subscribe'] = '订阅本页更改';
$lang['btn_profile'] = '更新个人信息';
$lang['btn_reset'] = '重设';
-$lang['btn_resendpwd'] = '发送新密码';
$lang['btn_draft'] = '编辑草稿';
$lang['btn_recover'] = '恢复草稿';
$lang['btn_draftdel'] = '删除草稿';
@@ -87,7 +86,6 @@ $lang['profnoempty'] = '不允许使用空的用户名或邮件地址
$lang['profchanged'] = '用户信息更新成功。';
$lang['pwdforget'] = '忘记密码?立即获取新密码';
$lang['resendna'] = '本维基不支持二次发送密码。';
-$lang['resendpwd'] = '发送新密码给';
$lang['resendpwdmissing'] = '对不起,您必须填写所有的区域。';
$lang['resendpwdnouser'] = '对不起,在我们的用户数据中找不到该用户。';
$lang['resendpwdbadauth'] = '对不起,该认证码错误。请使用完整的确认链接。';
diff --git a/inc/load.php b/inc/load.php
index d30397f6e..f3ab5bcdd 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -76,10 +76,13 @@ function load_autoload($name){
'SafeFN' => DOKU_INC.'inc/SafeFN.class.php',
'Sitemapper' => DOKU_INC.'inc/Sitemapper.php',
'PassHash' => DOKU_INC.'inc/PassHash.class.php',
+ 'RemoteAPI' => DOKU_INC.'inc/remote.php',
+ 'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php',
'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php',
'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php',
'DokuWiki_Syntax_Plugin' => DOKU_PLUGIN.'syntax.php',
+ 'DokuWiki_Remote_Plugin' => DOKU_PLUGIN.'remote.php',
);
@@ -89,7 +92,7 @@ function load_autoload($name){
}
// Plugin loading
- if(preg_match('/^(helper|syntax|action|admin|renderer)_plugin_([^_]+)(?:_([^_]+))?$/',
+ if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([^_]+)(?:_([^_]+))?$/',
$name, $m)) {
//try to load the wanted plugin file
// include, but be silent. Maybe some other autoloader has an idea
diff --git a/inc/mail.php b/inc/mail.php
index 01b2895e1..bec0c5b10 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -106,7 +106,7 @@ function _mail_send_action($data) {
// discard mail request if no recipients are available
if(trim($to) === '' && trim($cc) === '' && trim($bcc) === '') return false;
-
+
// end additional code to support event ... original mail_send() code from here
if(defined('MAILHEADER_ASCIIONLY')){
@@ -208,9 +208,9 @@ function mail_encode_address($string,$header='',$names=true){
if(!utf8_isASCII($text)){
// put the quotes outside as in =?UTF-8?Q?"Elan Ruusam=C3=A4e"?= vs "=?UTF-8?Q?Elan Ruusam=C3=A4e?="
if (preg_match('/^"(.+)"$/', $text, $matches)) {
- $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1], 0).'?="';
+ $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1], 0).'?="';
} else {
- $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?=';
+ $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?=';
}
// additionally the space character should be encoded as =20 (or each
// word QP encoded separately).
diff --git a/inc/media.php b/inc/media.php
index 66c531452..dd0193fa0 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -175,10 +175,10 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
*
* @author Andreas Gohr <andi@splitbrain.org>
* @return int One of: 0,
- DOKU_MEDIA_DELETED,
- DOKU_MEDIA_DELETED | DOKU_MEDIA_EMPTY_NS,
- DOKU_MEDIA_NOT_AUTH,
- DOKU_MEDIA_INUSE
+ * DOKU_MEDIA_DELETED,
+ * DOKU_MEDIA_DELETED | DOKU_MEDIA_EMPTY_NS,
+ * DOKU_MEDIA_NOT_AUTH,
+ * DOKU_MEDIA_INUSE
*/
function media_delete($id,$auth){
global $lang;
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 151fa5987..db00258e2 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -213,9 +213,9 @@ function sectionID($title,&$check) {
if(is_array($check)){
// make sure tiles are unique
if (!array_key_exists ($title,$check)) {
- $check[$title] = 0;
+ $check[$title] = 0;
} else {
- $title .= ++ $check[$title];
+ $title .= ++ $check[$title];
}
}
@@ -347,8 +347,8 @@ function mediaFN($id, $rev=''){
if(empty($rev)){
$fn = $conf['mediadir'].'/'.utf8_encodeFN($id);
}else{
- $ext = mimetype($id);
- $name = substr($id,0, -1*strlen($ext[0])-1);
+ $ext = mimetype($id);
+ $name = substr($id,0, -1*strlen($ext[0])-1);
$fn = $conf['mediaolddir'].'/'.utf8_encodeFN($name .'.'.( (int) $rev ).'.'.$ext[0]);
}
return $fn;
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 136c37531..8bfdc3b9c 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer {
global $conf;
$isImage = false;
- if (is_null($title)){
+ if (is_array($title)){
+ if($title['title']) return '['.$title['title'].']';
+ } else if (is_null($title) || trim($title)==''){
if (useHeading('content') && $id){
$heading = p_get_first_heading($id,METADATA_DONT_RENDER);
if ($heading) return $heading;
}
return $default;
- } else if (is_string($title)){
+ } else {
return $title;
- } else if (is_array($title)){
- if($title['title']) return '['.$title['title'].']';
}
}
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 68d4e4569..cf132ce97 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -929,7 +929,7 @@ class Doku_Parser_Mode_windowssharelink extends Doku_Parser_Mode {
var $pattern;
function preConnect() {
- $this->pattern = "\\\\\\\\\w+?(?:\\\\[\w$]+)+";
+ $this->pattern = "\\\\\\\\\w+?(?:\\\\[\w-$]+)+";
}
function connectTo($mode) {
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 8d1eb24c1..4345b494f 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
var $doc = ''; // will contain the whole document
var $toc = array(); // will contain the Table of Contents
- private $sectionedits = array(); // A stack of section edit data
+ var $sectionedits = array(); // A stack of section edit data
var $headers = array();
var $footnotes = array();
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 734331c94..208d7dae9 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -137,6 +137,7 @@ class Doku_Plugin_Controller {
// the plugin was disabled by rc2009-01-26
// disabling mechanism was changed back very soon again
// to keep everything simple we just skip the plugin completely
+ continue;
} elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) {
// treat this as a default disabled plugin(over-rideable by the plugin manager)
// deprecated 2011-09-10 (usage of disabled files)
diff --git a/inc/remote.php b/inc/remote.php
new file mode 100644
index 000000000..2ef28afd2
--- /dev/null
+++ b/inc/remote.php
@@ -0,0 +1,253 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+class RemoteException extends Exception {}
+class RemoteAccessDeniedException extends RemoteException {}
+
+/**
+ * This class provides information about remote access to the wiki.
+ *
+ * == Types of methods ==
+ * There are two types of remote methods. The first is the core methods.
+ * These are always available and provided by dokuwiki.
+ * The other is plugin methods. These are provided by remote plugins.
+ *
+ * == Information structure ==
+ * The information about methods will be given in an array with the following structure:
+ * array(
+ * 'method.remoteName' => array(
+ * 'args' => array(
+ * 'type eg. string|int|...|date|file',
+ * )
+ * 'name' => 'method name in class',
+ * 'return' => 'type',
+ * 'public' => 1/0 - method bypass default group check (used by login)
+ * ['doc' = 'method documentation'],
+ * )
+ * )
+ *
+ * plugin names are formed the following:
+ * core methods begin by a 'dokuwiki' or 'wiki' followed by a . and the method name itself.
+ * i.e.: dokuwiki.version or wiki.getPage
+ *
+ * plugin methods are formed like 'plugin.<plugin name>.<method name>'.
+ * i.e.: plugin.clock.getTime or plugin.clock_gmt.getTime
+ *
+ * @throws RemoteException
+ */
+class RemoteAPI {
+
+ /**
+ * @var RemoteAPICore
+ */
+ private $coreMethods = null;
+
+ /**
+ * @var array remote methods provided by dokuwiki plugins - will be filled lazy via
+ * {@see RemoteAPI#getPluginMethods}
+ */
+ private $pluginMethods = null;
+
+ /**
+ * @var array contains custom calls to the api. Plugins can use the XML_CALL_REGISTER event.
+ * The data inside is 'custom.call.something' => array('plugin name', 'remote method name')
+ *
+ * The remote method name is the same as in the remote name returned by _getMethods().
+ */
+ private $pluginCustomCalls = null;
+
+ private $dateTransformation;
+ private $fileTransformation;
+
+ public function __construct() {
+ $this->dateTransformation = array($this, 'dummyTransformation');
+ $this->fileTransformation = array($this, 'dummyTransformation');
+ }
+
+ /**
+ * Get all available methods with remote access.
+ *
+ * @return array with information to all available methods
+ */
+ public function getMethods() {
+ return array_merge($this->getCoreMethods(), $this->getPluginMethods());
+ }
+
+ /**
+ * call a method via remote api.
+ *
+ * @param string $method name of the method to call.
+ * @param array $args arguments to pass to the given method
+ * @return mixed result of method call, must be a primitive type.
+ */
+ public function call($method, $args = array()) {
+ if ($args === null) {
+ $args = array();
+ }
+ list($type, $pluginName, $call) = explode('.', $method, 3);
+ if ($type === 'plugin') {
+ return $this->callPlugin($pluginName, $method, $args);
+ }
+ if ($this->coreMethodExist($method)) {
+ return $this->callCoreMethod($method, $args);
+ }
+ return $this->callCustomCallPlugin($method, $args);
+ }
+
+ private function coreMethodExist($name) {
+ $coreMethods = $this->getCoreMethods();
+ return array_key_exists($name, $coreMethods);
+ }
+
+ private function callCustomCallPlugin($method, $args) {
+ $customCalls = $this->getCustomCallPlugins();
+ if (!array_key_exists($method, $customCalls)) {
+ throw new RemoteException('Method does not exist', -32603);
+ }
+ $customCall = $customCalls[$method];
+ return $this->callPlugin($customCall[0], $customCall[1], $args);
+ }
+
+ private function getCustomCallPlugins() {
+ if ($this->pluginCustomCalls === null) {
+ $data = array();
+ trigger_event('RPC_CALL_ADD', $data);
+ $this->pluginCustomCalls = $data;
+ }
+ return $this->pluginCustomCalls;
+ }
+
+ private function callPlugin($pluginName, $method, $args) {
+ $plugin = plugin_load('remote', $pluginName);
+ $methods = $this->getPluginMethods();
+ if (!$plugin) {
+ throw new RemoteException('Method does not exist', -32603);
+ }
+ $this->checkAccess($methods[$method]);
+ $name = $this->getMethodName($methods, $method);
+ return call_user_func_array(array($plugin, $name), $args);
+ }
+
+ private function callCoreMethod($method, $args) {
+ $coreMethods = $this->getCoreMethods();
+ $this->checkAccess($coreMethods[$method]);
+ if (!isset($coreMethods[$method])) {
+ throw new RemoteException('Method does not exist', -32603);
+ }
+ $this->checkArgumentLength($coreMethods[$method], $args);
+ return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args);
+ }
+
+ private function checkAccess($methodMeta) {
+ if (!isset($methodMeta['public'])) {
+ $this->forceAccess();
+ } else{
+ if ($methodMeta['public'] == '0') {
+ $this->forceAccess();
+ }
+ }
+ }
+
+ private function checkArgumentLength($method, $args) {
+ if (count($method['args']) < count($args)) {
+ throw new RemoteException('Method does not exist - wrong parameter count.', -32603);
+ }
+ }
+
+ private function getMethodName($methodMeta, $method) {
+ if (isset($methodMeta[$method]['name'])) {
+ return $methodMeta[$method]['name'];
+ }
+ $method = explode('.', $method);
+ return $method[count($method)-1];
+ }
+
+ /**
+ * @return bool true if the current user has access to remote api.
+ */
+ public function hasAccess() {
+ global $conf;
+ global $USERINFO;
+ if (!$conf['remote']) {
+ return false;
+ }
+ if(!$conf['useacl']) {
+ return true;
+ }
+ if(trim($conf['remoteuser']) == '') {
+ return true;
+ }
+
+ return auth_isMember($conf['remoteuser'], $_SERVER['REMOTE_USER'], (array) $USERINFO['grps']);
+ }
+
+ /**
+ * @throws RemoteException On denied access.
+ * @return void
+ */
+ public function forceAccess() {
+ if (!$this->hasAccess()) {
+ throw new RemoteAccessDeniedException('server error. not authorized to call method', -32604);
+ }
+ }
+
+ /**
+ * @return array all plugin methods.
+ */
+ public function getPluginMethods() {
+ if ($this->pluginMethods === null) {
+ $this->pluginMethods = array();
+ $plugins = plugin_list('remote');
+
+ foreach ($plugins as $pluginName) {
+ $plugin = plugin_load('remote', $pluginName);
+ if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) {
+ throw new RemoteException("Plugin $pluginName does not implement DokuWiki_Remote_Plugin");
+ }
+
+ $methods = $plugin->_getMethods();
+ foreach ($methods as $method => $meta) {
+ $this->pluginMethods["plugin.$pluginName.$method"] = $meta;
+ }
+ }
+ }
+ return $this->pluginMethods;
+ }
+
+ /**
+ * @param RemoteAPICore $apiCore this parameter is used for testing. Here you can pass a non-default RemoteAPICore
+ * instance. (for mocking)
+ * @return array all core methods.
+ */
+ public function getCoreMethods($apiCore = null) {
+ if ($this->coreMethods === null) {
+ if ($apiCore === null) {
+ $this->coreMethods = new RemoteAPICore($this);
+ } else {
+ $this->coreMethods = $apiCore;
+ }
+ }
+ return $this->coreMethods->__getRemoteInfo();
+ }
+
+ public function toFile($data) {
+ return call_user_func($this->fileTransformation, $data);
+ }
+
+ public function toDate($data) {
+ return call_user_func($this->dateTransformation, $data);
+ }
+
+ public function dummyTransformation($data) {
+ return $data;
+ }
+
+ public function setDateTransformation($dateTransformation) {
+ $this->dateTransformation = $dateTransformation;
+ }
+
+ public function setFileTransformation($fileTransformation) {
+ $this->fileTransformation = $fileTransformation;
+ }
+}
diff --git a/inc/template.php b/inc/template.php
index 27163f076..ab6aa925f 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -994,7 +994,7 @@ function tpl_img($maxwidth=0,$maxheight=0,$link=true,$params=null){
/**
* Default action for TPL_IMG_DISPLAY
*/
-function _tpl_img_action($data, $param=NULL) {
+function _tpl_img_action($data, $param=null) {
global $lang;
$p = buildAttributes($data['params']);
@@ -1012,8 +1012,6 @@ function _tpl_img_action($data, $param=NULL) {
*/
function tpl_indexerWebBug(){
global $ID;
- global $INFO;
- if(!$INFO['exists']) return false;
$p = array();
$p['src'] = DOKU_BASE.'lib/exe/indexer.php?id='.rawurlencode($ID).
@@ -1232,7 +1230,7 @@ function tpl_mediaFileDetails($image, $rev){
list($ext,$mime,$dl) = mimetype($image,false);
$class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
$class = 'select mediafile mf_'.$class;
- $tabTitle = '<strong class="'.$class.'">'.$image.'</strong>';
+ $tabTitle = '<strong class="'.$class.'"><a href="'.ml($image).'" title="'.$lang['mediaview'].'">'.$image.'</a>'.'</strong>';
if ($opened_tab === 'view' && $rev) {
printf($lang['media_viewold'], $tabTitle, dformat($rev));
} else {
diff --git a/inc/toolbar.php b/inc/toolbar.php
index 02172510e..b588d4477 100644
--- a/inc/toolbar.php
+++ b/inc/toolbar.php
@@ -243,7 +243,7 @@ function toolbar_signature(){
global $INFO;
$sig = $conf['signature'];
- $sig = strftime($sig);
+ $sig = dformat(null,$sig);
$sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
$sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
$sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
diff --git a/inc/utf8.php b/inc/utf8.php
index 9d0d17f78..54986e14e 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -526,7 +526,7 @@ if(!function_exists('utf8_decode_numeric')){
if(!class_exists('utf8_entity_decoder')){
class utf8_entity_decoder {
var $table;
- function utf8_entity_decoder() {
+ function __construct() {
$table = get_html_translation_table(HTML_ENTITIES);
$table = array_flip($table);
$this->table = array_map(array(&$this,'makeutf8'), $table);