From e0dd04a6493f1b7f7133f75c08f9ea55ee8bd50a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Oct 2011 16:39:36 +0200 Subject: Added bcrypt support for password hashes This method require PHP 5.3+ it will fail otherwise! --- inc/PassHash.class.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 31493c022..77f2115bd 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -47,6 +47,9 @@ class PassHash { }elseif(preg_match('/^md5\$(.{5})\$/',$hash,$m)){ $method = 'djangomd5'; $salt = $m[1]; + }elseif(preg_match('/^\$2a\$(.{2})\$/',$hash,$m)){ + $method = 'bcrypt'; + $salt = $hash; }elseif(substr($hash,0,6) == '{SSHA}'){ $method = 'ssha'; $salt = substr(base64_decode(substr($hash, 6)),20); @@ -379,4 +382,35 @@ class PassHash { return 'md5$'.$salt.'$'.md5($salt.$clear); } + + /** + * Passwordhashing method 'bcrypt' + * + * Uses a modified blowfish algorithm called eksblowfish + * This method works on PHP 5.3+ only and will throw an exception + * if the needed crypt support isn't available + * + * A full hash should be given as salt (starting with $a2$) or this + * will break. When no salt is given, the iteration count can be set + * through the $compute variable. + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @param int $compute - the iteration count (between 4 and 31) + * @returns string - hashed password + */ + public function hash_bcrypt($clear, $salt=null, $compute=8){ + if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1){ + throw new Exception('This PHP installation has no bcrypt support'); + } + + if(is_null($salt)){ + if($compute < 4 || $compute > 31) $compute = 8; + $salt = '$2a$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. + $this->gen_salt(22); + } + + return crypt($password, $salt); + } + } -- cgit v1.2.3 From 5446f3ffde77013d4eaea1fb166bcbd905a777a4 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 22 Oct 2011 16:01:07 +0200 Subject: use correct phpdoc @return tag. --- inc/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index eff984b36..a52c14731 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; -- cgit v1.2.3 From cc204bbd1f1625352ddd0edaacdd297fe022881c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Oct 2011 15:41:53 +0100 Subject: honor autopasswd setting for resend password When autopasswd is disabled, the resend password option now asks for a new password instead of autogenerating a new one and sending it by mail. Note to translators: the wording for btn_resendpwd and resendpwd changed to be more universal. English and German language files where updated - other languages need to be adjusted. Conflicts: inc/lang/en/lang.php --- inc/auth.php | 42 +++++++++++++++++++++++++---------- inc/html.php | 51 +++++++++++++++++++++++++++++++------------ inc/lang/de-informal/lang.php | 4 ++-- inc/lang/de/lang.php | 4 ++-- inc/lang/en/lang.php | 4 ++-- inc/lang/en/resetpwd.txt | 4 ++++ 6 files changed, 78 insertions(+), 31 deletions(-) create mode 100644 inc/lang/en/resetpwd.txt (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index eff984b36..740a75a5c 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -852,32 +852,52 @@ 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; } $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 (auth_sendPassword($user,$pass)) { - msg($lang['resendpwdsuccess'],1); - } else { - msg($lang['regmailfail'],-1); + 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('password mismatch',-1); #FIXME localize + return false; + } + $pass = $_REQUEST['pass']; + + 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 { diff --git a/inc/html.php b/inc/html.php index 1a2d7daef..dea9ac6ab 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1661,26 +1661,49 @@ function html_admin(){ * Form to request a new password for an existing account * * @author Benoit Chesneau + * @author Andreas Gohr */ function html_resendpwd() { global $lang; global $conf; global $ID; - print p_locale_xhtml('resendpwd'); - print '
'.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 '
'.NL; + $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + + if(!$conf['autopasswd'] && $token){ + print p_locale_xhtml('resetpwd'); + print '
'.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_makeTag('br')); + + $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 '
'.NL; + }else{ + print p_locale_xhtml('resendpwd'); + print '
'.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 '
'.NL; + } + + } /** diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index ec5e308ce..74f3126a9 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 eef2f6632..e8e44287f 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.'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 89a7c4d40..9d26a4957 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.'; 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. + -- cgit v1.2.3 From abb56b33e0993b3c6a7f114fbd074cc59626c394 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 28 Oct 2011 14:24:56 +0200 Subject: Check password expiry times in Active Directory backend When a user logs in, the password expiry time is checked and compared to the $conf['auth']['ad']['expirywarn'] setting (in days). If the password is about to expire in the specified timeframe, a warning is issued on login. This patch adds a new method to the adLDAP class for querying domain parameters. --- inc/adLDAP.php | 20 ++++++++++++++++++++ inc/auth/ad.class.php | 28 +++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/adLDAP.php b/inc/adLDAP.php index a64096b85..24be6e475 100644 --- a/inc/adLDAP.php +++ b/inc/adLDAP.php @@ -1020,6 +1020,26 @@ class adLDAP { return (false); } + /** + * Return info about the domain itself + * + * @authot Andreas Gohr + * @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 * diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 1fddad243..6b022d217 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -26,6 +26,8 @@ * $conf['auth']['ad']['use_ssl'] = 1; * $conf['auth']['ad']['use_tls'] = 1; * $conf['auth']['ad']['debug'] = 1; + * // warn user about expiring password in this mayn days in advance: + * $conf['auth']['ad']['expirywarn'] = 5; * * // get additional information to the userinfo array * // add a list of comma separated ldap contact fields. @@ -148,7 +150,7 @@ class auth_ad extends auth_basic { global $conf; if(!$this->_init()) return false; - $fields = array('mail','displayname','samaccountname'); + $fields = array('mail','displayname','samaccountname','lastpwd','pwdlastset','useraccountcontrol'); // add additional fields to read $fields = array_merge($fields, $this->cnf['additional']); @@ -157,10 +159,14 @@ class auth_ad extends auth_basic { //get info for given user $result = $this->adldap->user_info($user, $fields); //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 +189,18 @@ class auth_ad extends auth_basic { $info['grps'][] = $conf['defaultgroup']; } + // password will expire, let's warn the current user + if($_SERVER['REMOTE_USER'] == $user && $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)); + + if($timeleft <= $this->cnf['expirywarn']){ + msg('Your password will expire in '.$timeleft.' days. You should change it.'); + } + } + return $info; } -- cgit v1.2.3 From bb01c27c6c2c8e83091764cebadeef0489985b4b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 2 Nov 2011 08:59:18 +0100 Subject: Added Mailer class --- inc/Mailer.class.php | 324 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 inc/Mailer.class.php (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php new file mode 100644 index 000000000..991ec6c3e --- /dev/null +++ b/inc/Mailer.class.php @@ -0,0 +1,324 @@ + + */ + + +// end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) +// think different +if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); +#define('MAILHEADER_ASCIIONLY',1); + + +class Mailer { + + private $headers = array(); + private $attach = array(); + private $html = ''; + private $text = ''; + + private $boundary = ''; + private $partid = ''; + private $sendparam= ''; + + function __construct(){ + $this->partid = md5(uniqid(rand(),true)).'@'.$_SERVER['SERVER_NAME']; + $this->boundary = '----------'.md5(uniqid(rand(),true)); + } + + /** + * Attach a file + * + * @param $path Path to the file to attach + * @param $mime Mimetype of the attached file + * @param $name The filename to use + * @param $embed Unique key to reference this file from the HTML part + */ + public function attachFile($path,$mime,$name='',$embed=''){ + if(!$name){ + $name = basename($path); + } + + $this->attach[] = array( + 'data' => file_get_contents($path), + 'mime' => $mime, + 'name' => $name, + 'embed' => $embed + ); + } + + /** + * Attach a file + * + * @param $path The file contents to attach + * @param $mime Mimetype of the attached file + * @param $name The filename to use + * @param $embed Unique key to reference this file from the HTML part + */ + public function attachContent($data,$mime,$name='',$embed=''){ + if(!$name){ + list($junk,$ext) = split('/',$mime); + $name = count($this->attach).".$ext"; + } + + $this->attach[] = array( + 'data' => $data, + 'mime' => $mime, + 'name' => $name, + 'embed' => $embed + ); + } + + /** + * Set the HTML part of the mail + * + * Placeholders can be used to reference embedded attachments + */ + public function setHTMLBody($html){ + $this->html = $html; + } + + /** + * Set the plain text part of the mail + */ + public function setTextBody($text){ + $this->text = $text; + } + + /** + * Ses an email address header with correct encoding + * + * Unicode characters will be deaccented and encoded base64 + * for headers. Addresses may not contain Non-ASCII data! + * + * Example: + * setAddress("föö , me@somewhere.com","TBcc"); + * + * @param string $address Multiple adresses separated by commas + * @param string $header Name of the header (To,Bcc,Cc,...) + */ + function mail_encode_address($address,$header){ + // No named recipients for To: in Windows (see FS#652) + $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; + + $headers = ''; + $parts = explode(',',$address); + foreach ($parts as $part){ + $part = trim($part); + + // parse address + if(preg_match('#(.*?)<(.*?)>#',$part,$matches)){ + $text = trim($matches[1]); + $addr = $matches[2]; + }else{ + $addr = $part; + } + // skip empty ones + if(empty($addr)){ + continue; + } + + // FIXME: is there a way to encode the localpart of a emailaddress? + if(!utf8_isASCII($addr)){ + msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"),-1); + continue; + } + + if(!mail_isvalid($addr)){ + msg(htmlspecialchars("E-Mail address <$addr> is not valid"),-1); + continue; + } + + // text was given + if(!empty($text) && $names){ + // add address quotes + $addr = "<$addr>"; + + if(defined('MAILHEADER_ASCIIONLY')){ + $text = utf8_deaccent($text); + $text = utf8_strip($text); + } + + if(!utf8_isASCII($text)){ + //FIXME + // 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).'?="'; + } else { + $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?='; + } + */ + $text = '=?UTF-8?B?'.base64_encode($text).'?='; + } + }else{ + $text = ''; + } + + // add to header comma seperated + if($headers != ''){ + $headers .= ','; + $headers .= MAILHEADER_EOL.' '; // avoid overlong mail headers + } + $headers .= $text.' '.$addr; + } + + if(empty($headers)) return false; + + $this->headers[$header] = $headers; + return $headers; + } + + /** + * Add the To: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function to($address){ + $this->setAddress($address, 'To'); + } + + /** + * Add the Cc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function cc($address){ + $this->setAddress($address, 'Cc'); + } + + /** + * Add the Bcc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function bcc($address){ + $this->setAddress($address, 'Bcc'); + } + + /** + * Add the mail's Subject: header + * + * @param string $subject the mail subject + */ + public function subject($subject){ + if(!utf8_isASCII($subject)){ + $subject = '=?UTF-8?B?'.base64_encode($subject).'?='; + } + $this->headers['Subject'] = $subject; + } + + /** + * Prepare the mime multiparts for all attachments + * + * Replaces placeholders in the HTML with the correct CIDs + */ + protected function prepareAttachments(){ + $mime = ''; + $part = 1; + // embedded attachments + foreach($this->attach as $media){ + // create content id + $cid = 'part'.$part.'.'.$this->partid; + + // replace wildcards + if($media['embed']){ + $this->html = str_replace('%%'.$media['embed'].'%%','cid:'.$cid,$this->html); + } + + $mime .= '--'.$this->boundary.MAILHEADER_EOL; + $mime .= 'Content-Type: '.$media['mime'].';'.MAILHEADER_EOL; + $mime .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; + $mime .= "Content-ID: <$cid>".MAILHEADER_EOL; + if($media['embed']){ + $mime .= 'Content-Disposition: inline; filename="'.$media['name'].'"'.MAILHEADER_EOL; + }else{ + $mime .= 'Content-Disposition: attachment; filename="'.$media['name'].'"'.MAILHEADER_EOL; + } + $mime .= MAILHEADER_EOL; //end of headers + $mime .= chunk_split(base64_encode($media['data']),74,MAILHEADER_EOL); + + $part++; + } + return $mime; + } + + protected function createBody(){ + // check for body + if(!$this->text && !$this->html){ + return false; + } + + // add general headers + $this->headers['MIME-Version'] = '1.0'; + + if(!$this->html && !count($this->attach)){ // we can send a simple single part message + $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; + $this->headers['Content-Transfer-Encoding'] = 'base64'; + $body = chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); + }else{ // multi part it is + + // prepare the attachments + $attachments = $this->prepareAttachments(); + + // do we have alternative text content? + if($this->text && $this->html){ + $this->headers['Content-Type'] = 'multipart/alternative; boundary="'.$this->boundary.'XX"'; + $body = "This is a multi-part message in MIME format.".MAILHEADER_EOL; + $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; + $body .= MAILHEADER_EOL; + $body .= 'Content-Type: text/plain; charset=UTF-8'; + $body .= 'Content-Transfer-Encoding: base64'; + $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); + $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; + $body .= 'Content-Type: multipart/related; boundary="'.$this->boundary.'"'.MAILHEADER_EOL; + $body .= MAILHEADER_EOL; + }else{ + $this->headers['Content-Type'] = 'multipart/related; boundary="'.$this->boundary.'"'; + $body = "This is a multi-part message in MIME format.".MAILHEADER_EOL; + } + + $body .= '--'.$this->boundary."\n"; + $body .= "Content-Type: text/html; charset=UTF-8\n"; + $body .= "Content-Transfer-Encoding: base64\n"; + $body .= MAILHEADER_EOL; + $body = chunk_split(base64_encode($this->html),74,MAILHEADER_EOL); + $body .= MAILHEADER_EOL; + $body .= $attachments; + $body .= '--'.$this->boundary.'--'.MAILHEADER_EOL; + + // close open multipart/alternative boundary + if($this->text && $this->html){ + $body .= '--'.$this->boundary.'XX--'.MAILHEADER_EOL; + } + } + + return $body; + } + + /** + * Create a string from the headers array + */ + protected function prepareHeaders(){ + $headers = ''; + foreach($this->headers as $key => $val){ + $headers .= "$key: $val".MAILHEADER_EOL; + } + return $headers; + } + + /** + * return a full email with all headers + * + * This is mainly for debugging and testing + */ + public function dump(){ + $headers = $this->prepareHeaders(); + $body = $this->prepareBody(); + + return $headers.MAILHEADER_EOL.$body; + } +} -- cgit v1.2.3 From 1d045709e66a239d6a0933c0d07dfbb9fb257d48 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 2 Nov 2011 19:19:11 +0100 Subject: The Mailer class should work now It's still not real world tested but the output *looks* right. Plugin hook support is still missing. --- inc/Mailer.class.php | 173 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 148 insertions(+), 25 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 991ec6c3e..420277d9e 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -1,15 +1,19 @@ */ - // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) // think different if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); #define('MAILHEADER_ASCIIONLY',1); - class Mailer { private $headers = array(); @@ -19,10 +23,23 @@ class Mailer { private $boundary = ''; private $partid = ''; - private $sendparam= ''; + private $sendparam= null; + + private $validator = null; + + /** + * Constructor + * + * Initializes the boundary strings and part counters + */ + public function __construct(){ + if(isset($_SERVER['SERVER_NAME'])){ + $server = $_SERVER['SERVER_NAME']; + }else{ + $server = 'localhost'; + } - function __construct(){ - $this->partid = md5(uniqid(rand(),true)).'@'.$_SERVER['SERVER_NAME']; + $this->partid = md5(uniqid(rand(),true)).'@'.$server; $this->boundary = '----------'.md5(uniqid(rand(),true)); } @@ -69,24 +86,50 @@ class Mailer { ); } + /** + * Add an arbitrary header to the mail + * + * @param string $header the header name (no trailing colon!) + * @param string $value the value of the header + * @param bool $clean remove all non-ASCII chars and line feeds? + */ + public function setHeader($header,$value,$clean=true){ + $header = ucwords(strtolower($header)); // streamline casing + if($clean){ + $header = preg_replace('/[^\w \-\.\+\@]+/','',$header); + $value = preg_replace('/[^\w \-\.\+\@]+/','',$value); + } + $this->headers[$header] = $value; + } + + /** + * Set additional parameters to be passed to sendmail + * + * Whatever is set here is directly passed to PHP's mail() command as last + * parameter. Depending on the PHP setup this might break mailing alltogether + */ + public function setParameters($param){ + $this->sendparam = $param; + } + /** * Set the HTML part of the mail * * Placeholders can be used to reference embedded attachments */ - public function setHTMLBody($html){ + public function setHTML($html){ $this->html = $html; } /** * Set the plain text part of the mail */ - public function setTextBody($text){ + public function setText($text){ $this->text = $text; } /** - * Ses an email address header with correct encoding + * Sets an email address header with correct encoding * * Unicode characters will be deaccented and encoded base64 * for headers. Addresses may not contain Non-ASCII data! @@ -97,10 +140,13 @@ class Mailer { * @param string $address Multiple adresses separated by commas * @param string $header Name of the header (To,Bcc,Cc,...) */ - function mail_encode_address($address,$header){ + function setAddress($address,$header){ // No named recipients for To: in Windows (see FS#652) $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; + $header = ucwords(strtolower($header)); // streamline casing + $address = preg_replace('/[\r\n\0]+/',' ',$address); // remove attack vectors + $headers = ''; $parts = explode(',',$address); foreach ($parts as $part){ @@ -124,7 +170,11 @@ class Mailer { continue; } - if(!mail_isvalid($addr)){ + if(is_null($this->validator)){ + $this->validator = new EmailAddressValidator(); + $this->validator->allowLocalAddresses = true; + } + if(!$this->validator->check_email_address($addr)){ msg(htmlspecialchars("E-Mail address <$addr> is not valid"),-1); continue; } @@ -140,7 +190,7 @@ class Mailer { } if(!utf8_isASCII($text)){ - //FIXME + //FIXME check if this is needed for base64 too // 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)) { @@ -199,6 +249,19 @@ class Mailer { $this->setAddress($address, 'Bcc'); } + /** + * Add the From: address + * + * This is set to $conf['mailfrom'] when not specified so you shouldn't need + * to call this function + * + * @see setAddress + * @param string $address from address + */ + public function from($address){ + $this->setAddress($address, 'From'); + } + /** * Add the mail's Subject: header * @@ -246,20 +309,33 @@ class Mailer { return $mime; } - protected function createBody(){ + /** + * Build the body and handles multi part mails + * + * Needs to be called before prepareHeaders! + * + * @return string the prepared mail body, false on errors + */ + protected function prepareBody(){ + global $conf; + // check for body if(!$this->text && !$this->html){ return false; } // add general headers + if(!isset($this->headers['From'])) $this->from($conf['mailfrom']); $this->headers['MIME-Version'] = '1.0'; + $body = ''; + if(!$this->html && !count($this->attach)){ // we can send a simple single part message $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; $this->headers['Content-Transfer-Encoding'] = 'base64'; - $body = chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); }else{ // multi part it is + $body .= "This is a multi-part message in MIME format.".MAILHEADER_EOL; // prepare the attachments $attachments = $this->prepareAttachments(); @@ -267,25 +343,21 @@ class Mailer { // do we have alternative text content? if($this->text && $this->html){ $this->headers['Content-Type'] = 'multipart/alternative; boundary="'.$this->boundary.'XX"'; - $body = "This is a multi-part message in MIME format.".MAILHEADER_EOL; $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; + $body .= 'Content-Type: text/plain; charset=UTF-8'.MAILHEADER_EOL; + $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body .= 'Content-Type: text/plain; charset=UTF-8'; - $body .= 'Content-Transfer-Encoding: base64'; $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: multipart/related; boundary="'.$this->boundary.'"'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - }else{ - $this->headers['Content-Type'] = 'multipart/related; boundary="'.$this->boundary.'"'; - $body = "This is a multi-part message in MIME format.".MAILHEADER_EOL; } - $body .= '--'.$this->boundary."\n"; - $body .= "Content-Type: text/html; charset=UTF-8\n"; - $body .= "Content-Transfer-Encoding: base64\n"; + $body .= '--'.$this->boundary.MAILHEADER_EOL; + $body .= 'Content-Type: text/html; charset=UTF-8'.MAILHEADER_EOL; + $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body = chunk_split(base64_encode($this->html),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->html),74,MAILHEADER_EOL); $body .= MAILHEADER_EOL; $body .= $attachments; $body .= '--'.$this->boundary.'--'.MAILHEADER_EOL; @@ -301,6 +373,8 @@ class Mailer { /** * Create a string from the headers array + * + * @returns string the headers */ protected function prepareHeaders(){ $headers = ''; @@ -313,12 +387,61 @@ class Mailer { /** * return a full email with all headers * - * This is mainly for debugging and testing + * This is mainly intended for debugging and testing but could also be + * used for MHT exports + * + * @return string the mail, false on errors */ public function dump(){ - $headers = $this->prepareHeaders(); $body = $this->prepareBody(); + if($body === 'false') return false; + $headers = $this->prepareHeaders(); return $headers.MAILHEADER_EOL.$body; } + + /** + * Send the mail + * + * Call this after all data was set + * + * @fixme we need to support the old plugin hook here! + * @return bool true if the mail was successfully passed to the MTA + */ + public function send(){ + // any recipients? + if(trim($this->headers['To']) === '' && + trim($this->headers['Cc']) === '' && + trim($this->headers['Bcc']) === '') return false; + + // The To: header is special + if(isset($this->headers['To'])){ + $to = $this->headers['To']; + unset($this->headers['To']); + }else{ + $to = ''; + } + + // so is the subject + if(isset($this->headers['Subject'])){ + $subject = $this->headers['Subject']; + unset($this->headers['Subject']); + }else{ + $subject = ''; + } + + // make the body + $body = $this->prepareBody(); + if($body === 'false') return false; + + // cook the headers + $headers = $this->prepareHeaders(); + + // send the thing + if(is_null($this->sendparam)){ + return @mail($to,$subject,$body,$headers); + }else{ + return @mail($to,$subject,$body,$headers,$this->sendparam); + } + } } -- cgit v1.2.3 From 22ffffcf6892924895d9ad45f749a307d05e09e0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Nov 2011 14:15:29 +0100 Subject: always check expire time when configured --- inc/auth/ad.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 6b022d217..c3df2417b 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -189,14 +189,16 @@ class auth_ad extends auth_basic { $info['grps'][] = $conf['defaultgroup']; } - // password will expire, let's warn the current user - if($_SERVER['REMOTE_USER'] == $user && $info['expires'] && $this->cnf['expirywarn']){ + // 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($timeleft <= $this->cnf['expirywarn']){ + // if this is the current user, warn him + if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){ msg('Your password will expire in '.$timeleft.' days. You should change it.'); } } -- cgit v1.2.3 From 7f99c819166c15279a3214e3439be8efb77f7021 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Nov 2011 14:31:09 +0100 Subject: do not query AD for empty user name --- inc/auth/ad.class.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index c3df2417b..4363cfb07 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -150,6 +150,8 @@ class auth_ad extends auth_basic { global $conf; if(!$this->_init()) return false; + if($user == '') return array(); + $fields = array('mail','displayname','samaccountname','lastpwd','pwdlastset','useraccountcontrol'); // add additional fields to read -- cgit v1.2.3 From 9565908d97917c579e2ecb44a0b44a133df598fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Nov 2011 14:36:23 +0100 Subject: Don't return any data for non-existant users --- inc/auth/ad.class.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 4363cfb07..678a32047 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -160,6 +160,10 @@ 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]; -- cgit v1.2.3 From b2117c6969fc31aa958f6019fd1e4e258f555db7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Nov 2011 14:49:29 +0100 Subject: translatable AD expiry warning and link to update profile page --- inc/auth/ad.class.php | 5 +++-- inc/lang/de/lang.php | 1 + inc/lang/en/lang.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 678a32047..cb59c5a48 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -26,7 +26,7 @@ * $conf['auth']['ad']['use_ssl'] = 1; * $conf['auth']['ad']['use_tls'] = 1; * $conf['auth']['ad']['debug'] = 1; - * // warn user about expiring password in this mayn days in advance: + * // warn user about expiring password this many days in advance: * $conf['auth']['ad']['expirywarn'] = 5; * * // get additional information to the userinfo array @@ -148,6 +148,7 @@ class auth_ad extends auth_basic { */ function getUserData($user){ global $conf; + global $lang; if(!$this->_init()) return false; if($user == '') return array(); @@ -205,7 +206,7 @@ class auth_ad extends auth_basic { // if this is the current user, warn him if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){ - msg('Your password will expire in '.$timeleft.' days. You should change it.'); + msg(sprintf($lang['authpwdexpire'],$timeleft)); } } diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index eef2f6632..8fdffd66e 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -268,6 +268,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 ändern.'; $lang['i_chooselang'] = 'Wählen Sie Ihre Sprache'; $lang['i_installer'] = 'DokuWiki Installation'; $lang['i_wikiname'] = 'Wiki-Name'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 89a7c4d40..9250d119a 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -275,6 +275,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.'; /* installer strings */ $lang['i_chooselang'] = 'Choose your language'; -- cgit v1.2.3 From 95fbd79bc40a02aa5fdf80a55e8f2c77e5ae71f2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Nov 2011 15:16:36 +0100 Subject: German translation for password reset --- inc/lang/de/resetpwd.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 inc/lang/de/resetpwd.txt (limited to 'inc') 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. + -- cgit v1.2.3 From a36fc3485fd92593133d56e9bb98d739d70ed94f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 11:01:22 +0100 Subject: clean headers in a separate step this should make it easier to reintroduce a plugin hook compatible with the old one --- inc/Mailer.class.php | 179 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 115 insertions(+), 64 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 420277d9e..8f2992201 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -89,6 +89,8 @@ class Mailer { /** * Add an arbitrary header to the mail * + * If an empy value is passed, the header is removed + * * @param string $header the header name (no trailing colon!) * @param string $value the value of the header * @param bool $clean remove all non-ASCII chars and line feeds? @@ -99,7 +101,14 @@ class Mailer { $header = preg_replace('/[^\w \-\.\+\@]+/','',$header); $value = preg_replace('/[^\w \-\.\+\@]+/','',$value); } - $this->headers[$header] = $value; + + // empty value deletes + $value = trim($value); + if($value === ''){ + if(isset($this->headers[$header])) unset($this->headers[$header]); + }else{ + $this->headers[$header] = $value; + } } /** @@ -128,6 +137,58 @@ class Mailer { $this->text = $text; } + /** + * Add the To: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function to($address){ + $this->setHeader('To', $address, false); + } + + /** + * Add the Cc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function cc($address){ + $this->setHeader('Cc', $address, false); + } + + /** + * Add the Bcc: recipients + * + * @see setAddress + * @param string $address Multiple adresses separated by commas + */ + public function bcc($address){ + $this->setHeader('Bcc', $address, false); + } + + /** + * Add the From: address + * + * This is set to $conf['mailfrom'] when not specified so you shouldn't need + * to call this function + * + * @see setAddress + * @param string $address from address + */ + public function from($address){ + $this->setHeader('From', $address, false); + } + + /** + * Add the mail's Subject: header + * + * @param string $subject the mail subject + */ + public function subject($subject){ + $this->headers['Subject'] = $subject; + } + /** * Sets an email address header with correct encoding * @@ -138,13 +199,12 @@ class Mailer { * setAddress("föö , me@somewhere.com","TBcc"); * * @param string $address Multiple adresses separated by commas - * @param string $header Name of the header (To,Bcc,Cc,...) + * @param string returns the prepared header (can contain multiple lines) */ - function setAddress($address,$header){ + public function cleanAddress($address){ // No named recipients for To: in Windows (see FS#652) $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; - $header = ucwords(strtolower($header)); // streamline casing $address = preg_replace('/[\r\n\0]+/',' ',$address); // remove attack vectors $headers = ''; @@ -207,72 +267,16 @@ class Mailer { // add to header comma seperated if($headers != ''){ - $headers .= ','; - $headers .= MAILHEADER_EOL.' '; // avoid overlong mail headers + $headers .= ', '; } $headers .= $text.' '.$addr; } if(empty($headers)) return false; - $this->headers[$header] = $headers; return $headers; } - /** - * Add the To: recipients - * - * @see setAddress - * @param string $address Multiple adresses separated by commas - */ - public function to($address){ - $this->setAddress($address, 'To'); - } - - /** - * Add the Cc: recipients - * - * @see setAddress - * @param string $address Multiple adresses separated by commas - */ - public function cc($address){ - $this->setAddress($address, 'Cc'); - } - - /** - * Add the Bcc: recipients - * - * @see setAddress - * @param string $address Multiple adresses separated by commas - */ - public function bcc($address){ - $this->setAddress($address, 'Bcc'); - } - - /** - * Add the From: address - * - * This is set to $conf['mailfrom'] when not specified so you shouldn't need - * to call this function - * - * @see setAddress - * @param string $address from address - */ - public function from($address){ - $this->setAddress($address, 'From'); - } - - /** - * Add the mail's Subject: header - * - * @param string $subject the mail subject - */ - public function subject($subject){ - if(!utf8_isASCII($subject)){ - $subject = '=?UTF-8?B?'.base64_encode($subject).'?='; - } - $this->headers['Subject'] = $subject; - } /** * Prepare the mime multiparts for all attachments @@ -325,7 +329,6 @@ class Mailer { } // add general headers - if(!isset($this->headers['From'])) $this->from($conf['mailfrom']); $this->headers['MIME-Version'] = '1.0'; $body = ''; @@ -342,14 +345,16 @@ class Mailer { // do we have alternative text content? if($this->text && $this->html){ - $this->headers['Content-Type'] = 'multipart/alternative; boundary="'.$this->boundary.'XX"'; + $this->headers['Content-Type'] = 'multipart/alternative;'.MAILHEADER_EOL. + ' boundary="'.$this->boundary.'XX"'; $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: text/plain; charset=UTF-8'.MAILHEADER_EOL; $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; - $body .= 'Content-Type: multipart/related; boundary="'.$this->boundary.'"'.MAILHEADER_EOL; + $body .= 'Content-Type: multipart/related;'.MAILHEADER_EOL. + ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; } @@ -371,6 +376,47 @@ class Mailer { return $body; } + /** + * Cleanup and encode the headers array + */ + protected function cleanHeaders(){ + global $conf; + + // clean up addresses + if(empty($this->headers['From'])) $this->from($conf['mailfrom']); + $addrs = array('To','From','Cc','Bcc'); + foreach($addrs as $addr){ + if(isset($this->headers[$addr])){ + $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); + } + } + + if(isset($subject)){ + // add prefix to subject + if($conf['mailprefix']){ + $prefix = '['.$conf['mailprefix'].']'; + $len = strlen($prefix); + if(substr($this->headers['subject'],0,$len) != $prefix){ + $this->headers['subject'] = $prefix.' '.$this->headers['subject']; + } + } + + // encode subject + if(defined('MAILHEADER_ASCIIONLY')){ + $this->headers['subject'] = utf8_deaccent($this->headers['subject']); + $this->headers['subject'] = utf8_strip($this->headers['subject']); + } + if(!utf8_isASCII($this->headers['Subject'])){ + $subject = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; + } + } + + // wrap headers + foreach($this->headers as $key => $val){ + $this->headers[$key] = wordwrap($val,78,MAILHEADER_EOL.' '); + } + } + /** * Create a string from the headers array * @@ -393,6 +439,7 @@ class Mailer { * @return string the mail, false on errors */ public function dump(){ + $this->cleanHeaders(); $body = $this->prepareBody(); if($body === 'false') return false; $headers = $this->prepareHeaders(); @@ -409,6 +456,10 @@ class Mailer { * @return bool true if the mail was successfully passed to the MTA */ public function send(){ + // FIXME hook here + + $this->cleanHeaders(); + // any recipients? if(trim($this->headers['To']) === '' && trim($this->headers['Cc']) === '' && -- cgit v1.2.3 From 28d2ad801d5eafcfdfc9a122966458b2689a7ec6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 11:35:17 +0100 Subject: added old plugin hook back into Mailer class it now passes the whole Mail object and also signals if the mail sending was successful to the AFTER event. A bunch of references should make it compatible with old plugins. --- inc/Mailer.class.php | 95 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 33 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 8f2992201..3b7762e77 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -452,47 +452,76 @@ class Mailer { * * Call this after all data was set * - * @fixme we need to support the old plugin hook here! + * @triggers MAIL_MESSAGE_SEND * @return bool true if the mail was successfully passed to the MTA */ public function send(){ - // FIXME hook here - - $this->cleanHeaders(); - - // any recipients? - if(trim($this->headers['To']) === '' && - trim($this->headers['Cc']) === '' && - trim($this->headers['Bcc']) === '') return false; + $success = false; + + // prepare hook data + $data = array( + // pass the whole mail class to plugin + 'mail' => $this, + // pass references for backward compatibility + 'to' => &$this->headers['To'], + 'cc' => &$this->headers['Cc'], + 'bcc' => &$this->headers['Bcc'], + 'from' => &$this->headers['From'], + 'subject' => &$this->headers['Subject'], + 'body' => &$this->text, + 'params' => &$this->sendparams, + 'headers' => '', // plugins shouldn't use this + // signal if we mailed successfully to AFTER event + 'success' => &$success, + ); - // The To: header is special - if(isset($this->headers['To'])){ - $to = $this->headers['To']; - unset($this->headers['To']); - }else{ - $to = ''; - } + // do our thing if BEFORE hook approves + $evt = new Doku_Event('MAIL_MESSAGE_SEND', $data); + if ($evt->advise_before(true)) { + // clean up before using the headers + $this->cleanHeaders(); + + // any recipients? + if(trim($this->headers['To']) === '' && + trim($this->headers['Cc']) === '' && + trim($this->headers['Bcc']) === '') return false; + + // The To: header is special + if(isset($this->headers['To'])){ + $to = $this->headers['To']; + unset($this->headers['To']); + }else{ + $to = ''; + } - // so is the subject - if(isset($this->headers['Subject'])){ - $subject = $this->headers['Subject']; - unset($this->headers['Subject']); - }else{ - $subject = ''; - } + // so is the subject + if(isset($this->headers['Subject'])){ + $subject = $this->headers['Subject']; + unset($this->headers['Subject']); + }else{ + $subject = ''; + } - // make the body - $body = $this->prepareBody(); - if($body === 'false') return false; + // make the body + $body = $this->prepareBody(); + if($body === 'false') return false; - // cook the headers - $headers = $this->prepareHeaders(); + // cook the headers + $headers = $this->prepareHeaders(); + // add any headers set by legacy plugins + if(trim($data['headers'])){ + $headers .= MAILHEADER_EOL.trim($data['headers']); + } - // send the thing - if(is_null($this->sendparam)){ - return @mail($to,$subject,$body,$headers); - }else{ - return @mail($to,$subject,$body,$headers,$this->sendparam); + // send the thing + if(is_null($this->sendparam)){ + $success = @mail($to,$subject,$body,$headers); + }else{ + $success = @mail($to,$subject,$body,$headers,$this->sendparam); + } } + // any AFTER actions? + $evt->advise_after(); + return $success; } } -- cgit v1.2.3 From 54f3075553a782ff5e32a5326f0e225f4437be29 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 11:54:51 +0100 Subject: mail prefix defaults to title when empty --- inc/Mailer.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 3b7762e77..7b09cf75e 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -393,12 +393,14 @@ class Mailer { if(isset($subject)){ // add prefix to subject - if($conf['mailprefix']){ + if(empty($conf['mailprefix'])){ + $prefix = '['.$conf['title'].']'; + }else{ $prefix = '['.$conf['mailprefix'].']'; - $len = strlen($prefix); - if(substr($this->headers['subject'],0,$len) != $prefix){ - $this->headers['subject'] = $prefix.' '.$this->headers['subject']; - } + } + $len = strlen($prefix); + if(substr($this->headers['subject'],0,$len) != $prefix){ + $this->headers['subject'] = $prefix.' '.$this->headers['subject']; } // encode subject -- cgit v1.2.3 From 8a215f0965e27ba6b9e62b955890f1acc9445883 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 12:20:46 +0100 Subject: shorten title when used as prefix --- inc/Mailer.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 7b09cf75e..ffacc661d 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -394,7 +394,11 @@ class Mailer { if(isset($subject)){ // add prefix to subject if(empty($conf['mailprefix'])){ - $prefix = '['.$conf['title'].']'; + if(utf8_strlen($conf['title']) < 20) { + $prefix = '['.$conf['title'].']'; + }else{ + $prefix = '['.utf8_substr($conf['title'], 0, 20).'...]'; + } }else{ $prefix = '['.$conf['mailprefix'].']'; } -- cgit v1.2.3 From abbf08905d37ee82c6dda4c2afdbb54383c91517 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 13:02:00 +0100 Subject: Added setBody() to Mailer class This method makes it easy to send a HTML mail based on the default text mails. This is probably enough for simpler mails where no sophisticated HTML is needed except a bit of formatting and linked URLs. --- inc/Mailer.class.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index ffacc661d..b86a9d8f2 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -121,10 +121,80 @@ class Mailer { $this->sendparam = $param; } + /** + * Set the text and HTML body and apply replacements + * + * This function applies a whole bunch of default replacements in addition + * to the ones specidifed as parameters + * + * If you pass the HTML part or HTML replacements yourself you have to make + * sure you encode all HTML special chars correctly + * + * @fixme the HTML head and body still needs to be set + * @param string $text plain text body + * @param array $textrep replacements to apply on the text part + * @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep + * @param array $html the HTML body, leave null to create it from $text + */ + public function setBody($text, $textrep=null, $htmlrep=null, $html=null){ + global $INFO; + global $conf; + + // create HTML from text if not given + if(is_null($html)){ + $html = hsc($text); + $html = nl2br($text); + } + if(!is_null($textrep) && is_null($htmlrep)){ + $htmlrep = array_map('hsc',$textrep); + } + + // prepare default replacements + $ip = clientIP(); + $trep = array( + 'DATE' => dformat(), + 'BROWSER' => $_SERVER['HTTP_USER_AGENT'], + 'IPADDRESS' => $ip, + 'HOSTNAME' => gethostsbyaddrs($ip), + 'TITLE' => $conf['title'], + 'DOKUWIKIURL' => DOKU_URL, + 'USER' => $_SERVER['REMOTE_USER'], + 'NAME' => $INFO['userinfo']['name'], + 'MAIL' => $INFO['userinfo']['mail'], + ); + $trep = array_merge($trep,(array) $textrep); + $hrep = array( + 'DATE' => ''.hsc(dformat()).'', + 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']), + 'IPADDRESS' => ''.hsc($ip).'', + 'HOSTNAME' => ''.hsc(gethostsbyaddrs($ip)).'', + 'TITLE' => hsc($conf['title']), + 'DOKUWIKIURL' => ''.DOKU_URL.'', + 'USER' => hsc($_SERVER['REMOTE_USER']), + 'NAME' => hsc($INFO['userinfo']['name']), + 'MAIL' => ''. + hsc($INFO['userinfo']['mail']).'', + ); + $hrep = array_merge($hrep,(array) $htmlrep); + + // Apply replacements + foreach ($trep as $key => $substitution) { + $text = str_replace('@'.strtoupper($key).'@',$substitution, $text); + } + foreach ($hrep as $key => $substitution) { + $html = str_replace('@'.strtoupper($key).'@',$substitution, $html); + } + + $this->setHTML($html); + $this->setText($text); + } + /** * Set the HTML part of the mail * * Placeholders can be used to reference embedded attachments + * + * You probably want to use setBody() instead */ public function setHTML($html){ $this->html = $html; @@ -132,6 +202,8 @@ class Mailer { /** * Set the plain text part of the mail + * + * You probably want to use setBody() instead */ public function setText($text){ $this->text = $text; -- cgit v1.2.3 From 76efd6d0637bb67b7dadf65f29a945fe2ce5fc25 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 17:00:25 +0100 Subject: Copy all text replacements to HTML replacements in Mailer With this change it's easy to just set the replacements for HTML that need special attention. --- inc/Mailer.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index b86a9d8f2..09e457243 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -139,14 +139,22 @@ class Mailer { public function setBody($text, $textrep=null, $htmlrep=null, $html=null){ global $INFO; global $conf; + $htmlrep = (array) $htmlrep; + $textrep = (array) $textrep; // create HTML from text if not given if(is_null($html)){ $html = hsc($text); $html = nl2br($text); } - if(!is_null($textrep) && is_null($htmlrep)){ - $htmlrep = array_map('hsc',$textrep); + // copy over all replacements missing for HTML (autolink URLs) + foreach($textrep as $key => $value){ + if(isset($htmlrep[$key])) continue; + if(preg_match('/^https?:\/\//i',$value)){ + $htmlrep[$key] = ''.hsc($value).''; + }else{ + $htmlrep[$key] = hsc($value); + } } // prepare default replacements -- cgit v1.2.3 From 6df843ee8dd8133de3e4e8d5cb742d2afa5f6761 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 17:02:02 +0100 Subject: Make use of new Mailer class in notify() It now uses inline diff format for diff HTML mails --- inc/common.php | 74 +++++++++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 40 deletions(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 0c769c50d..b624c334c 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1087,7 +1087,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ global $conf; global $INFO; - // decide if there is something to do + // decide if there is something to do, eg. whom to mail if($who == 'admin'){ if(empty($conf['notify'])) return; //notify enabled? $text = rawLocale('mailtext'); @@ -1112,49 +1112,43 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ return; //just to be safe } - $ip = clientIP(); - $text = str_replace('@DATE@',dformat(),$text); - $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text); - $text = str_replace('@IPADDRESS@',$ip,$text); - $text = str_replace('@HOSTNAME@',gethostsbyaddrs($ip),$text); - $text = str_replace('@NEWPAGE@',wl($id,'',true,'&'),$text); - $text = str_replace('@PAGE@',$id,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@SUMMARY@',$summary,$text); - $text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text); - $text = str_replace('@NAME@',$INFO['userinfo']['name'],$text); - $text = str_replace('@MAIL@',$INFO['userinfo']['mail'],$text); - - foreach ($replace as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@',$substitution, $text); - } + // prepare replacements (keys not set in hrep will be taken from trep) + $trep = array( + 'NEWPAGE' => wl($id,'',true,'&'), + 'PAGE' => $id, + 'SUMMARY' => $summary + ); + $trep = array_merge($trep,$replace); + $hrep = array(); + // prepare content if($who == 'register'){ - $subject = $lang['mail_new_user'].' '.$summary; + $subject = $lang['mail_new_user'].' '.$summary; }elseif($rev){ - $subject = $lang['mail_changed'].' '.$id; - $text = str_replace('@OLDPAGE@',wl($id,"rev=$rev",true,'&'),$text); - $df = new Diff(explode("\n",rawWiki($id,$rev)), - explode("\n",rawWiki($id))); - $dformat = new UnifiedDiffFormatter(); - $diff = $dformat->format($df); + $subject = $lang['mail_changed'].' '.$id; + $trep['OLDPAGE'] = wl($id,"rev=$rev",true,'&'); + $df = new Diff(explode("\n",rawWiki($id,$rev)), + explode("\n",rawWiki($id))); + $dformat = new UnifiedDiffFormatter(); + $tdiff = $dformat->format($df); + $dformat = new InlineDiffFormatter(); + $hdiff = $dformat->format($df); }else{ - $subject=$lang['mail_newpage'].' '.$id; - $text = str_replace('@OLDPAGE@','none',$text); - $diff = rawWiki($id); - } - $text = str_replace('@DIFF@',$diff,$text); - if(empty($conf['mailprefix'])) { - if(utf8_strlen($conf['title']) < 20) { - $subject = '['.$conf['title'].'] '.$subject; - }else{ - $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject; - } - }else{ - $subject = '['.$conf['mailprefix'].'] '.$subject; - } - mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc); + $subject = $lang['mail_newpage'].' '.$id; + $trep['OLDPAGE'] = '---'; + $tdiff = rawWiki($id); + $hdiff = nl2br(hsc($tdiff)); + } + $trep['DIFF'] = $tdiff; + $hrep['DIFF'] = $hdiff; + + // send mail + $mail = new Mailer(); + $mail->to($to); + $mail->bcc($bcc); + $mail->subject($subject); + $mail->setBody($text,$trep); + return $mail->send(); } /** -- cgit v1.2.3 From d7169d19cde6fc49e27e7444e424549212339ff9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 17:50:47 +0100 Subject: Replaced mail_send calls with new Mailer class --- inc/auth.php | 42 ++++++++++++++++++++++-------------------- inc/media.php | 34 ++++++++++++++-------------------- inc/subscription.php | 18 ++++++++---------- 3 files changed, 44 insertions(+), 50 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index eff984b36..49346a84f 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -667,16 +667,17 @@ function auth_sendPassword($user,$password){ if(!$userinfo['mail']) return false; $text = rawLocale('password'); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@FULLNAME@',$userinfo['name'],$text); - $text = str_replace('@LOGIN@',$user,$text); - $text = str_replace('@PASSWORD@',$password,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - - return mail_send($userinfo['name'].' <'.$userinfo['mail'].'>', - $lang['regpwmail'], - $text, - $conf['mailfrom']); + $trep = array( + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'PASSWORD' => $password + ); + + $mail = new Mailer(); + $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); + $mail->subject($lang['regpwmail']); + $mail->setBody($text,$trep); + return $mail->send(); } /** @@ -906,16 +907,17 @@ function act_resendpwd(){ io_saveFile($tfile,$user); $text = rawLocale('pwconfirm'); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@FULLNAME@',$userinfo['name'],$text); - $text = str_replace('@LOGIN@',$user,$text); - $text = str_replace('@TITLE@',$conf['title'],$text); - $text = str_replace('@CONFIRM@',$url,$text); - - if(mail_send($userinfo['name'].' <'.$userinfo['mail'].'>', - $lang['regpwmail'], - $text, - $conf['mailfrom'])){ + $trep = array( + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'CONFIRM' => $url + ); + + $mail = new Mailer(); + $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); + $mail->subject($lang['regpwmail']); + $mail->setBody($text,$trep); + if($mail->send()){ msg($lang['resendpwdconfirm'],1); }else{ msg($lang['regmailfail'],-1); diff --git a/inc/media.php b/inc/media.php index 9d3e90a54..4e014877b 100644 --- a/inc/media.php +++ b/inc/media.php @@ -514,6 +514,7 @@ function media_contentcheck($file,$mime){ * Send a notify mail on uploads * * @author Andreas Gohr + * @fixme this should embed thumbnails of images in HTML version */ function media_notify($id,$file,$mime,$old_rev=false){ global $lang; @@ -521,31 +522,24 @@ function media_notify($id,$file,$mime,$old_rev=false){ global $INFO; if(empty($conf['notify'])) return; //notify enabled? - $ip = clientIP(); - $text = rawLocale('uploadmail'); - $text = str_replace('@DATE@',dformat(),$text); - $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text); - $text = str_replace('@IPADDRESS@',$ip,$text); - $text = str_replace('@HOSTNAME@',gethostsbyaddrs($ip),$text); - $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); - $text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text); - $text = str_replace('@MIME@',$mime,$text); - $text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text); - $text = str_replace('@SIZE@',filesize_h(filesize($file)),$text); - if ($old_rev && $conf['mediarevisions']) { - $text = str_replace('@OLD@', ml($id, "rev=$old_rev", true, '&', true), $text); - } else { - $text = str_replace('@OLD@', '', $text); - } + $trep = array( + 'MIME' => $mime, + 'MEDIA' => ml($id,'',true,'&',true), + 'SIZE' => filesize_h(filesize($file)), + ); - if(empty($conf['mailprefix'])) { - $subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id; + if ($old_rev && $conf['mediarevisions']) { + $trep['OLD'] = ml($id, "rev=$old_rev", true, '&', true); } else { - $subject = '['.$conf['mailprefix'].'] '.$lang['mail_upload'].' '.$id; + $trep['OLD'] = '---'; } - mail_send($conf['notify'],$subject,$text,$conf['mailfrom']); + $mail = new Mailer(); + $mail->to($conf['notify']); + $mail->subject($lang['mail_upload'].' '.$id); + $mail->setBody($text,$trep); + return $mail->send(); } /** diff --git a/inc/subscription.php b/inc/subscription.php index c94f17ad0..e9f17bc28 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -377,18 +377,16 @@ function subscription_send_list($subscriber_mail, $ids, $ns_id) { */ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) { global $conf; + global $lang; $text = rawLocale($template); - $replaces = array_merge($replaces, array('TITLE' => $conf['title'], - 'DOKUWIKIURL' => DOKU_URL, - 'PAGE' => $id)); - - foreach ($replaces as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@', $substitution, $text); - } + $trep = array_merge($replaces, array('PAGE' => $id)); - global $lang; $subject = $lang['mail_' . $subject] . ' ' . $id; - mail_send('', '['.$conf['title'].'] '. $subject, $text, - $conf['mailfrom'], '', $subscriber_mail); + $mail = new Mailer(); + $mail->bcc($subscriber_mail); + $mail->subject($subject); + $mail->setBody($text,$trep); + + return $mail->send(); } -- cgit v1.2.3 From c9a53c46de6ad79de64bd49ca6e4e8296982aa86 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 12 Nov 2011 17:52:19 +0100 Subject: added Mailer class to autoloader --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/load.php b/inc/load.php index d30397f6e..b5cfd4273 100644 --- a/inc/load.php +++ b/inc/load.php @@ -76,6 +76,7 @@ function load_autoload($name){ 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', 'PassHash' => DOKU_INC.'inc/PassHash.class.php', + 'Mailer' => DOKU_INC.'inc/Mailer.class.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', -- cgit v1.2.3 From 2adaf2b8a608f4a1ac3fe0dba94ff28d7a0d48e5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 13 Nov 2011 12:18:09 +0100 Subject: allow non-txt extensions when accessing locales --- inc/common.php | 4 ++-- inc/pageutils.php | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index b624c334c..1d8061ab0 100644 --- a/inc/common.php +++ b/inc/common.php @@ -789,8 +789,8 @@ function formText($text){ * * @author Andreas Gohr */ -function rawLocale($id){ - return io_readFile(localeFN($id)); +function rawLocale($id,$ext='txt'){ + return io_readFile(localeFN($id,$ext)); } /** diff --git a/inc/pageutils.php b/inc/pageutils.php index 31b5f9ff9..c355d4894 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -347,27 +347,29 @@ 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; } /** - * Returns the full filepath to a localized textfile if local + * Returns the full filepath to a localized file if local * version isn't found the english one is returned * + * @param string $id The id of the local file + * @param string $ext The file extension (usually txt) * @author Andreas Gohr */ -function localeFN($id){ +function localeFN($id,$ext='txt'){ global $conf; - $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ - $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ //fall back to english - $file = DOKU_INC.'inc/lang/en/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/en/'.$id.'.'.$ext; } } return $file; -- cgit v1.2.3 From f08086ec453c4529ae7361f9540b430ee61238f0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 13 Nov 2011 12:37:45 +0100 Subject: Added HTML wrapper for mails The mailwrap.html adds the standard headers and footers to all HTML mails. The signature present in the text body will be removed before inserting in the wrapper, allowing a nicer footer for HTML. Users can overwrite the file with their own to create HTML mails in corporate design. However, a way to automatically embed referenced images is missing currently. --- inc/Mailer.class.php | 15 +++++++++++---- inc/lang/en/mailwrap.html | 13 +++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 inc/lang/en/mailwrap.html (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 09e457243..cdd4b266a 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -130,13 +130,13 @@ class Mailer { * If you pass the HTML part or HTML replacements yourself you have to make * sure you encode all HTML special chars correctly * - * @fixme the HTML head and body still needs to be set * @param string $text plain text body * @param array $textrep replacements to apply on the text part * @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep * @param array $html the HTML body, leave null to create it from $text + * @param bool $wrap wrap the HTML in the default header/Footer */ - public function setBody($text, $textrep=null, $htmlrep=null, $html=null){ + public function setBody($text, $textrep=null, $htmlrep=null, $html=null, $wrap=true){ global $INFO; global $conf; $htmlrep = (array) $htmlrep; @@ -147,6 +147,12 @@ class Mailer { $html = hsc($text); $html = nl2br($text); } + if($wrap){ + $wrap = rawLocale('mailwrap','html'); + $html = preg_replace('/\n-- \n.*$/m','',$html); //strip signature + $html = str_replace('@HTMLBODY@',$html,$wrap); + } + // copy over all replacements missing for HTML (autolink URLs) foreach($textrep as $key => $value){ if(isset($htmlrep[$key])) continue; @@ -159,11 +165,12 @@ class Mailer { // prepare default replacements $ip = clientIP(); + $cip = gethostsbyaddrs($ip); $trep = array( 'DATE' => dformat(), 'BROWSER' => $_SERVER['HTTP_USER_AGENT'], 'IPADDRESS' => $ip, - 'HOSTNAME' => gethostsbyaddrs($ip), + 'HOSTNAME' => $cip, 'TITLE' => $conf['title'], 'DOKUWIKIURL' => DOKU_URL, 'USER' => $_SERVER['REMOTE_USER'], @@ -175,7 +182,7 @@ class Mailer { 'DATE' => ''.hsc(dformat()).'', 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']), 'IPADDRESS' => ''.hsc($ip).'', - 'HOSTNAME' => ''.hsc(gethostsbyaddrs($ip)).'', + 'HOSTNAME' => ''.hsc($cip).'', 'TITLE' => hsc($conf['title']), 'DOKUWIKIURL' => ''.DOKU_URL.'', 'USER' => hsc($_SERVER['REMOTE_USER']), diff --git a/inc/lang/en/mailwrap.html b/inc/lang/en/mailwrap.html new file mode 100644 index 000000000..d67644c95 --- /dev/null +++ b/inc/lang/en/mailwrap.html @@ -0,0 +1,13 @@ + + + @TITLE@ + + + + +@HTMLBODY@ + +


+This mail was generated by DokuWiki at @DOKUWIKIURL@. + + -- cgit v1.2.3 From 850dbf1f4b1e2bdee8b2e5f0438a5625d0a1bedf Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 13 Nov 2011 13:06:07 +0100 Subject: allow image embeds in HTML mail templates Using the place holder @MEDIA()@ you now can directly embed images from the media repository into your HTML mail template. An example was added to the mailwrap.html, but because images are embedded as is (no prescaling) this is suboptimal. If we keep it, a smaller version of the DokuWiki logo should be shipped with DokuWiki. --- inc/Mailer.class.php | 22 ++++++++++++++++++++++ inc/lang/en/mailwrap.html | 1 + 2 files changed, 23 insertions(+) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index cdd4b266a..7e6889292 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -86,6 +86,24 @@ class Mailer { ); } + /** + * Callback function to automatically embed images referenced in HTML templates + */ + protected function autoembed_cb($matches){ + static $embeds = 0; + $embeds++; + + // get file and mime type + $media = cleanID($matches[1]); + list($ext, $mime) = mimetype($media); + $file = mediaFN($media); + if(!file_exists($file)) return $matches[0]; //bad reference, keep as is + + // attach it and set placeholder + $this->attachFile($file,$mime,'','autoembed'.$embeds); + return '%%autoembed'.$embeds.'%%'; + } + /** * Add an arbitrary header to the mail * @@ -163,6 +181,10 @@ class Mailer { } } + // embed media from templates + $html = preg_replace_callback('/@MEDIA\(([^\)]+)\)@/', + array($this,'autoembed_cb'),$html); + // prepare default replacements $ip = clientIP(); $cip = gethostsbyaddrs($ip); diff --git a/inc/lang/en/mailwrap.html b/inc/lang/en/mailwrap.html index d67644c95..00daf29ac 100644 --- a/inc/lang/en/mailwrap.html +++ b/inc/lang/en/mailwrap.html @@ -8,6 +8,7 @@ @HTMLBODY@


+DokuWiki This mail was generated by DokuWiki at @DOKUWIKIURL@. -- cgit v1.2.3 From a4e0e797f6bce4aaabf4e115a277db8c9a1fa285 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 19 Nov 2011 14:40:11 +0100 Subject: enabled remote as plugintype --- inc/init.php | 2 +- inc/load.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index b3acf2e33..ba62fe079 100644 --- a/inc/init.php +++ b/inc/init.php @@ -200,7 +200,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'; diff --git a/inc/load.php b/inc/load.php index d30397f6e..b69d58140 100644 --- a/inc/load.php +++ b/inc/load.php @@ -89,7 +89,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 -- cgit v1.2.3 From 1017f6f159386699a10d2529c50fb5e28b5c1889 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 19 Nov 2011 14:40:29 +0100 Subject: begin with remote api --- inc/remote.php | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 inc/remote.php (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php new file mode 100644 index 000000000..ea5e23af3 --- /dev/null +++ b/inc/remote.php @@ -0,0 +1,120 @@ + array( + * 'args' => array( + * 'type' => 'string|int|...', + * ) + * ) + * ) + * + * 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..'. + * i.e.: plugin.clock.getTime or plugin.clock_gmt.getTime + * + * + * + * @throws RemoteException + */ +class RemoteAPI { + + /** + * @var array remote methods provided by dokuwiki. + */ + private $coreMethods = array(); + + /** + * @var array remote methods provided by dokuwiki plugins - will be filled lazy via + * {@see RemoteAPI#getPluginMethods} + */ + private $pluginMethods = null; + + /** + * Get all available methods with remote access. + * + * @return array with information to all available methods + */ + public function getMethods() { + $this->forceAccess(); + 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) { + $this->forceAccess(); + $method = explode('.', $method); + if ($method[0] === 'plugin') { + $plugin = plugin_load('remote', $method[1]); + if (!$plugin) { + throw new RemoteException('Method unavailable'); + } + return call_user_func_array(array($plugin, $method[2]), $args); + } else { + // TODO call core method + } + + } + + /** + * @return bool true if the current user has access to remote api. + */ + public function hasAccess() { + global $conf; + if (!isset($conf['remote'])) { + return false; + } + return $conf['remote']; + } + + /** + * @throws RemoteException On denied access. + * @return void + */ + private function forceAccess() { + if (!$this->hasAccess()) { + throw new RemoteException('Access denied'); + } + } + + /** + * @return array all plugin methods. + */ + public function getPluginMethods() { + if ($this->pluginMethods === null) { + // TODO: find plugin methods + $this->pluginMethods = array(); + } + return $this->pluginMethods; + } + + /** + * @return array all core methods. + */ + public function getCoreMethods() { + return $this->coreMethods; + } +} + + +class RemoteException extends Exception {} \ No newline at end of file -- cgit v1.2.3 From 457ad80ad7c53870fc033997bfbf36e3904f9c4e Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 23 Nov 2011 20:25:58 +0100 Subject: introduced remote api class --- inc/load.php | 2 ++ inc/remote.php | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/load.php b/inc/load.php index b69d58140..3f1f3429f 100644 --- a/inc/load.php +++ b/inc/load.php @@ -76,10 +76,12 @@ 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', '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', ); diff --git a/inc/remote.php b/inc/remote.php index ea5e23af3..13a38aa17 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -17,6 +17,7 @@ if (!defined('DOKU_INC')) die(); * 'args' => array( * 'type' => 'string|int|...', * ) + * 'return' => 'type' * ) * ) * @@ -102,8 +103,20 @@ class RemoteAPI { */ public function getPluginMethods() { if ($this->pluginMethods === null) { - // TODO: find plugin methods $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 dose not implement DokuWiki_Remote_Plugin"); + } + + $methods = $plugin->_getMethods(); + foreach ($methods as $method => $meta) { + $this->pluginMethods["plugin.$pluginName.$method"] = $meta; + } + } } return $this->pluginMethods; } -- cgit v1.2.3 From 502a92e072be7b42750b4c9032e7269d1fd7c7b4 Mon Sep 17 00:00:00 2001 From: Patrick Michel Date: Sun, 27 Nov 2011 10:55:27 +0100 Subject: MD5 password hash format of the LDAP RFC FS#2378 This implements the salted MD5 password hash format of the LDAP RFC. The format is quite simple the password, followed by the 8 byte hash in base64 encoding, which results in 32 characters, prepended with the string "{smd5}". --- inc/PassHash.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 31493c022..c13cf4a54 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -50,6 +50,9 @@ class PassHash { }elseif(substr($hash,0,6) == '{SSHA}'){ $method = 'ssha'; $salt = substr(base64_decode(substr($hash, 6)),20); + }elseif(substr($hash,0,6) == '{SMD5}'){ + $method = 'smd6'; + $salt = substr(base64_decode(substr($hash, 6)),16); }elseif($len == 32){ $method = 'md5'; }elseif($len == 40){ @@ -130,6 +133,18 @@ class PassHash { } } + + /** + * Password hashing method 'smd6' + * + * Uses salted MD5 hashs. Salt is 8 bytes long. Yes, really 8 bytes... + */ + public function hash_smd6($clear, $salt=null){ + $this->init_salt($salt,8); + return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); + } + + /** * Password hashing method 'apr1' * -- cgit v1.2.3 From 491a2c68bc685e7e0cd4f9622ef4051e4a580d62 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 27 Nov 2011 11:08:07 +0100 Subject: renamed passhash method smd6 to lsmd5 --- inc/PassHash.class.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index c13cf4a54..8f62425aa 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -51,7 +51,7 @@ class PassHash { $method = 'ssha'; $salt = substr(base64_decode(substr($hash, 6)),20); }elseif(substr($hash,0,6) == '{SMD5}'){ - $method = 'smd6'; + $method = 'lsmd5'; $salt = substr(base64_decode(substr($hash, 6)),16); }elseif($len == 32){ $method = 'md5'; @@ -135,13 +135,15 @@ class PassHash { /** - * Password hashing method 'smd6' + * Password hashing method 'lsmd5' * - * Uses salted MD5 hashs. Salt is 8 bytes long. Yes, really 8 bytes... + * Uses salted MD5 hashs. Salt is 8 bytes long. + * + * This is the format used by LDAP. */ - public function hash_smd6($clear, $salt=null){ - $this->init_salt($salt,8); - return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); + public function hash_lsmd5($clear, $salt=null){ + $this->init_salt($salt,8); + return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); } -- cgit v1.2.3 From 2d2d9d0f3a410b31d76a2be193fe16b3dbd79096 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Mon, 28 Nov 2011 19:09:48 +0100 Subject: collect remote functions in a class --- inc/RemoteAPICore.php | 617 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 617 insertions(+) create mode 100644 inc/RemoteAPICore.php (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php new file mode 100644 index 000000000..c4324ba29 --- /dev/null +++ b/inc/RemoteAPICore.php @@ -0,0 +1,617 @@ + + * @param string $id file id + * @return media file + */ + function getAttachment($id){ + $id = cleanID($id); + if (auth_quickaclcheck(getNS($id).':*') < AUTH_READ) { + throw new RemoteAccessDenied(); + } + + $file = mediaFN($id); + if (!@ file_exists($file)) { + throw new RemoteException('The requested file does not exist'); + } + + $data = io_readFile($file, false); + $base64 = base64_encode($data); + return $base64; + } + + /** + * Return info about a media file + * + * @author Gina Haeussge + */ + function getAttachmentInfo($id){ + $id = cleanID($id); + $info = array( + 'lastModified' => 0, + 'size' => 0, + ); + + $file = mediaFN($id); + if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){ + $info['lastModified'] = new IXR_Date(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 RemoteAccessDenied(1, 'You are not allowed to read this page'); + } + 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'] = new IXR_Date(@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){ + require_once(DOKU_INC.'inc/fulltext.php'); + + $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' => $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 + */ + function listAttachments($ns, $options = array()) { + global $conf; + global $lang; + + $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'] = new IXR_Date($data[$i]['mtime']); + } + return $data; + } else { + throw new RemoteAccessDenied(1, 'You are not allowed to list media files.'); + } + } + + /** + * 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 RemoteAccessDenied(1, 'You are not allowed to read this page'); + } + $file = wikiFN($id,$rev); + $time = @filemtime($file); + if(!$time){ + throw new RemoteException(10, 'The requested page does not exist'); + } + + $info = getRevisionInfo($id, $time, 1024); + + $data = array( + 'name' => $id, + 'lastModified' => new IXR_Date($time), + 'author' => (($info['user']) ? $info['user'] : $info['ip']), + 'version' => $time + ); + + return ($data); + } + + /** + * Save a wiki page + * + * @author Michael Klier + */ + function putPage($id, $text, $params) { + global $TEXT; + global $lang; + global $conf; + + $id = cleanID($id); + $TEXT = cleanText($text); + $sum = $params['sum']; + $minor = $params['minor']; + + if(empty($id)) { + throw new RemoteException(1, 'Empty page ID'); + } + + if(!page_exists($id) && trim($TEXT) == '' ) { + throw new RemoteException(1, 'Refusing to write an empty new wiki page'); + } + + if(auth_quickaclcheck($id) < AUTH_EDIT) { + throw new RemoteAccessDenied(1, 'You are not allowed to edit this page'); + } + + // Check, if page is locked + if(checklock($id)) { + throw new RemoteException(1, 'The page is currently locked'); + } + + // SPAM check + if(checkwordblock()) { + throw new RemoteException(1, 'Positive wordblock check'); + } + + // 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 + */ + function putAttachment($id, $file, $params) { + $id = cleanID($id); + $auth = auth_quickaclcheck(getNS($id).':*'); + + if(!isset($id)) { + throw new RemoteException(1, 'Filename not given.'); + } + + global $conf; + + $ftmp = $conf['tmpdir'] . '/' . md5($id.clientIP()); + + // save temporary file + @unlink($ftmp); + if (preg_match('/^[A-Za-z0-9\+\/]*={0,2}$/', $file) === 1) { + // DEPRECATED: Double-decode file if it still looks like base64 + // after first decoding (which is done by the library) + $file = base64_decode($file); + } + io_saveFile($ftmp, $file); + + $res = media_save(array('name' => $ftmp), $id, $params['ow'], $auth, 'rename'); + if (is_array($res)) { + throw new RemoteException(-$res[1], $res[0]); + } else { + return $res; + } + } + + /** + * Deletes a file from the wiki. + * + * @author Gina Haeussge + */ + 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 RemoteAccessDenied(1, "You don't have permissions to delete files."); + } elseif ($res & DOKU_MEDIA_INUSE) { + throw new RemoteException(1, 'File is still referenced'); + } else { + throw new RemoteException(1, 'Could not delete file'); + } + } + + /** + * 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 + */ + function listLinks($id) { + $id = cleanID($id); + if(auth_quickaclcheck($id) < AUTH_READ){ + throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + } + $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 + * @author Michael Klier + */ + function getRecentChanges($timestamp) { + if(strlen($timestamp) != 10) { + throw new RemoteException(20, 'The provided value is not a valid timestamp'); + } + + $recents = getRecentsSince($timestamp); + + $changes = array(); + + foreach ($recents as $recent) { + $change = array(); + $change['name'] = $recent['id']; + $change['lastModified'] = new IXR_Date($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'); + } + } + + /** + * Returns a list of recent media changes since give timestamp + * + * @author Michael Hamann + * @author Michael Klier + */ + function getRecentMediaChanges($timestamp) { + if(strlen($timestamp) != 10) + throw new RemoteException(20, 'The provided value is not a valid timestamp'); + + $recents = getRecentsSince($timestamp, null, '', RECENTS_MEDIA_CHANGES); + + $changes = array(); + + foreach ($recents as $recent) { + $change = array(); + $change['name'] = $recent['id']; + $change['lastModified'] = new IXR_Date($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(30, 'There are no changes in the specified timeframe'); + } + } + + /** + * Returns a list of available revisions of a given wiki page + * + * @author Michael Klier + */ + function pageVersions($id, $first) { + $id = cleanID($id); + if(auth_quickaclcheck($id) < AUTH_READ) { + throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + } + global $conf; + + $versions = array(); + + if(empty($id)) { + throw new RemoteException(1, 'Empty page ID'); + } + + $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'] = new IXR_Date($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_XMLRPC_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; + } + + +} \ No newline at end of file -- cgit v1.2.3 From f61380cb67f8216ae4c75922511ff5a07fd21ca0 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Mon, 28 Nov 2011 19:06:16 +0100 Subject: introduced first remote test cases --- inc/remote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 13a38aa17..6f48d2015 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -92,7 +92,7 @@ class RemoteAPI { * @throws RemoteException On denied access. * @return void */ - private function forceAccess() { + public function forceAccess() { if (!$this->hasAccess()) { throw new RemoteException('Access denied'); } -- cgit v1.2.3 From 3f3bb97fcdd30282632d96a5bb19d2ea61c01504 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Mon, 28 Nov 2011 20:59:49 +0100 Subject: removed dublicated content --- inc/remote.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 6f48d2015..14f6614f1 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -130,4 +130,5 @@ class RemoteAPI { } -class RemoteException extends Exception {} \ No newline at end of file +class RemoteException extends Exception {} +class RemoteAccessDenied extends RemoteException {} \ No newline at end of file -- cgit v1.2.3 From 4815d222f25c9a31949297223c98cfca7151ae8d Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Thu, 8 Dec 2011 19:57:18 +0100 Subject: RemoteAPI can now handle remote calls. --- inc/RemoteAPICore.php | 43 +++++++++++++++++++++++++++++++- inc/remote.php | 68 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 91 insertions(+), 20 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index c4324ba29..a2e12c7f1 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -2,6 +2,47 @@ class RemoteAPICore { + function __getRemoteInfo() { + return array( + 'wiki.getPage' => array( + 'args' => array( + 'id' => array( + 'type' => 'string', + 'doc' => 'wiki page id' + ), + ), + 'return' => 'string', + 'doc' => 'Return a raw wiki page', + 'name' => 'rawPage', + ), + 'wiki.getPageVersion' => array( + 'args' => array( + 'id' => array( + 'type' => 'string', + 'doc' => 'wiki page id' + ), + 'rev' => array( + 'type' => 'int', + 'doc' => 'revision number of the page', + ), + ), + 'name' => 'rawPage', + 'return' => 'string', + 'doc' => 'Return a raw wiki page' + ), + 'wiki.getAttachment' => array( + 'args' => array( + 'type' => 'string', + 'doc' => 'file id', + ), + 'doc' => 'Return a media file', + 'return' => 'file', + 'name' => 'getAttachment', + ), + + ); + } + /** * Return a raw wiki page * @param string $id wiki page id @@ -58,7 +99,7 @@ class RemoteAPICore { $file = mediaFN($id); if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){ - $info['lastModified'] = new IXR_Date(filemtime($file)); + $info['lastModified'] = filemtime($file); $info['size'] = filesize($file); } diff --git a/inc/remote.php b/inc/remote.php index 14f6614f1..5f136a43d 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -2,6 +2,9 @@ if (!defined('DOKU_INC')) die(); +class RemoteException extends Exception {} +class RemoteAccessDenied extends RemoteException {} + /** * This class provides information about remote access to the wiki. * @@ -13,11 +16,16 @@ if (!defined('DOKU_INC')) die(); * == Information structure == * The information about methods will be given in an array with the following structure: * array( - * 'method.name' => array( + * 'method.remoteName' => array( * 'args' => array( - * 'type' => 'string|int|...', + * 'name' => array( + * 'type' => 'string|int|...|date|file', + * ['doc' = 'argument documentation'], + * ), * ) - * 'return' => 'type' + * 'name' => 'method name in class', + * 'return' => 'type', +* ['doc' = 'method documentation'], * ) * ) * @@ -35,9 +43,9 @@ if (!defined('DOKU_INC')) die(); class RemoteAPI { /** - * @var array remote methods provided by dokuwiki. + * @var RemoteAPICore */ - private $coreMethods = array(); + private $coreMethods = null; /** * @var array remote methods provided by dokuwiki plugins - will be filled lazy via @@ -62,19 +70,36 @@ class RemoteAPI { * @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) { + public function call($method, $args = array()) { $this->forceAccess(); - $method = explode('.', $method); - if ($method[0] === 'plugin') { - $plugin = plugin_load('remote', $method[1]); + list($type, $pluginName, $call) = explode('.', $method, 3); + if ($type === 'plugin') { + $plugin = plugin_load('remote', $pluginName); if (!$plugin) { - throw new RemoteException('Method unavailable'); + throw new RemoteException('Method dose not exists'); } - return call_user_func_array(array($plugin, $method[2]), $args); + return call_user_func_array(array($plugin, $call), $args); } else { - // TODO call core method + $coreMethods = $this->getCoreMethods(); + if (!isset($coreMethods[$method])) { + throw new RemoteException('Method dose not exists'); + } + $this->checkArgumentLength($coreMethods[$method], $args); + return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args); } + } + private function checkArgumentLength($method, $args) { + if (count($method['args']) < count($args)) { + throw new RemoteException('Method dose not exists - wrong parameter count.'); + } + } + + private function getMethodName($methodMeta, $method) { + if (isset($methodMeta[$method]['name'])) { + return $methodMeta[$method]['name']; + } + return $method; } /** @@ -122,13 +147,18 @@ class RemoteAPI { } /** + * @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() { - return $this->coreMethods; + public function getCoreMethods($apiCore = null) { + if ($this->coreMethods === null) { + if ($apiCore === null) { + $this->coreMethods = new RemoteAPICore(); + } else { + $this->coreMethods = $apiCore; + } + } + return $this->coreMethods->__getRemoteInfo(); } -} - - -class RemoteException extends Exception {} -class RemoteAccessDenied extends RemoteException {} \ No newline at end of file +} \ No newline at end of file -- cgit v1.2.3 From 647919c9a61d928502b0b45063cc60702d0d310e Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Thu, 8 Dec 2011 20:33:30 +0100 Subject: added remote plugin calls. --- inc/remote.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 5f136a43d..bc35d525e 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -75,10 +75,12 @@ class RemoteAPI { list($type, $pluginName, $call) = explode('.', $method, 3); if ($type === 'plugin') { $plugin = plugin_load('remote', $pluginName); + $methods = $this->getPluginMethods(); if (!$plugin) { throw new RemoteException('Method dose not exists'); } - return call_user_func_array(array($plugin, $call), $args); + $name = $this->getMethodName($methods, $method); + return call_user_func_array(array($plugin, $name), $args); } else { $coreMethods = $this->getCoreMethods(); if (!isset($coreMethods[$method])) { @@ -99,7 +101,8 @@ class RemoteAPI { if (isset($methodMeta[$method]['name'])) { return $methodMeta[$method]['name']; } - return $method; + $method = explode('.', $method); + return $method[count($method)-1]; } /** -- cgit v1.2.3 From 795114e73f18f06c2b32b433e150cad81da6581f Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 10 Dec 2011 14:05:33 +0100 Subject: changed return types --- inc/remote.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index bc35d525e..7e82b6845 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -5,6 +5,21 @@ if (!defined('DOKU_INC')) die(); class RemoteException extends Exception {} class RemoteAccessDenied extends RemoteException {} +abstract class RemoteDataType { + private $value; + + function __construct($value) { + $this->value = $value; + } + + function getValue() { + return $this->value; + } +} + +class RemoteDate extends RemoteDataType {} +class RemoteFile extends RemoteDataType {} + /** * This class provides information about remote access to the wiki. * -- cgit v1.2.3 From add86630b09f0e91952081112e3fa642ee35e499 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Mon, 12 Dec 2011 17:02:12 +0100 Subject: changed to new Remote Data objects --- inc/RemoteAPICore.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index a2e12c7f1..6b34d257a 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -81,8 +81,7 @@ class RemoteAPICore { } $data = io_readFile($file, false); - $base64 = base64_encode($data); - return $base64; + return new RemoteFile($data); } /** @@ -134,7 +133,7 @@ class RemoteAPICore { $page['id'] = trim($pages[$idx]); $page['perms'] = $perm; $page['size'] = @filesize(wikiFN($pages[$idx])); - $page['lastModified'] = new IXR_Date(@filemtime(wikiFN($pages[$idx]))); + $page['lastModified'] = new RemoteDate(@filemtime(wikiFN($pages[$idx]))); $list[] = $page; } @@ -181,7 +180,7 @@ class RemoteAPICore { $pages[] = array( 'id' => $id, - 'score' => $score, + 'score' => intval($score), 'rev' => filemtime($file), 'mtime' => filemtime($file), 'size' => filesize($file), @@ -210,7 +209,6 @@ class RemoteAPICore { */ function listAttachments($ns, $options = array()) { global $conf; - global $lang; $ns = cleanID($ns); @@ -228,7 +226,7 @@ class RemoteAPICore { for($i=0; $i<$len; $i++) { unset($data[$i]['meta']); - $data[$i]['lastModified'] = new IXR_Date($data[$i]['mtime']); + $data[$i]['lastModified'] = new RemoteDate($data[$i]['mtime']); } return $data; } else { @@ -261,7 +259,7 @@ class RemoteAPICore { $data = array( 'name' => $id, - 'lastModified' => new IXR_Date($time), + 'lastModified' => new RemoteDate($time), 'author' => (($info['user']) ? $info['user'] : $info['ip']), 'version' => $time ); @@ -344,7 +342,7 @@ class RemoteAPICore { * * Michael Klier */ - function putAttachment($id, $file, $params) { + function putAttachment($id, RemoteFile $file, $params) { $id = cleanID($id); $auth = auth_quickaclcheck(getNS($id).':*'); @@ -358,12 +356,7 @@ class RemoteAPICore { // save temporary file @unlink($ftmp); - if (preg_match('/^[A-Za-z0-9\+\/]*={0,2}$/', $file) === 1) { - // DEPRECATED: Double-decode file if it still looks like base64 - // after first decoding (which is done by the library) - $file = base64_decode($file); - } - io_saveFile($ftmp, $file); + io_saveFile($ftmp, $file->getValue()); $res = media_save(array('name' => $ftmp), $id, $params['ow'], $auth, 'rename'); if (is_array($res)) { @@ -468,7 +461,7 @@ class RemoteAPICore { foreach ($recents as $recent) { $change = array(); $change['name'] = $recent['id']; - $change['lastModified'] = new IXR_Date($recent['date']); + $change['lastModified'] = new RemoteDate($recent['date']); $change['author'] = $recent['user']; $change['version'] = $recent['date']; $change['perms'] = $recent['perms']; @@ -501,7 +494,7 @@ class RemoteAPICore { foreach ($recents as $recent) { $change = array(); $change['name'] = $recent['id']; - $change['lastModified'] = new IXR_Date($recent['date']); + $change['lastModified'] = new RemoteDate($recent['date']); $change['author'] = $recent['user']; $change['version'] = $recent['date']; $change['perms'] = $recent['perms']; @@ -565,7 +558,7 @@ class RemoteAPICore { $data['ip'] = $info['ip']; $data['type'] = $info['type']; $data['sum'] = $info['sum']; - $data['modified'] = new IXR_Date($info['date']); + $data['modified'] = new RemoteDate($info['date']); $data['version'] = $info['date']; array_push($versions, $data); } -- cgit v1.2.3 From fb838798781d6a7a488c82a93c69853bb5cb08d8 Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 17 Dec 2011 13:17:44 +0800 Subject: Rewark for missing commit 9aa0e6c6087e616511fc95d1650ca9b608edece8 --- inc/parser/xhtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index ea1756803..a9ee33e9d 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(); -- cgit v1.2.3 From 85038eabd994f3b7609fee54bfbaab2513f28c1e Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 17 Dec 2011 13:18:12 +0800 Subject: Rework for missing commit 08162f005f3ced0555de590dc1a53155af99d998 --- inc/parser/metadata.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 136c37531..bd396e2b4 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); + $heading = p_get_first_heading($id,false); 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'].']'; } } -- cgit v1.2.3 From f01b3e16cda640fb4b47ec254b8390970da0b806 Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 17 Dec 2011 13:32:44 +0800 Subject: Slight fix to match current version. --- inc/parser/metadata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index bd396e2b4..9b4c6b8da 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -459,7 +459,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { if($title['title']) return '['.$title['title'].']'; } else if (is_null($title) || trim($title)==''){ if (useHeading('content') && $id){ - $heading = p_get_first_heading($id,false); + $heading = p_get_first_heading($id,METADATA_DONT_RENDER)); if ($heading) return $heading; } return $default; -- cgit v1.2.3 From 48d7b7a6544f9cecba4b776c782a3891b28fb300 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Tue, 20 Dec 2011 13:50:37 +0100 Subject: use in_array to filter groups instead of preg_grep for acl the usage of preg_grep can result in "regular expression is too large" warnings, which leads to errors in auth_aclcheck. --- inc/auth.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index e0f58e5f2..941dcb8d6 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -523,18 +523,19 @@ function auth_aclcheck($id,$user,$groups){ $groups[] = '@ALL'; //add User if($user) $groups[] = $user; - //build regexp - $regexp = join('|',$groups); }else{ - $regexp = '@ALL'; + $groups[] = '@ALL'; } //check exact match first - $matches = preg_grep('/^'.preg_quote($id,'/').'\s+('.$regexp.')\s+/'.$ci,$AUTH_ACL); + $matches = preg_grep('/^'.preg_quote($id,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); if(count($matches)){ foreach($matches as $match){ $match = preg_replace('/#.*$/','',$match); //ignore comments $acl = preg_split('/\s+/',$match); + if (!in_array($acl[1], $groups)) { + continue; + } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! if($acl[2] > $perm){ $perm = $acl[2]; @@ -554,20 +555,24 @@ function auth_aclcheck($id,$user,$groups){ } do{ - $matches = preg_grep('/^'.preg_quote($path,'/').'\s+('.$regexp.')\s+/'.$ci,$AUTH_ACL); + $matches = preg_grep('/^'.preg_quote($path,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); if(count($matches)){ foreach($matches as $match){ $match = preg_replace('/#.*$/','',$match); //ignore comments $acl = preg_split('/\s+/',$match); + if (!in_array($acl[1], $groups)) { + continue; + } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! if($acl[2] > $perm){ $perm = $acl[2]; } } //we had a match - return it - return $perm; + if ($perm != -1) { + return $perm; + } } - //get next higher namespace $ns = getNS($ns); @@ -582,9 +587,6 @@ function auth_aclcheck($id,$user,$groups){ return AUTH_NONE; } }while(1); //this should never loop endless - - //still here? return no permissions - return AUTH_NONE; } /** -- cgit v1.2.3 From 37fa8abdcb4ed0634f9c21c8e6f2d727d1ffd600 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Dec 2011 14:35:48 +0100 Subject: added methods from xmlrpc.php to RemoteAPICore --- inc/RemoteAPICore.php | 174 +++++++++++++++++++++++++++++++++++++++++++------- inc/remote.php | 5 +- 2 files changed, 151 insertions(+), 28 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 6b34d257a..106ed598c 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -4,40 +4,167 @@ class RemoteAPICore { function __getRemoteInfo() { return array( - 'wiki.getPage' => array( + 'dokuwiki.getVersion' => array( + 'args' => array(), + 'return' => 'string', + 'doc' => 'Returns the running DokuWiki version.' + ), 'dokuwiki.login' => array( + 'args' => array( + 'username' => 'string', + 'password' => 'string' + ), + 'return' => 'int', + 'doc' => 'Tries to login with the given credentials and sets auth cookies.' + ), 'dokuwiki.getPagelist' => array( + 'args' => array( + 'namespace' => 'string', + 'options' => 'array' + ), + 'return' => 'array', + 'doc' => 'List all pages within the given namespace.', + 'name' => 'readNamespace' + ), 'dokuwiki.search' => array( 'args' => array( - 'id' => array( - 'type' => 'string', - 'doc' => 'wiki page id' - ), + 'search' => '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('lock' => 'array'), + 'return' => 'array', + 'doc' => 'Lock or unlock pages.' + ), 'dokuwiki.getTitle' => array( + 'args' => array(), 'return' => 'string', - 'doc' => 'Return a raw wiki page', + 'doc' => 'Returns the wiki title.' + ), 'dokuwiki.appendPage' => array( + 'args' => array( + 'pagename' => 'string', + 'rawWikiText' => 'string', + 'attrs' => 'array' + ), + 'return' => 'int', + 'doc' => 'Append text to a wiki page.' + ), 'wiki.getPage' => array( + 'args' => array( + 'id' => 'string' + ), + 'return' => 'string', + 'doc' => 'Get the raw Wiki text of page, latest version.', 'name' => 'rawPage', - ), - 'wiki.getPageVersion' => array( + ), 'wiki.getPageVersion' => array( 'args' => array( - 'id' => array( - 'type' => 'string', - 'doc' => 'wiki page id' - ), - 'rev' => array( - 'type' => 'int', - 'doc' => 'revision number of the page', - ), + 'id' => 'string', + 'rev' => 'int', ), 'name' => 'rawPage', 'return' => 'string', 'doc' => 'Return a raw wiki page' - ), - 'wiki.getAttachment' => array( + ), 'wiki.getPageHTML' => array( + 'args' => array( + 'id' => 'string' + ), + 'return' => 'string', + 'doc' => 'Return page in rendered HTML, latest version.', + 'name' => 'htmlPage' + ), 'wiki.getPageHTMLVersion' => array( 'args' => array( - 'type' => 'string', - 'doc' => 'file id', + 'id' => 'string', + 'rev' => '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( + 'namespace' => 'string', + 'options' => 'array' + ), + 'return' => 'array', + 'doc' => 'Returns a list of all media files.', + 'name' => 'listAttachments' + ), 'wiki.getBackLinks' => array( + 'args' => array( + 'id' => 'string' + ), + 'return' => 'array', + 'doc' => 'Returns the pages that link to this page.', + 'name' => 'listBackLinks' + ), 'wiki.getPageInfo' => array( + 'args' => array('id' => 'string'), + 'return' => 'array', + 'doc' => 'Returns a struct with infos about the page.', + 'name' => 'pageInfo' + ), 'wiki.getPageInfoVersion' => array( + 'args' => array( + 'id' => 'string', + 'version' => 'int', + ), + 'return' => 'array', + 'doc' => 'Returns a struct with infos about the page.', + 'name' => 'pageInfo' + ), 'wiki.getPageVersions' => array( + 'args' => array( + 'id' => 'string', + 'offset' => 'int' + ), + 'return' => 'array', + 'doc' => 'Returns the available revisions of the page.', + 'name' => 'pageVersions' + ), 'wiki.putPage' => array( + 'args' => array( + 'id' => 'string', + 'rawText' => 'string', + 'attrs' => 'array' + ), + 'return' => 'int', + 'doc' => 'Saves a wiki page.' + ), 'wiki.listLinks' => array( + 'args' => array('id' => 'string'), + 'return' => 'array', + 'doc' => 'Lists all links contained in a wiki page.' + ), 'wiki.getRecentChanges' => array( + 'args' => array('timestamp' => 'int'), + 'return' => 'array', + 'Returns a struct about all recent changes since given timestamp.' + ), 'wiki.getRecentMediaChanges' => array( + 'args' => array('timestamp' => 'int'), + 'return' => 'array', + 'Returns a struct about all recent media changes since given timestamp.' + ), 'wiki.aclCheck' => array( + 'args' => array('id' => 'string'), + 'return' => 'int', + 'doc' => 'Returns the permissions of a given wiki page.' + ), 'wiki.putAttachment' => array( + 'args' => array( + 'id' => 'string', + 'data' => 'file', + 'params' => 'array' + ), + 'return' => 'array', + 'doc' => 'Upload a file to the wiki.' + ), 'wiki.deleteAttachment' => array( + 'args' => array('id' => 'string'), + 'return' => 'int', + 'doc' => 'Delete a file from the wiki.' + ), 'wiki.getAttachment' => array( + 'args' => array('id' => 'string'), 'doc' => 'Return a media file', 'return' => 'file', 'name' => 'getAttachment', + ), 'wiki.getAttachmentInfo' => array( + 'args' => array('id' => 'string'), + 'return' => 'array', + 'doc' => 'Returns a struct with infos about the attachment.' ), ); @@ -63,7 +190,7 @@ class RemoteAPICore { } /** - * Return a media file encoded in base64 + * Return a media file * * @author Gina Haeussge * @param string $id file id @@ -92,13 +219,13 @@ class RemoteAPICore { function getAttachmentInfo($id){ $id = cleanID($id); $info = array( - 'lastModified' => 0, + 'lastModified' => new RemoteDate(0), 'size' => 0, ); $file = mediaFN($id); if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){ - $info['lastModified'] = filemtime($file); + $info['lastModified'] = new RemoteDate(filemtime($file)); $info['size'] = filesize($file); } @@ -275,7 +402,6 @@ class RemoteAPICore { function putPage($id, $text, $params) { global $TEXT; global $lang; - global $conf; $id = cleanID($id); $TEXT = cleanText($text); diff --git a/inc/remote.php b/inc/remote.php index 7e82b6845..e18c71092 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -33,10 +33,7 @@ class RemoteFile extends RemoteDataType {} * array( * 'method.remoteName' => array( * 'args' => array( - * 'name' => array( - * 'type' => 'string|int|...|date|file', - * ['doc' = 'argument documentation'], - * ), + * 'name' => 'type eg. string|int|...|date|file', * ) * 'name' => 'method name in class', * 'return' => 'type', -- cgit v1.2.3 From a317247b19c498f4292480110cf0e0a1ce9780e8 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 14:54:53 +0100 Subject: updated remote hasAccess function --- inc/remote.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index e18c71092..94d428e8c 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -71,7 +71,6 @@ class RemoteAPI { * @return array with information to all available methods */ public function getMethods() { - $this->forceAccess(); return array_merge($this->getCoreMethods(), $this->getPluginMethods()); } @@ -122,10 +121,18 @@ class RemoteAPI { */ public function hasAccess() { global $conf; - if (!isset($conf['remote'])) { + global $USERINFO; + if (!$conf['remote']) { return false; } - return $conf['remote']; + if(!$conf['useacl']) { + return true; + } + if(trim($conf['remoteuser']) == '') { + return true; + } + + return auth_isMember($conf['remoteuser'], $_SERVER['REMOTE_USER'], (array) $USERINFO['grps']); } /** -- cgit v1.2.3 From 4beb39ea51a46409ab3abd4a1b880bf5d3d5dc4a Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 15:31:46 +0100 Subject: enforce acl on remote method call --- inc/remote.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 94d428e8c..15d2308f8 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -82,7 +82,6 @@ class RemoteAPI { * @return mixed result of method call, must be a primitive type. */ public function call($method, $args = array()) { - $this->forceAccess(); list($type, $pluginName, $call) = explode('.', $method, 3); if ($type === 'plugin') { $plugin = plugin_load('remote', $pluginName); @@ -90,10 +89,12 @@ class RemoteAPI { if (!$plugin) { throw new RemoteException('Method dose not exists'); } + $this->checkAccess($methods[$method]); $name = $this->getMethodName($methods, $method); return call_user_func_array(array($plugin, $name), $args); } else { $coreMethods = $this->getCoreMethods(); + $this->checkAccess($coreMethods[$method]); if (!isset($coreMethods[$method])) { throw new RemoteException('Method dose not exists'); } @@ -102,6 +103,16 @@ class RemoteAPI { } } + 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 dose not exists - wrong parameter count.'); @@ -141,7 +152,7 @@ class RemoteAPI { */ public function forceAccess() { if (!$this->hasAccess()) { - throw new RemoteException('Access denied'); + throw new RemoteAccessDenied(); } } -- cgit v1.2.3 From 27bf90be7901fc8002eb1f253df9785610d586f1 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 15:56:24 +0100 Subject: set login as public method --- inc/RemoteAPICore.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 106ed598c..023fcb803 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -14,7 +14,8 @@ class RemoteAPICore { 'password' => 'string' ), 'return' => 'int', - 'doc' => 'Tries to login with the given credentials and sets auth cookies.' + 'doc' => 'Tries to login with the given credentials and sets auth cookies.', + 'public' => '1' ), 'dokuwiki.getPagelist' => array( 'args' => array( 'namespace' => 'string', -- cgit v1.2.3 From 3a13cfe7e12afabb47139702b7f118d63ccf42c2 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 18:10:38 +0100 Subject: set login as public method --- inc/remote.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 15d2308f8..76d07b344 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -1,6 +1,7 @@ Date: Sun, 8 Jan 2012 18:14:44 +0100 Subject: added missing getVersion --- inc/RemoteAPICore.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 023fcb803..6b665e083 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -171,6 +171,10 @@ class RemoteAPICore { ); } + function getVersion() { + return getVersion(); + } + /** * Return a raw wiki page * @param string $id wiki page id -- cgit v1.2.3 From cb0d045e79603fb7f0c6703aaf633c8d0e34c117 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 18:21:48 +0100 Subject: added missing getTime --- inc/RemoteAPICore.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 6b665e083..a19c1b84e 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -175,6 +175,10 @@ class RemoteAPICore { return getVersion(); } + function getTime() { + return time(); + } + /** * Return a raw wiki page * @param string $id wiki page id -- cgit v1.2.3 From 1232df5e9480465ff8b2e24ce5760766b3bd908c Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 18:27:27 +0100 Subject: treat null as empty array --- inc/remote.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 76d07b344..c18cb3713 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -83,6 +83,9 @@ class RemoteAPI { * @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') { $plugin = plugin_load('remote', $pluginName); -- cgit v1.2.3 From f95017850a515969190f54df3d57a00449245bb9 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 18:37:59 +0100 Subject: delegate file and date transformation to remote library --- inc/RemoteAPICore.php | 26 ++++++++++++++++---------- inc/remote.php | 33 +++++++++++++++++++++++++++++---- 2 files changed, 45 insertions(+), 14 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index a19c1b84e..639aa4536 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -2,6 +2,12 @@ class RemoteAPICore { + private $api; + + public function __construct(RemoteAPI $api) { + $this->api = $api; + } + function __getRemoteInfo() { return array( 'dokuwiki.getVersion' => array( @@ -217,7 +223,7 @@ class RemoteAPICore { } $data = io_readFile($file, false); - return new RemoteFile($data); + return $this->api->toFile($data); } /** @@ -228,13 +234,13 @@ class RemoteAPICore { function getAttachmentInfo($id){ $id = cleanID($id); $info = array( - 'lastModified' => new RemoteDate(0), + 'lastModified' => $this->api->toDate(0), 'size' => 0, ); $file = mediaFN($id); if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){ - $info['lastModified'] = new RemoteDate(filemtime($file)); + $info['lastModified'] = $this->api->toDate(filemtime($file)); $info['size'] = filesize($file); } @@ -269,7 +275,7 @@ class RemoteAPICore { $page['id'] = trim($pages[$idx]); $page['perms'] = $perm; $page['size'] = @filesize(wikiFN($pages[$idx])); - $page['lastModified'] = new RemoteDate(@filemtime(wikiFN($pages[$idx]))); + $page['lastModified'] = $this->api->toDate(@filemtime(wikiFN($pages[$idx]))); $list[] = $page; } @@ -362,7 +368,7 @@ class RemoteAPICore { for($i=0; $i<$len; $i++) { unset($data[$i]['meta']); - $data[$i]['lastModified'] = new RemoteDate($data[$i]['mtime']); + $data[$i]['lastModified'] = $this->api->toDate($data[$i]['mtime']); } return $data; } else { @@ -395,7 +401,7 @@ class RemoteAPICore { $data = array( 'name' => $id, - 'lastModified' => new RemoteDate($time), + 'lastModified' => $this->api->toDate($time), 'author' => (($info['user']) ? $info['user'] : $info['ip']), 'version' => $time ); @@ -477,7 +483,7 @@ class RemoteAPICore { * * Michael Klier */ - function putAttachment($id, RemoteFile $file, $params) { + function putAttachment($id, $file, $params) { $id = cleanID($id); $auth = auth_quickaclcheck(getNS($id).':*'); @@ -596,7 +602,7 @@ class RemoteAPICore { foreach ($recents as $recent) { $change = array(); $change['name'] = $recent['id']; - $change['lastModified'] = new RemoteDate($recent['date']); + $change['lastModified'] = $this->api->toDate($recent['date']); $change['author'] = $recent['user']; $change['version'] = $recent['date']; $change['perms'] = $recent['perms']; @@ -629,7 +635,7 @@ class RemoteAPICore { foreach ($recents as $recent) { $change = array(); $change['name'] = $recent['id']; - $change['lastModified'] = new RemoteDate($recent['date']); + $change['lastModified'] = $this->api->toDate($recent['date']); $change['author'] = $recent['user']; $change['version'] = $recent['date']; $change['perms'] = $recent['perms']; @@ -693,7 +699,7 @@ class RemoteAPICore { $data['ip'] = $info['ip']; $data['type'] = $info['type']; $data['sum'] = $info['sum']; - $data['modified'] = new RemoteDate($info['date']); + $data['modified'] = $this->api->toDate($info['date']); $data['version'] = $info['date']; array_push($versions, $data); } diff --git a/inc/remote.php b/inc/remote.php index c18cb3713..71ceb97b5 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -18,9 +18,6 @@ abstract class RemoteDataType { } } -class RemoteDate extends RemoteDataType {} -class RemoteFile extends RemoteDataType {} - /** * This class provides information about remote access to the wiki. * @@ -66,6 +63,14 @@ class RemoteAPI { */ private $pluginMethods = 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. * @@ -191,11 +196,31 @@ class RemoteAPI { public function getCoreMethods($apiCore = null) { if ($this->coreMethods === null) { if ($apiCore === null) { - $this->coreMethods = new RemoteAPICore(); + $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; + } } \ No newline at end of file -- cgit v1.2.3 From e61127e4af913a252fbe5c8f427501268501895c Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 8 Jan 2012 19:31:10 +0100 Subject: refactored RemoteAccessDenied to RemoteAccessDeniedException --- inc/RemoteAPICore.php | 18 +++++++++--------- inc/remote.php | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 639aa4536..2fecc3032 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -194,7 +194,7 @@ class RemoteAPICore { function rawPage($id,$rev=''){ $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ - throw new RemoteAccessDenied(); + throw new RemoteAccessDeniedException(); } $text = rawWiki($id,$rev); if(!$text) { @@ -214,7 +214,7 @@ class RemoteAPICore { function getAttachment($id){ $id = cleanID($id); if (auth_quickaclcheck(getNS($id).':*') < AUTH_READ) { - throw new RemoteAccessDenied(); + throw new RemoteAccessDeniedException(); } $file = mediaFN($id); @@ -253,7 +253,7 @@ class RemoteAPICore { function htmlPage($id,$rev=''){ $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ - throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to read this page'); } return p_wiki_xhtml($id,$rev,false); } @@ -372,7 +372,7 @@ class RemoteAPICore { } return $data; } else { - throw new RemoteAccessDenied(1, 'You are not allowed to list media files.'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to list media files.'); } } @@ -389,7 +389,7 @@ class RemoteAPICore { function pageInfo($id,$rev=''){ $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ - throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to read this page'); } $file = wikiFN($id,$rev); $time = @filemtime($file); @@ -432,7 +432,7 @@ class RemoteAPICore { } if(auth_quickaclcheck($id) < AUTH_EDIT) { - throw new RemoteAccessDenied(1, 'You are not allowed to edit this page'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to edit this page'); } // Check, if page is locked @@ -519,7 +519,7 @@ class RemoteAPICore { if ($res & DOKU_MEDIA_DELETED) { return 0; } elseif ($res & DOKU_MEDIA_NOT_AUTH) { - throw new RemoteAccessDenied(1, "You don't have permissions to delete files."); + throw new RemoteAccessDeniedException(1, "You don't have permissions to delete files."); } elseif ($res & DOKU_MEDIA_INUSE) { throw new RemoteException(1, 'File is still referenced'); } else { @@ -543,7 +543,7 @@ class RemoteAPICore { function listLinks($id) { $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ - throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to read this page'); } $links = array(); @@ -659,7 +659,7 @@ class RemoteAPICore { function pageVersions($id, $first) { $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ) { - throw new RemoteAccessDenied(1, 'You are not allowed to read this page'); + throw new RemoteAccessDeniedException(1, 'You are not allowed to read this page'); } global $conf; diff --git a/inc/remote.php b/inc/remote.php index 71ceb97b5..8c505911c 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -4,7 +4,7 @@ if (!defined('DOKU_INC')) die(); require_once(DOKU_INC.'inc/RemoteAPICore.php'); class RemoteException extends Exception {} -class RemoteAccessDenied extends RemoteException {} +class RemoteAccessDeniedException extends RemoteException {} abstract class RemoteDataType { private $value; @@ -161,7 +161,7 @@ class RemoteAPI { */ public function forceAccess() { if (!$this->hasAccess()) { - throw new RemoteAccessDenied(); + throw new RemoteAccessDeniedException(); } } -- cgit v1.2.3 From 200ff6b799de7ba300488ec4cb4833c0092761e5 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 22 Jan 2012 11:58:39 +0100 Subject: removed unused class --- inc/remote.php | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 8c505911c..0a507e95d 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -6,18 +6,6 @@ require_once(DOKU_INC.'inc/RemoteAPICore.php'); class RemoteException extends Exception {} class RemoteAccessDeniedException extends RemoteException {} -abstract class RemoteDataType { - private $value; - - function __construct($value) { - $this->value = $value; - } - - function getValue() { - return $this->value; - } -} - /** * This class provides information about remote access to the wiki. * -- cgit v1.2.3 From 6d06b26afab712379b6d070a816f0c71cc76753b Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Tue, 24 Jan 2012 14:30:34 +0100 Subject: added INIT_LANG_LOAD event --- inc/init.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 14660b8d0..130746f20 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(); @@ -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. */ -- cgit v1.2.3 From 61917024a6e927db44aff03e4d7ea5a64bd3ec08 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 29 Jan 2012 18:25:52 +0000 Subject: added 5 new language strings for action tools and skip link (needs translations) This is in preparation for the new default template. This also updates the tpl_actiondropdown() to use most of them. --- inc/lang/de/lang.php | 5 +++++ inc/lang/en/lang.php | 5 +++++ inc/template.php | 6 +++--- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 08e72fec2..f36c9949c 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -198,6 +198,11 @@ $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Inhalt anzuzeigen.'; $lang['download'] = 'Schnipsel herunterladen'; +$lang['tools'] = 'Werkzeuge'; +$lang['user_tools'] = 'Benutzer-Werkzeuge'; +$lang['site_tools'] = 'Webseiten-Werkzeuge'; +$lang['page_tools'] = 'Seiten-Werkzeuge'; +$lang['skip_to_content'] = 'zum Inhalt springen'; $lang['mail_newpage'] = 'Neue Seite:'; $lang['mail_changed'] = 'Seite geändert:'; $lang['mail_subscribe_list'] = 'Geänderte Seiten im Namensraum:'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 3f74a8d9c..24974ea5e 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -195,6 +195,11 @@ $lang['external_edit'] = 'external edit'; $lang['summary'] = 'Edit summary'; $lang['noflash'] = 'The Adobe Flash Plugin is needed to display this content.'; $lang['download'] = 'Download Snippet'; +$lang['tools'] = 'Tools'; +$lang['user_tools'] = 'User Tools'; +$lang['site_tools'] = 'Site Tools'; +$lang['page_tools'] = 'Page Tools'; +$lang['skip_to_content'] = 'skip to content'; $lang['mail_newpage'] = 'page added:'; $lang['mail_changed'] = 'page changed:'; diff --git a/inc/template.php b/inc/template.php index 024bf985c..ca4b6327d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1270,7 +1270,7 @@ function tpl_actiondropdown($empty='',$button='>'){ echo ''; if($REV) echo ''; echo ''; @@ -1274,20 +1275,26 @@ function tpl_actiondropdown($empty='',$button='>'){ $act = tpl_get_action('edit'); if($act) echo ''; - $act = tpl_get_action('revisions'); + $act = tpl_get_action('revert'); if($act) echo ''; - $act = tpl_get_action('revert'); + $act = tpl_get_action('revisions'); if($act) echo ''; $act = tpl_get_action('backlink'); if($act) echo ''; - echo ''; + + $act = tpl_get_action('subscribe'); + if($act) echo ''; + echo ''; echo ''; $act = tpl_get_action('recent'); if($act) echo ''; + $act = tpl_get_action('media'); + if($act) echo ''; + $act = tpl_get_action('index'); if($act) echo ''; echo ''; @@ -1296,10 +1303,10 @@ function tpl_actiondropdown($empty='',$button='>'){ $act = tpl_get_action('login'); if($act) echo ''; - $act = tpl_get_action('profile'); + $act = tpl_get_action('register'); if($act) echo ''; - $act = tpl_get_action('subscribe'); + $act = tpl_get_action('profile'); if($act) echo ''; $act = tpl_get_action('admin'); @@ -1308,6 +1315,7 @@ function tpl_actiondropdown($empty='',$button='>'){ echo ''; echo ''; + echo ''; echo ''; } -- cgit v1.2.3 From 27833958afc4d9d54460bd5273a6a56d94c1923f Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 29 Jan 2012 20:03:50 +0000 Subject: added tpl_getMediaFile() to replace tpl_getFavicon() The function tpl_getFavicon() was doing more than its name was implying. Therefore the new tpl_getMediaFile() was introduced (which is doing nearly exactly the same) and tpl_getFavicon() was deprecated. tpl_favicon() can still be used, though. --- inc/template.php | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index d6b7af1e8..f7a49f002 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1458,16 +1458,15 @@ function tpl_flush(){ flush(); } - /** - * Returns icon from data/media root directory if it exists, otherwise - * the one in the template's image directory. + * Returns link to media file from data/media root directory if it exists, + * otherwise the one in the template's image directory. * - * @param bool $abs - if to use absolute URL * @param string $fileName - file name of icon + * @param bool $abs - if to use absolute URL * @author Anika Henke */ -function tpl_getFavicon($abs=false, $fileName='favicon.ico') { +function tpl_getMediaFile($fileName, $abs=false) { if (file_exists(mediaFN($fileName))) { return ml($fileName, '', true, '', $abs); } @@ -1478,6 +1477,17 @@ function tpl_getFavicon($abs=false, $fileName='favicon.ico') { return DOKU_TPL.'images/'.$fileName; } +/** + * Returns icon from data/media root directory if it exists, otherwise + * the one in the template's image directory. + * + * @deprecated Use tpl_getMediaFile() instead + * @author Anika Henke + */ +function tpl_getFavicon($abs=false, $fileName='favicon.ico') { + return tpl_getMediaFile($fileName, $abs); +} + /** * Returns tag for various icon types (favicon|mobile|generic) * @@ -1491,14 +1501,14 @@ function tpl_favicon($types=array('favicon')) { foreach ($types as $type) { switch($type) { case 'favicon': - $return .= ''.NL; + $return .= ''.NL; break; case 'mobile': - $return .= ''.NL; + $return .= ''.NL; break; case 'generic': // ideal world solution, which doesn't work in any browser yet - $return .= ''.NL; + $return .= ''.NL; break; } } -- cgit v1.2.3 From 378325f948e677b0253c6dc5e268aa753d3a10f1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 30 Jan 2012 19:08:25 +0100 Subject: made the tpl_getMediaFile() function more flexible --- inc/template.php | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index f7a49f002..b338d2ce9 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1459,22 +1459,44 @@ function tpl_flush(){ } /** - * Returns link to media file from data/media root directory if it exists, - * otherwise the one in the template's image directory. + * Tries to find a ressource file in the given locations. * - * @param string $fileName - file name of icon - * @param bool $abs - if to use absolute URL - * @author Anika Henke + * If a given location starts with a colon it is assumed to be a media + * file, otherwise it is assumed to be relative to the current template + * + * @param array $search locations to look at + * @param bool $abs if to use absolute URL + * @param arrayref $imginfo filled with getimagesize() + * @author Andreas Gohr */ -function tpl_getMediaFile($fileName, $abs=false) { - if (file_exists(mediaFN($fileName))) { - return ml($fileName, '', true, '', $abs); +function tpl_getMediaFile($search, $abs=false, &$imginfo=null){ + // loop through candidates until a match was found: + foreach($search as $img){ + if(substr($img,0,1) == ':'){ + $file = mediaFN($img); + $ismedia = true; + }else{ + $file = DOKU_TPLINC.$img; + $ismedia = false; + } + + if(file_exists($file)) break; } - if($abs) { - return DOKU_URL.substr(DOKU_TPL.'images/'.$fileName, strlen(DOKU_REL)); + // fetch image data if requested + if(!is_null($imginfo)){ + $imginfo = getimagesize($file); } - return DOKU_TPL.'images/'.$fileName; + + // build URL + if($ismedia){ + $url = ml($img, '', true, '', $abs); + }else{ + $url = DOKU_TPL.$img; + if($abs) $url = DOKU_URL.substr($url, strlen(DOKU_REL)); + } + + return $url; } /** @@ -1485,7 +1507,8 @@ function tpl_getMediaFile($fileName, $abs=false) { * @author Anika Henke */ function tpl_getFavicon($abs=false, $fileName='favicon.ico') { - return tpl_getMediaFile($fileName, $abs); + $look = array(":wiki:$fileName", ":$fileName", "images/$fileName"); + return tpl_getMediaFile($look, $abs); } /** @@ -1501,14 +1524,17 @@ function tpl_favicon($types=array('favicon')) { foreach ($types as $type) { switch($type) { case 'favicon': - $return .= ''.NL; + $look = array(':wiki:favicon.ico', ':favicon.ico', 'images/favicon.ico'); + $return .= ''.NL; break; case 'mobile': - $return .= ''.NL; + $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.ico'); + $return .= ''.NL; break; case 'generic': // ideal world solution, which doesn't work in any browser yet - $return .= ''.NL; + $look = array(':wiki:favicon.svg', ':favicon.svg', 'images/favicon.svg'); + $return .= ''.NL; break; } } -- cgit v1.2.3 From b78bf706e2ab1d34498beea00b7ecfda11944eee Mon Sep 17 00:00:00 2001 From: romain Date: Mon, 30 Jan 2012 19:58:55 +0100 Subject: Added support for the %GROUP% wildcard. %GROUP% is the same as %USER% except it's done on each group a user is in. %USER% and %GROUP% cannot be mixed on an ACL line. --- inc/auth.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index e0f58e5f2..88d2caf1b 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -120,17 +120,26 @@ function auth_setup(){ */ function auth_loadACL(){ global $config_cascade; + global $conf; + global $USERINFO; if(!is_readable($config_cascade['acl']['default'])) return array(); $acl = file($config_cascade['acl']['default']); //support user wildcard - if(isset($_SERVER['REMOTE_USER'])){ + if(isset($_SERVER['REMOTE_USER']) && $conf['use_wildcards']){ $len = count($acl); for($i=0; $i<$len; $i++){ if($acl[$i]{0} == '#') continue; list($id,$rest) = preg_split('/\s+/',$acl[$i],2); + if($conf['groups_wilcards'] && (strstr($id, '%GROUP%') || strstr($rest, '%GROUP%'))){ + foreach($USERINFO['grps'] as $grp){ + $nid = str_replace('%GROUP%',cleanID($grp),$id); + $nrest = str_replace('%GROUP%',auth_nameencode($grp),$rest); + $acl[] = "$nid\t$nrest"; + } + } $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id); $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest); $acl[$i] = "$id\t$rest"; @@ -607,6 +616,7 @@ function auth_nameencode($name,$skip_group=false){ // never encode wildcard FS#1955 if($name == '%USER%') return $name; + if($name == '%GROUP%') return $name; if (!isset($cache[$name][$skip_group])) { if($skip_group && $name{0} =='@'){ -- cgit v1.2.3 From c4766956646b53ab644ec6ddbd17d9cba07cf872 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 30 Jan 2012 20:38:41 +0100 Subject: DOKU_TPL* considered harmful Some plugins want to dynamically switch the template based on users, namspaces or the phase of the moon. Having fixed paths in a unchangable constant prevents this. This changes deprecates the DOKU_TPL* constants in favor of two new tpl_* functions that return the correct paths based on the $conf variables which can be changed from the DOKUWIKI_STARTED event. --- inc/init.php | 4 ++-- inc/template.php | 31 +++++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 14660b8d0..3aab0587b 100644 --- a/inc/init.php +++ b/inc/init.php @@ -118,11 +118,11 @@ if (!defined('DOKU_COOKIE')) define('DOKU_COOKIE', 'DW'.md5(DOKU_REL.(($conf['se // define main script if(!defined('DOKU_SCRIPT')) define('DOKU_SCRIPT','doku.php'); -// define Template baseURL +// DEPRECATED, use tpl_basedir() instead if(!defined('DOKU_TPL')) define('DOKU_TPL', DOKU_BASE.'lib/tpl/'.$conf['template'].'/'); -// define real Template directory +// DEPRECATED, use tpl_incdir() instead if(!defined('DOKU_TPLINC')) define('DOKU_TPLINC', DOKU_INC.'lib/tpl/'.$conf['template'].'/'); diff --git a/inc/template.php b/inc/template.php index b338d2ce9..28a6a387e 100644 --- a/inc/template.php +++ b/inc/template.php @@ -23,6 +23,29 @@ function template($tpl){ return DOKU_INC.'lib/tpl/default/'.$tpl; } + +/** + * Convenience function to access template dir from local FS + * + * This replaces the deprecated DOKU_TPLINC constant + * + * @author Andreas Gohr + */ +function tpl_incdir(){ + return DOKU_INC.'lib/tpl/'.$conf['template'].'/'; +} + +/** + * Convenience function to access template dir from web + * + * This replaces the deprecated DOKU_TPL constant + * + * @author Andreas Gohr + */ +function tpl_basedir(){ + return DOKU_BASE.'lib/tpl/'.$conf['template'].'/'; +} + /** * Print the content * @@ -1034,7 +1057,7 @@ function tpl_getConf($id){ */ function tpl_loadConfig(){ - $file = DOKU_TPLINC.'/conf/default.php'; + $file = tpl_incdir().'/conf/default.php'; $conf = array(); if (!@file_exists($file)) return false; @@ -1055,7 +1078,7 @@ function tpl_getLang($id){ static $lang = array(); if (count($lang) === 0){ - $path = DOKU_TPLINC.'lang/'; + $path = tpl_incdir().'lang/'; $lang = array(); @@ -1476,7 +1499,7 @@ function tpl_getMediaFile($search, $abs=false, &$imginfo=null){ $file = mediaFN($img); $ismedia = true; }else{ - $file = DOKU_TPLINC.$img; + $file = tpl_incdir().$img; $ismedia = false; } @@ -1492,7 +1515,7 @@ function tpl_getMediaFile($search, $abs=false, &$imginfo=null){ if($ismedia){ $url = ml($img, '', true, '', $abs); }else{ - $url = DOKU_TPL.$img; + $url = tpl_basedir().$img; if($abs) $url = DOKU_URL.substr($url, strlen(DOKU_REL)); } -- cgit v1.2.3 From 75b14482064ceb8495221b07b8991b787f520dad Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 30 Jan 2012 20:42:59 +0100 Subject: added missing global statements tss.. --- inc/template.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index 28a6a387e..c23fd14c1 100644 --- a/inc/template.php +++ b/inc/template.php @@ -32,6 +32,7 @@ function template($tpl){ * @author Andreas Gohr */ function tpl_incdir(){ + global $conf; return DOKU_INC.'lib/tpl/'.$conf['template'].'/'; } @@ -43,6 +44,7 @@ function tpl_incdir(){ * @author Andreas Gohr */ function tpl_basedir(){ + global $conf; return DOKU_BASE.'lib/tpl/'.$conf['template'].'/'; } -- cgit v1.2.3 From c4dda6afdfe780288bffaebcde485b32b91731d6 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 31 Jan 2012 00:21:07 +0000 Subject: fixed .curid to always highlight the current ID of the main/viewed page --- inc/parser/xhtml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index bfa22d066..8d1eb24c1 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -566,6 +566,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') { global $conf; global $ID; + global $INFO; $params = ''; $parts = explode('?', $id, 2); @@ -610,7 +611,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['pre'] = ''; $link['suf'] = ''; // highlight link to current page - if ($id == $ID) { + if ($id == $INFO['id']) { $link['pre'] = ''; $link['suf'] = ''; } -- cgit v1.2.3 From 40d429f51adcff41f289a7961b5d298d2190f3ef Mon Sep 17 00:00:00 2001 From: Begina Felicysym Date: Thu, 2 Feb 2012 20:48:01 +0100 Subject: Polish language update --- inc/lang/pl/lang.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'inc') diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 26e1bd5f5..42af3d3c4 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -192,6 +192,11 @@ $lang['external_edit'] = 'edycja zewnętrzna'; $lang['summary'] = 'Opis zmian'; $lang['noflash'] = 'Plugin Adobe Flash Plugin jest niezbędny do obejrzenia tej zawartości.'; $lang['download'] = 'Pobierz zrzut'; +$lang['tools'] = 'Narzędzia'; +$lang['user_tools'] = 'Narzędzia użytkownika'; +$lang['site_tools'] = 'Narzędzia witryny'; +$lang['page_tools'] = 'Narzędzia strony'; +$lang['skip_to_content'] = 'przejście do zawartości'; $lang['mail_newpage'] = 'Strona dodana:'; $lang['mail_changed'] = 'Strona zmieniona:'; $lang['mail_subscribe_list'] = 'Zmienione strony w katalogu:'; -- cgit v1.2.3 From ae6cce187876439c77b53ebd2ae61976274f4a11 Mon Sep 17 00:00:00 2001 From: Matej Urban Date: Thu, 2 Feb 2012 20:49:20 +0100 Subject: Slovak language update --- inc/lang/sl/lang.php | 59 +++++++++++++++++++++++++++++++++++++++++++---- inc/lang/sl/locked.txt | 2 +- inc/lang/sl/stopwords.txt | 6 ++--- 3 files changed, 59 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index d802aa8f0..00a349af6 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -48,6 +48,9 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; +$lang['btn_register'] = 'Prijava'; +$lang['btn_apply'] = 'Uveljavi'; +$lang['btn_media'] = 'Urejevalnik predstavnih vsebin'; $lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; @@ -57,7 +60,6 @@ $lang['passchk'] = 'Ponovi novo geslo'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; $lang['email'] = 'Elektronski naslov'; -$lang['register'] = 'Vpis računa'; $lang['profile'] = 'Uporabniški profil'; $lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; @@ -72,12 +74,12 @@ $lang['regbadmail'] = 'Videti je, da je naveden elektronski naslov ne $lang['regbadpass'] = 'Gesli nista enaki. Poskusite znova.'; $lang['regpwmail'] = 'Geslo za DokuWiki'; $lang['reghere'] = 'Nimate še računa? Vpišite se za nov račun.'; -$lang['profna'] = 'Wiki ne podpira spreminjanja profila.'; +$lang['profna'] = 'DokuWiki ne podpira spreminjanja profila.'; $lang['profnochange'] = 'Brez sprememb.'; $lang['profnoempty'] = 'Prazno polje elektronskega naslova ali imena ni dovoljeno.'; $lang['profchanged'] = 'Uporabniški profil je uspešno posodobljen.'; $lang['pwdforget'] = 'Ali ste pozabili geslo? Pridobite si novo geslo.'; -$lang['resendna'] = 'Wiki ne podpira možnosti ponovnega pošiljanja gesel.'; +$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.'; @@ -93,7 +95,7 @@ $lang['txt_filename'] = 'Pošlji z imenom (izborno)'; $lang['txt_overwrt'] = 'Prepiši obstoječo datoteko'; $lang['lockedby'] = 'Trenutno je zaklenjeno s strani'; $lang['lockexpire'] = 'Zaklep preteče ob'; -$lang['js']['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; +$lang['js']['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; $lang['js']['notsavedyet'] = 'Neshranjene spremembe bodo izgubljene.'; $lang['js']['searchmedia'] = 'Poišči datoteke'; $lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto'; @@ -123,6 +125,16 @@ $lang['js']['nosmblinks'] = 'Povezovanje do souporabnih datotek sistema Win $lang['js']['linkwiz'] = 'Čarovnik za povezave'; $lang['js']['linkto'] = 'Poveži na:'; $lang['js']['del_confirm'] = 'Ali naj se res izbrišejo izbrani predmeti?'; +$lang['js']['restore_confirm'] = 'Ali naj se koda obnovi na to različico?'; +$lang['js']['media_diff'] = 'Razlike:'; +$lang['js']['media_diff_both'] = 'Eno ob drugem'; +$lang['js']['media_diff_opacity'] = 'Prosojno'; +$lang['js']['media_select'] = 'Izbor datotek ...'; +$lang['js']['media_upload_btn'] = 'Naloži'; +$lang['js']['media_done_btn'] = 'Končano'; +$lang['js']['media_drop'] = 'Spusti datoteke za nalaganje.'; +$lang['js']['media_cancel'] = 'odstrani'; +$lang['js']['media_overwrt'] = 'Prepiši obstoječe datoteke'; $lang['rssfailed'] = 'Prišlo je do napake med pridobivanjem vira: '; $lang['nothingfound'] = 'Ni najdenih predmetov.'; $lang['mediaselect'] = 'Predstavne datoteke'; @@ -157,6 +169,9 @@ $lang['yours'] = 'Vaša različica'; $lang['diff'] = 'Pokaži razlike s trenutno različico'; $lang['diff2'] = 'Pokaži razlike med izbranimi različicami.'; $lang['difflink'] = 'Poveži s tem pogledom primerjave.'; +$lang['diff_type'] = 'Razlike:'; +$lang['diff_inline'] = 'V besedilu'; +$lang['diff_side'] = 'Eno ob drugem'; $lang['line'] = 'Vrstica'; $lang['breadcrumb'] = 'Sled'; $lang['youarehere'] = 'Trenutno dejavna stran'; @@ -169,11 +184,20 @@ $lang['external_edit'] = 'urejanje v zunanjem urejevalniku'; $lang['summary'] = 'Povzetek urejanja'; $lang['noflash'] = 'Za prikaz vsebine je treba namestiti Adobe Flash Plugin'; $lang['download'] = 'Naloži izrezek'; +$lang['tools'] = 'Orodja'; +$lang['user_tools'] = 'Uporabniška orodja'; +$lang['site_tools'] = 'Orodja spletišča'; +$lang['page_tools'] = 'Orodja strani'; +$lang['skip_to_content'] = 'preskoči na vsebino'; $lang['mail_newpage'] = '[DokuWiki] stran dodana:'; $lang['mail_changed'] = '[DokuWiki] stran spremenjena:'; $lang['mail_subscribe_list'] = 'strani s spremenjenim imenom:'; $lang['mail_new_user'] = 'nov uporabnik:'; $lang['mail_upload'] = 'naložena datoteka:'; +$lang['changes_type'] = 'Poglej spremembe'; +$lang['pages_changes'] = 'Strani'; +$lang['media_changes'] = 'Predstavne datoteke'; +$lang['both_changes'] = 'Strani in predstavne datoteke'; $lang['qb_bold'] = 'Krepko besedilo'; $lang['qb_italic'] = 'Ležeče besedilo'; $lang['qb_underl'] = 'Podčrtano besedilo'; @@ -214,6 +238,9 @@ $lang['img_copyr'] = 'Avtorska pravica'; $lang['img_format'] = 'Zapis'; $lang['img_camera'] = 'Fotoaparat'; $lang['img_keywords'] = 'Ključne besede'; +$lang['img_width'] = 'Širina'; +$lang['img_height'] = 'Višina'; +$lang['img_manager'] = 'Poglej v urejevalniku predstavnih vsebin'; $lang['subscr_subscribe_success'] = 'Uporabniški račun %s je dodan na seznam naročnin na %s'; $lang['subscr_subscribe_error'] = 'Napaka med dodajanjem %s na seznam naročnin na %s'; $lang['subscr_subscribe_noaddress'] = 'S trenutnimi prijavnimi podatki ni povezanega elektronskega naslova, zato uporabniškega računa ni mogoče dodati na seznam naročnikov.'; @@ -263,3 +290,27 @@ $lang['hours'] = '%d ur nazaj'; $lang['minutes'] = '%d minut nazaj'; $lang['seconds'] = '%d sekund nazaj'; $lang['wordblock'] = 'Spremembe niso shranjene, ker je v vsebini navedeno neželeno besedilo (spam).'; +$lang['media_uploadtab'] = 'Naloži'; +$lang['media_searchtab'] = 'Poišči'; +$lang['media_file'] = 'Datoteka'; +$lang['media_viewtab'] = 'Pogled'; +$lang['media_edittab'] = 'Uredi'; +$lang['media_historytab'] = 'Zgodovina'; +$lang['media_list_thumbs'] = 'Sličice'; +$lang['media_list_rows'] = 'Vrstice'; +$lang['media_sort_name'] = 'Ime'; +$lang['media_sort_date'] = 'Datum'; +$lang['media_namespaces'] = 'Izbor imenskega prostora'; +$lang['media_files'] = 'Datoteke v %s'; +$lang['media_upload'] = 'Naloži v %s'; +$lang['media_search'] = 'Poišči v %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s pri %s'; +$lang['media_edit'] = 'Uredi %s'; +$lang['media_history'] = 'Zgodovina %s'; +$lang['media_meta_edited'] = 'metapodatki so urejeni'; +$lang['media_perm_read'] = 'Ni ustreznih dovoljenj za branje datotek.'; +$lang['media_perm_upload'] = 'Ni ustreznih dovoljenj za nalaganje datotek.'; +$lang['media_update'] = 'Naloži novo različico'; +$lang['media_restore'] = 'Obnovi to različico'; +$lang['plugin_install_err'] = 'Vstavek ni pravilno nameščen. Preimenujte mapo vstavka\'%s\' v \'%s\'.'; diff --git a/inc/lang/sl/locked.txt b/inc/lang/sl/locked.txt index d51e940b7..cc693d3fa 100644 --- a/inc/lang/sl/locked.txt +++ b/inc/lang/sl/locked.txt @@ -1,3 +1,3 @@ ====== Stran je zaklenjena ====== -Stran je zaklenjenjena za urejanje. Počakati je treba, da zaklep strani poteče. +Stran je zaklenjena za urejanje. Počakati je treba, da zaklep strani poteče. diff --git a/inc/lang/sl/stopwords.txt b/inc/lang/sl/stopwords.txt index 5d61539e7..8eed2daa6 100644 --- a/inc/lang/sl/stopwords.txt +++ b/inc/lang/sl/stopwords.txt @@ -1,7 +1,7 @@ # To je seznam besed, ki jih ustvarjalnik kazala prezre. Seznam je sestavljen iz -# besede, ki so zapisane vsaka v svoji vrstici. Datoteka mora biti zapisana s konnim -# UNIX znakom vrstice. Besede kraje od treh znakov so iz kazala izloene samodejno -# zaradi preglednosti. Seznam se s bo s asom spreminjal in dopolnjeval. +# besede, ki so zapisane vsaka v svoji vrstici. Datoteka mora biti zapisana s končnim +# UNIX znakom vrstice. Besede krajše od treh znakov so iz kazala izločene samodejno +# zaradi preglednosti. Seznam se s bo s časom spreminjal in dopolnjeval. moja moje moji -- cgit v1.2.3 From c7b28ffda48d3e6e225940a74b00ee5011f45b4b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 4 Feb 2012 13:26:50 +0000 Subject: added div.table around non-editable content as well (FS#1980) --- inc/html.php | 2 ++ inc/media.php | 2 ++ 2 files changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index 1a2d7daef..ece26d136 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1176,6 +1176,7 @@ function html_diff($text='',$intro=true,$type=null){ ptln(''); } ?> +
format($df)?>
> @@ -1187,6 +1188,7 @@ function html_diff($text='',$intro=true,$type=null){
+
+
@@ -1183,6 +1184,7 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){ echo ''.NL; echo '
'.NL; + echo '
'.NL; if ($is_img && !$fromajax) echo ''; } -- cgit v1.2.3 From 750a55de568a82aaa40ca384a17a64804e94f2b9 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 5 Feb 2012 12:33:35 +0100 Subject: corrected comment --- inc/remote.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 0a507e95d..82a0d3c08 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -23,7 +23,8 @@ class RemoteAccessDeniedException extends RemoteException {} * ) * 'name' => 'method name in class', * 'return' => 'type', -* ['doc' = 'method documentation'], + * 'public' => 1/0 - method bypass default group check (used by login) + * ['doc' = 'method documentation'], * ) * ) * -- cgit v1.2.3 From 03d7247e047c21d2733f837148a1499f56784ae3 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 5 Feb 2012 12:36:19 +0100 Subject: moved plugin and core method calls to seperate function --- inc/remote.php | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 82a0d3c08..105969f8b 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -82,23 +82,31 @@ class RemoteAPI { } list($type, $pluginName, $call) = explode('.', $method, 3); if ($type === 'plugin') { - $plugin = plugin_load('remote', $pluginName); - $methods = $this->getPluginMethods(); - if (!$plugin) { - throw new RemoteException('Method dose not exists'); - } - $this->checkAccess($methods[$method]); - $name = $this->getMethodName($methods, $method); - return call_user_func_array(array($plugin, $name), $args); + return $this->callPlugin($pluginName, $method, $args); } else { - $coreMethods = $this->getCoreMethods(); - $this->checkAccess($coreMethods[$method]); - if (!isset($coreMethods[$method])) { - throw new RemoteException('Method dose not exists'); - } - $this->checkArgumentLength($coreMethods[$method], $args); - return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args); + return $this->callCoreMethod($method, $args); + } + } + + private function callPlugin($pluginName, $method, $args) { + $plugin = plugin_load('remote', $pluginName); + $methods = $this->getPluginMethods(); + if (!$plugin) { + throw new RemoteException('Method dose not exists'); + } + $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 dose not exists'); } + $this->checkArgumentLength($coreMethods[$method], $args); + return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args); } private function checkAccess($methodMeta) { -- cgit v1.2.3 From 5c0c6845e9d948437a54eb986c9f339dfc4b2c62 Mon Sep 17 00:00:00 2001 From: PCPA Date: Mon, 6 Feb 2012 23:39:40 +0100 Subject: Russian language update --- inc/lang/ru/lang.php | 103 ++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 58 deletions(-) (limited to 'inc') diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 10fca5477..0b1af234c 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -19,15 +19,15 @@ * @author Aleksandr Selivanov * @author Ladyko Andrey * @author Eugene + * @author Johnny Utah */ $lang['encoding'] = ' utf-8'; $lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '«'; //“ -$lang['doublequoteclosing'] = '»'; //” -$lang['singlequoteopening'] = '„'; //‘ -$lang['singlequoteclosing'] = '“'; //’ -$lang['apostrophe'] = '’'; //’ - +$lang['doublequoteopening'] = '«'; +$lang['doublequoteclosing'] = '»'; +$lang['singlequoteopening'] = '„'; +$lang['singlequoteclosing'] = '“'; +$lang['apostrophe'] = '’'; $lang['btn_edit'] = 'Править страницу'; $lang['btn_source'] = 'Показать исходный текст'; $lang['btn_show'] = 'Показать страницу'; @@ -63,7 +63,6 @@ $lang['btn_revert'] = 'Восстановить'; $lang['btn_register'] = 'Зарегистрироваться'; $lang['btn_apply'] = 'Применить'; $lang['btn_media'] = 'Media Manager'; - $lang['loggedinas'] = 'Зашли как'; $lang['user'] = 'Логин'; $lang['pass'] = 'Пароль'; @@ -78,7 +77,6 @@ $lang['badlogin'] = 'Извините, неверное имя по $lang['minoredit'] = 'Небольшие изменения'; $lang['draftdate'] = 'Черновик сохранён'; $lang['nosecedit'] = 'За это время страница была изменена и информация о секции устарела. Загружена полная версия страницы.'; - $lang['regmissing'] = 'Извините, вам следует заполнить все поля.'; $lang['reguexists'] = 'Извините, пользователь с таким логином уже существует.'; $lang['regsuccess'] = 'Пользователь создан, пароль выслан на адрес электронной почты.'; @@ -88,12 +86,10 @@ $lang['regbadmail'] = 'Данный вами адрес электр $lang['regbadpass'] = 'Два введённых пароля не идентичны. Пожалуйста, попробуйте ещё раз.'; $lang['regpwmail'] = 'Ваш пароль для системы «ДокуВики»'; $lang['reghere'] = 'У вас ещё нет аккаунта? Зарегистрируйтесь'; - $lang['profna'] = 'Данная вики не поддерживает изменение профиля'; $lang['profnochange'] = 'Изменений не было внесено, профиль не обновлён.'; $lang['profnoempty'] = 'Логин и адрес электронной почты не могут быть пустыми.'; $lang['profchanged'] = 'Профиль пользователя успешно обновлён.'; - $lang['pwdforget'] = 'Забыли пароль? Получите новый'; $lang['resendna'] = 'Данная вики не поддерживает повторную отправку пароля.'; $lang['resendpwd'] = 'Выслать пароль для'; @@ -102,10 +98,8 @@ $lang['resendpwdnouser'] = 'Пользователь с таким лог $lang['resendpwdbadauth'] = 'Извините, неверный код авторизации. Убедитесь, что вы полностью скопировали ссылку. '; $lang['resendpwdconfirm'] = 'Ссылка для подтверждения пароля была выслана по электронной почте. '; $lang['resendpwdsuccess'] = 'Ваш новый пароль был выслан по электронной почте.'; - $lang['license'] = 'За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:'; $lang['licenseok'] = 'Примечание: редактируя эту страницу, вы соглашаетесь на использование своего вклада на условиях следующей лицензии:'; - $lang['searchmedia'] = 'Поиск по имени файла:'; $lang['searchmedia_in'] = 'Поиск в %s'; $lang['txt_upload'] = 'Выберите файл для загрузки'; @@ -113,7 +107,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 +137,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 +174,6 @@ $lang['mediaextchange'] = 'Расширение изменилось: с $lang['reference'] = 'Ссылки для'; $lang['ref_inuse'] = 'Этот файл не может быть удалён, так как он используется на следующих страницах:'; $lang['ref_hidden'] = 'Некоторые ссылки находятся на страницах, на чтение которых у вас нет прав доступа'; - $lang['hits'] = 'соответствий'; $lang['quickhits'] = 'Соответствия в названиях страниц'; $lang['toc'] = 'Содержание'; @@ -207,18 +197,20 @@ $lang['external_edit'] = 'внешнее изменение'; $lang['summary'] = 'Сводка изменений'; $lang['noflash'] = 'Для просмотра этого содержимого требуется Adobe Flash Plugin.'; $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 +235,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 +254,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 +297,6 @@ $lang['i_pol1'] = 'Общедоступная вики (чтен $lang['i_pol2'] = 'Закрытая вики (чтение, запись и загрузка файлов только для зарегистрированных пользователей)'; $lang['i_retry'] = 'Повторить попытку'; $lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики:'; - $lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён %s. Вы можете также просмотреть недавние изменения во всей вики.'; $lang['years'] = '%d лет назад'; $lang['months'] = '%d месяц(ев) назад'; @@ -323,24 +305,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'] = 'Загрузка в пространство имён %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'."; +$lang['plugin_install_err'] = 'Плагин установлен некорректно. Переименуйте папку плагина из \'%s\' в \'%s\'.'; -- cgit v1.2.3 From b2a1a44c2b1170a6fdbec637fa077c1469631511 Mon Sep 17 00:00:00 2001 From: Marius Olar Date: Tue, 7 Feb 2012 19:46:28 +0100 Subject: Romanian language update --- inc/lang/ro/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 96a3d7970..2159c8c53 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -8,7 +8,7 @@ * @author Emanuel-Emeric Andrași * @author Emanuel-Emeric Andraşi * @author Marius OLAR - * @author Emanuel-Emeric Andrași + * @author Marius Olar */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; -- cgit v1.2.3 From a699035c4f7aa040cc4170401b2f9c48966eba5b Mon Sep 17 00:00:00 2001 From: Erial Krale Date: Wed, 15 Feb 2012 23:30:22 +0100 Subject: Korean language update --- inc/lang/ko/lang.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index b0664e7f4..bcf2dbbf9 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -8,6 +8,7 @@ * @author dongnak@gmail.com * @author Song Younghwan * @author Seung-Chul Yoo + * @author erial2@gmail.com */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -49,7 +50,9 @@ $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'] = '새로운 패스워드'; @@ -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'] = '이 컨텐츠를 표시하기 위해서 Adobe Flash Plugin이 필요합니다.'; $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'] = '등록된 주소가 없기 때문에 구독목록에 등록되지 않았습니다'; @@ -271,3 +297,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\'로 변경하십시오.'; -- cgit v1.2.3 From 69995a164f9dbb51adfe17f09901e0200ea8dc7a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 13:39:38 +0100 Subject: do not hardcode profile link in AD pass expire message Changing passwords might not be available. --- inc/auth/ad.class.php | 8 +++++++- inc/lang/de/lang.php | 2 +- inc/lang/en/lang.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index cb59c5a48..dc1fef17a 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -149,6 +149,7 @@ class auth_ad extends auth_basic { function getUserData($user){ global $conf; global $lang; + global $ID; if(!$this->_init()) return false; if($user == '') return array(); @@ -206,7 +207,12 @@ class auth_ad extends auth_basic { // if this is the current user, warn him if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){ - msg(sprintf($lang['authpwdexpire'],$timeleft)); + $msg = sprintf($lang['authpwdexpire'],$timeleft); + if($this->canDo('modPass')){ + $url = wl($ID,array('do'=>'profile')); + $msg .= ' '.$lang['btn_profile'].''; + } + msg($msg); } } diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 8fdffd66e..c7b2d7893 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -268,7 +268,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 ändern.'; +$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/en/lang.php b/inc/lang/en/lang.php index 9250d119a..5c8628da5 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -275,7 +275,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.'; +$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; /* installer strings */ $lang['i_chooselang'] = 'Choose your language'; -- cgit v1.2.3 From 1e5105f90f56d0f57111eff37a535480115920c5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 13:42:39 +0100 Subject: make sure AD pass expiry message is never shown twice --- inc/auth/ad.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index dc1fef17a..cc080dc93 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -46,6 +46,7 @@ class auth_ad extends auth_basic { var $opts = null; var $adldap = null; var $users = null; + var $msgshown = false; /** * Constructor @@ -205,14 +206,18 @@ class auth_ad extends auth_basic { $timeleft = round($timeleft/(24*60*60)); $info['expiresin'] = $timeleft; - // if this is the current user, warn him - if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){ + // 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 .= ' '.$lang['btn_profile'].''; } msg($msg); + $this->msgshown = true; } } -- cgit v1.2.3 From 7cb9c0e3233fdc295a05e410a1d7a731301bc2da Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 14:06:34 +0100 Subject: removed outdated language string. it has to be retranslated --- inc/lang/af/lang.php | 2 -- inc/lang/ar/lang.php | 2 -- inc/lang/az/lang.php | 2 -- inc/lang/bg/lang.php | 2 -- inc/lang/ca-valencia/lang.php | 2 -- inc/lang/ca/lang.php | 2 -- inc/lang/cs/lang.php | 2 -- inc/lang/da/lang.php | 2 -- inc/lang/el/lang.php | 2 -- inc/lang/eo/lang.php | 2 -- inc/lang/es/lang.php | 2 -- inc/lang/et/lang.php | 2 -- inc/lang/eu/lang.php | 2 -- inc/lang/fa/lang.php | 2 -- inc/lang/fi/lang.php | 2 -- inc/lang/fo/lang.php | 2 -- inc/lang/fr/lang.php | 2 -- inc/lang/gl/lang.php | 2 -- inc/lang/he/lang.php | 2 -- inc/lang/hi/lang.php | 1 - inc/lang/hr/lang.php | 2 -- inc/lang/hu/lang.php | 2 -- inc/lang/ia/lang.php | 2 -- inc/lang/id-ni/lang.php | 2 -- inc/lang/id/lang.php | 2 -- inc/lang/is/lang.php | 2 -- inc/lang/it/lang.php | 2 -- inc/lang/ja/lang.php | 2 -- inc/lang/kk/lang.php | 2 -- inc/lang/km/lang.php | 2 -- inc/lang/ko/lang.php | 2 -- inc/lang/la/lang.php | 2 -- inc/lang/lb/lang.php | 2 -- inc/lang/lt/lang.php | 2 -- inc/lang/lv/lang.php | 2 -- inc/lang/mk/lang.php | 2 -- inc/lang/mr/lang.php | 2 -- inc/lang/ne/lang.php | 2 -- inc/lang/nl/lang.php | 2 -- inc/lang/no/lang.php | 2 -- inc/lang/pl/lang.php | 2 -- inc/lang/pt-br/lang.php | 2 -- inc/lang/pt/lang.php | 2 -- inc/lang/ro/lang.php | 2 -- inc/lang/ru/lang.php | 2 -- inc/lang/sk/lang.php | 2 -- inc/lang/sl/lang.php | 2 -- inc/lang/sq/lang.php | 2 -- inc/lang/sr/lang.php | 2 -- inc/lang/sv/lang.php | 2 -- inc/lang/th/lang.php | 2 -- inc/lang/tr/lang.php | 2 -- inc/lang/uk/lang.php | 2 -- inc/lang/zh-tw/lang.php | 2 -- inc/lang/zh/lang.php | 2 -- 55 files changed, 109 deletions(-) (limited to 'inc') diff --git a/inc/lang/af/lang.php b/inc/lang/af/lang.php index 6665196f4..54e5cfc9d 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 02a62fe94..fe1f043b0 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 13ba7b3c3..a1f9c172b 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 8985e20e5..fee3505a0 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/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'] = 'Изтриване на чернова'; @@ -78,7 +77,6 @@ $lang['profnoempty'] = 'Въвеждането на име и ел. п $lang['profchanged'] = 'Потребителският профил е обновен успешно.'; $lang['pwdforget'] = 'Забравили сте паролата си? Получете нова'; $lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.'; -$lang['resendpwd'] = 'Изпращане на нова парола за'; $lang['resendpwdmissing'] = 'Моля, попълнете всички полета.'; $lang['resendpwdnouser'] = 'Потребителят не е намерен в базата от данни.'; $lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целия линк за потвърждение.'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index eac9fc8d1..e7b653bab 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 7094df5b4..a689316b6 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 292c2c42e..ac95c1456 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -45,7 +45,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'; @@ -80,7 +79,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?'; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 0b6961921..582687293 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/el/lang.php b/inc/lang/el/lang.php index 4c334c1de..855c581d0 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/eo/lang.php b/inc/lang/eo/lang.php index 8a15981ee..84f96448d 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 5164c3243..97e6827c0 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 6cd2f437d..6716e14ba 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 d02f281c3..4b1ab32ad 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 ac14ce07a..b4643a0ba 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 8d671a4cb..a33095ee4 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 a0bc6aff7..6c7123e13 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -57,7 +57,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'; @@ -94,7 +93,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 01938b3a0..d09cb097f 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -39,7 +39,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'; @@ -74,7 +73,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 f295e44a9..6ff429695 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 00e5589d8..a11220087 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 ef10d7720..79a181f1d 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 23419a2bd..fd148aa65 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 8398f29f0..52fec80f0 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 e8026acee..b1f0e4f26 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 0e281e58d..be8ed059f 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 9f4d42004..f5538b166 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 1eeb6bb73..5a43e7414 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/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/kk/lang.php b/inc/lang/kk/lang.php index f9ea0bced..685759f82 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 91825c797..a9a0bee9f 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/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'] = '문서초안 삭제'; @@ -78,7 +77,6 @@ $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니 $lang['profchanged'] = '개인정보 변경이 성공했습니다.'; $lang['pwdforget'] = '패스워드를 잊어버린 경우 새로 발급받을 수 있습니다.'; $lang['resendna'] = '이 위키는 패스워드 재발급을 지원하지 않습니다.'; -$lang['resendpwd'] = '새로운 패스워드를 보냅니다.'; $lang['resendpwdmissing'] = '새로운 패스워드를 입력해야햡니다.'; $lang['resendpwdnouser'] = '등록된 사용자가 아닙니다. 다시 확인 바랍니다.'; $lang['resendpwdbadauth'] = '인증 코드가 틀립니다. 잘못된 링크인지 확인 바랍니다.'; diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php index fd34a4ef8..a37548d3b 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 191a9bab5..8af1de4cc 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 d14a0695a..c4495bdb8 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 205d2e56d..21f3494a0 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 ca4a746cd..8a137ce71 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 63fda3e5a..4e5001342 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 97e2dde5c..8f593267e 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 62d23b0d2..705aaf134 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -50,7 +50,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'; @@ -87,7 +86,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 88d21b536..3bf15fffa 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -52,7 +52,6 @@ $lang['btn_backtomedia'] = 'Tilbake til valg av mediafil'; $lang['btn_subscribe'] = 'Abonner 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'; @@ -89,7 +88,6 @@ $lang['profnoempty'] = 'Tomt navn- eller e-postfelt er ikke tillatt.'; $lang['profchanged'] = 'Brukerprofil ble vellykket oppdatert.'; $lang['pwdforget'] = 'Glemt ditt passord? Få deg et nytt'; $lang['resendna'] = 'Denne wikien støtter ikke nyutsending.'; -$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 a6fc3d52e..1aafe3eae 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -47,7 +47,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'; @@ -82,7 +81,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 066b3acaa..3721465be 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 3c3a8d9da..96a157da5 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 91f8ebb97..b88905385 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -43,7 +43,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ţă'; @@ -80,7 +79,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 eda838451..863e75f8f 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -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'] = 'Удалить черновик'; @@ -96,7 +95,6 @@ $lang['profchanged'] = 'Профиль пользователя усп $lang['pwdforget'] = 'Забыли пароль? Получите новый'; $lang['resendna'] = 'Данная вики не поддерживает повторную отправку пароля.'; -$lang['resendpwd'] = 'Выслать пароль для'; $lang['resendpwdmissing'] = 'Вы должны заполнить все поля формы.'; $lang['resendpwdnouser'] = 'Пользователь с таким логином не обнаружен в нашей базе данных.'; $lang['resendpwdbadauth'] = 'Извините, неверный код авторизации. Убедитесь, что вы полностью скопировали ссылку. '; diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index c0d45da58..a8ea546d3 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -42,7 +42,6 @@ $lang['btn_backtomedia'] = 'Späť na výber média'; $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 9acf13504..75eac8c96 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'; @@ -78,7 +77,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'] = 'Wiki 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 87d0f30b5..788e21d36 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 22bcf4e33..50f486924 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 943509fed..28cc10f6c 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 0d0613961..337fccf85 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 94b1c951a..b867a5201 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 22d61c9bf..bd68ecb81 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 a46869d6c..fd12c00ad 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'] = '捨棄草稿'; @@ -80,7 +79,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 6e6dff6f4..0d89a1e5d 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -49,7 +49,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'] = '删除草稿'; @@ -86,7 +85,6 @@ $lang['profnoempty'] = '不允许使用空的用户名或邮件地址 $lang['profchanged'] = '用户信息更新成功。'; $lang['pwdforget'] = '忘记密码?立即获取新密码'; $lang['resendna'] = '本维基不支持二次发送密码。'; -$lang['resendpwd'] = '发送新密码给'; $lang['resendpwdmissing'] = '对不起,您必须填写所有的区域。'; $lang['resendpwdnouser'] = '对不起,在我们的用户数据中找不到该用户。'; $lang['resendpwdbadauth'] = '对不起,该认证码错误。请使用完整的确认链接。'; -- cgit v1.2.3 From 451e1b4dc1985d10b3aeaeeaf23d5498ce87032b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 14:10:10 +0100 Subject: use correct lang string for password mismatch --- inc/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 740a75a5c..437a82a82 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -872,7 +872,7 @@ function act_resendpwd(){ // password given correctly? if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false; if($_REQUEST['pass'] != $_REQUEST['passchk']){ - msg('password mismatch',-1); #FIXME localize + msg($lang['regbadpass'],-1); return false; } $pass = $_REQUEST['pass']; -- cgit v1.2.3 From 4d3ea096062ffd40303a0499aee5b7f757e00948 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 21:48:02 +0100 Subject: removed commented line --- inc/html.php | 1 - 1 file changed, 1 deletion(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index dea9ac6ab..50989f236 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1677,7 +1677,6 @@ function html_resendpwd() { $form->startFieldset($lang['btn_resendpwd']); $form->addHidden('token', $token); $form->addHidden('do', 'resendpwd'); - //$form->addElement(form_makeTag('br')); $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); -- cgit v1.2.3 From 8a9735e34dc99c24355e0aee74a3cd49aa3b1492 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 19 Feb 2012 13:38:31 +0100 Subject: added a timelimit for password reset tokens passwords now need to be reset within 3 days of requesting the password change mail --- inc/auth.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 437a82a82..4e11288e1 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -860,6 +860,14 @@ function act_resendpwd(){ 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); $userinfo = $auth->getUserData($user); if(!$userinfo['mail']) { -- cgit v1.2.3 From 361171a4e89a313fae8aa823c2279b32ec0c08bc Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 22 Feb 2012 17:34:53 +0100 Subject: simpler/more robust header parsing in HTTPClient The previous regexp approach failed for empty headers. --- inc/HTTPClient.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 641950348..f0470e736 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -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; -- cgit v1.2.3 From 20f04039e631c2cfd34d22e124d2b9d9b94a19d6 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 1 Mar 2012 20:54:28 +0800 Subject: Fix a stupid typo --- inc/parser/metadata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 9b4c6b8da..8bfdc3b9c 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -459,7 +459,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { 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)); + $heading = p_get_first_heading($id,METADATA_DONT_RENDER); if ($heading) return $heading; } return $default; -- cgit v1.2.3 From 1d901ab2e0bb93fd121685d355782e3672c0d96d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 2 Mar 2012 07:53:45 +0100 Subject: fixed media only RSS feed when the SKIP_DELETED flag was set, no recent changes where returned for media only queries, becuase file checks where done on page files instead of media files --- inc/changelog.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'inc') 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; } -- cgit v1.2.3 From b796e32e30bfcda629ebcf2a86550c6371839b0d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Mar 2012 17:43:51 +0100 Subject: fixed missing replacement for HTML notify mails --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 1d8061ab0..a75d452a0 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1147,7 +1147,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $mail->to($to); $mail->bcc($bcc); $mail->subject($subject); - $mail->setBody($text,$trep); + $mail->setBody($text,$trep,$hrep); return $mail->send(); } -- cgit v1.2.3 From 44dae8a743d9c3d83f22e6f38a1685c8326a3b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bohum=C3=ADr=20Z=C3=A1me=C4=8Dn=C3=ADk?= Date: Sun, 4 Mar 2012 17:49:09 +0100 Subject: Czech language update --- inc/lang/cs/lang.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc') diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index badd57ac5..55e891863 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -11,6 +11,7 @@ * @author Lefty * @author Vojta Beran * @author zbynek.krivka@seznam.cz + * @author Bohumir Zamecnik */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -190,6 +191,11 @@ $lang['external_edit'] = 'upraveno mimo DokuWiki'; $lang['summary'] = 'Komentář k úpravám'; $lang['noflash'] = 'Pro přehrání obsahu potřebujete Adobe Flash Plugin.'; $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:'; -- cgit v1.2.3 From bfdeb23f1844dffca054cb9c17c31a2151d3d9ea Mon Sep 17 00:00:00 2001 From: lupo49 Date: Wed, 7 Mar 2012 19:58:33 +0100 Subject: Parser: Allow parser to fully recognize windows share links with a hyphen character in it (Currently, the clickable link stops before a hyphen character) --- inc/parser/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') 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) { -- cgit v1.2.3 From 7980e1acf1a671646747e5b924f2c8e208280a2e Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Wed, 7 Mar 2012 20:19:29 +0100 Subject: Add link to view non images files in media manager (FS#2439) --- inc/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index c23fd14c1..d9a2042ad 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1232,7 +1232,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 = ''.$image.''; + $tabTitle = ''.$image.''.''; if ($opened_tab === 'view' && $rev) { printf($lang['media_viewold'], $tabTitle, dformat($rev)); } else { -- cgit v1.2.3 From 45992a638a85374bf0df1084b3657c845abec060 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 07:58:02 +0100 Subject: fixed mailprefix handling --- inc/Mailer.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 7e6889292..5a5e7f2c6 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -500,7 +500,7 @@ class Mailer { } } - if(isset($subject)){ + if(isset($this->headers['Subject'])){ // add prefix to subject if(empty($conf['mailprefix'])){ if(utf8_strlen($conf['title']) < 20) { @@ -512,17 +512,17 @@ class Mailer { $prefix = '['.$conf['mailprefix'].']'; } $len = strlen($prefix); - if(substr($this->headers['subject'],0,$len) != $prefix){ - $this->headers['subject'] = $prefix.' '.$this->headers['subject']; + if(substr($this->headers['Subject'],0,$len) != $prefix){ + $this->headers['Subject'] = $prefix.' '.$this->headers['Subject']; } // encode subject if(defined('MAILHEADER_ASCIIONLY')){ - $this->headers['subject'] = utf8_deaccent($this->headers['subject']); - $this->headers['subject'] = utf8_strip($this->headers['subject']); + $this->headers['Subject'] = utf8_deaccent($this->headers['Subject']); + $this->headers['Subject'] = utf8_strip($this->headers['Subject']); } if(!utf8_isASCII($this->headers['Subject'])){ - $subject = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; + $this->headers['Subject'] = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; } } -- cgit v1.2.3 From a4c4a73d78c4db014dbc66ea67968472d52708f9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 08:02:27 +0100 Subject: fixed signature stripping --- inc/Mailer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 5a5e7f2c6..753ea3fd6 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -167,7 +167,7 @@ class Mailer { } if($wrap){ $wrap = rawLocale('mailwrap','html'); - $html = preg_replace('/\n-- \n.*$/m','',$html); //strip signature + $html = preg_replace('/\n--
.*$/s','',$html); //strip signature $html = str_replace('@HTMLBODY@',$html,$wrap); } -- cgit v1.2.3 From 47a906ead4a9ea1105bd2d1038b64b7bd0d67b76 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 09:17:01 +0100 Subject: use inlinestyles for diffs in HTML mails --- inc/DifferenceEngine.php | 61 +++++++++++++++++++++++++++++++++++++----------- inc/common.php | 4 ++++ 2 files changed, 51 insertions(+), 14 deletions(-) (limited to 'inc') diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 6e1d07382..52dca32c8 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -818,6 +818,39 @@ class DiffFormatter { } } +/** + * Utilityclass for styling HTML formatted diffs + * + * Depends on global var $DIFF_INLINESTYLES, if true some minimal predefined + * inline styles are used. Useful for HTML mails and RSS feeds + * + * @author Andreas Gohr + */ +class HTMLDiff { + /** + * Holds the style names and basic CSS + */ + static public $styles = array( + 'diff-addedline' => 'background-color: #ddffdd;', + 'diff-deletedline' => 'background-color: #ffdddd;', + 'diff-context' => 'background-color: #f5f5f5;', + 'diff-mark' => 'color: #ff0000;', + ); + + /** + * Return a class or style parameter + */ + static function css($classname){ + global $DIFF_INLINESTYLES; + + if($DIFF_INLINESTYLES){ + if(!isset(self::$styles[$classname])) return ''; + return 'style="'.self::$styles[$classname].'"'; + }else{ + return 'class="'.$classname.'"'; + } + } +} /** * Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3 @@ -838,11 +871,11 @@ class _HWLDF_WordAccumulator { function _flushGroup($new_tag) { if ($this->_group !== '') { if ($this->_tag == 'mark') - $this->_line .= ''.$this->_group.''; + $this->_line .= ''.$this->_group.''; elseif ($this->_tag == 'add') - $this->_line .= ''.$this->_group.''; + $this->_line .= ''.$this->_group.''; elseif ($this->_tag == 'del') - $this->_line .= ''.$this->_group.''; + $this->_line .= ''.$this->_group.''; else $this->_line .= $this->_group; } @@ -1020,8 +1053,8 @@ class TableDiffFormatter extends DiffFormatter { global $lang; $l1 = $lang['line'].' '.$xbeg; $l2 = $lang['line'].' '.$ybeg; - $r = ''.$l1.":\n". - ''.$l2.":\n". + $r = ''.$l1.":\n". + ''.$l2.":\n". "\n"; return $r; } @@ -1037,11 +1070,11 @@ class TableDiffFormatter extends DiffFormatter { } function addedLine($line) { - return '+' . $line.''; + return '+' . $line.''; } function deletedLine($line) { - return '-' . $line.''; + return '-' . $line.''; } function emptyLine() { @@ -1049,7 +1082,7 @@ class TableDiffFormatter extends DiffFormatter { } function contextLine($line) { - return ' '.$line.''; + return ' '.$line.''; } function _added($lines) { @@ -1115,9 +1148,9 @@ class InlineDiffFormatter extends DiffFormatter { $xbeg .= "," . $xlen; if ($ylen != 1) $ybeg .= "," . $ylen; - $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; - $r .= ' '.$lang['deleted'].''; - $r .= ' '.$lang['created'].''; + $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r .= ' '.$lang['deleted'].''; + $r .= ' '.$lang['created'].''; $r .= "\n"; return $r; } @@ -1134,19 +1167,19 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print(''. $line . "\n"); + print(''. $line . "\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('' . $line . "\n"); + print('' . $line . "\n"); } } function _context($lines) { foreach ($lines as $line) { - print(''.$line."\n"); + print(''.$line."\n"); } } diff --git a/inc/common.php b/inc/common.php index a75d452a0..5e2bb7c93 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1086,6 +1086,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ global $lang; global $conf; global $INFO; + global $DIFF_INLINESTYLES; // decide if there is something to do, eg. whom to mail if($who == 'admin'){ @@ -1131,8 +1132,11 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ explode("\n",rawWiki($id))); $dformat = new UnifiedDiffFormatter(); $tdiff = $dformat->format($df); + + $DIFF_INLINESTYLES = true; $dformat = new InlineDiffFormatter(); $hdiff = $dformat->format($df); + $DIFF_INLINESTYLES = false; }else{ $subject = $lang['mail_newpage'].' '.$id; $trep['OLDPAGE'] = '---'; -- cgit v1.2.3 From d2113a3cac4f670858d94dc53de4f653828dac91 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 09:19:30 +0100 Subject: removed footer image from HTML mails --- inc/lang/en/mailwrap.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/lang/en/mailwrap.html b/inc/lang/en/mailwrap.html index 00daf29ac..f9f80fd80 100644 --- a/inc/lang/en/mailwrap.html +++ b/inc/lang/en/mailwrap.html @@ -7,8 +7,7 @@ @HTMLBODY@ -


-DokuWiki +

This mail was generated by DokuWiki at @DOKUWIKIURL@. -- cgit v1.2.3 From 9f3eca0b520fc5f689170108fbcbf490d12f2c2e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 12:44:28 +0100 Subject: Add various headers to the mails FS#2247. pull request #83 closed --- inc/Mailer.class.php | 23 ++++++++++++++++------- inc/common.php | 7 +++++++ inc/subscription.php | 6 +++++- 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 753ea3fd6..141b69a18 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -33,14 +33,23 @@ class Mailer { * Initializes the boundary strings and part counters */ public function __construct(){ - if(isset($_SERVER['SERVER_NAME'])){ - $server = $_SERVER['SERVER_NAME']; - }else{ - $server = 'localhost'; - } + global $conf; + + $server = parse_url(DOKU_URL,PHP_URL_HOST); $this->partid = md5(uniqid(rand(),true)).'@'.$server; $this->boundary = '----------'.md5(uniqid(rand(),true)); + + $listid = join('.',array_reverse(explode('/',DOKU_BASE))).$server; + $listid = strtolower(trim($listid,'.')); + + // add some default headers for mailfiltering FS#2247 + $this->setHeader('X-Mailer','DokuWiki '.getVersion()); + $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); + $this->setHeader('X-DokuWiki-Title', $conf['title']); + $this->setHeader('X-DokuWiki-Server', $server); + $this->setHeader('X-Auto-Response-Suppress', 'OOF'); + $this->setHeader('List-Id',$conf['title'].' <'.$listid.'>'); } /** @@ -114,10 +123,10 @@ class Mailer { * @param bool $clean remove all non-ASCII chars and line feeds? */ public function setHeader($header,$value,$clean=true){ - $header = ucwords(strtolower($header)); // streamline casing + $header = str_replace(' ','-',ucwords(strtolower(str_replace('-',' ',$header)))); // streamline casing if($clean){ $header = preg_replace('/[^\w \-\.\+\@]+/','',$header); - $value = preg_replace('/[^\w \-\.\+\@]+/','',$value); + $value = preg_replace('/[^\w \-\.\+\@<>]+/','',$value); } // empty value deletes diff --git a/inc/common.php b/inc/common.php index 5e2bb7c93..79646eadc 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1152,6 +1152,13 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $mail->bcc($bcc); $mail->subject($subject); $mail->setBody($text,$trep,$hrep); + if($who == 'subscribers'){ + $mail->setHeader( + 'List-Unsubscribe', + '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + false + ); + } return $mail->send(); } diff --git a/inc/subscription.php b/inc/subscription.php index e9f17bc28..d1ee0397a 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -387,6 +387,10 @@ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template $mail->bcc($subscriber_mail); $mail->subject($subject); $mail->setBody($text,$trep); - + $mail->setHeader( + 'List-Unsubscribe', + '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + false + ); return $mail->send(); } -- cgit v1.2.3 From ba9c057b0126f2c449e16adf5073920b5a663773 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 12:50:34 +0100 Subject: use real HRs in HTML mails --- inc/Mailer.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 141b69a18..d7dc70ded 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -171,8 +171,10 @@ class Mailer { // create HTML from text if not given if(is_null($html)){ - $html = hsc($text); - $html = nl2br($text); + $html = $text; + $html = hsc($html); + $html = preg_replace('/^-----*$/m','
',$html); + $html = nl2br($html); } if($wrap){ $wrap = rawLocale('mailwrap','html'); -- cgit v1.2.3 From 6e87cfd37115039280bb5d88291d188c94b07a38 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Mar 2012 12:50:47 +0100 Subject: fixed subscriber mail signatures --- inc/lang/en/subscr_digest.txt | 2 +- inc/lang/en/subscr_list.txt | 2 +- inc/lang/en/subscr_single.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/lang/en/subscr_digest.txt b/inc/lang/en/subscr_digest.txt index fac8564bd..35011b6e6 100644 --- a/inc/lang/en/subscr_digest.txt +++ b/inc/lang/en/subscr_digest.txt @@ -15,6 +15,6 @@ To cancel the page notifications, log into the wiki at @SUBSCRIBE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ diff --git a/inc/lang/en/subscr_list.txt b/inc/lang/en/subscr_list.txt index efe27d866..4c38b9326 100644 --- a/inc/lang/en/subscr_list.txt +++ b/inc/lang/en/subscr_list.txt @@ -12,6 +12,6 @@ To cancel the page notifications, log into the wiki at @SUBSCRIBE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ diff --git a/inc/lang/en/subscr_single.txt b/inc/lang/en/subscr_single.txt index f2abe6d77..673c4c32a 100644 --- a/inc/lang/en/subscr_single.txt +++ b/inc/lang/en/subscr_single.txt @@ -18,6 +18,6 @@ To cancel the page notifications, log into the wiki at @NEWPAGE@ and unsubscribe page and/or namespace changes. --- +-- This mail was generated by DokuWiki at @DOKUWIKIURL@ -- cgit v1.2.3 From 80083a41ce7a4ccf3132621757c333c535179dbe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 Mar 2012 17:25:02 +0100 Subject: made tpl_license a bit more flexible This way there's less custom code for the footer buttons needed --- inc/template.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index c23fd14c1..02e039b2d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1350,8 +1350,9 @@ function tpl_actiondropdown($empty='',$button='>'){ * @author Andreas Gohr * @param string $img - print image? (|button|badge) * @param bool $return - when true don't print, but return HTML + * @param bool $wrap - wrap in div with class="license"? */ -function tpl_license($img='badge',$imgonly=false,$return=false){ +function tpl_license($img='badge',$imgonly=false,$return=false,$wrap=true){ global $license; global $conf; global $lang; @@ -1359,22 +1360,29 @@ function tpl_license($img='badge',$imgonly=false,$return=false){ if(!is_array($license[$conf['license']])) return ''; $lic = $license[$conf['license']]; - $out = '
'; + $out = ''; + if($wrap) $out .= '
'; if($img){ $src = license_img($img); if($src){ + if(!$imgonly){ + $left = 'medialeft'; + }else{ + $left = ''; + } + $out .= ' '; + $out .= '>'.$lic['name'].' '; } } if(!$imgonly) { $out .= $lang['license']; - $out .= ' '; } - $out .= '
'; + if($wrap) $out .= '
'; if($return) return $out; echo $out; -- cgit v1.2.3 From 53e15c8ba5cc2fd8ac7ed5a7f8dd4df684dba28a Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 10 Mar 2012 20:58:38 +0000 Subject: improved tpl_license() (removed unnecessary class, fixed space issues) --- inc/template.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index 02e039b2d..37848b59a 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1359,27 +1359,21 @@ function tpl_license($img='badge',$imgonly=false,$return=false,$wrap=true){ if(!$conf['license']) return ''; if(!is_array($license[$conf['license']])) return ''; $lic = $license[$conf['license']]; + $target = ($conf['target']['extern']) ? ' target="'.$conf['target']['extern'].'"' : ''; $out = ''; if($wrap) $out .= '
'; if($img){ $src = license_img($img); if($src){ - if(!$imgonly){ - $left = 'medialeft'; - }else{ - $left = ''; - } - - $out .= ' '; + $out .= ''; + if(!$imgonly) $out .= ' '; } } if(!$imgonly) { - $out .= $lang['license']; - $out .= ''; } if($wrap) $out .= '
'; -- cgit v1.2.3 From 7651b376ab78457d123e1c3513a6a4b8b0d5a7e7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 13 Mar 2012 19:21:17 +0100 Subject: pass the correct clean parameter when reading wiki pages DokuWiki's page loading is intended to be filesystem agnostic. DOS line endings in pages are supposed to be self healing. This behaviour was broken in a change in 2006. As long as you edited pages through DokuWiki only you never noticed the bug though. --- inc/io.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') 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); } -- cgit v1.2.3 From 04058413cc2649aa16f5bfe605270e8e5d4536f3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 14 Mar 2012 10:40:25 +0100 Subject: add missing table tags for HTML diff mails --- inc/common.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 79646eadc..d19147387 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1136,6 +1136,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $DIFF_INLINESTYLES = true; $dformat = new InlineDiffFormatter(); $hdiff = $dformat->format($df); + $hdiff = ''.$hdiff.'
'; $DIFF_INLINESTYLES = false; }else{ $subject = $lang['mail_newpage'].' '.$id; -- cgit v1.2.3 From a23ac4d7df6b3952d2d1b76686d3b439fc0a6759 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 15 Mar 2012 14:21:42 +0100 Subject: Indexer: Check for deleted pages first FS#2469 This move the check if the page doesn't exist anymore but is still in the index before the check if the index needs to be updated as otherwise deleted pages won't be deleted from the index. --- inc/indexer.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 9d8d6f99b..3f56e5fe5 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1174,18 +1174,8 @@ function & idx_get_stopwords() { * @author Tom N Harris */ 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; -- cgit v1.2.3 From 8d1fa7573a9c92901a1fef0e77f6543f0b3fcf62 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 15 Mar 2012 14:55:32 +0100 Subject: Display the indexer web bug for deleted pages This executes the indexer for deleted pages. This is necessary for the search index to be able to deleted deleted pages from the search index. --- inc/template.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index d9a2042ad..5733972f7 100644 --- a/inc/template.php +++ b/inc/template.php @@ -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). -- cgit v1.2.3 From c55c59e3d67b1481e86b41e4b49083c99d3659c5 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 15 Mar 2012 14:56:48 +0100 Subject: Fix page deletion in the indexer This fixes page deletion in the indexer and fixes a but where empty lines were added to the _i.idx file of metadata for which no value was set (harmless, and wasn't executed anyway). --- inc/indexer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 3f56e5fe5..6766bec25 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -351,7 +351,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 +389,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); -- cgit v1.2.3 From 7883d066bc903bdea41cfdb920c949ec1ebdf206 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 16 Mar 2012 10:41:12 +0100 Subject: use dformat in toolbar build of the signature string --- inc/toolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') 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); -- cgit v1.2.3 From d4dca43453a7a9e798c208cbb89ee09616381dde Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 16 Mar 2012 11:11:15 +0100 Subject: fixed error in bcrypt password method --- inc/PassHash.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 2558f37c6..0521ee305 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -427,7 +427,7 @@ class PassHash { $this->gen_salt(22); } - return crypt($password, $salt); + return crypt($clear, $salt); } } -- cgit v1.2.3 From 63703ba5bd81f50c43bc45f8bf79c514afa3ee49 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 16 Mar 2012 12:09:30 +0100 Subject: coding style updates --- inc/DifferenceEngine.php | 10 +- inc/HTTPClient.php | 4 +- inc/PassHash.class.php | 4 +- inc/SafeFN.class.php | 23 +- inc/Sitemapper.php | 26 +- inc/TarLib.class.php | 4 +- inc/auth.php | 7 +- inc/auth/ad.class.php | 40 +- inc/auth/basic.class.php | 728 ++++++++++++++++---------------- inc/auth/ldap.class.php | 5 +- inc/auth/mysql.class.php | 932 +++++++++++++++++++++-------------------- inc/auth/pgsql.class.php | 417 +++++++++--------- inc/auth/plain.class.php | 282 ++++++------- inc/cliopts.php | 10 +- inc/common.php | 18 +- inc/config_cascade.php | 2 +- inc/html.php | 5 - inc/indexer.php | 1 - inc/mail.php | 6 +- inc/media.php | 8 +- inc/pageutils.php | 8 +- inc/plugincontroller.class.php | 1 + inc/template.php | 2 +- inc/utf8.php | 2 +- 24 files changed, 1277 insertions(+), 1268 deletions(-) (limited to 'inc') 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 f0470e736..62c3fde2f 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -22,7 +22,7 @@ class DokuHTTPClient extends HTTPClient { * * @author Andreas Gohr */ - function DokuHTTPClient(){ + function __construct(){ global $conf; // call parent constructor @@ -121,7 +121,7 @@ class HTTPClient { * * @author Andreas Gohr */ - function HTTPClient(){ + function __construct(){ $this->agent = 'Mozilla/4.0 (compatible; DokuWiki HTTP Client; '.PHP_OS.')'; $this->timeout = 15; $this->cookies = array(); diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 0521ee305..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; } 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 @@ + * @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 = ' '.NL .' '.hsc($this->url).''.NL .' '.date_iso8601($this->lastmod).''.NL; - if ($this->changefreq !== NULL) + if ($this->changefreq !== null) $result .= ' '.hsc($this->changefreq).''.NL; - if ($this->priority !== NULL) + if ($this->priority !== null) $result .= ' '.hsc($this->priority).''.NL; $result .= ' '.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/auth.php b/inc/auth.php index 78d98a99e..cd0f612aa 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -677,7 +677,7 @@ function auth_sendPassword($user,$password){ if(empty($conf['mailprefix'])) { $subject = $lang['regpwmail']; - } else { + } else { $subject = '['.$conf['mailprefix'].'] '.$lang['regpwmail']; } @@ -883,7 +883,6 @@ function act_resendpwd(){ return false; } - if(!$conf['autopasswd']){ // we let the user choose a password // password given correctly? if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false; @@ -950,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 cc080dc93..bc4168527 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -33,10 +33,10 @@ * // 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 - * @link http://www.nosq.com/blog/2005/08/ldap-activedirectory-and-dokuwiki/ - * @author Andreas Gohr + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author James Van Lommel + * @link http://www.nosq.com/blog/2005/08/ldap-activedirectory-and-dokuwiki/ + * @author Andreas Gohr */ require_once(DOKU_INC.'inc/adLDAP.php'); @@ -51,11 +51,10 @@ class auth_ad extends auth_basic { /** * 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']); @@ -72,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 @@ -147,7 +146,7 @@ class auth_ad extends auth_basic { * * @author James Van Lommel */ - function getUserData($user){ + function getUserData($user){ global $conf; global $lang; global $ID; @@ -297,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; @@ -380,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 + */ + 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 - */ - 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 + * @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 - * @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 + * @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 - * @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 + */ + 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 - */ - 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 + * + * @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 - * - * @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 - * @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 + * @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 - * @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 + * @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 - */ - 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 + */ + 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 - * @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 + * @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 - * @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 + * @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 - */ - 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 + */ + 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 - * @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 + * @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 - * @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 + * @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 - * @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 + * @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 - * @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 + * @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 - * @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 + * @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 - * @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 + * @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 * @author Chris Smith * @author Matthias Grimm -*/ + */ class auth_mysql extends auth_basic { @@ -25,65 +25,74 @@ class auth_mysql extends auth_basic { * * @author Matthias Grimm */ - 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 * @author Chris Smith * @author Matthias Grimm -*/ + */ require_once(DOKU_INC.'inc/auth/mysql.class.php'); @@ -24,63 +24,72 @@ class auth_pgsql extends auth_mysql { * @author Matthias Grimm * @author Andreas Gohr */ - 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ 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 */ - 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 */ 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 - * @param array $users array of users to be deleted - * @return int the number of users deleted + * @author Christopher Smith + * @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 */ 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/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 * @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 ef95aa11f..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, @@ -1703,8 +1700,6 @@ function html_resendpwd() { html_form('resendpwd', $form); print ''.NL; } - - } /** diff --git a/inc/indexer.php b/inc/indexer.php index 6766bec25..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 !== "") { 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 * @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/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/template.php b/inc/template.php index 5733972f7..8ca6defeb 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']); 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); -- cgit v1.2.3 From 053d9e5dfd8af184722ff762028c824de4c7858c Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Sun, 18 Mar 2012 14:43:27 +0100 Subject: Fixed call to new constructor name --- inc/HTTPClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 62c3fde2f..26bee52a7 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -26,7 +26,7 @@ class DokuHTTPClient extends HTTPClient { global $conf; // call parent constructor - $this->HTTPClient(); + parent::__construct(); // set some values from the config $this->proxy_host = $conf['proxy']['host']; -- cgit v1.2.3 From 4ea1d54936a1d1e9b919e06639632bc2ac65f6d3 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 11:01:38 +0100 Subject: typo fixes --- inc/remote.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index c8af76420..fb095f517 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -92,7 +92,7 @@ class RemoteAPI { $plugin = plugin_load('remote', $pluginName); $methods = $this->getPluginMethods(); if (!$plugin) { - throw new RemoteException('Method dose not exists', -32603); + throw new RemoteException('Method does not exist', -32603); } $this->checkAccess($methods[$method]); $name = $this->getMethodName($methods, $method); @@ -103,7 +103,7 @@ class RemoteAPI { $coreMethods = $this->getCoreMethods(); $this->checkAccess($coreMethods[$method]); if (!isset($coreMethods[$method])) { - throw new RemoteException('Method dose not exists', -32603); + 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); @@ -121,7 +121,7 @@ class RemoteAPI { private function checkArgumentLength($method, $args) { if (count($method['args']) < count($args)) { - throw new RemoteException('Method dose not exists - wrong parameter count.', -32603); + throw new RemoteException('Method does not exist - wrong parameter count.', -32603); } } @@ -173,7 +173,7 @@ class RemoteAPI { foreach ($plugins as $pluginName) { $plugin = plugin_load('remote', $pluginName); if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) { - throw new RemoteException("Plugin $pluginName dose not implement DokuWiki_Remote_Plugin"); + throw new RemoteException("Plugin $pluginName does not implement DokuWiki_Remote_Plugin"); } $methods = $plugin->_getMethods(); -- cgit v1.2.3 From c2eb026d070a5ba9ba1ee8754c3a862a026a7ea8 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 11:04:12 +0100 Subject: changed error code for unauthorized method calls. --- inc/remote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index fb095f517..b4cc8e6cc 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -158,7 +158,7 @@ class RemoteAPI { */ public function forceAccess() { if (!$this->hasAccess()) { - throw new RemoteAccessDeniedException('server error. not authorized to call method', -32603); + throw new RemoteAccessDeniedException('server error. not authorized to call method', -32604); } } -- cgit v1.2.3 From 96946cc94d3ecb3832e2a1ce35c49743e25329e1 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 11:25:00 +0100 Subject: replaced $HTTP_RAW_POST_DATA with http_get_raw_post_data function --- inc/IXR_Library.php | 7 ++++--- inc/httputils.php | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c8255e6d9..ce5a4d914 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()) { 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; +} -- cgit v1.2.3 From 7c35ac36c1dea2d6f26d8184dcbf1fe5afae59ac Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 13:15:18 +0100 Subject: added RPC_CALL_ADD event. This event enables plugins to register custom method names. --- inc/remote.php | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index b4cc8e6cc..089a5f7d4 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -35,8 +35,6 @@ class RemoteAccessDeniedException extends RemoteException {} * plugin methods are formed like 'plugin..'. * i.e.: plugin.clock.getTime or plugin.clock_gmt.getTime * - * - * * @throws RemoteException */ class RemoteAPI { @@ -52,6 +50,14 @@ class RemoteAPI { */ 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; @@ -83,9 +89,34 @@ class RemoteAPI { list($type, $pluginName, $call) = explode('.', $method, 3); if ($type === 'plugin') { return $this->callPlugin($pluginName, $method, $args); - } else { + } + 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) { -- cgit v1.2.3 From 895122581107d99070522a1b5121f01e69d8a4de Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 13:33:00 +0100 Subject: added dokuwiki.getXMLRPCAPIVersion and wiki.getRPCVersionSupported --- inc/RemoteAPICore.php | 99 ++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 64 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index d525b17e0..38f7072ad 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -20,25 +20,17 @@ class RemoteAPICore { 'return' => 'string', 'doc' => 'Returns the running DokuWiki version.' ), 'dokuwiki.login' => array( - 'args' => array( - 'username' => 'string', - 'password' => 'string' - ), + '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( - 'namespace' => 'string', - 'options' => 'array' - ), + 'args' => array('string', 'array'), 'return' => 'array', 'doc' => 'List all pages within the given namespace.', 'name' => 'readNamespace' ), 'dokuwiki.search' => array( - 'args' => array( - 'search' => 'string' - ), + 'args' => array('string'), 'return' => 'array', 'doc' => 'Perform a fulltext search and return a list of matching pages' ), 'dokuwiki.getTime' => array( @@ -46,7 +38,7 @@ class RemoteAPICore { 'return' => 'int', 'doc' => 'Returns the current time at the remote wiki server as Unix timestamp.', ), 'dokuwiki.setLocks' => array( - 'args' => array('lock' => 'array'), + 'args' => array('array'), 'return' => 'array', 'doc' => 'Lock or unlock pages.' ), 'dokuwiki.getTitle' => array( @@ -54,40 +46,26 @@ class RemoteAPICore { 'return' => 'string', 'doc' => 'Returns the wiki title.' ), 'dokuwiki.appendPage' => array( - 'args' => array( - 'pagename' => 'string', - 'rawWikiText' => 'string', - 'attrs' => 'array' - ), + 'args' => array('string', 'string', 'array'), 'return' => 'int', 'doc' => 'Append text to a wiki page.' ), 'wiki.getPage' => array( - 'args' => array( - 'id' => 'string' - ), + 'args' => array('string'), 'return' => 'string', 'doc' => 'Get the raw Wiki text of page, latest version.', 'name' => 'rawPage', ), 'wiki.getPageVersion' => array( - 'args' => array( - 'id' => 'string', - 'rev' => 'int', - ), + 'args' => array('string', 'int'), 'name' => 'rawPage', 'return' => 'string', 'doc' => 'Return a raw wiki page' ), 'wiki.getPageHTML' => array( - 'args' => array( - 'id' => 'string' - ), + 'args' => array('string'), 'return' => 'string', 'doc' => 'Return page in rendered HTML, latest version.', 'name' => 'htmlPage' ), 'wiki.getPageHTMLVersion' => array( - 'args' => array( - 'id' => 'string', - 'rev' => 'int' - ), + 'args' => array('string', 'int'), 'return' => 'string', 'doc' => 'Return page in rendered HTML.', 'name' => 'htmlPage' @@ -97,86 +75,79 @@ class RemoteAPICore { 'doc' => 'Returns a list of all pages. The result is an array of utf8 pagenames.', 'name' => 'listPages' ), 'wiki.getAttachments' => array( - 'args' => array( - 'namespace' => 'string', - 'options' => 'array' - ), + 'args' => array('string', 'array'), 'return' => 'array', 'doc' => 'Returns a list of all media files.', 'name' => 'listAttachments' ), 'wiki.getBackLinks' => array( - 'args' => array( - 'id' => 'string' - ), + 'args' => array('string'), 'return' => 'array', 'doc' => 'Returns the pages that link to this page.', 'name' => 'listBackLinks' ), 'wiki.getPageInfo' => array( - 'args' => array('id' => 'string'), + 'args' => array('string'), 'return' => 'array', 'doc' => 'Returns a struct with infos about the page.', 'name' => 'pageInfo' ), 'wiki.getPageInfoVersion' => array( - 'args' => array( - 'id' => 'string', - 'version' => 'int', - ), + 'args' => array('string', 'int'), 'return' => 'array', 'doc' => 'Returns a struct with infos about the page.', 'name' => 'pageInfo' ), 'wiki.getPageVersions' => array( - 'args' => array( - 'id' => 'string', - 'offset' => 'int' - ), + 'args' => array('string', 'int'), 'return' => 'array', 'doc' => 'Returns the available revisions of the page.', 'name' => 'pageVersions' ), 'wiki.putPage' => array( - 'args' => array( - 'id' => 'string', - 'rawText' => 'string', - 'attrs' => 'array' - ), + 'args' => array('string', 'string', 'array'), 'return' => 'int', 'doc' => 'Saves a wiki page.' ), 'wiki.listLinks' => array( - 'args' => array('id' => 'string'), + 'args' => array('string'), 'return' => 'array', 'doc' => 'Lists all links contained in a wiki page.' ), 'wiki.getRecentChanges' => array( - 'args' => array('timestamp' => 'int'), + 'args' => array('int'), 'return' => 'array', 'Returns a struct about all recent changes since given timestamp.' ), 'wiki.getRecentMediaChanges' => array( - 'args' => array('timestamp' => 'int'), + 'args' => array('int'), 'return' => 'array', 'Returns a struct about all recent media changes since given timestamp.' ), 'wiki.aclCheck' => array( - 'args' => array('id' => 'string'), + 'args' => array('string'), 'return' => 'int', 'doc' => 'Returns the permissions of a given wiki page.' ), 'wiki.putAttachment' => array( - 'args' => array( - 'id' => 'string', - 'data' => 'file', - 'params' => 'array' - ), + 'args' => array('string', 'file', 'array'), 'return' => 'array', 'doc' => 'Upload a file to the wiki.' ), 'wiki.deleteAttachment' => array( - 'args' => array('id' => 'string'), + 'args' => array('string'), 'return' => 'int', 'doc' => 'Delete a file from the wiki.' ), 'wiki.getAttachment' => array( - 'args' => array('id' => 'string'), + 'args' => array('string'), 'doc' => 'Return a media file', 'return' => 'file', 'name' => 'getAttachment', ), 'wiki.getAttachmentInfo' => array( - 'args' => array('id' => 'string'), + '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' ), ); -- cgit v1.2.3 From 418431a22a4a8f9d62e60e1d8eaa9bcf321377ce Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 13:34:19 +0100 Subject: updated comment --- inc/remote.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/remote.php b/inc/remote.php index 089a5f7d4..0347bd900 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -19,7 +19,7 @@ class RemoteAccessDeniedException extends RemoteException {} * array( * 'method.remoteName' => array( * 'args' => array( - * 'name' => 'type eg. string|int|...|date|file', + * 'type eg. string|int|...|date|file', * ) * 'name' => 'method name in class', * 'return' => 'type', -- cgit v1.2.3 From 37e579189fae39899d3856598affa31dfd39328b Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Thu, 22 Mar 2012 12:04:56 +0100 Subject: removed require_once for autoloaded fulltext.php --- inc/RemoteAPICore.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 38f7072ad..450c6f39e 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -278,8 +278,6 @@ class RemoteAPICore { * List all pages in the given namespace (and below) */ function search($query){ - require_once(DOKU_INC.'inc/fulltext.php'); - $regex = ''; $data = ft_pageSearch($query,$regex); $pages = array(); -- cgit v1.2.3 From b967e5fc8fd93226eba7926c13b73b93878f182b Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Thu, 22 Mar 2012 12:11:31 +0100 Subject: removed requires, changed conf check in xmlrpc.php --- inc/load.php | 1 + inc/remote.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/load.php b/inc/load.php index 3f1f3429f..f3ab5bcdd 100644 --- a/inc/load.php +++ b/inc/load.php @@ -77,6 +77,7 @@ function load_autoload($name){ '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', diff --git a/inc/remote.php b/inc/remote.php index 0347bd900..2ef28afd2 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -1,7 +1,6 @@ Date: Fri, 23 Mar 2012 08:16:38 +0100 Subject: use correct call to parent constructor in IXR lib --- inc/IXR_Library.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c8255e6d9..80b534b2e 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -501,7 +501,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; -- cgit v1.2.3 From 8ae0948568a6c6944e475c0d6133776d0256940f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 23 Mar 2012 10:48:38 +0100 Subject: fix for putAttachment --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 450c6f39e..d8d4d5b7b 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -471,7 +471,7 @@ class RemoteAPICore { // save temporary file @unlink($ftmp); - io_saveFile($ftmp, $file->getValue()); + io_saveFile($ftmp, $file); $res = media_save(array('name' => $ftmp), $id, $params['ow'], $auth, 'rename'); if (is_array($res)) { -- cgit v1.2.3 From ee9b1ae4b3919f79050bb3c4478203d648810645 Mon Sep 17 00:00:00 2001 From: Taisuke Shimamoto Date: Fri, 23 Mar 2012 11:07:23 +0100 Subject: Japanese language update --- inc/lang/ja/lang.php | 8 ++++++++ inc/lang/ja/resetpwd.txt | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 inc/lang/ja/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 94fa71f1b..057fa5a54 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -7,6 +7,7 @@ * @author Ikuo Obataya * @author Daniel Dupriest * @author Kazutaka Miyasaka + * @author Taisuke Shimamoto */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -42,6 +43,7 @@ $lang['btn_backtomedia'] = 'メディアファイル選択に戻る'; $lang['btn_subscribe'] = '変更履歴配信の登録'; $lang['btn_profile'] = 'ユーザー情報の更新'; $lang['btn_reset'] = 'リセット'; +$lang['btn_resendpwd'] = '新しいパスワードをセット'; $lang['btn_draft'] = 'ドラフトを編集'; $lang['btn_recover'] = 'ドラフトを復元'; $lang['btn_draftdel'] = 'ドラフトを削除'; @@ -78,6 +80,7 @@ $lang['profnoempty'] = 'ユーザー名とメールアドレスを入 $lang['profchanged'] = 'ユーザー情報は更新されました。'; $lang['pwdforget'] = 'パスワードをお忘れですか?パスワード再発行'; $lang['resendna'] = 'パスワードの再発行は出来ません。'; +$lang['resendpwd'] = '新しいパスワードをセット'; $lang['resendpwdmissing'] = '全ての項目を入力して下さい。'; $lang['resendpwdnouser'] = '入力されたユーザーが見つかりませんでした。'; $lang['resendpwdbadauth'] = '申し訳ありません。この確認コードは有効ではありません。メール内に記載されたリンクを確認してください。'; @@ -183,6 +186,11 @@ $lang['external_edit'] = '外部編集'; $lang['summary'] = '編集の概要'; $lang['noflash'] = 'この内容を表示するためには
Adobe Flash Plugin が必要です。'; $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 -- cgit v1.2.3 From 052b2a1780ce07c45e80cd16a55e43177850de35 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 23 Mar 2012 11:39:25 +0100 Subject: removed commented code left from the quoted_printable days --- inc/Mailer.class.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index d7dc70ded..9744fa44e 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -370,15 +370,6 @@ class Mailer { } if(!utf8_isASCII($text)){ - //FIXME check if this is needed for base64 too - // 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).'?="'; - } else { - $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?='; - } - */ $text = '=?UTF-8?B?'.base64_encode($text).'?='; } }else{ -- cgit v1.2.3 From 9d421a3d3c1411a47d49f43cfc1f798f6a96ab8c Mon Sep 17 00:00:00 2001 From: Erial Krale Date: Mon, 26 Mar 2012 20:44:07 +0200 Subject: Korean language update --- inc/lang/ko/lang.php | 3 +++ inc/lang/ko/resetpwd.txt | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 inc/lang/ko/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 9be5df4b7..84fdb3c48 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -44,6 +44,7 @@ $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,6 +81,7 @@ $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니 $lang['profchanged'] = '개인정보 변경이 성공했습니다.'; $lang['pwdforget'] = '패스워드를 잊어버린 경우 새로 발급받을 수 있습니다.'; $lang['resendna'] = '이 위키는 패스워드 재발급을 지원하지 않습니다.'; +$lang['resendpwd'] = '새 암호 다음으로 전송 : '; $lang['resendpwdmissing'] = '새로운 패스워드를 입력해야햡니다.'; $lang['resendpwdnouser'] = '등록된 사용자가 아닙니다. 다시 확인 바랍니다.'; $lang['resendpwdbadauth'] = '인증 코드가 틀립니다. 잘못된 링크인지 확인 바랍니다.'; @@ -261,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'] = '위키 이름'; 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 -- cgit v1.2.3 From 51b120f658e9d28fa503e2adf78771e1abfc4d35 Mon Sep 17 00:00:00 2001 From: Kiril LastName Date: Tue, 3 Apr 2012 22:58:41 +0300 Subject: BG: language update --- inc/lang/bg/lang.php | 72 +++++++++++++++++++++++++++++++++++++----------- inc/lang/bg/resetpwd.txt | 4 +++ 2 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 inc/lang/bg/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index 04000d10e..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'] = '“'; //“ +$lang['doublequoteclosing'] = '”'; //” +$lang['singlequoteopening'] = '‘'; //‘ +$lang['singlequoteclosing'] = '’'; //’ +$lang['apostrophe'] = '’'; //’ + $lang['btn_edit'] = 'Редактиране'; $lang['btn_source'] = 'Преглед на кода'; $lang['btn_show'] = 'Преглед на страницата'; @@ -41,13 +42,15 @@ $lang['btn_backtomedia'] = 'Назад към избора на файл'; $lang['btn_subscribe'] = 'Абонаменти'; $lang['btn_profile'] = 'Профил'; $lang['btn_reset'] = 'Изчистване'; -$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'] = 'Парола'; @@ -59,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'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.'; @@ -71,19 +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['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'] = 'Изберете файл за качване'; @@ -91,6 +100,7 @@ $lang['txt_filename'] = 'Качи като (незадължителн $lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; $lang['lockedby'] = 'В момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; + $lang['js']['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа предотвратяване на конфликти, ползвайте бутона "Преглед", за рестартиране на брояча за заключване.'; $lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?'; $lang['js']['searchmedia'] = 'Търсене на файлове'; @@ -117,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.
Можете да копирате и поставите връзката.'; $lang['js']['linkwiz'] = 'Помощник за препратки'; $lang['js']['linkto'] = 'Препратка към: '; $lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?'; @@ -133,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'] = 'Качването е успешно'; @@ -159,6 +170,7 @@ $lang['mediaextchange'] = 'Разширението на файла е с $lang['reference'] = 'Връзки за'; $lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:'; $lang['ref_hidden'] = 'Някои връзки са към страници, които нямате права да четете'; + $lang['hits'] = 'Съвпадения'; $lang['quickhits'] = 'Съвпадащи имена на страници'; $lang['toc'] = 'Съдържание'; @@ -182,15 +194,23 @@ $lang['external_edit'] = 'външна редакция'; $lang['summary'] = 'Обобщение'; $lang['noflash'] = 'Необходим е Adobe Flash Plugin за изобразяване на съдържанието.'; $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'] = 'Подчертан текст'; @@ -215,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'] = 'Метаданните са запазени успешно'; @@ -234,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'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.'; @@ -241,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'] = 'Текущи абонаменти'; @@ -250,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'] = 'Поради мерки за сигурност инсталаторът работи само с нови и непроменени инсталационни файлове. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталиране на Dokuwiki.'; +$lang['i_modified'] = 'Поради мерки за сигурност инсталаторът работи само с нови и непроменени инсталационни файлове. + Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталиране на Dokuwiki.'; + $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; $lang['i_phpver'] = 'Инсталираната версия %s на PHP е по-стара от необходимата %s. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; @@ -267,13 +299,16 @@ $lang['i_writeerr'] = '%s не можа да бъде с $lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=%s)'; $lang['i_badval'] = '%s - непозволена или празна стойност'; $lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.'; -$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; + +$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, + за да можете да ползвате Вашето ново DokuWiki.'; $lang['i_policy'] = 'Първоначална политика за достъп'; $lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)'; $lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани пишат и качват)'; $lang['i_pol2'] = 'Затворено Wiki (само регистрирани четат, пишат и качват)'; $lang['i_retry'] = 'Повторен опит'; $lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието:'; + $lang['recent_global'] = 'В момента преглеждате промените в именно пространство %s. Може да прегледате и промените в цялото Wiki.'; $lang['years'] = 'преди %d години'; $lang['months'] = 'преди %d месеца'; @@ -282,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'] = 'Файл'; @@ -306,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 страницата. + -- cgit v1.2.3 From 586bfa91f239ca0bd7d90be35d5d81fb4edaa5d1 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Wed, 4 Apr 2012 21:49:26 +0200 Subject: Changed an error code in XML-RPC interface. This error hasn't anything to do with the rest of the -32600 errors. --- inc/IXR_Library.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index d1e877813..979dc4d16 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -440,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); } -- cgit v1.2.3 From 6e3f46e33d8bcba4e852940d321c8f3741bcc5e5 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 5 Apr 2012 17:56:44 +0200 Subject: Make getTitle method in remote interface public --- inc/RemoteAPICore.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index d8d4d5b7b..546832100 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -44,7 +44,8 @@ class RemoteAPICore { ), 'dokuwiki.getTitle' => array( 'args' => array(), 'return' => 'string', - 'doc' => 'Returns the wiki title.' + 'doc' => 'Returns the wiki title.', + 'public' => '1' ), 'dokuwiki.appendPage' => array( 'args' => array('string', 'string', 'array'), 'return' => 'int', -- cgit v1.2.3 From e5d4768d27336a3af2fc36af663d21a1a57d0ee1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 7 Apr 2012 20:20:22 +0200 Subject: added tpl_includeFile() to core --- inc/template.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index 37848b59a..edf3ca3fb 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1526,6 +1526,42 @@ function tpl_getMediaFile($search, $abs=false, &$imginfo=null){ return $url; } +/** + * PHP include a file + * + * either from the conf directory if it exists, otherwise use + * file in the template's root directory. + * + * The function honours config cascade settings and looks for the given + * file next to the ´main´ config files, in the order protected, local, + * default. + * + * Note: no escaping or sanity checking is done here. Never pass user input + * to this function! + * + * @author Anika Henke + * @author Andreas Gohr + */ +function tpl_includeFile($file){ + global $config_cascade; + foreach (array('protected','local','default') as $config_group) { + if (empty($config_cascade['main'][$config_group])) continue; + foreach ($config_cascade['main'][$config_group] as $conf_file) { + $dir = dirname($conf_file); + if(file_exists("$dir/$file")){ + // include("$dir/$file"); + return; + } + } + } + + // still here? try the template dir + $file = tpl_incdir().$file; + if(file_exists($file)){ + //include($file); + } +} + /** * Returns icon from data/media root directory if it exists, otherwise * the one in the template's image directory. -- cgit v1.2.3 From f3a1225fae9b5d3b72f691efd61a993c92c0d581 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 7 Apr 2012 22:12:29 +0100 Subject: removed comments from accidentally commented lines in tpl_includeFile() --- inc/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index edf3ca3fb..27163f076 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1549,7 +1549,7 @@ function tpl_includeFile($file){ foreach ($config_cascade['main'][$config_group] as $conf_file) { $dir = dirname($conf_file); if(file_exists("$dir/$file")){ - // include("$dir/$file"); + include("$dir/$file"); return; } } @@ -1558,7 +1558,7 @@ function tpl_includeFile($file){ // still here? try the template dir $file = tpl_incdir().$file; if(file_exists($file)){ - //include($file); + include($file); } } -- cgit v1.2.3 From 16cc7ed7a97c7525c006a0355bd0c1277c256cab Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 8 Apr 2012 16:20:09 +0100 Subject: removed names from footnotes and removed anchors from headings altogether --- inc/parser/xhtml.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 4345b494f..69060a3b4 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -109,7 +109,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // open the footnote and set the anchor and backlink $this->doc .= '
'; - $this->doc .= ''; + $this->doc .= ''; $this->doc .= $id.') '.DOKU_LF; // get any other footnotes that use the same markup @@ -118,7 +118,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if (count($alt)) { foreach ($alt as $ref) { // set anchor and backlink for the other footnotes - $this->doc .= ', '; + $this->doc .= ', '; $this->doc .= ($ref+1).') '.DOKU_LF; } } @@ -181,9 +181,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if ($level <= $conf['maxseclevel']) { $this->doc .= ' class="' . $this->startSectionEdit($pos, 'section', $text) . '"'; } - $this->doc .= '>'; + $this->doc .= ' id="'.$hid.'">'; $this->doc .= $this->_xmlEntities($text); - $this->doc .= "".DOKU_LF; + $this->doc .= "".DOKU_LF; } function section_open($level) { @@ -316,7 +316,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // output the footnote reference and link - $this->doc .= ''.$id.')'; + $this->doc .= ''.$id.')'; } function listu_open() { -- cgit v1.2.3 From 940db3a35fd0feb1f5540a789e79c4a3e192c115 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 8 Apr 2012 16:28:39 +0100 Subject: use abbr instead of deprecated acronym --- inc/parser/xhtml.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 69060a3b4..157d0d76a 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -471,8 +471,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $title = $this->_xmlEntities($this->acronyms[$acronym]); - $this->doc .= ''.$this->_xmlEntities($acronym).''; + $this->doc .= ''.$this->_xmlEntities($acronym).''; } else { $this->doc .= $this->_xmlEntities($acronym); -- cgit v1.2.3 From 3c86b7ebf3316c3566a7f6fed683a484036d1c3b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 8 Apr 2012 17:35:06 +0100 Subject: removed align attribute from images and inserted them only in the feed (FS#1351) can someone with better regex skills please revise this? --- inc/parser/xhtml.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 157d0d76a..4514a18a4 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1075,10 +1075,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret .= ' Date: Sun, 8 Apr 2012 17:45:05 +0100 Subject: renamed smiley image class to 'icon' (FS#1970) --- inc/parser/xhtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 4514a18a4..119ac3f01 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -483,7 +483,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if ( array_key_exists($smiley, $this->smileys) ) { $title = $this->_xmlEntities($this->smileys[$smiley]); $this->doc .= ''.
+                ''; } else { $this->doc .= $this->_xmlEntities($smiley); -- cgit v1.2.3 From 0607bfee2c4334d31415541abb89026e77c7628a Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 8 Apr 2012 20:01:24 +0100 Subject: added some wanting classes --- inc/html.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index b233e1d92..f3f042ea1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -449,7 +449,7 @@ function html_revisions($first=0, $media_id = false){ if (!$media_id) print p_locale_xhtml('revisions'); - $params = array('id' => 'page__revisions'); + $params = array('id' => 'page__revisions', 'class' => 'changes'); if ($media_id) $params['action'] = media_managerURL(array('image' => $media_id), '&'); $form = new Doku_Form($params); @@ -664,12 +664,13 @@ function html_recent($first=0, $show_changes='both'){ if (getNS($ID) != '') print '

' . sprintf($lang['recent_global'], getNS($ID), wl('', 'do=recent')) . '

'; - $form = new Doku_Form(array('id' => 'dw__recent', 'method' => 'GET')); + $form = new Doku_Form(array('id' => 'dw__recent', 'method' => 'GET', 'class' => 'changes')); $form->addHidden('sectok', null); $form->addHidden('do', 'recent'); $form->addHidden('id', $ID); if ($conf['mediarevisions']) { + $form->addElement('
'); $form->addElement(form_makeListboxField( 'show_changes', array( @@ -682,6 +683,7 @@ function html_recent($first=0, $show_changes='both'){ array('class'=>'quickselect'))); $form->addElement(form_makeButton('submit', 'recent', $lang['btn_apply'])); + $form->addElement('
'); } $form->addElement(form_makeOpenTag('ul')); @@ -1381,7 +1383,7 @@ function html_edit(){ } $form->addHidden('target', $data['target']); - $form->addElement(form_makeOpenTag('div', array('id'=>'wiki__editbar'))); + $form->addElement(form_makeOpenTag('div', array('id'=>'wiki__editbar', 'class'=>'editBar'))); $form->addElement(form_makeOpenTag('div', array('id'=>'size__ctl'))); $form->addElement(form_makeCloseTag('div')); if ($wr) { @@ -1413,13 +1415,12 @@ function html_edit(){ echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '//-->' . NL; } ?> -
+
-
-
- +
+
Date: Mon, 9 Apr 2012 14:15:29 +0100 Subject: load only one stylesheet for all modes instead of three Instead of three stylesheets for 'all', 'screen' and 'print' modes, they are all loaded into a single stylesheet by wrapping all screen styles in a "@media screen {}" and all print styles in a "@media print {}". The 'all' mode is not wrapped in anything. Potential issues with existing CSS: If any of your screen or print CSS files already contain any "@media" syntax, the CSS will probably break. In that case please add any CSS with "@media" in it to the 'all' mode instead! Also, the 'rtl' mode is hereby deprecated. Please just prefix any RTL styles within your normal CSS files with "[dir=rtl]". This also fixes that RTL styles cannot be added for 'all' or 'print' modes. --- inc/template.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/template.php b/inc/template.php index ab6aa925f..131f34020 100644 --- a/inc/template.php +++ b/inc/template.php @@ -354,12 +354,8 @@ function tpl_metaheaders($alt=true){ } // load stylesheets - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'screen', 'type'=>'text/css', + $head['link'][] = array('rel'=>'stylesheet', 'type'=>'text/css', 'href'=>DOKU_BASE.'lib/exe/css.php?t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'all', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=all&t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'print', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=print&t='.$conf['template'].'&tseed='.$tseed); // make $INFO and other vars available to JavaScripts $json = new JSON(); -- cgit v1.2.3 From d5acc30de20298eb6ed7545e70484599c4d95867 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 9 Apr 2012 17:36:33 +0100 Subject: rewrote and improved HTML for TOC Attention: Template authors need to adjust their CSS! Original structure: div.toc > div#toc__header.tocheader.toctoggle > span#toc__toggle.toc_close|toc_open > span div#toc__inside > ul.toc > li.level1 > div.li > span.li > a.toc New structure: div#dw__toc.open|close > h3 > strong > span ul.toc > li.toc > div.li > a --- inc/html.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index f3f042ea1..787f96caa 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1712,11 +1712,11 @@ function html_TOC($toc){ if(!count($toc)) return ''; global $lang; $out = ''.DOKU_LF; - $out .= '
'.DOKU_LF; - $out .= '
'; + $out .= '
'.DOKU_LF; + $out .= '

'; $out .= $lang['toc']; - $out .= '

'.DOKU_LF; - $out .= '
'.DOKU_LF; + $out .= ''.DOKU_LF; + $out .= '
'.DOKU_LF; $out .= html_buildlist($toc,'toc','html_list_toc','html_li_default',true); $out .= '
'.DOKU_LF.'
'.DOKU_LF; $out .= ''.DOKU_LF; @@ -1733,8 +1733,7 @@ function html_list_toc($item){ $link = $item['link']; } - return ''. - hsc($item['title']).''; + return ''.hsc($item['title']).''; } /** -- cgit v1.2.3 From 91b05b6bf9cb9fd3aeced777159422f4e8114a9c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 9 Apr 2012 19:06:15 +0100 Subject: improved HTML for search results Attention: Template authors need to adjust their CSS! Original structure: div.search_result > a.wikilink1 > span.search_cnt br div.search_snippet New structure: dl.search_results > dt > a.wikilink1 dd --- inc/html.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index 787f96caa..c3e345cb0 100644 --- a/inc/html.php +++ b/inc/html.php @@ -323,11 +323,11 @@ function html_search(){ flush(); //show progressbar - print '
'.NL; + print '
'.NL; print ''.NL; - print '
'.NL; + print '
'.NL; flush(); //do quick pagesearch @@ -363,20 +363,24 @@ function html_search(){ //do fulltext search $data = ft_pageSearch($QUERY,$regex); if(count($data)){ + print '
'; $num = 1; foreach($data as $id => $cnt){ - print '
'; + print '
'; print html_wikilink(':'.$id,useHeading('navigation')?null:$id,$regex); if($cnt !== 0){ - print ': '.$cnt.' '.$lang['hits'].'
'; + print ': '.$cnt.' '.$lang['hits'].''; + } + print '
'; + if($cnt !== 0){ if($num < FT_SNIPPET_NUMBER){ // create snippets for the first number of matches only - print '
'.ft_snippet($id,$regex).'
'; + print '
'.ft_snippet($id,$regex).'
'; } $num++; } - print '
'; flush(); } + print '
'; }else{ print '
'.$lang['nothingfound'].'
'; } -- cgit v1.2.3 From bed6e6e5baa092db263210240784e7e640729579 Mon Sep 17 00:00:00 2001 From: Usama Akkad Date: Wed, 11 Apr 2012 23:02:09 +0200 Subject: Arabic Language Update --- inc/lang/ar/lang.php | 54 +++++++++++++++++++++++++++++++++++++++++++++++- inc/lang/ar/resetpwd.txt | 3 +++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 inc/lang/ar/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index af92243c9..350e26695 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -42,11 +42,14 @@ $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_revert'] = 'استعد'; $lang['btn_register'] = 'سجّل'; +$lang['btn_apply'] = 'طبق'; +$lang['btn_media'] = 'مدير الوسائط'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -76,6 +79,7 @@ $lang['profnoempty'] = 'غير مسموح باسم مستخدم أو $lang['profchanged'] = 'حُدث الملف الشخصي للمستخدم بنجاح.'; $lang['pwdforget'] = 'أنسيت كلمة السر؟ احصل على واحدة جديدة'; $lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.'; +$lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ'; $lang['resendpwdmissing'] = 'عذراّ، يجب أن تملأ كل الحقول.'; $lang['resendpwdnouser'] = 'عذراً، لم نجد المستخدم هذا في قاعدة بياناتنا.'; $lang['resendpwdbadauth'] = 'عذراً، رمز التفعيل هذا غير صحيح. نأكد من استخدامك كامل وصلة التأكيد.'; @@ -90,7 +94,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'] = 'أبقي النافذة مفتوحة أثناء الاختيار'; @@ -121,6 +125,17 @@ $lang['js']['nosmblinks'] = 'الروابط لمجلدات مشاركة و $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'] = 'Shine-through'; +$lang['js']['media_diff_portions'] = 'Swipe'; +$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'] = 'ملفات الوسائط'; @@ -170,11 +185,20 @@ $lang['external_edit'] = 'تحرير خارجي'; $lang['summary'] = 'ملخص التحرير'; $lang['noflash'] = 'تحتاج إلىملحق فلاش أدوبي لعرض هذا المحتوى.'; $lang['download'] = 'نزل Snippet'; +$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'] = 'نص مسطر'; @@ -215,6 +239,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'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك'; @@ -233,6 +260,7 @@ $lang['subscr_style_digest'] = 'بريد ملخص عن تغييرات كل ص $lang['subscr_style_list'] = 'قائمة بالصفحات المتغيرة منذ آخر بريد'; $lang['authmodfailed'] = 'إعدادات تصريح فاسدة، يرجى مراسلة المدير.'; $lang['authtempfail'] = 'تصريح المشترك غير متوفر مؤقتاً، إن استمرت هذه الحالة يرجى مراسلة المدير'; +$lang['authpwdexpire'] = 'ستنتهي صلاحية كلمة السر في %d . عليك بتغييرها سريعا.'; $lang['i_chooselang'] = 'اختر لغتك'; $lang['i_installer'] = 'برنامج تنصيب دوكو ويكي'; $lang['i_wikiname'] = 'اسم الويكي'; @@ -273,3 +301,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/ar/resetpwd.txt b/inc/lang/ar/resetpwd.txt new file mode 100644 index 000000000..2bbd4a21a --- /dev/null +++ b/inc/lang/ar/resetpwd.txt @@ -0,0 +1,3 @@ +====== اضبط كلمة سر جديدة ====== + +أدخل كلمة سر جديدة لحسابك في هذه الويكي. -- cgit v1.2.3 From cffea7877fa1a5e2c46852274ae878bf73284598 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 22:23:09 +0200 Subject: Added page title to search results in Remote API --- inc/RemoteAPICore.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 546832100..80deb7377 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,6 +302,7 @@ class RemoteAPICore { 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, + 'title' => p_get_first_heading($id) ); } return $pages; -- cgit v1.2.3 From 5529fa3167d83c7fd8ab03d077c2b46163b20c24 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 23:29:24 +0200 Subject: Remote search is aware of useheading option --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 80deb7377..9da493210 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,7 +302,7 @@ class RemoteAPICore { 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, - 'title' => p_get_first_heading($id) + 'title' => useHeading('navigation') ? p_get_first_heading($id) : $id ); } return $pages; -- cgit v1.2.3 From 389762f8976d87198af8a6aa178bc7026dde98f0 Mon Sep 17 00:00:00 2001 From: Padmanabh Kulkarni Date: Sun, 15 Apr 2012 12:46:42 +0200 Subject: Marathi language update --- inc/lang/mr/lang.php | 82 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 12 deletions(-) (limited to 'inc') diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 96323394d..32781e6d4 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -44,13 +44,16 @@ $lang['btn_back'] = 'मागॆ'; $lang['btn_backlink'] = 'येथे काय जोडले आहे'; $lang['btn_backtomedia'] = 'परत माध्यम फाइल निवडीकड़े'; $lang['btn_subscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) लावा '; -$lang['btn_unsubscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) बंद करा'; $lang['btn_profile'] = 'प्रोफाइल अद्ययावत करा'; $lang['btn_reset'] = 'रिसेट'; +$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'] = 'परवलीचा शब्द'; @@ -81,19 +84,58 @@ $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'] = 'अपलोड करण्याची फाइल निवडा'; $lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल्पिक )'; $lang['txt_overwrt'] = 'अस्तित्वात असलेल्या फाइलवरच सुरक्षित करा.'; $lang['lockedby'] = 'सध्या लॉक करणारा :'; $lang['lockexpire'] = 'सध्या लॉक करणारा :'; -$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; -$lang['js']['notsavedyet'] = "सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?"; +$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; +$lang['js']['notsavedyet'] = 'सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?'; +$lang['js']['searchmedia'] = 'फाईल्ससाठी शोधा'; +$lang['js']['keepopen'] = 'निवड केल्यावर विण्डो उघडी ठेवा'; +$lang['js']['hidedetails'] = 'सविस्तर मजकूर लपवा'; +$lang['js']['mediatitle'] = 'लिंक सेटिंग'; +$lang['js']['mediadisplay'] = 'लिंकचा प्रकार'; +$lang['js']['mediaalign'] = 'जुळवणी'; +$lang['js']['mediasize'] = 'प्रतिमेचा आकार'; +$lang['js']['mediatarget'] = 'लिंकचे लक्ष्य'; +$lang['js']['mediaclose'] = 'बंद'; +$lang['js']['mediadisplayimg'] = 'प्रतिमा दाखवा.'; +$lang['js']['mediadisplaylnk'] = 'फक्त लिंक दाखवा.'; +$lang['js']['mediasmall'] = 'लहान आवृत्ती'; +$lang['js']['mediamedium'] = 'माध्यम आवृत्ती'; +$lang['js']['medialarge'] = 'मोठी आवृत्ती'; +$lang['js']['mediaoriginal'] = 'मूळ आवृत्ती'; +$lang['js']['medialnk'] = 'सविस्तर माहितीकडेची लिंक'; +$lang['js']['mediadirect'] = 'मूळ मजकुराकडे थेट लिंक'; +$lang['js']['medianolnk'] = 'लिंक नको'; +$lang['js']['medianolink'] = 'प्रतिमा लिंक करू नका'; +$lang['js']['medialeft'] = 'प्रतिमा डाव्या बाजूला जुळवून घ्या.'; +$lang['js']['mediaright'] = 'प्रतिमा उजव्या बाजूला जुळवून घ्या.'; +$lang['js']['mediacenter'] = 'प्रतिमा मध्यभागी जुळवून घ्या.'; +$lang['js']['medianoalign'] = 'जुळवाजुळव वापरू नका.'; +$lang['js']['nosmblinks'] = 'विन्डोज़ शेअर ला लिंक केल्यास ते फक्त मायक्रोसॉफ़्ट इन्टरनेट एक्स्प्लोरर वरच चालते. तरी तुम्ही लिंक कॉपी करू शकता.'; +$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_portions'] = 'स्वाईप'; +$lang['js']['media_select'] = 'फाईल निवड...'; +$lang['js']['media_upload_btn'] = 'अपलोड'; +$lang['js']['media_done_btn'] = 'झालं'; +$lang['js']['media_drop'] = 'अपलोड करण्यासाठी इथे फाईल टाका'; +$lang['js']['media_cancel'] = 'काढा'; $lang['rssfailed'] = 'ही पुरवणी आणण्यात काही चूक झाली:'; $lang['nothingfound'] = 'काही सापडला नाही.'; $lang['mediaselect'] = 'दृकश्राव्य फाइल'; @@ -111,9 +153,7 @@ $lang['deletefail'] = '%s ही फाइल नष्ट करू $lang['mediainuse'] = '%s ही फाइल नष्ट केली नाही - ती अजुन वापरात आहे.'; $lang['namespaces'] = 'नेमस्पेस'; $lang['mediafiles'] = 'मध्ये उपलब्ध असलेल्या फाइल'; -$lang['js']['keepopen'] = 'निवड केल्यावर विण्डो उघडी ठेवा'; -$lang['js']['hidedetails'] = 'सविस्तर मजकूर लपवा'; -$lang['js']['nosmblinks'] = 'विन्डोज़ शेअर ला लिंक केल्यास ते फक्त मायक्रोसॉफ़्ट इन्टरनेट एक्स्प्लोरर वरच चालते. तरी तुम्ही लिंक कॉपी करू शकता.'; +$lang['accessdenied'] = 'तुम्हाला हे पान बघायची परवानगी नाही.'; $lang['mediausage'] = 'ह्या फाइलचा संदर्भ देण्यासाठी खालील सिन्टॅक्स वापरा :'; $lang['mediaview'] = 'मूळ फाइल बघू '; $lang['mediaroot'] = 'रूट'; @@ -129,6 +169,10 @@ $lang['current'] = 'चालू'; $lang['yours'] = 'तुमची आवृत्ति'; $lang['diff'] = 'सध्याच्या आवृत्तिंशी फरक दाखवा'; $lang['diff2'] = 'निवडलेल्या आवृत्तिंमधील फरक दाखवा'; +$lang['difflink'] = 'ह्या तुलना दृष्टीकोनाला लिंक करा'; +$lang['diff_type'] = 'फरक बघू:'; +$lang['diff_inline'] = 'एका ओळीत'; +$lang['diff_side'] = 'बाजूबाजूला'; $lang['line'] = 'ओळ'; $lang['breadcrumb'] = 'मागमूस'; $lang['youarehere'] = 'तुम्ही इथे आहात'; @@ -140,10 +184,21 @@ $lang['restored'] = 'जुनी आवृत्ति पुन $lang['external_edit'] = 'बाहेरून संपादित'; $lang['summary'] = 'सारांश बदला'; $lang['noflash'] = 'ही माहिती दाखवण्यासाठी अडोब फ्लॅश प्लेअर ची गरज आहे.'; +$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'] = 'अधोरेखित मजकूर'; @@ -154,6 +209,11 @@ $lang['qb_h2'] = 'दुसर्या पातळीचे $lang['qb_h3'] = 'तिसर्या पातळीचे शीर्षक'; $lang['qb_h4'] = 'चवथ्या पातळीचे शीर्षक'; $lang['qb_h5'] = 'पाचव्या पातळीचे शीर्षक'; +$lang['qb_h'] = 'शीर्षक'; +$lang['qb_hs'] = 'शीर्षक निवड'; +$lang['qb_hplus'] = 'उंच शीर्षक'; +$lang['qb_hminus'] = 'खालचं शीर्षक'; +$lang['qb_hequal'] = 'समान लेवलचे शीर्षक'; $lang['qb_link'] = 'अंतर्गत लिंक'; $lang['qb_extlink'] = 'बाह्य लिंक'; $lang['qb_hr'] = 'आडवी पट्टी'; @@ -163,7 +223,7 @@ $lang['qb_media'] = 'प्रतिमा आणि इतर फ $lang['qb_sig'] = 'स्वाक्षरी टाका'; $lang['qb_smileys'] = 'स्माइली'; $lang['qb_chars'] = 'ख़ास चिन्ह'; -$lang['js']['del_confirm'] = 'निवडलेल्या गोष्टी नक्की नष्ट करू का ?'; +$lang['upperns'] = 'ह्यावरच्या नेमस्पेसकडे उडी मारा'; $lang['admin_register'] = 'नवीन सदस्य'; $lang['metaedit'] = 'मेटाडेटा बदला'; $lang['metasaveerr'] = 'मेटाडेटा सुरक्षित झाला नाही'; @@ -179,11 +239,9 @@ $lang['img_copyr'] = 'कॉपीराइट'; $lang['img_format'] = 'प्रकार'; $lang['img_camera'] = 'कॅमेरा'; $lang['img_keywords'] = 'मुख्य शब्द'; -$lang['subscribe_success'] = '%s ला %s च्या पुरवणिसाठि नोंदवले'; -$lang['subscribe_error'] = '%s ला %s च्या पुरवणिसाठि नोंदवताना चूक झाली'; -$lang['subscribe_noaddress'] = 'तुमच्या लॉगिनशी सम्बंधित कुठलाही पत्ता नाही , त्यामुळे पुरवणिसाठि नोंद केली जाऊ शकत नाही'; -$lang['unsubscribe_success'] = '%s ला %s च्या पुरवणी यादी मधून काढून टाकले'; -$lang['unsubscribe_error'] = '%s ला %s च्या पुरवणी यादी मधून काढून टाकण्यात चूक झाली'; +$lang['img_width'] = 'रुंदी'; +$lang['img_height'] = 'उंची'; +$lang['img_manager'] = 'मिडिया व्यवस्थापकात बघू'; $lang['authmodfailed'] = 'सदस्य अधिकृत करण्याची व्यवस्था चुकीची आहे. कृपया तुमच्या विकीच्या व्यवस्थापकाशी सम्पर्क साधा.'; $lang['authtempfail'] = 'सदस्य अधिकृत करण्याची सुविधा सध्या चालू नाही. सतत हा मजकूर दिसल्यास कृपया तुमच्या विकीच्या व्यवस्थापकाशी सम्पर्क साधा.'; $lang['i_chooselang'] = 'तुमची भाषा निवडा'; -- cgit v1.2.3 From 026b314868ee80aca644bf4107f78d8e8052b43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel-Emeric=20Andra=C5=9Fi?= Date: Sun, 15 Apr 2012 12:47:43 +0200 Subject: Romanian language update --- inc/lang/ro/lang.php | 9 +++++++++ inc/lang/ro/resetpwd.txt | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 inc/lang/ro/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 21a6ecef4..41727e521 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -9,6 +9,7 @@ * @author Emanuel-Emeric Andraşi * @author Marius OLAR * @author Marius Olar + * @author Emanuel-Emeric Andrași */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -44,6 +45,7 @@ $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'] = 'Setează o parolă nouă'; $lang['btn_draft'] = 'Editează schiţă'; $lang['btn_recover'] = 'Recuperează schiţă'; $lang['btn_draftdel'] = 'Şterge schiţă'; @@ -80,6 +82,7 @@ $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'] = 'Setează o parolă 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.'; @@ -186,6 +189,11 @@ $lang['external_edit'] = 'editare externă'; $lang['summary'] = 'Editează sumarul'; $lang['noflash'] = 'Plugin-ul Adobe Flash Plugin este necesar pentru afişarea corectă a conţinutului.'; $lang['download'] = 'Bloc descărcări'; +$lang['tools'] = 'Unelte'; +$lang['user_tools'] = 'Unelte utilizator'; +$lang['site_tools'] = 'Unelte Site'; +$lang['page_tools'] = 'Unelte Pagină'; +$lang['skip_to_content'] = 'sari la conținut'; $lang['mail_newpage'] = 'pagina adăugată:'; $lang['mail_changed'] = 'page schimbată:'; $lang['mail_subscribe_list'] = 'pagini modificate în spaţiul de nume:'; @@ -256,6 +264,7 @@ $lang['subscr_style_digest'] = 'digerează email la schimbări pentru fiecare $lang['subscr_style_list'] = 'lista paginilor schimbate de la ultimul email (la fiecare %.2f zile)'; $lang['authmodfailed'] = 'Configuraţia autentificării utilizatorului este eronată. Anunţaţi Wiki Admin-ul.'; $lang['authtempfail'] = 'Autentificarea utilizatorului este temporar indisponibilă. Anunţaţi Wiki Admin-ul.'; +$lang['authpwdexpire'] = 'Parola vă va expira în %d zile, ar trebui să o schimbați curând.'; $lang['i_chooselang'] = 'Alegeţi limba'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Numele Wiki'; diff --git a/inc/lang/ro/resetpwd.txt b/inc/lang/ro/resetpwd.txt new file mode 100644 index 000000000..2eb8052f1 --- /dev/null +++ b/inc/lang/ro/resetpwd.txt @@ -0,0 +1,3 @@ +====== Setează parolă nouă ====== + +Vă rugăm să introduceți o nouă parolă pentru contul dvs. pe acest wiki. \ No newline at end of file -- cgit v1.2.3 From 2398a2b54196667d6659d3d0489212b271c43703 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 15 Apr 2012 13:25:05 +0200 Subject: made it possible to disable HTML mails in the config --- inc/Mailer.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 9744fa44e..f04cdd3e2 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -26,6 +26,7 @@ class Mailer { private $sendparam= null; private $validator = null; + private $allowhtml = true; /** * Constructor @@ -43,6 +44,8 @@ class Mailer { $listid = join('.',array_reverse(explode('/',DOKU_BASE))).$server; $listid = strtolower(trim($listid,'.')); + $this->allowhtml = (bool) $conf['htmlmail']; + // add some default headers for mailfiltering FS#2247 $this->setHeader('X-Mailer','DokuWiki '.getVersion()); $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); @@ -434,6 +437,11 @@ class Mailer { protected function prepareBody(){ global $conf; + // no HTML mails allowed? remove HTML body + if(!$this->allowhtml){ + $this->html = ''; + } + // check for body if(!$this->text && !$this->html){ return false; -- cgit v1.2.3 From f41c79d730286e8e8c95deb88a4c876e08e278a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 15 Apr 2012 13:26:57 +0200 Subject: changed internal Mailer members from private to protected --- inc/Mailer.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index f04cdd3e2..507150d00 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -16,17 +16,17 @@ if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); class Mailer { - private $headers = array(); - private $attach = array(); - private $html = ''; - private $text = ''; + protected $headers = array(); + protected $attach = array(); + protected $html = ''; + protected $text = ''; - private $boundary = ''; - private $partid = ''; - private $sendparam= null; + protected $boundary = ''; + protected $partid = ''; + protected $sendparam= null; - private $validator = null; - private $allowhtml = true; + protected $validator = null; + protected $allowhtml = true; /** * Constructor -- cgit v1.2.3 From 50da7978b031b566117cfe95fa7341d506207766 Mon Sep 17 00:00:00 2001 From: Usama Akkad Date: Wed, 11 Apr 2012 23:02:09 +0200 Subject: Arabic Language Update --- inc/lang/ar/lang.php | 54 +++++++++++++++++++++++++++++++++++++++++++++++- inc/lang/ar/resetpwd.txt | 3 +++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 inc/lang/ar/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index af92243c9..350e26695 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -42,11 +42,14 @@ $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_revert'] = 'استعد'; $lang['btn_register'] = 'سجّل'; +$lang['btn_apply'] = 'طبق'; +$lang['btn_media'] = 'مدير الوسائط'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -76,6 +79,7 @@ $lang['profnoempty'] = 'غير مسموح باسم مستخدم أو $lang['profchanged'] = 'حُدث الملف الشخصي للمستخدم بنجاح.'; $lang['pwdforget'] = 'أنسيت كلمة السر؟ احصل على واحدة جديدة'; $lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.'; +$lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ'; $lang['resendpwdmissing'] = 'عذراّ، يجب أن تملأ كل الحقول.'; $lang['resendpwdnouser'] = 'عذراً، لم نجد المستخدم هذا في قاعدة بياناتنا.'; $lang['resendpwdbadauth'] = 'عذراً، رمز التفعيل هذا غير صحيح. نأكد من استخدامك كامل وصلة التأكيد.'; @@ -90,7 +94,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'] = 'أبقي النافذة مفتوحة أثناء الاختيار'; @@ -121,6 +125,17 @@ $lang['js']['nosmblinks'] = 'الروابط لمجلدات مشاركة و $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'] = 'Shine-through'; +$lang['js']['media_diff_portions'] = 'Swipe'; +$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'] = 'ملفات الوسائط'; @@ -170,11 +185,20 @@ $lang['external_edit'] = 'تحرير خارجي'; $lang['summary'] = 'ملخص التحرير'; $lang['noflash'] = 'تحتاج إلىملحق فلاش أدوبي لعرض هذا المحتوى.'; $lang['download'] = 'نزل Snippet'; +$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'] = 'نص مسطر'; @@ -215,6 +239,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'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك'; @@ -233,6 +260,7 @@ $lang['subscr_style_digest'] = 'بريد ملخص عن تغييرات كل ص $lang['subscr_style_list'] = 'قائمة بالصفحات المتغيرة منذ آخر بريد'; $lang['authmodfailed'] = 'إعدادات تصريح فاسدة، يرجى مراسلة المدير.'; $lang['authtempfail'] = 'تصريح المشترك غير متوفر مؤقتاً، إن استمرت هذه الحالة يرجى مراسلة المدير'; +$lang['authpwdexpire'] = 'ستنتهي صلاحية كلمة السر في %d . عليك بتغييرها سريعا.'; $lang['i_chooselang'] = 'اختر لغتك'; $lang['i_installer'] = 'برنامج تنصيب دوكو ويكي'; $lang['i_wikiname'] = 'اسم الويكي'; @@ -273,3 +301,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/ar/resetpwd.txt b/inc/lang/ar/resetpwd.txt new file mode 100644 index 000000000..2bbd4a21a --- /dev/null +++ b/inc/lang/ar/resetpwd.txt @@ -0,0 +1,3 @@ +====== اضبط كلمة سر جديدة ====== + +أدخل كلمة سر جديدة لحسابك في هذه الويكي. -- cgit v1.2.3 From 28be31cd273e011d9c9b8ea7b7223497ec28ebd7 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 22:23:09 +0200 Subject: Added page title to search results in Remote API --- inc/RemoteAPICore.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 546832100..80deb7377 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,6 +302,7 @@ class RemoteAPICore { 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, + 'title' => p_get_first_heading($id) ); } return $pages; -- cgit v1.2.3 From c8095cd786d9a27b3f7ed2d55a463ac69020fcbb Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 12 Apr 2012 23:29:24 +0200 Subject: Remote search is aware of useheading option --- inc/RemoteAPICore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 80deb7377..9da493210 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -302,7 +302,7 @@ class RemoteAPICore { 'mtime' => filemtime($file), 'size' => filesize($file), 'snippet' => $snippet, - 'title' => p_get_first_heading($id) + 'title' => useHeading('navigation') ? p_get_first_heading($id) : $id ); } return $pages; -- cgit v1.2.3 From 64676c5f790c644a1180b3cd35c0c4a8ecc2b24e Mon Sep 17 00:00:00 2001 From: Padmanabh Kulkarni Date: Sun, 15 Apr 2012 12:46:42 +0200 Subject: Marathi language update --- inc/lang/mr/lang.php | 82 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 12 deletions(-) (limited to 'inc') diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 96323394d..32781e6d4 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -44,13 +44,16 @@ $lang['btn_back'] = 'मागॆ'; $lang['btn_backlink'] = 'येथे काय जोडले आहे'; $lang['btn_backtomedia'] = 'परत माध्यम फाइल निवडीकड़े'; $lang['btn_subscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) लावा '; -$lang['btn_unsubscribe'] = 'पृष्ठाच्या बदलांची पुरवणी (फीड) बंद करा'; $lang['btn_profile'] = 'प्रोफाइल अद्ययावत करा'; $lang['btn_reset'] = 'रिसेट'; +$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'] = 'परवलीचा शब्द'; @@ -81,19 +84,58 @@ $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'] = 'अपलोड करण्याची फाइल निवडा'; $lang['txt_filename'] = 'अपलोड उर्फ़ ( वैकल्पिक )'; $lang['txt_overwrt'] = 'अस्तित्वात असलेल्या फाइलवरच सुरक्षित करा.'; $lang['lockedby'] = 'सध्या लॉक करणारा :'; $lang['lockexpire'] = 'सध्या लॉक करणारा :'; -$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; -$lang['js']['notsavedyet'] = "सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?"; +$lang['js']['willexpire'] = 'हे पृष्ठ संपादित करण्यासाठी मिळालेले लॉक एखाद्या मिनिटात संपणार आहे.\n चुका होऊ नयेत म्हणुन कृपया प्रीव्यू बटन दाबुन लॉक ची वेळ पुन्हा चालू करा.'; +$lang['js']['notsavedyet'] = 'सुरक्षित न केलेले बदल नष्ट होतील. नक्की करू का ?'; +$lang['js']['searchmedia'] = 'फाईल्ससाठी शोधा'; +$lang['js']['keepopen'] = 'निवड केल्यावर विण्डो उघडी ठेवा'; +$lang['js']['hidedetails'] = 'सविस्तर मजकूर लपवा'; +$lang['js']['mediatitle'] = 'लिंक सेटिंग'; +$lang['js']['mediadisplay'] = 'लिंकचा प्रकार'; +$lang['js']['mediaalign'] = 'जुळवणी'; +$lang['js']['mediasize'] = 'प्रतिमेचा आकार'; +$lang['js']['mediatarget'] = 'लिंकचे लक्ष्य'; +$lang['js']['mediaclose'] = 'बंद'; +$lang['js']['mediadisplayimg'] = 'प्रतिमा दाखवा.'; +$lang['js']['mediadisplaylnk'] = 'फक्त लिंक दाखवा.'; +$lang['js']['mediasmall'] = 'लहान आवृत्ती'; +$lang['js']['mediamedium'] = 'माध्यम आवृत्ती'; +$lang['js']['medialarge'] = 'मोठी आवृत्ती'; +$lang['js']['mediaoriginal'] = 'मूळ आवृत्ती'; +$lang['js']['medialnk'] = 'सविस्तर माहितीकडेची लिंक'; +$lang['js']['mediadirect'] = 'मूळ मजकुराकडे थेट लिंक'; +$lang['js']['medianolnk'] = 'लिंक नको'; +$lang['js']['medianolink'] = 'प्रतिमा लिंक करू नका'; +$lang['js']['medialeft'] = 'प्रतिमा डाव्या बाजूला जुळवून घ्या.'; +$lang['js']['mediaright'] = 'प्रतिमा उजव्या बाजूला जुळवून घ्या.'; +$lang['js']['mediacenter'] = 'प्रतिमा मध्यभागी जुळवून घ्या.'; +$lang['js']['medianoalign'] = 'जुळवाजुळव वापरू नका.'; +$lang['js']['nosmblinks'] = 'विन्डोज़ शेअर ला लिंक केल्यास ते फक्त मायक्रोसॉफ़्ट इन्टरनेट एक्स्प्लोरर वरच चालते. तरी तुम्ही लिंक कॉपी करू शकता.'; +$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_portions'] = 'स्वाईप'; +$lang['js']['media_select'] = 'फाईल निवड...'; +$lang['js']['media_upload_btn'] = 'अपलोड'; +$lang['js']['media_done_btn'] = 'झालं'; +$lang['js']['media_drop'] = 'अपलोड करण्यासाठी इथे फाईल टाका'; +$lang['js']['media_cancel'] = 'काढा'; $lang['rssfailed'] = 'ही पुरवणी आणण्यात काही चूक झाली:'; $lang['nothingfound'] = 'काही सापडला नाही.'; $lang['mediaselect'] = 'दृकश्राव्य फाइल'; @@ -111,9 +153,7 @@ $lang['deletefail'] = '%s ही फाइल नष्ट करू $lang['mediainuse'] = '%s ही फाइल नष्ट केली नाही - ती अजुन वापरात आहे.'; $lang['namespaces'] = 'नेमस्पेस'; $lang['mediafiles'] = 'मध्ये उपलब्ध असलेल्या फाइल'; -$lang['js']['keepopen'] = 'निवड केल्यावर विण्डो उघडी ठेवा'; -$lang['js']['hidedetails'] = 'सविस्तर मजकूर लपवा'; -$lang['js']['nosmblinks'] = 'विन्डोज़ शेअर ला लिंक केल्यास ते फक्त मायक्रोसॉफ़्ट इन्टरनेट एक्स्प्लोरर वरच चालते. तरी तुम्ही लिंक कॉपी करू शकता.'; +$lang['accessdenied'] = 'तुम्हाला हे पान बघायची परवानगी नाही.'; $lang['mediausage'] = 'ह्या फाइलचा संदर्भ देण्यासाठी खालील सिन्टॅक्स वापरा :'; $lang['mediaview'] = 'मूळ फाइल बघू '; $lang['mediaroot'] = 'रूट'; @@ -129,6 +169,10 @@ $lang['current'] = 'चालू'; $lang['yours'] = 'तुमची आवृत्ति'; $lang['diff'] = 'सध्याच्या आवृत्तिंशी फरक दाखवा'; $lang['diff2'] = 'निवडलेल्या आवृत्तिंमधील फरक दाखवा'; +$lang['difflink'] = 'ह्या तुलना दृष्टीकोनाला लिंक करा'; +$lang['diff_type'] = 'फरक बघू:'; +$lang['diff_inline'] = 'एका ओळीत'; +$lang['diff_side'] = 'बाजूबाजूला'; $lang['line'] = 'ओळ'; $lang['breadcrumb'] = 'मागमूस'; $lang['youarehere'] = 'तुम्ही इथे आहात'; @@ -140,10 +184,21 @@ $lang['restored'] = 'जुनी आवृत्ति पुन $lang['external_edit'] = 'बाहेरून संपादित'; $lang['summary'] = 'सारांश बदला'; $lang['noflash'] = 'ही माहिती दाखवण्यासाठी अडोब फ्लॅश प्लेअर ची गरज आहे.'; +$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'] = 'अधोरेखित मजकूर'; @@ -154,6 +209,11 @@ $lang['qb_h2'] = 'दुसर्या पातळीचे $lang['qb_h3'] = 'तिसर्या पातळीचे शीर्षक'; $lang['qb_h4'] = 'चवथ्या पातळीचे शीर्षक'; $lang['qb_h5'] = 'पाचव्या पातळीचे शीर्षक'; +$lang['qb_h'] = 'शीर्षक'; +$lang['qb_hs'] = 'शीर्षक निवड'; +$lang['qb_hplus'] = 'उंच शीर्षक'; +$lang['qb_hminus'] = 'खालचं शीर्षक'; +$lang['qb_hequal'] = 'समान लेवलचे शीर्षक'; $lang['qb_link'] = 'अंतर्गत लिंक'; $lang['qb_extlink'] = 'बाह्य लिंक'; $lang['qb_hr'] = 'आडवी पट्टी'; @@ -163,7 +223,7 @@ $lang['qb_media'] = 'प्रतिमा आणि इतर फ $lang['qb_sig'] = 'स्वाक्षरी टाका'; $lang['qb_smileys'] = 'स्माइली'; $lang['qb_chars'] = 'ख़ास चिन्ह'; -$lang['js']['del_confirm'] = 'निवडलेल्या गोष्टी नक्की नष्ट करू का ?'; +$lang['upperns'] = 'ह्यावरच्या नेमस्पेसकडे उडी मारा'; $lang['admin_register'] = 'नवीन सदस्य'; $lang['metaedit'] = 'मेटाडेटा बदला'; $lang['metasaveerr'] = 'मेटाडेटा सुरक्षित झाला नाही'; @@ -179,11 +239,9 @@ $lang['img_copyr'] = 'कॉपीराइट'; $lang['img_format'] = 'प्रकार'; $lang['img_camera'] = 'कॅमेरा'; $lang['img_keywords'] = 'मुख्य शब्द'; -$lang['subscribe_success'] = '%s ला %s च्या पुरवणिसाठि नोंदवले'; -$lang['subscribe_error'] = '%s ला %s च्या पुरवणिसाठि नोंदवताना चूक झाली'; -$lang['subscribe_noaddress'] = 'तुमच्या लॉगिनशी सम्बंधित कुठलाही पत्ता नाही , त्यामुळे पुरवणिसाठि नोंद केली जाऊ शकत नाही'; -$lang['unsubscribe_success'] = '%s ला %s च्या पुरवणी यादी मधून काढून टाकले'; -$lang['unsubscribe_error'] = '%s ला %s च्या पुरवणी यादी मधून काढून टाकण्यात चूक झाली'; +$lang['img_width'] = 'रुंदी'; +$lang['img_height'] = 'उंची'; +$lang['img_manager'] = 'मिडिया व्यवस्थापकात बघू'; $lang['authmodfailed'] = 'सदस्य अधिकृत करण्याची व्यवस्था चुकीची आहे. कृपया तुमच्या विकीच्या व्यवस्थापकाशी सम्पर्क साधा.'; $lang['authtempfail'] = 'सदस्य अधिकृत करण्याची सुविधा सध्या चालू नाही. सतत हा मजकूर दिसल्यास कृपया तुमच्या विकीच्या व्यवस्थापकाशी सम्पर्क साधा.'; $lang['i_chooselang'] = 'तुमची भाषा निवडा'; -- cgit v1.2.3 From a48c834625c8fb17e4081cfd6121f14042dcf468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel-Emeric=20Andra=C5=9Fi?= Date: Sun, 15 Apr 2012 12:47:43 +0200 Subject: Romanian language update --- inc/lang/ro/lang.php | 9 +++++++++ inc/lang/ro/resetpwd.txt | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 inc/lang/ro/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 21a6ecef4..41727e521 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -9,6 +9,7 @@ * @author Emanuel-Emeric Andraşi * @author Marius OLAR * @author Marius Olar + * @author Emanuel-Emeric Andrași */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -44,6 +45,7 @@ $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'] = 'Setează o parolă nouă'; $lang['btn_draft'] = 'Editează schiţă'; $lang['btn_recover'] = 'Recuperează schiţă'; $lang['btn_draftdel'] = 'Şterge schiţă'; @@ -80,6 +82,7 @@ $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'] = 'Setează o parolă 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.'; @@ -186,6 +189,11 @@ $lang['external_edit'] = 'editare externă'; $lang['summary'] = 'Editează sumarul'; $lang['noflash'] = 'Plugin-ul Adobe Flash Plugin este necesar pentru afişarea corectă a conţinutului.'; $lang['download'] = 'Bloc descărcări'; +$lang['tools'] = 'Unelte'; +$lang['user_tools'] = 'Unelte utilizator'; +$lang['site_tools'] = 'Unelte Site'; +$lang['page_tools'] = 'Unelte Pagină'; +$lang['skip_to_content'] = 'sari la conținut'; $lang['mail_newpage'] = 'pagina adăugată:'; $lang['mail_changed'] = 'page schimbată:'; $lang['mail_subscribe_list'] = 'pagini modificate în spaţiul de nume:'; @@ -256,6 +264,7 @@ $lang['subscr_style_digest'] = 'digerează email la schimbări pentru fiecare $lang['subscr_style_list'] = 'lista paginilor schimbate de la ultimul email (la fiecare %.2f zile)'; $lang['authmodfailed'] = 'Configuraţia autentificării utilizatorului este eronată. Anunţaţi Wiki Admin-ul.'; $lang['authtempfail'] = 'Autentificarea utilizatorului este temporar indisponibilă. Anunţaţi Wiki Admin-ul.'; +$lang['authpwdexpire'] = 'Parola vă va expira în %d zile, ar trebui să o schimbați curând.'; $lang['i_chooselang'] = 'Alegeţi limba'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Numele Wiki'; diff --git a/inc/lang/ro/resetpwd.txt b/inc/lang/ro/resetpwd.txt new file mode 100644 index 000000000..2eb8052f1 --- /dev/null +++ b/inc/lang/ro/resetpwd.txt @@ -0,0 +1,3 @@ +====== Setează parolă nouă ====== + +Vă rugăm să introduceți o nouă parolă pentru contul dvs. pe acest wiki. \ No newline at end of file -- cgit v1.2.3 From 3ab58ffe5551d68e5a34f8e29e55c5e0c2511570 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 17 Apr 2012 09:46:23 +0200 Subject: no need to pass objects by reference fixes passing null to event hook registration --- inc/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index 621cb64c1..09f3f3c0c 100644 --- a/inc/events.php +++ b/inc/events.php @@ -149,8 +149,8 @@ class Doku_Event_Handler { * @param $method (function) event handler function * @param $param (mixed) data passed to the event handler */ - function register_hook($event, $advise, &$obj, $method, $param=null) { - $this->_hooks[$event.'_'.$advise][] = array(&$obj, $method, $param); + function register_hook($event, $advise, $obj, $method, $param=null) { + $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param); } function process_event(&$event,$advise='') { -- cgit v1.2.3 From 23725b9188f335447080ba9cc8e1f32cdec2e472 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 17 Apr 2012 12:15:48 +0200 Subject: have a default plugin config This allows us to distribute plugins that are disabled by default. We'll may want to do that for a special unit test plugin --- inc/config_cascade.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 79567fc56..e4a3df353 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -66,6 +66,7 @@ $config_cascade = array_merge( ), 'plugins' => array( + 'default' => array(DOKU_CONF.'plugins.php'), 'local' => array(DOKU_CONF.'plugins.local.php'), 'protected' => array( DOKU_CONF.'plugins.required.php', -- cgit v1.2.3 From ff71173477e54774b5571015d49d944f51cb8a26 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 19 Apr 2012 11:26:46 +0200 Subject: escape target error message (SECURITY) FS#2487 FS#2488 The error message when a non-existant editor was tried to load wasn't escaped correctly, allowing to introduce arbitrary JavaScript to the output, leading to a XSS vulnerability. Note: the reported second XCRF vulnerability is the same bug, the xploit code simply uses JavaScript to extract a valid CSRF token from the site --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index b233e1d92..022cd792a 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1436,7 +1436,7 @@ function html_edit_form($param) { global $TEXT; if ($param['target'] !== 'section') { - msg('No editor for edit target ' . $param['target'] . ' found.', -1); + msg('No editor for edit target ' . hsc($param['target']) . ' found.', -1); } $attr = array('tabindex'=>'1'); -- cgit v1.2.3 From d41322ba564fdb4e6c0e6572fb14c20e9238a7ee Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Thu, 19 Apr 2012 13:51:37 +0200 Subject: Resolve empty page ID to configured start page --- inc/RemoteAPICore.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index 9da493210..36c518881 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -169,7 +169,7 @@ class RemoteAPICore { * @return page text. */ function rawPage($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this file', 111); } @@ -228,7 +228,7 @@ class RemoteAPICore { * Return a wiki page rendered to html */ function htmlPage($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -356,14 +356,14 @@ class RemoteAPICore { * Return a list of backlinks */ function listBackLinks($id){ - return ft_backlinks(cleanID($id)); + return ft_backlinks($this->resolvePageId($id)); } /** * Return some basic data about a page */ function pageInfo($id,$rev=''){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -394,7 +394,7 @@ class RemoteAPICore { global $TEXT; global $lang; - $id = cleanID($id); + $id = $this->resolvePageId($id); $TEXT = cleanText($text); $sum = $params['sum']; $minor = $params['minor']; @@ -507,7 +507,7 @@ class RemoteAPICore { * Returns the permissions of a given wiki page */ function aclCheck($id) { - $id = cleanID($id); + $id = $this->resolvePageId($id); return auth_quickaclcheck($id); } @@ -517,7 +517,7 @@ class RemoteAPICore { * @author Michael Klier */ function listLinks($id) { - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ){ throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -633,7 +633,7 @@ class RemoteAPICore { * @author Michael Klier */ function pageVersions($id, $first) { - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_READ) { throw new RemoteAccessDeniedException('You are not allowed to read this page', 111); } @@ -711,7 +711,7 @@ class RemoteAPICore { $unlockfail = array(); foreach((array) $set['lock'] as $id){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_EDIT || checklock($id)){ $lockfail[] = $id; }else{ @@ -721,7 +721,7 @@ class RemoteAPICore { } foreach((array) $set['unlock'] as $id){ - $id = cleanID($id); + $id = $this->resolvePageId($id); if(auth_quickaclcheck($id) < AUTH_EDIT || !unlock($id)){ $unlockfail[] = $id; }else{ @@ -764,6 +764,14 @@ class RemoteAPICore { return $ok; } + private function resolvePageId($id) { + $id = cleanID($id); + if(empty($id)) { + global $conf; + $id = cleanID($conf['start']); + } + return $id; + } } -- cgit v1.2.3 From 8a803cae76e430dc0f358986db3420ef45049370 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 20 Apr 2012 21:42:53 +0200 Subject: some edge case checking in search result highlighting --- inc/fulltext.php | 2 ++ inc/html.php | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index 620237296..8f4db111d 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -405,6 +405,8 @@ function ft_snippet_re_preprocess($term) { }else{ $term = $term.'\b'; } + + if($term == '\b' || $term == '\b\b') $term = ''; return $term; } diff --git a/inc/html.php b/inc/html.php index 022cd792a..be5666353 100644 --- a/inc/html.php +++ b/inc/html.php @@ -280,8 +280,11 @@ function html_draft(){ * @author Harry Fuecks */ function html_hilight($html,$phrases){ - $phrases = array_filter((array) $phrases); - $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); + $phrases = (array) $phrases; + $phrases = array_map('preg_quote_cb', $phrases); + $phrases = array_map('ft_snippet_re_preprocess', $phrases); + $phrases = array_filter($phrases); + $regex = join('|',$phrases); if ($regex === '') return $html; if (!utf8_check($regex)) return $html; -- cgit v1.2.3 From 48722ac855c79944285cbe8958fe5ed03bd835ed Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 22 Apr 2012 21:19:59 +0100 Subject: improved toc changes and sidebar toggling --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/html.php b/inc/html.php index c3e345cb0..0b297a347 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1717,7 +1717,7 @@ function html_TOC($toc){ global $lang; $out = ''.DOKU_LF; $out .= '
'.DOKU_LF; - $out .= '

'; + $out .= '

'; $out .= $lang['toc']; $out .= '

'.DOKU_LF; $out .= '
'.DOKU_LF; -- cgit v1.2.3 From 22ef1e32c51ac82df8d6a03e1e95876100e8f6c1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 23 Apr 2012 12:24:08 +0200 Subject: added option to disable reverse DNS lookups --- inc/common.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 22a315901..6ea536c44 100644 --- a/inc/common.php +++ b/inc/common.php @@ -676,10 +676,15 @@ function clientismobile(){ /** * Convert one or more comma separated IPs to hostnames * + * If $conf['dnslookups'] is disabled it simply returns the input string + * * @author Glen Harris * @returns a comma separated list of hostnames */ function gethostsbyaddrs($ips){ + global $conf; + if(!$conf['dnslookups']) return $ips; + $hosts = array(); $ips = explode(',',$ips); -- cgit v1.2.3 From f940e4a0129ffeefd746c0ebdb25132413e388c0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 23 Apr 2012 13:23:20 +0200 Subject: display uploadable file size in media manager FS#2425 --- inc/lang/en/lang.php | 1 + inc/media.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'inc') diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 2ba220e64..c1fc543fb 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -99,6 +99,7 @@ $lang['searchmedia_in'] = 'Search in %s'; $lang['txt_upload'] = 'Select file to upload'; $lang['txt_filename'] = 'Upload as (optional)'; $lang['txt_overwrt'] = 'Overwrite existing file'; +$lang['maxuploadsize'] = 'Upload max. %s per file.'; $lang['lockedby'] = 'Currently locked by'; $lang['lockexpire'] = 'Lock expires at'; diff --git a/inc/media.php b/inc/media.php index 66984e957..841a5218e 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1602,7 +1602,35 @@ function media_uploadform($ns, $auth, $fullscreen = false){ echo NL.'
'.NL; html_form('upload', $form); + echo '
'.NL; + + echo '

'; + printf($lang['maxuploadsize'],filesize_h(media_getuploadsize())); + echo '

'.NL; + +} + +/** + * Returns the size uploaded files may have + * + * This uses a conservative approach using the lowest number found + * in any of the limiting ini settings + * + * @returns int size in bytes + */ +function media_getuploadsize(){ + $okay = 0; + + $post = (int) php_to_byte(@ini_get('post_max_size')); + $suho = (int) php_to_byte(@ini_get('suhosin.post.max_value_length')); + $upld = (int) php_to_byte(@ini_get('upload_max_filesize')); + + if($post && ($post < $okay || $okay == 0)) $okay = $post; + if($suho && ($suho < $okay || $okay == 0)) $okay = $suho; + if($upld && ($upld < $okay || $okay == 0)) $okay = $upld; + + return $okay; } /** -- cgit v1.2.3 From a1d9de52cdffcc3eec070a7089786a3ed90fdc17 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 26 Apr 2012 08:19:15 +0200 Subject: make HTTPClient loadable via autoloader this fixes the HTTP tests which do test the base class directly instead of the DokuHTTPClient subclass --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/load.php b/inc/load.php index 0572b5760..9f54034a3 100644 --- a/inc/load.php +++ b/inc/load.php @@ -49,6 +49,7 @@ function load_autoload($name){ static $classes = null; if(is_null($classes)) $classes = array( 'DokuHTTPClient' => DOKU_INC.'inc/HTTPClient.php', + 'HTTPClient' => DOKU_INC.'inc/HTTPClient.php', 'JSON' => DOKU_INC.'inc/JSON.php', 'adLDAP' => DOKU_INC.'inc/adLDAP.php', 'Diff' => DOKU_INC.'inc/DifferenceEngine.php', -- cgit v1.2.3 From 14704953412e3710917a7595b4d1e9e6d0f6e7fe Mon Sep 17 00:00:00 2001 From: Yannick Aure Date: Fri, 27 Apr 2012 15:14:54 +0200 Subject: French language update --- inc/lang/fr/lang.php | 9 +++++++++ inc/lang/fr/resetpwd.txt | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 inc/lang/fr/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 140c584c3..a77be6965 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -23,6 +23,7 @@ * @author Johan Guilbaud * @author schplurtz@laposte.net * @author skimpax@gmail.com + * @author Yannick Aure */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -58,6 +59,7 @@ $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'] = 'Définir un nouveau mot de passe'; $lang['btn_draft'] = 'Modifier le brouillon'; $lang['btn_recover'] = 'Récupérer le brouillon'; $lang['btn_draftdel'] = 'Effacer le brouillon'; @@ -94,6 +96,7 @@ $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'] = 'Définir un nouveau mot de passe pour'; $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.'; @@ -198,6 +201,11 @@ $lang['external_edit'] = 'modification externe'; $lang['summary'] = 'Résumé'; $lang['noflash'] = 'Le greffon Adobe Flash est nécessaire pour afficher ce contenu.'; $lang['download'] = 'Télécharger un extrait'; +$lang['tools'] = 'Outils'; +$lang['user_tools'] = 'Outils d\'utilisateurs'; +$lang['site_tools'] = 'Outils du Site'; +$lang['page_tools'] = 'Outils de la Page'; +$lang['skip_to_content'] = 'Aller au contenu'; $lang['mail_newpage'] = 'page ajoutée :'; $lang['mail_changed'] = 'page modifiée :'; $lang['mail_subscribe_list'] = 'pages modifiées dans la catégorie :'; @@ -268,6 +276,7 @@ $lang['subscr_style_digest'] = 'Courriel, tous les %.2f jours, résumant les m $lang['subscr_style_list'] = 'Liste des pages modifiées depuis le dernier courriel (tous les %.2f jours)'; $lang['authmodfailed'] = 'Mauvais paramétrage de l\'authentification. Merci d\'informer l\'administrateur du Wiki.'; $lang['authtempfail'] = 'L\'authentification est temporairement indisponible. Si cela perdure, merci d\'informer l\'administrateur du Wiki.'; +$lang['authpwdexpire'] = 'Votre mot de passe expirera dans %d jours, vous devriez le changer bientôt.'; $lang['i_chooselang'] = 'Choisissez votre langue'; $lang['i_installer'] = 'Installeur DokuWiki'; $lang['i_wikiname'] = 'Nom du wiki'; diff --git a/inc/lang/fr/resetpwd.txt b/inc/lang/fr/resetpwd.txt new file mode 100644 index 000000000..7b1990ca0 --- /dev/null +++ b/inc/lang/fr/resetpwd.txt @@ -0,0 +1,3 @@ +====== Définir un nouveau mot de passe ====== + +Merci d'entrer un nouveau mot de passe pour votre compte sur ce wiki. \ No newline at end of file -- cgit v1.2.3 From 98fb3f18ab505241d412ef4892e24c97b73efcd5 Mon Sep 17 00:00:00 2001 From: Osaka Date: Fri, 27 Apr 2012 15:16:01 +0200 Subject: Japanese language update --- inc/lang/ja/lang.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 057fa5a54..490c84cc9 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -261,6 +261,7 @@ $lang['subscr_style_digest'] = 'それぞれのページへの変更の要約 $lang['subscr_style_list'] = '前回のメールから変更されたページをリスト(%.2f 日毎)'; $lang['authmodfailed'] = 'ユーザー認証の設定が正しくありません。Wikiの管理者に連絡して下さい。'; $lang['authtempfail'] = 'ユーザー認証が一時的に使用できなくなっています。この状態が続いているようであれば、Wikiの管理者に連絡して下さい。'; +$lang['authpwdexpire'] = 'あなたのパスワードは、あと%d日で有効期限が切れます。パスワードを変更してください。'; $lang['i_chooselang'] = '使用言語を選択してください'; $lang['i_installer'] = 'DokuWiki インストーラー'; $lang['i_wikiname'] = 'Wiki名'; -- cgit v1.2.3 From bdc67fe7b11d95a896a62142b9cf675bd5e51d94 Mon Sep 17 00:00:00 2001 From: Robert Bogenschneider Date: Fri, 27 Apr 2012 15:18:35 +0200 Subject: Esperanto language update --- inc/lang/eo/conflict.txt | 4 +-- inc/lang/eo/denied.txt | 2 +- inc/lang/eo/diff.txt | 2 +- inc/lang/eo/draft.txt | 4 +-- inc/lang/eo/edit.txt | 2 +- inc/lang/eo/editrev.txt | 2 +- inc/lang/eo/index.txt | 2 +- inc/lang/eo/install.html | 12 ++++---- inc/lang/eo/lang.php | 69 ++++++++++++++++++++++++------------------- inc/lang/eo/locked.txt | 2 +- inc/lang/eo/mailtext.txt | 7 ++--- inc/lang/eo/newpage.txt | 2 +- inc/lang/eo/norev.txt | 2 +- inc/lang/eo/password.txt | 7 ++--- inc/lang/eo/preview.txt | 2 +- inc/lang/eo/pwconfirm.txt | 9 +++--- inc/lang/eo/read.txt | 2 +- inc/lang/eo/recent.txt | 2 +- inc/lang/eo/register.txt | 2 +- inc/lang/eo/registermail.txt | 5 ++-- inc/lang/eo/resendpwd.txt | 2 +- inc/lang/eo/showrev.txt | 2 +- inc/lang/eo/stopwords.txt | 4 +-- inc/lang/eo/subscr_digest.txt | 3 +- inc/lang/eo/subscr_list.txt | 3 +- inc/lang/eo/subscr_single.txt | 3 +- inc/lang/eo/updateprofile.txt | 2 +- inc/lang/eo/uploadmail.txt | 5 ++-- 28 files changed, 82 insertions(+), 83 deletions(-) (limited to 'inc') diff --git a/inc/lang/eo/conflict.txt b/inc/lang/eo/conflict.txt index 603af39e1..cd0192942 100644 --- a/inc/lang/eo/conflict.txt +++ b/inc/lang/eo/conflict.txt @@ -1,5 +1,5 @@ ====== Pli nova versio ekzistas ====== -Ekzistas pli nova versio de la dokumento. Tio okazas kiam iu alia uzanto ŝanĝigis enhavon de la dokumento dum vi redaktis ĝin. +Ekzistas pli nova versio de la dokumento. Tio okazas kiam iu alia uzanto ŝanĝis enhavon de la dokumento dum vi redaktis ĝin. -Atente esploru distingojn kaj decidu kiun version vi tenigos. Se vi premos '"Konservi'", do via versio estos konservita. Presonte butonon '"Rezigni" vi tenos la kurantan version. +Atente esploru distingojn kaj decidu kiun version vi tenos. Se vi premos '"Konservi'", do via versio estos konservita. Presonte butonon '"Rezigni" vi tenos la kurantan version. diff --git a/inc/lang/eo/denied.txt b/inc/lang/eo/denied.txt index b35fe0412..3cd6c76bf 100644 --- a/inc/lang/eo/denied.txt +++ b/inc/lang/eo/denied.txt @@ -1,4 +1,4 @@ ====== Aliro malpermesita ====== -Vi ne havas sufiĉe da rajtoj por rigardi ĉi tiujn paĝojn. Eble vi forgesis identiĝi. +Vi ne havas sufiĉajn rajtojn rigardi ĉi tiujn paĝojn. Eble vi forgesis identiĝi. diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt index ac5474ef1..5829a7db1 100644 --- a/inc/lang/eo/diff.txt +++ b/inc/lang/eo/diff.txt @@ -1,4 +1,4 @@ ====== Diferencoj ====== -Ĉi tie vi povas ekvidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo. +Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo. diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt index fa43ecb74..32ddc83f6 100644 --- a/inc/lang/eo/draft.txt +++ b/inc/lang/eo/draft.txt @@ -1,5 +1,5 @@ -====== Skiza dosiero estis trovata ====== +====== Skiza dosiero troviĝis ====== -Via lasta sekcio de redakto en tiu ĉi paĝo ne estis korekte kompletita. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datenaron, kiu estis konservata el via lasta sekcio. +Via lasta sekcio de redakto en tiu ĉi paĝo ne korekte kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sekcio. Bonvolu decidi ĉu vi volas //restarigi// vian perditan redakton, //forigi// la aŭtomate konservitan skizon aŭ //rezigni// pri la redakta procezo. diff --git a/inc/lang/eo/edit.txt b/inc/lang/eo/edit.txt index 9239c7fe6..29b3382c5 100644 --- a/inc/lang/eo/edit.txt +++ b/inc/lang/eo/edit.txt @@ -1 +1 @@ -Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[vikio:sintakso|vikian sintakson]] por kompreni kiel vi povas krei paĝojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, do bonvolu uzi specialan paĝon: [[vikio:ludejo|ludejo]]. +Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] por kompreni kiel vi povas krei paĝojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[wiki:playground|ludejo]]. diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt index 4bab50b93..1640baa91 100644 --- a/inc/lang/eo/editrev.txt +++ b/inc/lang/eo/editrev.txt @@ -1,2 +1,2 @@ -**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, tiel kreiĝos nova kuranta versio kun la sama enhavo. +**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun la sama enhavo. ---- diff --git a/inc/lang/eo/index.txt b/inc/lang/eo/index.txt index 4ef720cb2..ac1f32cba 100644 --- a/inc/lang/eo/index.txt +++ b/inc/lang/eo/index.txt @@ -1,3 +1,3 @@ ====== Enhavo ====== -Tio ĉi estas indekso pri ĉiuj disponeblaj paĝoj ordigitaj laŭ [[doku>namespaces|nomspacoj]]. \ No newline at end of file +Tio ĉi estas indekso pri ĉiuj disponeblaj paĝoj ordigitaj laŭ [[doku>namespaces|nomspacoj]]. diff --git a/inc/lang/eo/install.html b/inc/lang/eo/install.html index 9f43ae82e..2e741e7c2 100644 --- a/inc/lang/eo/install.html +++ b/inc/lang/eo/install.html @@ -1,9 +1,9 @@ -<p>Tiu ĉi paĝo helpas en la unua instalo kaj agordado de <a href="http://dokuwiki.org">DokuWiki</a>. Pli da informo pri tiu instalilo estas disponebla en ĝia propra <a href="http://dokuwiki.org/installer">dokumentada paĝo</a>.</p> +

Tiu ĉi paĝo helpas en la unua instalo kaj agordado de DokuWiki. Pli da informo pri tiu instalilo disponeblas en ĝia propra dokumentada paĝo.

-<p>DokuWiki uzas ordinarajn dosierojn por konservi vikiajn paĝojn kaj aliajn informojn asociitaj al tiuj paĝoj (ekz. bildoj, serĉindeksoj, malnovaj revizioj, ktp). Por bone funkcii, DokuWiki <strong>devas</strong> havi registran rajton sur la subdosierujoj, kiuj entenas tiujn dosierojn. Tiu ĉi instalilo ne kapablas difini permes-atributojn de dosierujoj. Ordinare, tio devas esti senpere farita de iu komando en konzolo aŭ, se vi abonas retprovizanton, per FTP aŭ kontrola panelo de tiu retprovidanto (ekz. cPanel).

+

DokuWiki uzas ordinarajn dosierojn por konservi vikiajn paĝojn kaj aliajn informojn asociitaj al tiuj paĝoj (ekz. bildoj, serĉindeksoj, malnovaj revizioj, ktp). Por bone funkcii, DokuWiki devas havi registran rajton sur la subdosierujoj, kiuj entenas tiujn dosierojn. Tiu ĉi instalilo ne kapablas difini permes-atributojn de dosierujoj. Ordinare, tio devas esti senpere farita de iu komando en konzolo aŭ, se vi abonas retprovizanton, per FTP aŭ kontrola panelo de tiu retprovidanto (ekz. cPanel).

-<p>Tiu ĉi instalilo difinos vian DokuWiki-an agordadon por <acronym title="alir-kontrola listo">ACL</acronym>, kiu ebligas al administranto identiĝi kaj aliri taŭgan interfacon por instali kromaĵojn, administri uzantojn kaj alireblon al vikipaĝoj, kaj difini agordojn ĝeneralajn. -Ĝi ne estas nepra por ke DokuWiki funkciu, tamen ĝi multe faciligos administradon.</p> +

Tiu ĉi instalilo difinos vian DokuWiki-an agordadon por ACL, kiu ebligas al administranto identiĝi kaj aliri taŭgan interfacon por instali kromaĵojn, administri uzantojn kaj alireblon al vikipaĝoj, kaj difini agordojn ĝeneralajn. +Ĝi ne estas nepra por ke DokuWiki funkciu, tamen ĝi multe faciligos administradon.

-<p>Spertuloj aŭ uzantoj kiuj bezonas specialajn agordrimedojn devus uzi tiujn ligilojn por havi pli detalojn pri <a href="http://dokuwiki.org/install">instaladaj instrukcioj</a> -kaj <a href="http://dokuwiki.org/config">agordadaj difinoj</a>.</p> \ No newline at end of file +

Spertuloj aŭ uzantoj kiuj bezonas specialajn agordrimedojn uzu tiujn ligilojn por havi pli detalojn pri instaladaj instrukcioj +kaj agordadaj difinoj.

diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 41c6b80d1..b2c64b2a6 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -9,7 +9,7 @@ * @author Felipe Castro * @author Robert Bogenschneider * @author Erik Pedersen - * @author Robert BOGENSCHNEIDER + * @author Robert Bogenschneider */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -45,6 +45,7 @@ $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'; @@ -68,38 +69,39 @@ $lang['draftdate'] = 'Lasta konservo de la skizo:'; $lang['nosecedit'] = 'La paĝo ŝanĝiĝis intertempe, sekcio-informo estis malĝisdata, tial la tuta paĝo estas reŝargita.'; $lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.'; $lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; -$lang['regsuccess'] = 'La uzanto estas kreita kaj la pasvorto estis elsendita per retpoŝto.'; -$lang['regsuccess2'] = 'La uzanto estas kreita.'; +$lang['regsuccess'] = 'La uzanto kreiĝis kaj la pasvorto sendiĝis per retpoŝto.'; +$lang['regsuccess2'] = 'La uzanto kreiĝis.'; $lang['regmailfail'] = 'Ŝajne okazis eraro dum elsendo de la pasvorto. Bonvolu informi administranton pri tio!'; -$lang['regbadmail'] = 'Entajpita retpoŝta adreso ne ŝajnas valida. Se vi pensas, ke tio estas eraro, kontaktu la administranton.'; +$lang['regbadmail'] = 'Entajpita retpoŝta adreso ŝajnas ne valida. Se vi pensas, ke tio estas eraro, kontaktu la administranton.'; $lang['regbadpass'] = 'La du pasvortoj ne samas, bonvolu provi refoje.'; $lang['regpwmail'] = 'Via DokuWiki-pasvorto'; $lang['reghere'] = 'Se vi ne havas konton, vi povas akiri ĝin'; $lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profiloj.'; $lang['profnochange'] = 'Neniu ŝanĝo, nenio farinda.'; -$lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesataj.'; -$lang['profchanged'] = 'La profilo de la uzanto estas sukcese ĝisdatigita.'; +$lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata.'; +$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.'; $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['resendpwdnouser'] = 'Pardonu, tiu uzanto ne troveblas en nia datumbazo.'; $lang['resendpwdbadauth'] = 'Pardonu, tiu aŭtentiga kodo ne validas. Certiĝu, ke vi uzis la kompletan konfirmigan ligilon.'; -$lang['resendpwdconfirm'] = 'Konfirmiga ligilo estas sendita per retpoŝto.'; -$lang['resendpwdsuccess'] = 'Via nova pasvorto estas sendita per retpoŝto.'; +$lang['resendpwdconfirm'] = 'Konfirmiga ligilo sendiĝis per retpoŝto.'; +$lang['resendpwdsuccess'] = 'Via nova pasvorto sendiĝis per retpoŝto.'; $lang['license'] = 'Krom kie rekte indikite, enhavo de tiu ĉi vikio estas publikigita laŭ la jena permesilo:'; $lang['licenseok'] = 'Rimarku: redaktante tiun ĉi paĝon vi konsentas publikigi vian enhavon laŭ la jena permesilo:'; $lang['searchmedia'] = 'Serĉi dosiernomon:'; $lang['searchmedia_in'] = 'Serĉi en %s'; -$lang['txt_upload'] = 'Elektu dosieron por alŝuto'; +$lang['txt_upload'] = 'Elektu dosieron por alŝuti'; $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)'; $lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron'; $lang['lockedby'] = 'Nune ŝlosita de'; $lang['lockexpire'] = 'Ŝlosado ĉesos en'; -$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempkontrolon de la ŝlosado, do premu butonon "Antaŭrigardi".'; +$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempokontrolon de la ŝlosado, premu la butonon "Antaŭrigardi".'; $lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos. Ĉu vi certe volas daŭrigi la procezon?'; $lang['js']['searchmedia'] = 'Serĉi dosierojn'; -$lang['js']['keepopen'] = 'Tenu la fenestron malfermata dum elekto'; +$lang['js']['keepopen'] = 'Tenu la fenestron malferma dum elekto'; $lang['js']['hidedetails'] = 'Kaŝi detalojn'; $lang['js']['mediatitle'] = 'Ligilaj agordoj'; $lang['js']['mediadisplay'] = 'Ligila tipo'; @@ -122,10 +124,10 @@ $lang['js']['medialeft'] = 'Meti la bildon maldekstren.'; $lang['js']['mediaright'] = 'Meti la bildon dekstren.'; $lang['js']['mediacenter'] = 'Meti la bildon mezen.'; $lang['js']['medianoalign'] = 'Ne uzi poziciigon.'; -$lang['js']['nosmblinks'] = 'Tio ĉi nur funkcias en la Vindozaĉa "Microsoft Internet Explorer".\nVi ankoraŭ povas kopii kaj almeti la ligilon.'; +$lang['js']['nosmblinks'] = 'Tio ĉi nur funkcias en "Microsoft Internet Explorer".\nVi ankoraŭ povas kopii kaj almeti la ligilon.'; $lang['js']['linkwiz'] = 'Ligil-Asistanto'; $lang['js']['linkto'] = 'Ligilo al:'; -$lang['js']['del_confirm'] = 'Ĉu vere forigi elektitajn ero(j)n?'; +$lang['js']['del_confirm'] = 'Ĉu vere forigi elektita(j)n ero(j)n?'; $lang['js']['restore_confirm'] = 'Ĉu vere restarigi ĉi tiun version?'; $lang['js']['media_diff'] = 'Rigardu la diferencojn:'; $lang['js']['media_diff_both'] = 'Flankon apud flanko'; @@ -141,27 +143,27 @@ $lang['rssfailed'] = 'Okazis eraro dum ricevado de la novaĵ-fluo: ' $lang['nothingfound'] = 'Ankoraŭ nenio troviĝas tie ĉi.'; $lang['mediaselect'] = 'Elekto de aŭdvidaĵa dosiero'; $lang['fileupload'] = 'Alŝuto de aŭdvidaĵa dosiero'; -$lang['uploadsucc'] = 'Alŝuto estis sukcesa'; -$lang['uploadfail'] = 'Alŝuto estis malsukcesa. Eble ĉu estas problemoj pro permes-atributoj?'; +$lang['uploadsucc'] = 'Alŝuto sukcesis'; +$lang['uploadfail'] = 'Alŝuto malsukcesis. Ĉu eble estas problemoj pro permes-atributoj?'; $lang['uploadwrong'] = 'Rifuzita alŝuto. Tiu ĉi dosiersufikso estas malpermesata!'; $lang['uploadexist'] = 'La dosiero jam ekzistas. Nenio estas farita.'; $lang['uploadbadcontent'] = 'La alŝutita enhavo ne kongruas al la sufikso %s.'; -$lang['uploadspam'] = 'La alŝutaĵo estis blokita de kontraŭspama vortlisto.'; -$lang['uploadxss'] = 'La alŝutajo estis blokita pro ebla malica enhavo.'; +$lang['uploadspam'] = 'La alŝutaĵo blokiĝis de kontraŭspama vortlisto.'; +$lang['uploadxss'] = 'La alŝutajo blokiĝis pro ebla malica enhavo.'; $lang['uploadsize'] = 'La alŝutita dosiero estis tro granda. (maks. %s)'; -$lang['deletesucc'] = 'La dosiero "%s" estas forigita.'; +$lang['deletesucc'] = 'La dosiero "%s" forigiĝis.'; $lang['deletefail'] = '"%s" ne povis esti forigita - kontrolu permes-atributojn.'; -$lang['mediainuse'] = 'La dosiero "%s" ne estis forigita - ĝi ankoraŭ estas uzata.'; +$lang['mediainuse'] = 'La dosiero "%s" ne forigiĝis - ĝi ankoraŭ estas uzata.'; $lang['namespaces'] = 'Nomspacoj'; $lang['mediafiles'] = 'Disponeblaj dosieroj'; $lang['accessdenied'] = 'Vi ne rajtas vidi tiun paĝon.'; -$lang['mediausage'] = 'Uzu la jenan sintakson por referenci tiun ĉi dosieron:'; +$lang['mediausage'] = 'Uzu jenan sintakson por referenci tiun ĉi dosieron:'; $lang['mediaview'] = 'Rigardi originalan dosieron'; $lang['mediaroot'] = 'ĉefo (root)'; -$lang['mediaupload'] = 'Alŝutu dosieron al la kuranta nomspaco tien ĉi. Por krei subnomspacojn, antaŭmetu ilin al via "Alŝuti kiel" dosiernomo, apartigante per dupunktoj (:).'; +$lang['mediaupload'] = 'Alŝutu dosieron al la kuranta nomspaco tien ĉi. Por krei subnomspacojn, antaŭmetu ilin al via "Alŝuti kiel" dosiernomo, disigigante per dupunktoj (:).'; $lang['mediaextchange'] = 'La dosiersufikso ŝanĝis de .%s al .%s!'; $lang['reference'] = 'Referencoj por'; -$lang['ref_inuse'] = 'La dosiero ne povas esti forigita, ĉar ĝi ankoraŭ estas uzata de la jenaj paĝoj:'; +$lang['ref_inuse'] = 'La dosiero ne povas esti forigita, ĉar ĝi ankoraŭ estas uzata de jenaj paĝoj:'; $lang['ref_hidden'] = 'Kelkaj referencoj estas en paĝoj, kiujn vi ne rajtas legi'; $lang['hits'] = 'Trafoj'; $lang['quickhits'] = 'Trafoj trovitaj en paĝnomoj'; @@ -184,8 +186,13 @@ $lang['created'] = 'kreita'; $lang['restored'] = 'malnova revizio restarigita'; $lang['external_edit'] = 'ekstera redakto'; $lang['summary'] = 'Bulteno de ŝanĝoj'; -$lang['noflash'] = 'La Adobe Flash Plugin estas bezonata por montrigi tiun ĉi enhavon.'; +$lang['noflash'] = 'La Adobe Flash Plugin necesas por montri tiun ĉi enhavon.'; $lang['download'] = 'Elŝuti eltiraĵon'; +$lang['tools'] = 'Iloj'; +$lang['user_tools'] = 'Uzantaj iloj'; +$lang['site_tools'] = 'Retejaj iloj'; +$lang['page_tools'] = 'Paĝaj iloj'; +$lang['skip_to_content'] = 'al la enhavo'; $lang['mail_newpage'] = 'paĝo aldonita:'; $lang['mail_changed'] = 'paĝo modifita:'; $lang['mail_subscribe_list'] = 'ŝanĝitaj paĝoj en nomspaco:'; @@ -221,10 +228,10 @@ $lang['qb_smileys'] = 'Ridetuloj'; $lang['qb_chars'] = 'Specialaj signaĵoj'; $lang['upperns'] = 'saltu al la parenca nomspaco'; $lang['admin_register'] = 'Aldoni novan uzanton'; -$lang['metaedit'] = 'Redakti metadatenaron'; -$lang['metasaveerr'] = 'La konservo de metadatenaro malsukcesis'; -$lang['metasaveok'] = 'La metadatenaro estis konservita'; -$lang['img_backto'] = 'Retroiri al'; +$lang['metaedit'] = 'Redakti metadatumaron'; +$lang['metasaveerr'] = 'La konservo de metadatumaro malsukcesis'; +$lang['metasaveok'] = 'La metadatumaro konserviĝis'; +$lang['img_backto'] = 'Iri reen al'; $lang['img_title'] = 'Titolo'; $lang['img_caption'] = 'Priskribo'; $lang['img_date'] = 'Dato'; @@ -237,7 +244,7 @@ $lang['img_camera'] = 'Kamerao'; $lang['img_keywords'] = 'Ŝlosilvortoj'; $lang['img_width'] = 'Larĝeco'; $lang['img_height'] = 'Alteco'; -$lang['img_manager'] = 'Rigardi en media-administrilo'; +$lang['img_manager'] = 'Rigardi en aŭdvidaĵ-administrilo'; $lang['subscr_subscribe_success'] = 'Aldonis %s al la abonlisto por %s'; $lang['subscr_subscribe_error'] = 'Eraro dum aldono de %s al la abonlisto por %s'; $lang['subscr_subscribe_noaddress'] = 'Ne estas adreso ligita al via ensaluto, ne eblas aldoni vin al la abonlisto'; @@ -271,7 +278,7 @@ $lang['i_confexists'] = '%s jam ekzistas'; $lang['i_writeerr'] = 'Ne eblas krei "%s". Vi bezonas kontroli la permesojn de la dosier(uj)oj kaj mem krej la dosieron.'; $lang['i_badhash'] = 'dokuwiki.php ne estas rekonebla aŭ ĝi estas modifita (hash=%s)'; $lang['i_badval'] = '%s - malvalida aŭ malplena valoro'; -$lang['i_success'] = 'La agordado estas sukcese kompletita. Vi povas forigi la dosieron nun. Pluiru al via nova DokuWiki.'; +$lang['i_success'] = 'La agordado sukcese kompletiĝis. Vi povas forigi la dosieron nun. Pluiru al via nova DokuWiki.'; $lang['i_failure'] = 'Kelkaj eraroj okazis dum la konservo de la agordaj dosieroj. Vi devas senpere korekti ilin antaŭ ol vi povos uzi vian novan DokuWiki-on. '; $lang['i_policy'] = 'Komenca ACL-a agordo'; $lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)'; @@ -287,7 +294,7 @@ $lang['days'] = 'antaŭ %d tagoj'; $lang['hours'] = 'antaŭ %d horoj'; $lang['minutes'] = 'antaŭ %d minutoj'; $lang['seconds'] = 'antaŭ %d sekundoj'; -$lang['wordblock'] = 'Via ŝanĝo ne estis savita, ĉar ĝi enhavas blokitan tekston (spamon).'; +$lang['wordblock'] = 'Via ŝanĝo ne konserviĝis, ĉar ĝi enhavas blokitan tekston (spamon).'; $lang['media_uploadtab'] = 'Alŝuto'; $lang['media_searchtab'] = 'Serĉo'; $lang['media_file'] = 'Dosiero'; diff --git a/inc/lang/eo/locked.txt b/inc/lang/eo/locked.txt index 68963da75..abdc05916 100644 --- a/inc/lang/eo/locked.txt +++ b/inc/lang/eo/locked.txt @@ -1,3 +1,3 @@ ====== La paĝo estas ŝlosita ====== -Tiu ĉi paĝo nun estas blokita pro redaktado de iu alia uzanto. Bonvole atendu ke ŝi/li finu redakti aŭ ke la ŝlosada tempolimo finiĝu. +Tiu ĉi paĝo nun blokiĝis pro redaktado de iu alia uzanto. Bonvolu atendi ke ŝi/li finu redakti aŭ ke la ŝlosada tempolimo finiĝu. diff --git a/inc/lang/eo/mailtext.txt b/inc/lang/eo/mailtext.txt index b2cb3b49d..2765301ea 100644 --- a/inc/lang/eo/mailtext.txt +++ b/inc/lang/eo/mailtext.txt @@ -1,4 +1,4 @@ -Paĝo en via DokuVikio estis ŝanĝita aŭ aldonita. Jen detaloj: +Paĝo en via DokuVikio ŝanĝiĝis aŭ aldoniĝis. Jen detaloj: Dato: @DATE@ Foliumilo: @BROWSER@ @@ -7,10 +7,9 @@ RetNodo: @HOSTNAME@ Antaŭa revizio: @OLDPAGE@ Nova revizio: @NEWPAGE@ Bulteno de ŝanĝoj: @SUMMARY@ -Uzulo: @USER@ +Uzanto: @USER@ @DIFF@ -- -Tiu ĉi mesaĝo estis kreita de DokuWiki, kiu lokiĝas tie: -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaĝo kreiĝis de DokuWiki, kiu lokiĝas ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/newpage.txt b/inc/lang/eo/newpage.txt index 486f61f5a..53ab6209d 100644 --- a/inc/lang/eo/newpage.txt +++ b/inc/lang/eo/newpage.txt @@ -1,4 +1,4 @@ ====== Ĉi tiu paĝo ankoraŭ ne ekzistas ====== -Vi sekvis ligilon, kiu kondukas al artikolo ankoraŭ ne ekzistanta. Se vi rajtas, tiel vi povas krei tiun ĉi paĝon ekpremante la butonon "Krei paĝon". +Vi sekvis ligilon, kiu kondukas al artikolo ankoraŭ ne ekzistanta. Se vi rajtas, tiam vi povas krei tiun ĉi paĝon premante la butonon "Krei paĝon". diff --git a/inc/lang/eo/norev.txt b/inc/lang/eo/norev.txt index dc44d194b..e951a551b 100644 --- a/inc/lang/eo/norev.txt +++ b/inc/lang/eo/norev.txt @@ -1,3 +1,3 @@ ====== Tiu revizio ne ekzistas ====== -La elektita revizio ne ekzistas. Premu butonon "Malnovaj revizioj" por vidi liston de malnovaj revizioj de la dokumento. \ No newline at end of file +La elektita revizio ne ekzistas. Premu butonon "Malnovaj revizioj" por vidi liston de malnovaj revizioj de la dokumento. diff --git a/inc/lang/eo/password.txt b/inc/lang/eo/password.txt index ef744059e..6dc42a9de 100644 --- a/inc/lang/eo/password.txt +++ b/inc/lang/eo/password.txt @@ -1,10 +1,9 @@ -Saluton @FULLNAME@! +Saluton, @FULLNAME@! -Jen via uzantodatenoj por @TITLE@ ĉe @DOKUWIKIURL@ +Jen viaj uzantodatumoj por @TITLE@ ĉe @DOKUWIKIURL@ Ensalutnomo: @LOGIN@ Pasvorto: @PASSWORD@ -- -Tiu ĉi mesaĝo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ +Tiu ĉi mesaĝo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/preview.txt b/inc/lang/eo/preview.txt index ac2e75d00..b3faef69e 100644 --- a/inc/lang/eo/preview.txt +++ b/inc/lang/eo/preview.txt @@ -1,3 +1,3 @@ ====== Antaŭrigardo ====== -Tiu ĉi estas antaŭrigardo de redaktita teksto. Memoru: ĝi ankoraŭ **ne estas konservita**! \ No newline at end of file +Tiu ĉi estas antaŭrigardo de redaktita teksto. Memoru: ĝi ankoraŭ **ne konserviĝis**! diff --git a/inc/lang/eo/pwconfirm.txt b/inc/lang/eo/pwconfirm.txt index f227752b1..5abc3d13e 100644 --- a/inc/lang/eo/pwconfirm.txt +++ b/inc/lang/eo/pwconfirm.txt @@ -1,14 +1,13 @@ -Saluton @FULLNAME@! +Saluton, @FULLNAME@! Iu petis novan pasvorton por via @TITLE@ ensalutnomo ĉe @DOKUWIKIURL@ -Se ne estas vi, kiu petis tion, do preterlasu tiun ĉi mesaĝon. +Se ne vi petis tion, ignoru tiun ĉi mesaĝon. -Por konfirmi, ke la peto estis vere via, bonvolu musklaki la jenan ligilon. +Por konfirmi, ke la peto estis vere via, bonvolu musklaki jenan ligilon: @CONFIRM@ -- -Tiu ĉi mesaĝo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaĝo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/read.txt b/inc/lang/eo/read.txt index 734eb1654..b8c642f43 100644 --- a/inc/lang/eo/read.txt +++ b/inc/lang/eo/read.txt @@ -1,2 +1,2 @@ -Tiu ĉi paĝo estas disponigata nur por legado (vi ne povas redakti ĝin). Sciigu administranton, se vi opinias ke tio estas ne ĝusta malpermeso. +Tiu ĉi paĝo disponiĝas nur por legado (vi ne povas redakti ĝin). Sciigu administranton, se vi opinias ke tio estas falsa malpermeso. diff --git a/inc/lang/eo/recent.txt b/inc/lang/eo/recent.txt index ffd9936e2..2454ea630 100644 --- a/inc/lang/eo/recent.txt +++ b/inc/lang/eo/recent.txt @@ -1,3 +1,3 @@ ====== Freŝaj Ŝanĝoj ====== -La jenaj paĝoj estis ŝanĝitaj antaŭ nelonga tempo. \ No newline at end of file +Jenaj paĝoj ŝanĝiĝis antaŭ nelonge: diff --git a/inc/lang/eo/register.txt b/inc/lang/eo/register.txt index 57d5ca1f4..10b303d3b 100644 --- a/inc/lang/eo/register.txt +++ b/inc/lang/eo/register.txt @@ -1,4 +1,4 @@ ====== Registriĝi ====== -Entajpu necesajn informojn por enregistriĝi. Certiĝu ke via retpoŝta adreso estas vera ĉar ni sendos al ĝi vian pasvorton. +Entajpu necesajn informojn por enregistriĝi. Certiĝu ke via retpoŝta adreso estas vera, ĉar ni sendos al ĝi vian pasvorton. diff --git a/inc/lang/eo/registermail.txt b/inc/lang/eo/registermail.txt index 8b9ea8501..9ef6013c0 100644 --- a/inc/lang/eo/registermail.txt +++ b/inc/lang/eo/registermail.txt @@ -1,4 +1,4 @@ -Nova uzanto estis registrata. Jen la detaloj: +Nova uzanto registriĝis. Jen la detaloj: Uzantonomo: @NEWUSER@ Kompleta nomo: @NEWNAME@ @@ -10,5 +10,4 @@ IP-Adreso: @IPADDRESS@ Provizanto: @HOSTNAME@ -- -Tiu ĉi mesaĝo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaĝo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/resendpwd.txt b/inc/lang/eo/resendpwd.txt index 57b4b0408..556477a07 100644 --- a/inc/lang/eo/resendpwd.txt +++ b/inc/lang/eo/resendpwd.txt @@ -1,3 +1,3 @@ ====== Sendi novan pasvorton ====== -Bonvolu meti vian uzantonomon en la suban formularon petante novan pasvorton por via aliĝo en tiu ĉi vikio. Konfirma ligilo estos sendata al via registrita retadreso. +Bonvolu meti vian uzantonomon en la suban formularon petante novan pasvorton por via aliĝo en tiu ĉi vikio. Konfirma ligilo sendaiĝos al via registrita retadreso. diff --git a/inc/lang/eo/showrev.txt b/inc/lang/eo/showrev.txt index e3a8a1747..3ece4f2fb 100644 --- a/inc/lang/eo/showrev.txt +++ b/inc/lang/eo/showrev.txt @@ -1,2 +1,2 @@ -**Tiu estas malnova revizio de la dokumento**. Klaku sur titolo por ricevi kurantan version. +**Tiu estas malnova revizio de la dokumento**. Klaku sur titolon por ricevi kurantan version. ---- diff --git a/inc/lang/eo/stopwords.txt b/inc/lang/eo/stopwords.txt index 38757ae04..d27c569a2 100644 --- a/inc/lang/eo/stopwords.txt +++ b/inc/lang/eo/stopwords.txt @@ -1,6 +1,6 @@ # Jen listo de vortoj, kiujn la indeksilo ignoras, unu vorton po linio # Kiam vi modifas la dosieron, estu certa ke vi uzas UNIX-stilajn linifinaĵojn (unuopa novlinio) -# Ne enmetu vortojn malpli longajn ol 3 literoj - tiuj ĉiukaze estas ignorataj +# Ne enmetu vortojn malpli longajn ol 3 literoj - tiuj ĉiukaze ignoriĝas pri estas kaj @@ -17,4 +17,4 @@ kio kiam kie kiu -www \ No newline at end of file +www diff --git a/inc/lang/eo/subscr_digest.txt b/inc/lang/eo/subscr_digest.txt index d6bc69887..42fc79ad1 100644 --- a/inc/lang/eo/subscr_digest.txt +++ b/inc/lang/eo/subscr_digest.txt @@ -16,5 +16,4 @@ Por nuligi la paĝinformojn, ensalutu la vikion ĉe kaj malabonu la paĝajn kaj/aŭ nomspacajn ŝanĝojn. -- -Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/subscr_list.txt b/inc/lang/eo/subscr_list.txt index 175e3f3d2..1957e85e0 100644 --- a/inc/lang/eo/subscr_list.txt +++ b/inc/lang/eo/subscr_list.txt @@ -13,5 +13,4 @@ Por nuligi la paĝinformojn, ensalutu la vikion ĉe kaj malabonu la paĝajn kaj/aŭ nomspacajn ŝanĝojn. -- -Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/subscr_single.txt b/inc/lang/eo/subscr_single.txt index d51c5ca15..431fd0251 100644 --- a/inc/lang/eo/subscr_single.txt +++ b/inc/lang/eo/subscr_single.txt @@ -19,5 +19,4 @@ Por nuligi la paĝinformojn, ensalutu la vikion ĉe kaj malabonu la paĝajn kaj/aŭ nomspacajn ŝanĝojn. -- -Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu retpoŝtaĵo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ diff --git a/inc/lang/eo/updateprofile.txt b/inc/lang/eo/updateprofile.txt index a3de0c840..4b52ff20a 100644 --- a/inc/lang/eo/updateprofile.txt +++ b/inc/lang/eo/updateprofile.txt @@ -1,3 +1,3 @@ ====== Ĝisdatigi vian profilon ====== -Vi nur bezonas kompletigi tiujn kampojn, kiujn vi deziras ŝanĝi. Vi ne povas ŝanĝi vian uzantonomon. \ No newline at end of file +Vi nur kompletigu tiujn kampojn, kiujn vi deziras ŝanĝi. Vi ne povas ŝanĝi vian uzantonomon. diff --git a/inc/lang/eo/uploadmail.txt b/inc/lang/eo/uploadmail.txt index e7c327a60..1cb48ade6 100644 --- a/inc/lang/eo/uploadmail.txt +++ b/inc/lang/eo/uploadmail.txt @@ -1,4 +1,4 @@ -Dosiero estis alŝutita al via DokuVikio. Jen detaloj: +Dosiero alŝutiĝis al via DokuVikio. Jen detaloj: Dosiero: @MEDIA@ Dato: @DATE@ @@ -10,5 +10,4 @@ Dosier-tipo: @MIME@ Uzanto: @USER@ -- -Tiu ĉi mesaĝo estis kreita de DokuWiki ĉe -@DOKUWIKIURL@ \ No newline at end of file +Tiu ĉi mesaĝo kreiĝis de DokuWiki ĉe @DOKUWIKIURL@ -- cgit v1.2.3 From 22f44d031dd846cd1ff2f032ea10bc1ff1797f42 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 1 May 2012 21:18:17 +0200 Subject: avoid integer overflow in PassHash::pmd5 method Input iteration counts are squared in the function and passing something above 30 is giving integer overflows on 32 bit systems (and causes insane iteration counts on 64bit systems). --- inc/PassHash.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 3fb1349d2..d825057f0 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -316,6 +316,11 @@ class PassHash { * Uses salted MD5 hashs. Salt is 1+8 bytes long, 1st byte is the * iteration count when given, for null salts $compute is used. * + * The actual iteration count is the given count squared, maximum is + * 30 (-> 1073741824). If a higher one is given, the function throws + * an exception. + * + * @link http://www.openwall.com/phpass/ * @param string $clear - the clear text to hash * @param string $salt - the salt to use, null for random * @param string $magic - the hash identifier (P or H) @@ -330,6 +335,12 @@ class PassHash { } $iterc = $salt[0]; // pos 0 of salt is iteration count $iter = strpos($itoa64,$iterc); + + if($iter > 30){ + throw new Exception("Too high iteration count ($iter) in ". + __class__.'::'.__function__); + } + $iter = 1 << $iter; $salt = substr($salt,1,8); -- cgit v1.2.3 From e0f1fe02c25f445ed53c695a4f61bd6ba9910fde Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 2 May 2012 23:35:14 +0200 Subject: removed duplicated documentation header in JSON.php --- inc/JSON.php | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'inc') diff --git a/inc/JSON.php b/inc/JSON.php index 2dea44003..b31340f44 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -47,8 +47,6 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * @category - * @package * @author Michal Migurski * @author Matt Knapp * @author Brett Stimmerman @@ -97,19 +95,6 @@ define('JSON_STRICT_TYPE', 11); /** * Converts to and from JSON format. - * - * @category - * @package - * @author Michal Migurski - * @author Matt Knapp - * @author Brett Stimmerman - * @copyright 2005 Michal Migurski - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version - * @link - * @see - * @since - * @deprecated */ class JSON { -- cgit v1.2.3 From 040571dbb13c148147a105a8c0857057c358093c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 3 May 2012 00:33:38 +0200 Subject: also skip native JSON encoding when skipnative is true --- inc/JSON.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/JSON.php b/inc/JSON.php index b31340f44..012697eb3 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -136,7 +136,9 @@ class JSON { * @access public */ function encode($var) { - if (function_exists('json_encode')) return json_encode($var); + if (!$this->skipnative && function_exists('json_encode')){ + return json_encode($var); + } switch (gettype($var)) { case 'boolean': return $var ? 'true' : 'false'; -- cgit v1.2.3 From 55ce110126c81c7f7c821183fab3018cacc40016 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 3 May 2012 00:34:24 +0200 Subject: fixed a JSON bug with handling backspaces This was fixed in upstream and the upstream tests caught this :-) --- inc/JSON.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/JSON.php b/inc/JSON.php index 012697eb3..7f89005ff 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -569,17 +569,17 @@ class JSON { } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && - in_array($top['what'], array(JSON_SLICE, JSON_IN_ARR, JSON_IN_OBJ))) { + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != JSON_IN_STR)) { // found a quote, and we are not inside a string array_push($stk, array('what' => JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); //print("Found start of string at {$c}\n"); } elseif (($chrs{$c} == $top['delim']) && ($top['what'] == JSON_IN_STR) && - (($chrs{$c - 1} != "\\") || - ($chrs{$c - 1} == "\\" && $chrs{$c - 2} == "\\"))) { + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far array_pop($stk); //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); -- cgit v1.2.3 From d6b9c7bffaacf3b0b983386eca336e4f8d60a2f3 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Tue, 8 May 2012 20:18:35 +0200 Subject: Restore page versions - add timestamp of the restored version to to the summary field. This allows easier identifying of which version has been restored. (FS#2522) --- inc/actions.php | 2 +- inc/lang/de-informal/lang.php | 2 +- inc/lang/de/lang.php | 2 +- inc/lang/en/lang.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 4a2e200ae..458926345 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -380,7 +380,7 @@ function act_revert($act){ if($REV){ $text = rawWiki($ID,$REV); if(!$text) return 'show'; //something went wrong - $sum = $lang['restored']; + $sum = sprintf($lang['restored'], dformat($REV)); } // spam check diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index 093125aa6..61e5ef3d8 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -191,7 +191,7 @@ $lang['lastmod'] = 'Zuletzt geändert'; $lang['by'] = 'von'; $lang['deleted'] = 'gelöscht'; $lang['created'] = 'angelegt'; -$lang['restored'] = 'alte Version wiederhergestellt'; +$lang['restored'] = 'alte Version wiederhergestellt (%s)'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Inhalt anzuzeigen.'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 63ffd3008..cfbe04396 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -193,7 +193,7 @@ $lang['lastmod'] = 'Zuletzt geändert'; $lang['by'] = 'von'; $lang['deleted'] = 'gelöscht'; $lang['created'] = 'angelegt'; -$lang['restored'] = 'alte Version wieder hergestellt'; +$lang['restored'] = 'alte Version wieder hergestellt (%s)'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Inhalt anzuzeigen.'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index c1fc543fb..7f0bf05e9 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -191,7 +191,7 @@ $lang['lastmod'] = 'Last modified'; $lang['by'] = 'by'; $lang['deleted'] = 'removed'; $lang['created'] = 'created'; -$lang['restored'] = 'old revision restored'; +$lang['restored'] = 'old revision restored (%s)'; $lang['external_edit'] = 'external edit'; $lang['summary'] = 'Edit summary'; $lang['noflash'] = 'The Adobe Flash Plugin is needed to display this content.'; -- cgit v1.2.3 From 2daedc0b7ff9126ebb9855f6b8b39f830bd625ed Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 May 2012 15:48:01 +0200 Subject: GeSHi updated to 1.0.8.10 --- inc/geshi.php | 115 ++++++++++++- inc/geshi/4cs.php | 2 +- inc/geshi/6502acme.php | 230 ++++++++++++++++++++++++++ inc/geshi/6502kickass.php | 241 +++++++++++++++++++++++++++ inc/geshi/6502tasm.php | 189 ++++++++++++++++++++++ inc/geshi/68000devpac.php | 168 +++++++++++++++++++ inc/geshi/abap.php | 2 +- inc/geshi/actionscript.php | 2 +- inc/geshi/actionscript3.php | 4 +- inc/geshi/ada.php | 2 +- inc/geshi/algol68.php | 329 +++++++++++++++++++++++++++++++++++++ inc/geshi/apache.php | 5 +- inc/geshi/applescript.php | 2 +- inc/geshi/apt_sources.php | 12 +- inc/geshi/asm.php | 10 +- inc/geshi/asp.php | 2 +- inc/geshi/autoconf.php | 2 +- inc/geshi/autohotkey.php | 2 +- inc/geshi/autoit.php | 2 +- inc/geshi/avisynth.php | 2 +- inc/geshi/awk.php | 2 +- inc/geshi/bascomavr.php | 185 +++++++++++++++++++++ inc/geshi/bash.php | 137 ++++++++++++++-- inc/geshi/basic4gl.php | 2 +- inc/geshi/bf.php | 2 +- inc/geshi/bibtex.php | 2 +- inc/geshi/blitzbasic.php | 2 +- inc/geshi/bnf.php | 2 +- inc/geshi/boo.php | 2 +- inc/geshi/c.php | 85 +++++++++- inc/geshi/c_loadrunner.php | 323 +++++++++++++++++++++++++++++++++++++ inc/geshi/c_mac.php | 2 +- inc/geshi/caddcl.php | 2 +- inc/geshi/cadlisp.php | 2 +- inc/geshi/cfdg.php | 2 +- inc/geshi/cfm.php | 2 +- inc/geshi/chaiscript.php | 2 +- inc/geshi/cil.php | 2 +- inc/geshi/clojure.php | 2 +- inc/geshi/cmake.php | 2 +- inc/geshi/cobol.php | 2 +- inc/geshi/coffeescript.php | 146 +++++++++++++++++ inc/geshi/cpp-qt.php | 4 +- inc/geshi/cpp.php | 4 +- inc/geshi/csharp.php | 2 +- inc/geshi/css.php | 17 +- inc/geshi/cuesheet.php | 2 +- inc/geshi/d.php | 2 +- inc/geshi/dcs.php | 2 +- inc/geshi/delphi.php | 2 +- inc/geshi/diff.php | 2 +- inc/geshi/div.php | 2 +- inc/geshi/dos.php | 35 +++- inc/geshi/dot.php | 2 +- inc/geshi/e.php | 208 ++++++++++++++++++++++++ inc/geshi/ecmascript.php | 2 +- inc/geshi/eiffel.php | 2 +- inc/geshi/email.php | 12 +- inc/geshi/epc.php | 154 ++++++++++++++++++ inc/geshi/erlang.php | 10 +- inc/geshi/euphoria.php | 140 ++++++++++++++++ inc/geshi/f1.php | 151 +++++++++++++++++ inc/geshi/falcon.php | 218 +++++++++++++++++++++++++ inc/geshi/fo.php | 2 +- inc/geshi/fortran.php | 2 +- inc/geshi/freebasic.php | 2 +- inc/geshi/fsharp.php | 8 +- inc/geshi/gambas.php | 2 +- inc/geshi/gdb.php | 63 +++++--- inc/geshi/genero.php | 2 +- inc/geshi/genie.php | 2 +- inc/geshi/gettext.php | 2 +- inc/geshi/glsl.php | 2 +- inc/geshi/gml.php | 2 +- inc/geshi/gnuplot.php | 2 +- inc/geshi/go.php | 375 ++++++++++++++++++++++++++++++++++++++++++ inc/geshi/groovy.php | 18 +-- inc/geshi/gwbasic.php | 2 +- inc/geshi/haskell.php | 2 +- inc/geshi/hicest.php | 2 +- inc/geshi/hq9plus.php | 2 +- inc/geshi/html4strict.php | 27 +--- inc/geshi/html5.php | 212 ++++++++++++++++++++++++ inc/geshi/icon.php | 2 +- inc/geshi/idl.php | 2 +- inc/geshi/ini.php | 2 +- inc/geshi/inno.php | 2 +- inc/geshi/intercal.php | 2 +- inc/geshi/io.php | 2 +- inc/geshi/j.php | 73 +++------ inc/geshi/java.php | 2 +- inc/geshi/java5.php | 2 +- inc/geshi/javascript.php | 10 +- inc/geshi/jquery.php | 2 +- inc/geshi/kixtart.php | 2 +- inc/geshi/klonec.php | 2 +- inc/geshi/klonecpp.php | 2 +- inc/geshi/latex.php | 4 +- inc/geshi/lb.php | 162 +++++++++++++++++++ inc/geshi/lisp.php | 2 +- inc/geshi/llvm.php | 385 ++++++++++++++++++++++++++++++++++++++++++++ inc/geshi/locobasic.php | 2 +- inc/geshi/logtalk.php | 35 ++-- inc/geshi/lolcode.php | 2 +- inc/geshi/lotusformulas.php | 2 +- inc/geshi/lotusscript.php | 2 +- inc/geshi/lscript.php | 2 +- inc/geshi/lsl2.php | 2 +- inc/geshi/lua.php | 64 ++++++-- inc/geshi/m68k.php | 2 +- inc/geshi/magiksf.php | 2 +- inc/geshi/make.php | 2 +- inc/geshi/mapbasic.php | 2 +- inc/geshi/matlab.php | 2 +- inc/geshi/mirc.php | 2 +- inc/geshi/mmix.php | 2 +- inc/geshi/modula2.php | 2 +- inc/geshi/modula3.php | 2 +- inc/geshi/mpasm.php | 2 +- inc/geshi/mxml.php | 2 +- inc/geshi/mysql.php | 2 +- inc/geshi/newlisp.php | 2 +- inc/geshi/nsis.php | 2 +- inc/geshi/oberon2.php | 2 +- inc/geshi/objc.php | 2 +- inc/geshi/objeck.php | 116 +++++++++++++ inc/geshi/ocaml-brief.php | 2 +- inc/geshi/ocaml.php | 2 +- inc/geshi/oobas.php | 2 +- inc/geshi/oracle11.php | 2 +- inc/geshi/oracle8.php | 2 +- inc/geshi/oxygene.php | 2 +- inc/geshi/oz.php | 2 +- inc/geshi/pascal.php | 2 +- inc/geshi/pcre.php | 2 +- inc/geshi/per.php | 2 +- inc/geshi/perl.php | 2 +- inc/geshi/perl6.php | 2 +- inc/geshi/pf.php | 2 +- inc/geshi/php-brief.php | 2 +- inc/geshi/php.php | 2 +- inc/geshi/pic16.php | 2 +- inc/geshi/pike.php | 2 +- inc/geshi/pixelbender.php | 2 +- inc/geshi/pli.php | 200 +++++++++++++++++++++++ inc/geshi/plsql.php | 2 +- inc/geshi/postgresql.php | 2 +- inc/geshi/povray.php | 2 +- inc/geshi/powerbuilder.php | 2 +- inc/geshi/powershell.php | 2 +- inc/geshi/proftpd.php | 374 ++++++++++++++++++++++++++++++++++++++++++ inc/geshi/progress.php | 2 +- inc/geshi/prolog.php | 2 +- inc/geshi/properties.php | 2 +- inc/geshi/providex.php | 2 +- inc/geshi/purebasic.php | 2 +- inc/geshi/pycon.php | 64 ++++++++ inc/geshi/python.php | 17 +- inc/geshi/q.php | 2 +- inc/geshi/qbasic.php | 2 +- inc/geshi/rails.php | 2 +- inc/geshi/rebol.php | 2 +- inc/geshi/reg.php | 2 +- inc/geshi/robots.php | 2 +- inc/geshi/rpmspec.php | 2 +- inc/geshi/rsplus.php | 2 +- inc/geshi/ruby.php | 2 +- inc/geshi/sas.php | 6 +- inc/geshi/scala.php | 2 +- inc/geshi/scheme.php | 2 +- inc/geshi/scilab.php | 2 +- inc/geshi/sdlbasic.php | 2 +- inc/geshi/smalltalk.php | 2 +- inc/geshi/smarty.php | 2 +- inc/geshi/sql.php | 75 ++++++--- inc/geshi/systemverilog.php | 8 +- inc/geshi/tcl.php | 2 +- inc/geshi/teraterm.php | 147 ++++++++++------- inc/geshi/text.php | 2 +- inc/geshi/thinbasic.php | 2 +- inc/geshi/tsql.php | 2 +- inc/geshi/typoscript.php | 2 +- inc/geshi/unicon.php | 2 +- inc/geshi/uscript.php | 299 ++++++++++++++++++++++++++++++++++ inc/geshi/vala.php | 2 +- inc/geshi/vb.php | 2 +- inc/geshi/vbnet.php | 2 +- inc/geshi/verilog.php | 2 +- inc/geshi/vhdl.php | 2 +- inc/geshi/vim.php | 2 +- inc/geshi/visualfoxpro.php | 2 +- inc/geshi/visualprolog.php | 2 +- inc/geshi/whitespace.php | 2 +- inc/geshi/whois.php | 2 +- inc/geshi/winbatch.php | 2 +- inc/geshi/xbasic.php | 3 +- inc/geshi/xml.php | 2 +- inc/geshi/xorg_conf.php | 2 +- inc/geshi/xpp.php | 2 +- inc/geshi/yaml.php | 150 +++++++++++++++++ inc/geshi/z80.php | 2 +- inc/geshi/zxbasic.php | 150 +++++++++++++++++ 202 files changed, 6040 insertions(+), 437 deletions(-) create mode 100644 inc/geshi/6502acme.php create mode 100644 inc/geshi/6502kickass.php create mode 100644 inc/geshi/6502tasm.php create mode 100644 inc/geshi/68000devpac.php create mode 100644 inc/geshi/algol68.php create mode 100644 inc/geshi/bascomavr.php create mode 100644 inc/geshi/c_loadrunner.php create mode 100644 inc/geshi/coffeescript.php create mode 100644 inc/geshi/e.php create mode 100644 inc/geshi/epc.php create mode 100644 inc/geshi/euphoria.php create mode 100644 inc/geshi/f1.php create mode 100644 inc/geshi/falcon.php create mode 100644 inc/geshi/go.php create mode 100644 inc/geshi/html5.php create mode 100644 inc/geshi/lb.php create mode 100644 inc/geshi/llvm.php create mode 100644 inc/geshi/objeck.php create mode 100644 inc/geshi/pli.php create mode 100644 inc/geshi/proftpd.php create mode 100644 inc/geshi/pycon.php create mode 100644 inc/geshi/uscript.php create mode 100644 inc/geshi/yaml.php create mode 100644 inc/geshi/zxbasic.php (limited to 'inc') diff --git a/inc/geshi.php b/inc/geshi.php index 31d2da49f..aedc64f84 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -41,7 +41,7 @@ // /** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.8.8'); +define('GESHI_VERSION', '1.0.8.10'); // Define the root directory for the GeSHi code tree if (!defined('GESHI_ROOT')) { @@ -209,12 +209,16 @@ define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ /** Number format to highlight octal numbers with a prefix 0o (logtalk) */ define('GESHI_NUMBER_OCT_PREFIX_0O', 512); //0[0-7]+ +/** Number format to highlight octal numbers with a leading @ (Used in HiSofts Devpac series). */ +define('GESHI_NUMBER_OCT_PREFIX_AT', 1024); //@[0-7]+ /** Number format to highlight octal numbers with a suffix of o */ -define('GESHI_NUMBER_OCT_SUFFIX', 1024); //[0-7]+[oO] +define('GESHI_NUMBER_OCT_SUFFIX', 2048); //[0-7]+[oO] /** Number format to highlight hex numbers with a prefix 0x */ define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ +/** Number format to highlight hex numbers with a prefix $ */ +define('GESHI_NUMBER_HEX_PREFIX_DOLLAR', 8192); //$[0-9a-fA-F]+ /** Number format to highlight hex numbers with a suffix of h */ -define('GESHI_NUMBER_HEX_SUFFIX', 8192); //[0-9][0-9a-fA-F]*h +define('GESHI_NUMBER_HEX_SUFFIX', 16384); //[0-9][0-9a-fA-F]*h /** Number format to highlight floating-point numbers without support for scientific notation */ define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ /** Number format to highlight floating-point numbers without support for scientific notation */ @@ -731,6 +735,88 @@ class GeSHi { } } + /** + * Get supported langs or an associative array lang=>full_name. + * @param boolean $longnames + * @return array + */ + function get_supported_languages($full_names=false) + { + // return array + $back = array(); + + // we walk the lang root + $dir = dir($this->language_path); + + // foreach entry + while (false !== ($entry = $dir->read())) + { + $full_path = $this->language_path.$entry; + + // Skip all dirs + if (is_dir($full_path)) { + continue; + } + + // we only want lang.php files + if (!preg_match('/^([^.]+)\.php$/', $entry, $matches)) { + continue; + } + + // Raw lang name is here + $langname = $matches[1]; + + // We want the fullname too? + if ($full_names === true) + { + if (false !== ($fullname = $this->get_language_fullname($langname))) + { + $back[$langname] = $fullname; // we go associative + } + } + else + { + // just store raw langname + $back[] = $langname; + } + } + + $dir->close(); + + return $back; + } + + /** + * Get full_name for a lang or false. + * @param string $language short langname (html4strict for example) + * @return mixed + */ + function get_language_fullname($language) + { + //Clean up the language name to prevent malicious code injection + $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); + + $language = strtolower($language); + + // get fullpath-filename for a langname + $fullpath = $this->language_path.$language.'.php'; + + // we need to get contents :S + if (false === ($data = file_get_contents($fullpath))) { + $this->error = sprintf('Geshi::get_lang_fullname() Unknown Language: %s', $language); + return false; + } + + // match the langname + if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+)\'/', $data, $matches)) { + $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language); + return false; + } + + // return fullname for langname + return stripcslashes($matches[1]); + } + /** * Sets the type of header to be used. * @@ -1353,6 +1439,10 @@ class GeSHi { function get_language_name_from_extension( $extension, $lookup = array() ) { if ( !is_array($lookup) || empty($lookup)) { $lookup = array( + '6502acme' => array( 'a', 's', 'asm', 'inc' ), + '6502tasm' => array( 'a', 's', 'asm', 'inc' ), + '6502kickass' => array( 'a', 's', 'asm', 'inc' ), + '68000devpac' => array( 'a', 's', 'asm', 'inc' ), 'abap' => array('abap'), 'actionscript' => array('as'), 'ada' => array('a', 'ada', 'adb', 'ads'), @@ -1971,7 +2061,7 @@ class GeSHi { //All this formats are matched case-insensitively! static $numbers_format = array( GESHI_NUMBER_INT_BASIC => - '(?:(? '(? @@ -1984,10 +2074,14 @@ class GeSHi { '(? '(? + '(? '(? '(? + '(? '(? @@ -2021,6 +2115,10 @@ class GeSHi { $this->language_data['NUMBERS_RXCACHE'][$key] = "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; // } + + if(!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) { + $this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'] = '#\d#'; + } } $this->parse_cache_built = true; @@ -3241,7 +3339,7 @@ class GeSHi { $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); // Highlight keywords - $disallowed_before = "(?|^&"; + $disallowed_before = "(?lexic_permissions['STRINGS']) { $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); @@ -3299,7 +3397,7 @@ class GeSHi { // Basically, we don't put the styles in yet because then the styles themselves will // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) $stuff_to_parse = preg_replace_callback( - "/$disallowed_before_local({$keywordset})(?!\(?:htm|php))$disallowed_after_local/$modifiers", + "/$disallowed_before_local({$keywordset})(?!\(?:htm|php|aspx?))$disallowed_after_local/$modifiers", array($this, 'handle_keyword_replace'), $stuff_to_parse ); @@ -3346,7 +3444,8 @@ class GeSHi { // Highlight numbers. As of 1.0.8 we support different types of numbers $numbers_found = false; - if ($this->lexic_permissions['NUMBERS'] && preg_match('#\d#', $stuff_to_parse )) { + + if ($this->lexic_permissions['NUMBERS'] && preg_match($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'], $stuff_to_parse )) { $numbers_found = true; //For each of the formats ... @@ -4465,7 +4564,7 @@ class GeSHi { * @access private */ function optimize_regexp_list($list, $regexp_delimiter = '/') { - $regex_chars = array('.', '\\', '+', '*', '?', '[', '^', ']', '$', + $regex_chars = array('.', '\\', '+', '-', '*', '?', '[', '^', ']', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); sort($list); $regexp_list = array(''); diff --git a/inc/geshi/4cs.php b/inc/geshi/4cs.php index 48b671f4a..7b1efec9a 100644 --- a/inc/geshi/4cs.php +++ b/inc/geshi/4cs.php @@ -4,7 +4,7 @@ * ------ * Author: Jason Curl (jason.curl@continental-corporation.com) * Copyright: (c) 2009 Jason Curl - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/09/05 * * 4CS language file for GeSHi. diff --git a/inc/geshi/6502acme.php b/inc/geshi/6502acme.php new file mode 100644 index 000000000..880211d5b --- /dev/null +++ b/inc/geshi/6502acme.php @@ -0,0 +1,230 @@ + 'MOS 6502 (6510) ACME Cross Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 3 => array( + '!8', '!08', '!by', '!byte', + '!16', '!wo', '!word', + '!24', '!32', + '!fi', '!fill', + '!align', + '!ct', '!convtab', + '!tx', '!text', + '!pet', + '!raw', + '!scrxor', + '!to', + '!source', + '!bin', '!binary', + '!zn', '!zone', + '!sl', + '!svl', + '!sal', + '!if', '!ifdef', + '!for', + '!set', + '!do', 'while', 'until', + '!eof', '!endoffile', + '!warn', '!error', '!serious', + '!macro', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + '!initmem', + '!pseudopc', + '!cpu', + '!al', '!as', '!rl', '!rs', + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, there are also + * several more that mainly perform various forms of crash and are not supported by ACME 0.93. + */ + 4 => array( + 'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax', + 'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. + * ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out). */ + 5 => array( + 'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb' + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm', + 'xba', 'xce', + ), + /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 7 => array( + '!cbm', + '!sz', '!subzone', + '!realpc', + ), + /* Math functions, some are aliases for the symbols. */ + 8 => array( + 'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan', + 'arcsin', 'arccos', 'arctan', 'int', 'float', + + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '!', '^', '-', '*', '/', + '%', '+', '-', '<<', '>>', '>>>', + '<', '>', '^', '<=', '<', '>=', '>', '!=', + '=', '&', '|', '<>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #000;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #f00;' + , 1 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //ACME .# Binary number format. e.g. %..##..##..## + 0 => '\%[\.\#]{1,64}', + //ACME Local Labels + 1 => '\.[_a-zA-Z][_a-zA-Z0-9]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/6502kickass.php b/inc/geshi/6502kickass.php new file mode 100644 index 000000000..b1edcaa5b --- /dev/null +++ b/inc/geshi/6502kickass.php @@ -0,0 +1,241 @@ + 'MOS 6502 (6510) Kick Assembler format', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes including undocumented opcodes as Kick Assembler 3.13 does not make a distinction - they are ALL valid. */ + 1 => array( + 'adc', 'ahx', 'alr', 'anc', 'anc2', 'and', 'arr', 'asl', + 'axs', 'bcc', 'bcs', 'beq', 'bit', 'bmi', 'bne', 'bpl', + 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', 'clv', 'cmp', + 'cpx', 'cpy', 'dcp', 'dec', 'dex', 'dey', 'eor', 'inc', + 'inx', 'iny', 'isc', 'jmp', 'jsr', 'las', 'lax', 'lda', + 'ldx', 'ldy', 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', + 'plp', 'rla', 'rol', 'ror', 'rra', 'rti', 'rts', 'sax', + 'sbc', 'sbc2', 'sec', 'sed', 'sei', 'shx', 'shy', 'slo', + 'sre', 'sta', 'stx', 'sty', 'tas', 'tax', 'tay', 'tsx', + 'txa', 'txs', 'tya', 'xaa', + ), + /* DTV additional Opcodes. */ + 2 => array( + 'bra', 'sac', 'sir' + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. */ + 3 => array( + 'x', 'y' + ), + /* Directives. */ + 4 => array( + '.pc', '.pseudopc', 'virtual', '.align', '.byte', '.word', '.text', '.fill', + '.import source', '.import binary', '.import c64', '.import text', '.import', '.print', '.printnow', + '.error', '.var', '.eval', '.const', '.eval const', '.enum', '.label', '.define', '.struct', + 'if', '.for', '.macro', '.function', '.return', '.pseudocommand', '.namespace', '.filenamespace', + '.assert', '.asserterror', + ), + /* Kick Assembler 3.13 Functions/Operators. */ + 5 => array( + 'size', 'charAt', 'substring', 'asNumber', 'asBoolean', 'toIntString', 'toBinaryString', 'toOctalString', + 'toHexString', 'lock', // String functions/operators. + 'get', 'set', 'add', 'remove', 'shuffle', // List functions. + 'put', 'keys', // Hashtable functions. + 'getType', 'getValue', 'CmdArgument', // Pseudo Commands functions. + 'asmCommandSize', // Opcode Constants functions. + 'LoadBinary', 'getSize', + 'LoadSid', 'getData', + 'LoadPicture', 'width', 'height', 'getPixel', 'getSinglecolorByte', 'getMulticolorByte', + 'createFile', 'writeln', + 'cmdLineVars', + 'getX', 'getY', 'getZ', // Vector functions. + 'RotationMatrix', 'ScaleMatrix', 'MoveMatrix', 'PerspectiveMatrix', // Matrix functions. + + ), + + /* Kick Assembler 3.13 Math Functions. */ + 6 => array( + 'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', + 'exp', 'expm1', 'floor', 'hypot', 'IEEEremainder', 'log', 'log10', + 'log1p', 'max', 'min', 'pow', 'mod', 'random', 'round', 'signum', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'toDegrees', 'toRadians', + ), + + /* Kick Assembler 3.13 Objects/Data Types. */ + 7 => array( + 'List', // List() Object. + 'Hashtable', // Hashtable() Object. + 'Vector', // Vector() Object. + 'Matrix', // Matrix() Object. + ), + + /* Kick Assembler 3.13 Constants. */ + 8 => array( + 'PI', 'E', // Math Constants. + 'AT_ABSOLUTE' , 'AT_ABSOLUTEX' , 'AT_ABSOLUTEY' , 'AT_IMMEDIATE', // Pseudo Commands Constants. + 'AT_INDIRECT' , 'AT_IZEROPAGEX' , 'AT_IZEROPAGEY' , 'AT_NONE', + 'BLACK', 'WHITE', 'RED', 'CYAN', 'PURPLE', 'GREEN', 'BLUE', // Colour Constants. + 'YELLOW', 'ORANGE', 'BROWN', 'LIGHT_RED', 'DARK_GRAY', 'GRAY', + 'LIGHT_GREEN', 'LIGHT_BLUE', 'LIGHT_GRAY', + 'C64FILE', // Template Tag names. + 'BF_C64FILE', 'BF_BITMAP_SINGLECOLOR', 'BF_KOALA' , 'BF_FLI', // Binary format constant + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '-', '+', '-', '*', '/', '>', '<', '<<', '>>', '&', '|', '^', '=', '==', + '!=', '>=', '<=', '!', '&&', '||', '#', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #f08; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;', + 1 => 'color: #933;', + 2 => 'color: #933;', + 3 => 'color: #00f; font-weight:bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //Labels end with a collon. + 0 => '[!]{0,1}[_a-zA-Z][_a-zA-Z0-9]*\:', + //Multi Labels (local labels) references start with ! and end with + or - for forward/backward reference. + 1 => '![_a-zA-Z][_a-zA-Z0-9]*[+-]', + //Macros start with a colon :Macro. + 2 => ':[_a-zA-Z][_a-zA-Z0-9]*', + // Opcode Constants, such as LDA_IMM, STA_IZPY are basically all 6502 opcodes + // in UPPER case followed by _underscore_ and the ADDRESS MODE. + // As you might imagine that is rather a lot ( 78 supported Opcodes * 12 Addressing modes = 936 variations) + // So I thought it better and easier to maintain as a regular expression. + // NOTE: The order of the Address Modes must be maintained or it wont work properly (eg. place ZP first and find out!) + 3 => '[A-Z]{3}[2]?_(?:IMM|IND|IZPX|IZPY|ZPX|ZPY|ABSX|ABSY|REL|ABS|ZP)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ), + 'KEYWORDS' => array( + 5 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 6 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 8 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ) + ) + ), +); + +?> \ No newline at end of file diff --git a/inc/geshi/6502tasm.php b/inc/geshi/6502tasm.php new file mode 100644 index 000000000..5f9f2b9be --- /dev/null +++ b/inc/geshi/6502tasm.php @@ -0,0 +1,189 @@ + 'MOS 6502 (6510) TASM/64TASS 1.46 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives. */ + 3 => array( + '.al', '.align', '.as', '.assert', '.binary', '.byte', '.cerror', '.char', + '.comment', '.cpu', '.cwarn', '.databank', '.dpage', '.else', '.elsif', + '.enc', '.endc', '.endif', '.endm', '.endp', '.error', '.fi', '.fill', + '.for', '.here', '.if', '.ifeq', '.ifmi', '.ifne', '.ifpl', + '.include', '.int', '.logical', '.long', '.macro', '.next', '.null', '.offs', + '.page', '.pend', '.proc', '.rept', '.rta', '.shift', '.text', '.warn', '.word', + '.xl', '.xs', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, these are the names + * used by 64TASS V1.46. + */ + 4 => array( + 'ahx', 'alr', 'anc', 'ane', 'arr', 'asr', 'axs', 'dcm', + 'dcp', 'ins', 'isb', 'isc', 'jam', 'lae', 'las', 'lax', + 'lds', 'lxa', 'rla', 'rra', 'sax', 'sbx', 'sha', 'shs', + 'shx', 'shy', 'slo', 'sre', 'tas', 'xaa', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the + * CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. */ + 5 => array( + 'bra', 'dea', 'gra', 'ina', 'phx', 'phy', 'plx', 'ply', + 'stz', 'trb', 'tsb', + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'stp', 'swa', 'tad', 'tcd', 'tcs', 'tda', + 'tdc', 'tsa', 'tsc', 'txy', 'tyx', 'wai', 'xba', 'xce', + ), + /* Deprecated directives (or yet to be implemented). */ + 7 => array( + '.global', '.check' + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '<', '>', '`', '=', '<', '>', + '!=', '>=', '<=', '+', '-', '*', '/', '//', '|', + '^', '&', '<<', '>>', '-', '~', '!', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/68000devpac.php b/inc/geshi/68000devpac.php new file mode 100644 index 000000000..efd800809 --- /dev/null +++ b/inc/geshi/68000devpac.php @@ -0,0 +1,168 @@ + 'Motorola 68000 - HiSoft Devpac ST 2 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Directives. */ + 1 => array( + 'end', 'include', 'incbin', 'opt', 'even', 'cnop', 'dc.b', 'dc.w', + 'dc.l', 'ds.b', 'ds.w', 'ds.l', 'dcb.b', 'dcb.w', 'dcb.l', + 'fail', 'output', '__g2', 'rept', 'endr', 'list', 'nolist', 'plen', + 'llen', 'ttl', 'subttl', 'spc', 'page', 'listchar', 'format', + 'equ', 'equr', 'set', 'reg', 'rs.b', 'rs.w', 'rs.l', 'rsreset', + 'rsset', '__rs', 'ifeq', 'ifne', 'ifgt', 'ifge', 'iflt', 'ifle', 'endc', + 'ifd', 'ifnd', 'ifc', 'ifnc', 'elseif', 'iif', 'macro', 'endm', 'mexit', + 'narg', '\@', 'section', 'text', 'data', 'bss', 'xdef', 'xref', 'org', + 'offset', '__lk', 'comment', + ), + /* 68000 Opcodes. */ + 2 => array( + 'abcd', 'add', 'adda', 'addi', 'addq', 'addx', 'and', 'andi', + 'asl', 'asr', 'bcc', 'bchg', 'bclr', 'bcs', 'beq', 'bge', + 'bgt', 'bhi', 'ble', 'bls', 'blt', 'bmi', 'bne', 'bpl', + 'bra', 'bset', 'bsr', 'btst', 'bvc', 'bvs', 'chk', 'clr', + 'cmp', 'cmpa', 'cmpi', 'cmpm', 'dbcc', 'dbcs', 'dbeq', 'dbf', + 'dbge', 'dbgt', 'dbhi', 'dble', 'dbls', 'dblt', 'dbmi', 'dbne', + 'dbpl', 'dbra', 'dbt', 'dbvc', 'dbvs', 'divs', 'divu', 'eor', + 'eori', 'exg', 'ext','illegal','jmp', 'jsr', 'lea', 'link', + 'lsl', 'lsr', 'move','movea','movem','movep','moveq', 'muls', + 'mulu', 'nbcd', 'neg', 'negx', 'nop', 'not', 'or', 'ori', + 'pea', 'reset', 'rol', 'ror', 'roxl', 'roxr', 'rte', 'rtr', + 'rts', 'sbcd', 'scc', 'scs', 'seq', 'sf', 'sge', 'sgt', + 'shi', 'sle', 'sls', 'slt', 'smi', 'sne', 'spl', 'st', + 'stop', 'sub', 'suba', 'subi', 'subq', 'subx', 'svc', 'svs', + 'swap', 'tas', 'trap','trapv', 'tst', 'unlk', + ), + /* oprand sizes. */ + 3 => array( + 'b', 'w', 'l' , 's' + ), + /* 68000 Registers. */ + 4 => array( + 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', + 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'sp', 'usp', 'ssp', + 'pc', 'ccr', 'sr', + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '+', '-', '~', '<<', '>>', '&', + '!', '^', '*', '/', '=', '<', '>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #f08; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_OCT_PREFIX_AT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_OCT_PREFIX_AT | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + 'REGEXPS' => array( + //Labels may end in a colon. + 0 => '(?<=\A\x20|\r|\n|^)[\._a-zA-Z][\._a-zA-Z0-9]*[\:]?[\s]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%\@]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/inc/geshi/abap.php b/inc/geshi/abap.php index 942d2397e..6ce930c7c 100644 --- a/inc/geshi/abap.php +++ b/inc/geshi/abap.php @@ -7,7 +7,7 @@ * - Sandra Rossi (sandra.rossi@gmail.com) * - Jacob Laursen (jlu@kmd.dk) * Copyright: (c) 2007 Andres Picazo - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * ABAP language file for GeSHi. diff --git a/inc/geshi/actionscript.php b/inc/geshi/actionscript.php index 41d66edd2..47eec3950 100644 --- a/inc/geshi/actionscript.php +++ b/inc/geshi/actionscript.php @@ -4,7 +4,7 @@ * ---------------- * Author: Steffen Krause (Steffen.krause@muse.de) * Copyright: (c) 2004 Steffen Krause, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/20 * * Actionscript language file for GeSHi. diff --git a/inc/geshi/actionscript3.php b/inc/geshi/actionscript3.php index 4aab929dc..ba27573cc 100644 --- a/inc/geshi/actionscript3.php +++ b/inc/geshi/actionscript3.php @@ -4,7 +4,7 @@ * ---------------- * Author: Jordi Boggiano (j.boggiano@seld.be) * Copyright: (c) 2007 Jordi Boggiano (http://www.seld.be/), Benny Baumann (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/11/26 * * ActionScript3 language file for GeSHi. @@ -60,7 +60,7 @@ $language_data = array ( 'COMMENT_MULTI' => array('/*' => '*/'), 'COMMENT_REGEXP' => array( //Regular expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(? GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'", '"'), diff --git a/inc/geshi/ada.php b/inc/geshi/ada.php index c6b0597bb..8f8390952 100644 --- a/inc/geshi/ada.php +++ b/inc/geshi/ada.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/29 * * Ada language file for GeSHi. diff --git a/inc/geshi/algol68.php b/inc/geshi/algol68.php new file mode 100644 index 000000000..1f79f10eb --- /dev/null +++ b/inc/geshi/algol68.php @@ -0,0 +1,329 @@ + $prebits.$LONGS."(?:".$bl.")".$postbits, + "INT" => $preint.$LONGS."(?:".$il.")".$postint, + "REAL" => $prereal.$LONGS."(?:".$rl.")".$postreal, + + "BOLD" => 'color: #b1b100; font-weight: bold;', + "ITALIC" => 'color: #b1b100;', # procedures traditionally italic # + "NONSTD" => 'color: #FF0000; font-weight: bold;', # RED # + "COMMENT" => 'color: #666666; font-style: italic;' + ); + } +} +$a68=geshi_langfile_algol68_vars(); + +$language_data = array( + 'LANG_NAME' => 'ALGOL 68', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array( + '¢' => '¢', + '£' => '£', + '#' => '#', + ), + 'COMMENT_REGEXP' => array( + 1 => '/\bCO((?:MMENT)?)\b.*?\bCO\\1\b/i', + 2 => '/\bPR((?:AGMAT)?)\b.*?\bPR\\1\b/i', + 3 => '/\bQUOTE\b.*?\bQUOTE\b/i' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '"', + 'NUMBERS' => GESHI_NUMBER_HEX_SUFFIX, # Warning: Feature!! # +# GESHI_NUMBER_HEX_SUFFIX, # Attempt ignore default # + 'KEYWORDS' => array( +# Extensions + 1 => array('KEEP', 'FINISH', 'USE', 'SYSPROCS', 'IOSTATE', 'USING', 'ENVIRON', 'PROGRAM', 'CONTEXT'), +# 2 => array('CASE', 'IN', 'OUSE', 'IN', 'OUT', 'ESAC', '(', '|', '|:', ')', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', 'THEN', 'ELSE', 'FI', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO', 'GOTO', 'FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT'), # + 2 => array('CASE', 'IN', 'OUSE', /* 'IN',*/ 'OUT', 'ESAC', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO TO', 'GOTO', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', /* 'THEN',*/ 'ELSE', 'FI' ), + 3 => array('BITS', 'BOOL', 'BYTES', 'CHAR', 'COMPL', 'INT', 'REAL', 'SEMA', 'STRING', 'VOID'), + 4 => array('MODE', 'OP', 'PRIO', 'PROC', 'FLEX', 'HEAP', 'LOC', 'REF', 'LONG', 'SHORT', 'EITHER'), +# Extensions or deprecated keywords +# 'PIPE': keyword somehow interferes with the internal operation of GeSHi + 5 => array('FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT', 'CTB', 'CT', 'CTAB', 'COMPLEX', 'VECTOR', 'SOUND' /*, 'PIPE'*/), + 6 => array('CHANNEL', 'FILE', 'FORMAT', 'STRUCT', 'UNION', 'OF'), +# '(', '|', '|:', ')', # +# 7 => array('OF', 'AT', '@', 'IS', ':=:', 'ISNT', ':/=:', ':≠:', 'CTB', 'CT', '::', 'CTAB', '::=', 'TRUE', 'FALSE', 'EMPTY', 'NIL', '○', 'SKIP', '~'), + 7 => array('AT', 'IS', 'ISNT', 'TRUE', 'FALSE', 'EMPTY', 'NIL', 'SKIP'), + 8 => array('NOT', 'UP', 'DOWN', 'LWB', 'UPB', /* '-',*/ 'ABS', 'ARG', 'BIN', 'ENTIER', 'LENG', 'LEVEL', 'ODD', 'REPR', 'ROUND', 'SHORTEN', 'CONJ', 'SIGN'), +# OPERATORS ordered roughtly by PRIORITY # +# 9 => array('¬', '↑', '↓', '⌊', '⌈', '~', '⎩', '⎧'), +# 10 => array('+*', 'I', '+×', '⊥', '!', '⏨'), + 10 => array('I'), +# 11 => array('SHL', 'SHR', '**', 'UP', 'DOWN', 'LWB', 'UPB', '↑', '↓', '⌊', '⌈', '⎩', '⎧'), + 11 => array('SHL', 'SHR', /*'UP', 'DOWN', 'LWB', 'UPB'*/), +# 12 => array('*', '/', '%', 'OVER', '%*', 'MOD', 'ELEM', '×', '÷', '÷×', '÷*', '%×', '□', '÷:'), + 12 => array('OVER', 'MOD', 'ELEM'), +# 13 => array('-', '+'), +# 14 => array('<', 'LT', '<=', 'LE', '>=', 'GE', '>', 'GT', '≤', '≥'), + 14 => array('LT', 'LE', 'GE', 'GT'), +# 15 => array('=', 'EQ', '/=', 'NE', '≠', '~='), + 15 => array('EQ', 'NE'), +# 16 => array('&', 'AND', '∧', 'OR', '∨', '/\\', '\\/'), + 16 => array('AND', 'OR'), + 17 => array('MINUSAB', 'PLUSAB', 'TIMESAB', 'DIVAB', 'OVERAB', 'MODAB', 'PLUSTO'), +# 18 => array('-:=', '+:=', '*:=', '/:=', '%:=', '%*:=', '+=:', '×:=', '÷:=', '÷×:=', '÷*:=', '%×:=', '÷::=', 'MINUS', 'PLUS', 'DIV', 'MOD', 'PRUS'), +# Extensions or deprecated keywords + 18 => array('MINUS', 'PLUS', 'DIV', /* 'MOD',*/ 'PRUS', 'IS NOT'), +# Extensions or deprecated keywords + 19 => array('THEF', 'ANDF', 'ORF', 'ANDTH', 'OREL', 'ANDTHEN', 'ORELSE'), +# Built in procedures - from standard prelude # + 20 => array('int lengths', 'intlengths', 'int shorths', 'intshorths', 'max int', 'maxint', 'real lengths', 'reallengths', 'real shorths', 'realshorths', 'bits lengths', 'bitslengths', 'bits shorths', 'bitsshorths', 'bytes lengths', 'byteslengths', 'bytes shorths', 'bytesshorths', 'max abs char', 'maxabschar', 'int width', 'intwidth', 'long int width', 'longintwidth', 'long long int width', 'longlongintwidth', 'real width', 'realwidth', 'long real width', 'longrealwidth', 'long long real width', 'longlongrealwidth', 'exp width', 'expwidth', 'long exp width', 'longexpwidth', 'long long exp width', 'longlongexpwidth', 'bits width', 'bitswidth', 'long bits width', 'longbitswidth', 'long long bits width', 'longlongbitswidth', 'bytes width', 'byteswidth', 'long bytes width', 'longbyteswidth', 'max real', 'maxreal', 'small real', 'smallreal', 'long max int', 'longmaxint', 'long long max int', 'longlongmaxint', 'long max real', 'longmaxreal', 'long small real', 'longsmallreal', 'long long max real', 'longlongmaxreal', 'long long small real', 'longlongsmallreal', 'long max bits', 'longmaxbits', 'long long max bits', 'longlongmaxbits', 'null character', 'nullcharacter', 'blank', 'flip', 'flop', 'error char', 'errorchar', 'exp char', 'expchar', 'newline char', 'newlinechar', 'formfeed char', 'formfeedchar', 'tab char', 'tabchar'), + 21 => array('stand in channel', 'standinchannel', 'stand out channel', 'standoutchannel', 'stand back channel', 'standbackchannel', 'stand draw channel', 'standdrawchannel', 'stand error channel', 'standerrorchannel'), + 22 => array('put possible', 'putpossible', 'get possible', 'getpossible', 'bin possible', 'binpossible', 'set possible', 'setpossible', 'reset possible', 'resetpossible', 'reidf possible', 'reidfpossible', 'draw possible', 'drawpossible', 'compressible', 'on logical file end', 'onlogicalfileend', 'on physical file end', 'onphysicalfileend', 'on line end', 'onlineend', 'on page end', 'onpageend', 'on format end', 'onformatend', 'on value error', 'onvalueerror', 'on open error', 'onopenerror', 'on transput error', 'ontransputerror', 'on format error', 'onformaterror', 'open', 'establish', 'create', 'associate', 'close', 'lock', 'scratch', 'space', 'new line', 'newline', 'print', 'write f', 'writef', 'print f', 'printf', 'write bin', 'writebin', 'print bin', 'printbin', 'read f', 'readf', 'read bin', 'readbin', 'put f', 'putf', 'get f', 'getf', 'make term', 'maketerm', 'make device', 'makedevice', 'idf', 'term', 'read int', 'readint', 'read long int', 'readlongint', 'read long long int', 'readlonglongint', 'read real', 'readreal', 'read long real', 'readlongreal', 'read long long real', 'readlonglongreal', 'read complex', 'readcomplex', 'read long complex', 'readlongcomplex', 'read long long complex', 'readlonglongcomplex', 'read bool', 'readbool', 'read bits', 'readbits', 'read long bits', 'readlongbits', 'read long long bits', 'readlonglongbits', 'read char', 'readchar', 'read string', 'readstring', 'print int', 'printint', 'print long int', 'printlongint', 'print long long int', 'printlonglongint', 'print real', 'printreal', 'print long real', 'printlongreal', 'print long long real', 'printlonglongreal', 'print complex', 'printcomplex', 'print long complex', 'printlongcomplex', 'print long long complex', 'printlonglongcomplex', 'print bool', 'printbool', 'print bits', 'printbits', 'print long bits', 'printlongbits', 'print long long bits', 'printlonglongbits', 'print char', 'printchar', 'print string', 'printstring', 'whole', 'fixed', 'float'), + 23 => array('pi', 'long pi', 'longpi', 'long long pi', 'longlongpi'), + 24 => array('sqrt', 'curt', 'cbrt', 'exp', 'ln', 'log', 'sin', 'arc sin', 'arcsin', 'cos', 'arc cos', 'arccos', 'tan', 'arc tan', 'arctan', 'long sqrt', 'longsqrt', 'long curt', 'longcurt', 'long cbrt', 'longcbrt', 'long exp', 'longexp', 'long ln', 'longln', 'long log', 'longlog', 'long sin', 'longsin', 'long arc sin', 'longarcsin', 'long cos', 'longcos', 'long arc cos', 'longarccos', 'long tan', 'longtan', 'long arc tan', 'longarctan', 'long long sqrt', 'longlongsqrt', 'long long curt', 'longlongcurt', 'long long cbrt', 'longlongcbrt', 'long long exp', 'longlongexp', 'long long ln', 'longlongln', 'long long log', 'longlonglog', 'long long sin', 'longlongsin', 'long long arc sin', 'longlongarcsin', 'long long cos', 'longlongcos', 'long long arc cos', 'longlongarccos', 'long long tan', 'longlongtan', 'long long arc tan', 'longlongarctan'), + 25 => array('first random', 'firstrandom', 'next random', 'nextrandom', 'long next random', 'longnextrandom', 'long long next random', 'longlongnextrandom'), + 26 => array('real', 'bits pack', 'bitspack', 'long bits pack', 'longbitspack', 'long long bits pack', 'longlongbitspack', 'bytes pack', 'bytespack', 'long bytes pack', 'longbytespack', 'char in string', 'charinstring', 'last char in string', 'lastcharinstring', 'string in string', 'stringinstring'), + 27 => array('utc time', 'utctime', 'local time', 'localtime', 'argc', 'argv', 'get env', 'getenv', 'reset errno', 'reseterrno', 'errno', 'strerror'), + 28 => array('sinh', 'long sinh', 'longsinh', 'long long sinh', 'longlongsinh', 'arc sinh', 'arcsinh', 'long arc sinh', 'longarcsinh', 'long long arc sinh', 'longlongarcsinh', 'cosh', 'long cosh', 'longcosh', 'long long cosh', 'longlongcosh', 'arc cosh', 'arccosh', 'long arc cosh', 'longarccosh', 'long long arc cosh', 'longlongarccosh', 'tanh', 'long tanh', 'longtanh', 'long long tanh', 'longlongtanh', 'arc tanh', 'arctanh', 'long arc tanh', 'longarctanh', 'long long arc tanh', 'longlongarctanh', 'arc tan2', 'arctan2', 'long arc tan2', 'longarctan2', 'long long arc tan2', 'longlongarctan2'), + 29 => array('complex sqrt', 'complexsqrt', 'long complex sqrt', 'longcomplexsqrt', 'long long complex sqrt', 'longlongcomplexsqrt', 'complex exp', 'complexexp', 'long complex exp', 'longcomplexexp', 'long long complex exp', 'longlongcomplexexp', 'complex ln', 'complexln', 'long complex ln', 'longcomplexln', 'long long complex ln', 'longlongcomplexln', 'complex sin', 'complexsin', 'long complex sin', 'longcomplexsin', 'long long complex sin', 'longlongcomplexsin', 'complex arc sin', 'complexarcsin', 'long complex arc sin', 'longcomplexarcsin', 'long long complex arc sin', 'longlongcomplexarcsin', 'complex cos', 'complexcos', 'long complex cos', 'longcomplexcos', 'long long complex cos', 'longlongcomplexcos', 'complex arc cos', 'complexarccos', 'long complex arc cos', 'longcomplexarccos', 'long long complex arc cos', 'longlongcomplexarccos', 'complex tan', 'complextan', 'long complex tan', 'longcomplextan', 'long long complex tan', 'longlongcomplextan', 'complex arc tan', 'complexarctan', 'long complex arc tan', 'longcomplexarctan', 'long long complex arc tan', 'longlongcomplexarctan', 'complex sinh', 'complexsinh', 'complex arc sinh', 'complexarcsinh', 'complex cosh', 'complexcosh', 'complex arc cosh', 'complexarccosh', 'complex tanh', 'complextanh', 'complex arc tanh', 'complexarctanh') + ), + 'SYMBOLS' => array( + 1 => array( /* reverse length sorted... */ '÷×:=', '%×:=', ':≠:', '÷*:=', '÷::=', '%*:=', ':/=:', '×:=', '÷:=', '÷×', '%:=', '%×', '*:=', '+:=', '+=:', '+×', '-:=', '/:=', '::=', ':=:', '÷*', '÷:', '↑', '↓', '∧', '∨', '≠', '≤', '≥', '⊥', '⌈', '⌊', '⎧', '⎩', /* '⏨', */ '□', '○', '%*', '**', '+*', '/=', '::', '/\\', '\\/', '<=', '>=', '|:', '~=', '¬', '×', '÷', '!', '%', '&', '(', ')', '*', '+', ',', '-', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '^', '{', '|', '}', '~') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, +# 9 => true, + 10 => true, + 11 => true, + 12 => true, +# 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => $a68['NONSTD'], 2 => $a68['BOLD'], 3 => $a68['BOLD'], 4 => $a68['BOLD'], + 5 => $a68['NONSTD'], 6 => $a68['BOLD'], 7 => $a68['BOLD'], 8 => $a68['BOLD'], + /* 9 => $a68['BOLD'],*/ 10 => $a68['BOLD'], 11 => $a68['BOLD'], 12 => $a68['BOLD'], + /* 13 => $a68['BOLD'],*/ 14 => $a68['BOLD'], 15 => $a68['BOLD'], 16 => $a68['BOLD'], 17 => $a68['BOLD'], + 18 => $a68['NONSTD'], 19 => $a68['NONSTD'], + 20 => $a68['ITALIC'], 21 => $a68['ITALIC'], 22 => $a68['ITALIC'], 23 => $a68['ITALIC'], + 24 => $a68['ITALIC'], 25 => $a68['ITALIC'], 26 => $a68['ITALIC'], 27 => $a68['ITALIC'], + 28 => $a68['ITALIC'], 29 => $a68['ITALIC'] + ), + 'COMMENTS' => array( + 1 => $a68['COMMENT'], 2 => $a68['COMMENT'], 3 => $a68['COMMENT'], /* 4 => $a68['COMMENT'], + 5 => $a68['COMMENT'],*/ 'MULTI' => $a68['COMMENT'] + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;', + 1 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #cc66cc;', # BITS # + 1 => 'color: #cc66cc;', # REAL # + /* 2 => 'color: #cc66cc;', # INT # */ + ), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', +# 9 => '', + 10 => '', + 11 => '', + 12 => '', +# 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '', + 21 => '', + 22 => '', + 23 => '', + 24 => '', + 25 => '', + 26 => '', + 27 => '', + 28 => '', + 29 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => '→', + 1 => 'OF' + ), + 'REGEXPS' => array( + 0 => $a68['BITS'], + 1 => $a68['REAL'] + # 2 => $a68['INT'], # Breaks formatting for some reason # + # 2 => $GESHI_NUMBER_INT_BASIC # Also breaks formatting # + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +unset($a68); +?> \ No newline at end of file diff --git a/inc/geshi/apache.php b/inc/geshi/apache.php index 34704eb22..ace3862ef 100644 --- a/inc/geshi/apache.php +++ b/inc/geshi/apache.php @@ -4,7 +4,7 @@ * ---------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/29/07 * * Apache language file for GeSHi. @@ -344,6 +344,9 @@ $language_data = array ( //mod_unique_id.c + //mod_upload_progress + 'ReportUploads', 'TrackUploads', 'UploadProgressSharedMemorySize', + //mod_userdir.c 'UserDir', diff --git a/inc/geshi/applescript.php b/inc/geshi/applescript.php index 9e214f2e1..c64a4974d 100644 --- a/inc/geshi/applescript.php +++ b/inc/geshi/applescript.php @@ -4,7 +4,7 @@ * -------- * Author: Stephan Klimek (http://www.initware.org) * Copyright: Stephan Klimek (http://www.initware.org) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2005/07/20 * * AppleScript language file for GeSHi. diff --git a/inc/geshi/apt_sources.php b/inc/geshi/apt_sources.php index f4cf9ae3f..9feefceaf 100644 --- a/inc/geshi/apt_sources.php +++ b/inc/geshi/apt_sources.php @@ -4,7 +4,7 @@ * ---------- * Author: Milian Wolff (mail@milianw.de) * Copyright: (c) 2008 Milian Wolff (http://milianw.de) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/06/17 * * Apt sources.list language file for GeSHi. @@ -55,7 +55,7 @@ $language_data = array ( 'stable/updates', //Debian 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woody', 'sarge', - 'etch', 'lenny', 'sid', + 'etch', 'lenny', 'wheezy', 'sid', //Ubuntu 'warty', 'warty-updates', 'warty-security', 'warty-proposed', 'warty-backports', 'hoary', 'hoary-updates', 'hoary-security', 'hoary-proposed', 'hoary-backports', @@ -65,7 +65,11 @@ $language_data = array ( 'feisty', 'feisty-updates', 'feisty-security', 'feisty-proposed', 'feisty-backports', 'gutsy', 'gutsy-updates', 'gutsy-security', 'gutsy-proposed', 'gutsy-backports', 'hardy', 'hardy-updates', 'hardy-security', 'hardy-proposed', 'hardy-backports', - 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports' + 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports', + 'jaunty', 'jaunty-updates', 'jaunty-security', 'jaunty-proposed', 'jaunty-backports', + 'karmic', 'karmic-updates', 'karmic-security', 'karmic-proposed', 'karmic-backports', + 'lucid', 'lucid-updates', 'lucid-security', 'lucid-proposed', 'lucid-backports', + 'maverick', 'maverick-updates', 'maverick-security', 'maverick-proposed', 'maverick-backports' ), 3 => array( 'main', 'restricted', 'preview', 'contrib', 'non-free', @@ -141,4 +145,4 @@ $language_data = array ( 'TAB_WIDTH' => 4 ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/asm.php b/inc/geshi/asm.php index d54e24023..2093d86b8 100644 --- a/inc/geshi/asm.php +++ b/inc/geshi/asm.php @@ -4,7 +4,7 @@ * ------- * Author: Tux (tux@inmail.cz) * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/07/27 * * x86 Assembler language file for GeSHi. @@ -99,9 +99,9 @@ $language_data = array ( 4 => array( '186','286','286c','286p','287','386','386c','386p','387','486','486p', '8086','8087','alpha','break','code','const','continue','cref','data','data?', - 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', + 'dosseg','else','elseif','endif','endw','equ','err','err1','err2','errb', 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', - 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', + 'errnz','exit','fardata','fardata?','global','if','lall','lfcond','list','listall', 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', 'startup','tfcond','type','until','untilcxz','while','xall','xcref', @@ -114,7 +114,7 @@ $language_data = array ( 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', 'page','popcontext','private','proc','proto','ptr','public','purge','pushcontext','record', - 'rept','seg','segment','short','size','sizeof','sizestr','struc','struct', + 'resb','resd','resw','rept','section','seg','segment','short','size','sizeof','sizestr','struc','struct', 'substr','subtitle','subttl','textequ','this','title','typedef','union','width', '.model', '.stack', '.code', '.data' ), @@ -222,4 +222,4 @@ $language_data = array ( ) ); -?> +?> \ No newline at end of file diff --git a/inc/geshi/asp.php b/inc/geshi/asp.php index 4a9d6c8e2..c011de960 100644 --- a/inc/geshi/asp.php +++ b/inc/geshi/asp.php @@ -4,7 +4,7 @@ * -------- * Author: Amit Gupta (http://blog.igeek.info/) * Copyright: (c) 2004 Amit Gupta (http://blog.igeek.info/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/13 * * ASP language file for GeSHi. diff --git a/inc/geshi/autoconf.php b/inc/geshi/autoconf.php index 0883f9f54..901125bdc 100644 --- a/inc/geshi/autoconf.php +++ b/inc/geshi/autoconf.php @@ -4,7 +4,7 @@ * ----- * Author: Mihai Vasilian (grayasm@gmail.com) * Copyright: (c) 2010 Mihai Vasilian - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2010/01/25 * * autoconf language file for GeSHi. diff --git a/inc/geshi/autohotkey.php b/inc/geshi/autohotkey.php index 6a3528334..c162f7ade 100644 --- a/inc/geshi/autohotkey.php +++ b/inc/geshi/autohotkey.php @@ -4,7 +4,7 @@ * -------- * Author: Naveen Garg (naveen.garg@gmail.com) * Copyright: (c) 2009 Naveen Garg and GeSHi - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/06/11 * * Autohotkey language file for GeSHi. diff --git a/inc/geshi/autoit.php b/inc/geshi/autoit.php index c8ef4404b..7f69d2bd5 100644 --- a/inc/geshi/autoit.php +++ b/inc/geshi/autoit.php @@ -4,7 +4,7 @@ * -------- * Author: big_daddy (robert.i.anthony@gmail.com) * Copyright: (c) 2006 and to GESHi ;) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/01/26 * * AutoIT language file for GeSHi. diff --git a/inc/geshi/avisynth.php b/inc/geshi/avisynth.php index f74f50c3a..949d0ecb6 100644 --- a/inc/geshi/avisynth.php +++ b/inc/geshi/avisynth.php @@ -4,7 +4,7 @@ * -------- * Author: Ryan Jones (sciguyryan@gmail.com) * Copyright: (c) 2008 Ryan Jones - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2008/10/08 * * AviSynth language file for GeSHi. diff --git a/inc/geshi/awk.php b/inc/geshi/awk.php index 5d540315c..a1ab68ef1 100644 --- a/inc/geshi/awk.php +++ b/inc/geshi/awk.php @@ -4,7 +4,7 @@ * ------- * Author: George Pollard (porges@porg.es) * Copyright: (c) 2009 George Pollard - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/01/28 * * Awk language file for GeSHi. diff --git a/inc/geshi/bascomavr.php b/inc/geshi/bascomavr.php new file mode 100644 index 000000000..8270fb26e --- /dev/null +++ b/inc/geshi/bascomavr.php @@ -0,0 +1,185 @@ + 'BASCOM AVR', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Navy Blue Bold Keywords + '1WRESET' , '1WREAD' , '1WWRITE' , '1WSEARCHFIRST' , '1WSEARCHNEXT' ,'1WVERIFY' , '1WIRECOUNT', + 'CONFIG' , 'ACI' , 'ADC' , 'BCCARD' , 'CLOCK' , 'COM1' , + 'COM2' , 'PS2EMU' , 'ATEMU' , 'I2CSLAVE' , + 'INPUT', 'OUTPUT', 'GRAPHLCD' , 'KEYBOARD' , 'TIMER0' , 'TIMER1' , + 'LCDBUS' , 'LCDMODE' , '1WIRE' , 'LCD' , 'SERIALOUT' , + 'SERIALIN' , 'SPI' , 'LCDPIN' , 'SDA' , 'SCL' , + 'WATCHDOG' , 'PORT' , 'COUNTER0', 'COUNTER1' , 'TCPIP' , 'TWISLAVE' , + 'X10' , 'XRAM' , 'USB', + 'BCD' , 'GRAY2BIN' , 'BIN2GRAY' , 'BIN' , 'MAKEBCD' , 'MAKEDEC' , 'MAKEINT' , 'FORMAT' , 'FUSING' , 'BINVAL' , + 'CRC8' , 'CRC16' , 'CRC16UNI' , 'CRC32' , 'HIGH' , 'HIGHW' , 'LOW', + 'DATE' , 'TIME' , 'DATE$' , 'TIME$' , 'DAYOFWEEK' , 'DAYOFYEAR' , 'SECOFDAY' , 'SECELAPSED' , 'SYSDAY' , 'SYSSEC' , 'SYSSECELAPSED', + 'WAIT' , 'WAITMS' , 'WAITUS' , 'DELAY', + 'BSAVE' , 'BLOAD' , 'GET' , 'VER' , 'DISKFREE' , 'DIR' , 'DriveReset' , 'DriveInit' , 'LINE' , 'INITFILESYSTEM' , + 'EOF' , 'WRITE' , 'FLUSH' , 'FREEFILE' , 'FILEATTR' , 'FILEDATE' , 'FILETIME' , 'FILEDATETIME' , 'FILELEN' , 'SEEK' , + 'KILL' , 'DriveGetIdentity' , 'DriveWriteSector' , 'DriveReadSector' , 'LOC' , 'LOF' , 'PUT' , 'OPEN' , 'CLOSE', + 'GLCDCMD' , 'GLCDDATA' , 'SETFONT' , 'PSET' , 'SHOWPIC' , 'SHOWPICE' , 'CIRCLE' , 'BOX', + 'I2CINIT' , 'I2CRECEIVE' , 'I2CSEND' , 'I2CSTART','I2CSTOP','I2CRBYTE','I2CWBYTE', + 'ALIAS' , 'BITWAIT' , 'TOGGLE' , 'RESET' , 'SET' , 'SHIFTIN' , 'SHIFTOUT' , 'DEBOUNCE' , 'PULSEIN' , 'PULSEOUT', + 'IDLE' , 'POWERDOWN' , 'POWERSAVE' , 'ON', 'INTERRUPT' , 'ENABLE' , 'DISABLE' , 'START' , 'VERSION' , 'CLOCKDIVISION' , 'CRYSTAL' , 'STOP', + 'ADR' , 'ADR2' , 'WRITEEEPROM' , 'CPEEK' , 'CPEEKH' , 'PEEK' , 'POKE' , 'OUT' , 'READEEPROM' , 'DATA' , 'INP' , 'READ' , 'RESTORE' , 'LOOKDOWN' , 'LOOKUP' , 'LOOKUPSTR' , 'LOAD' , 'LOADADR' , 'LOADLABEL' , 'LOADWORDADR' , 'MEMCOPY', + 'RC5SEND' , 'RC6SEND' , 'GETRC5' , 'SONYSEND', + 'BAUD' , 'BAUD1', 'BUFSPACE' , 'CLEAR', 'ECHO' , 'WAITKEY' , 'ISCHARWAITING' , 'INKEY' , 'INPUTBIN' , 'INPUTHEX' , 'PRINT', 'PRINT1','PRINT0', 'PRINTBIN' , 'SERIN' , 'SEROUT' , 'SPC' , 'MAKEMODBUS', + 'SPIIN' , 'SPIINIT' , 'SPIMOVE' , 'SPIOUT', 'SINGLE', + 'ASC' , 'UCASE' , 'LCASE' , 'TRIM' , 'SPLIT' , 'LTRIM' , 'INSTR' , 'SPACE' , 'RTRIM' , 'LEFT' , 'LEN' , 'MID' , 'RIGHT' , 'VAL' , 'STR' , 'CHR' , 'CHECKSUM' , 'HEX' , 'HEXVAL', + 'BASE64DEC' , 'BASE64ENC' , 'IP2STR' , 'UDPREAD' , 'UDPWRITE' , 'UDPWRITESTR' , 'TCPWRITE' , 'TCPWRITESTR' , 'TCPREAD' , 'GETDSTIP' , 'GETDSTPORT' , 'SOCKETSTAT' , 'SOCKETCONNECT' , 'SOCKETLISTEN' , 'GETSOCKET' , 'CLOSESOCKET' , + 'SETTCP' , 'GETTCPREGS' , 'SETTCPREGS' , 'SETIPPROTOCOL' , 'TCPCHECKSUM', + 'HOME' , 'CURSOR' , 'UPPERLINE' , 'THIRDLINE' , 'INITLCD' , 'LOWERLINE' , 'LCDAT' , 'FOURTHLINE' , 'DISPLAY' , 'LCDCONTRAST' , 'LOCATE' , 'SHIFTCURSOR' , 'DEFLCDCHAR' , 'SHIFTLCD' , 'CLS', + 'ACOS' , 'ASIN' , 'ATN' , 'ATN2' , 'EXP' , 'RAD2DEG' , 'FRAC' , 'TAN' , 'TANH' , 'COS' , 'COSH' , 'LOG' , 'LOG10' , 'ROUND' , 'ABS' , 'INT' , 'MAX' , 'MIN' , 'SQR' , 'SGN' , 'POWER' , 'SIN' , 'SINH' , 'FIX' , 'INCR' , 'DECR' , 'DEG2RAD', + 'DBG' , 'DEBUG', 'DTMFOUT' , 'ENCODER' , 'GETADC' , 'GETKBD' , 'GETATKBD' , 'GETRC' , 'VALUE' , 'POPALL' , 'PS2MOUSEXY' , 'PUSHALL' , + 'RETURN' , 'RND' , 'ROTATE' , 'SENDSCAN' , 'SENDSCANKBD' , 'SHIFT' , 'SOUND' , 'STCHECK' , 'SWAP' , 'VARPTR' , 'X10DETECT' , 'X10SEND' , 'READMAGCARD' , 'REM' , 'BITS' , 'BYVAL' , 'CALL' , 'READHITAG', + 'Buffered', 'Size', 'Dummy', 'Parity', 'None', 'Stopbits', 'Databits', 'Clockpol', 'Synchrone', 'Prescaler', 'Reference', 'int0', 'int1', 'Interrupts', + 'Auto', 'avcc', 'ack', 'nack', 'Pin', 'Db4', 'Db3', 'Db2', 'Db1', 'Db7', 'Db6', 'Db5', 'Db0', 'e', 'rs', 'twi', + ), + 2 => array( + // Red Lowercase Keywords + '$ASM' , '$BAUD' , '$BAUD1' , '$BGF' , '$BOOT' , '$CRYSTAL' , '$DATA' , '$DBG' , '$DEFAULT' , '$EEPLEAVE' , '$EEPROM' , + '$EEPROMHEX' , '$EXTERNAL' , '$HWSTACK' , '$INC' , '$INCLUDE' , '$INITMICRO' , '$LCD' , '$LCDRS' , '$LCDPUTCTRL' , + '$LCDPUTDATA' , '$LCDVFO' , '$LIB' , '$LOADER' , '$LOADERSIZE' , '$MAP' , '$NOCOMPILE' , '$NOINIT' , '$NORAMCLEAR' , + '$PROG' , '$PROGRAMMER' , '$REGFILE' , '$RESOURCE' , '$ROMSTART', '$SERIALINPUT', '$SERIALINPUT1' , '$SERIALINPUT2LCD' , + '$SERIALOUTPUT' , '$SERIALOUTPUT1' , '$SIM' , '$SWSTACK' , '$TIMEOUT' , '$TINY' , '$WAITSTATE' , '$XRAMSIZE' , '$XRAMSTART', '$XA', + '#IF' , '#ELSE' , '#ENDIF', '$framesize' + ), + 3 => array( + // Blue Lowercase Keywords + 'IF', 'THEN', 'ELSE', 'END', 'WHILE', 'WEND', 'DO', 'LOOP', 'SELECT', 'CASE', 'FOR', 'NEXT', + 'GOSUB' , 'GOTO' , 'LOCAL' , 'SUB' , 'DEFBIT', 'DEFBYTE', 'DEFINT', 'DEFWORD', 'DEFLNG', 'DEFSNG', 'DEFDBL', + 'CONST', 'DECLARE', 'FUNCTION', 'DIM', 'EXIT', 'LONG', 'INTEGER', 'BYTE', 'AS', 'STRING', 'WORD' + ), + 4 => array( + //light blue + 'PINA.0', 'PINA.1', 'PINA.2', 'PINA.3', 'PINA.4', 'PINA.5', 'PINA.6', 'PINA.7', + 'PINB.0', 'PINB.1', 'PINB.2', 'PINB.3', 'PINB.4', 'PINB.5', 'PINB.6', 'PINB.7', + 'PINC.0', 'PINC.1', 'PINC.2', 'PINC.3', 'PINC.4', 'PINC.5', 'PINC.6', 'PINC.7', + 'PIND.0', 'PIND.1', 'PIND.2', 'PIND.3', 'PIND.4', 'PIND.5', 'PIND.6', 'PIND.7', + 'PINE.0', 'PINE.1', 'PINE.2', 'PINE.3', 'PINE.4', 'PINE.5', 'PINE.6', 'PINE.7', + 'PINF.0', 'PINF.1', 'PINF.2', 'PINF.3', 'PINF.4', 'PINF.5', 'PINF.6', 'PINF.7', + + 'PORTA.0', 'PORTA.1', 'PORTA.2', 'PORTA.3', 'PORTA.4', 'PORTA.5', 'PORTA.6', 'PORTA.7', + 'PORTB.0', 'PORTB.1', 'PORTB.2', 'PORTB.3', 'PORTB.4', 'PORTB.5', 'PORTB.6', 'PORTB.7', + 'PORTC.0', 'PORTC.1', 'PORTC.2', 'PORTC.3', 'PORTC.4', 'PORTC.5', 'PORTC.6', 'PORTC.7', + 'PORTD.0', 'PORTD.1', 'PORTD.2', 'PORTD.3', 'PORTD.4', 'PORTD.5', 'PORTD.6', 'PORTD.7', + 'PORTE.0', 'PORTE.1', 'PORTE.2', 'PORTE.3', 'PORTE.4', 'PORTE.5', 'PORTE.6', 'PORTE.7', + 'PORTF.0', 'PORTF.1', 'PORTF.2', 'PORTF.3', 'PORTF.4', 'PORTF.5', 'PORTF.6', 'PORTF.7', + + 'DDRA.0', 'DDRA.1', 'DDRA.2', 'DDRA.3', 'DDRA.4', 'DDRA.5', 'DDRA.6', 'DDRA.7', + 'DDRB.0', 'DDRB.1', 'DDRB.2', 'DDRB.3', 'DDRB.4', 'DDRB.5', 'DDRB.6', 'DDRB.7', + 'DDRC.0', 'DDRC.1', 'DDRC.2', 'DDRC.3', 'DDRC.4', 'DDRC.5', 'DDRC.6', 'DDRC.7', + 'DDRD.0', 'DDRD.1', 'DDRD.2', 'DDRD.3', 'DDRD.4', 'DDRD.5', 'DDRD.6', 'DDRD.7', + 'DDRE.0', 'DDRE.1', 'DDRE.2', 'DDRE.3', 'DDRE.4', 'DDRE.5', 'DDRE.6', 'DDRE.7', + 'DDRF.0', 'DDRF.1', 'DDRF.2', 'DDRF.3', 'DDRF.4', 'DDRF.5', 'DDRF.6', 'DDRF.7', + + 'DDRA','DDRB','DDRC','DDRD','DDRE','DDRF', + 'PORTA','PORTB','PORTC','PORTD','PORTE','PORTF', + 'PINA','PINB','PINC','PIND','PINE','PINF', + ) + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', ';', ':', '$', '&H' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;', + 4 => 'color: #0080FF;', + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/inc/geshi/bash.php b/inc/geshi/bash.php index dad391c8a..8edb3f30e 100644 --- a/inc/geshi/bash.php +++ b/inc/geshi/bash.php @@ -4,7 +4,7 @@ * -------- * Author: Andreas Gohr (andi@splitbrain.org) * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/08/20 * * BASH language file for GeSHi. @@ -65,7 +65,10 @@ $language_data = array ( //BASH-style Heredoc 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', //Escaped String Starters - 3 => "/\\\\['\"]/siU" + 3 => "/\\\\['\"]/siU", + // Single-Line Shell usage: Hide the prompt at the beginning + /* 4 => "/\A(?!#!)\s*(?>[\w:@\\/\\-\\._~]*[$#]\s?)?(?=[^\n]+\n?\Z)|^(?!#!)(\w+@)?[\w\\-\\.]+(:~?)[\w\\/\\-\\._]*?[$#]\s?/ms" */ + 4 => "/\A(?!#!)(?:(?>[\w:@\\/\\-\\._~]*)[$#]\s?)(?=(?>[^\n]+)\n?\Z)|^(?!#!)(?:\w+@)?(?>[\w\\-\\.]+)(?>:~?[\w\\/\\-\\._]*?)?[$#]\s?/sm" ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), @@ -90,10 +93,44 @@ $language_data = array ( 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' ), 2 => array( - 'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos', - 'apt-cache', 'apt-file', 'apt-get', 'apt-key', 'apt-src', 'aptitude', - 'ar', 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', - 'autoheader', 'automake', 'awk', + 'aclocal', 'aconnect', 'apachectl', 'apache2ctl', 'aplay', 'apm', + 'apmsleep', 'apropos', 'apt-cache', 'apt-cdrom', 'apt-config', + 'apt-file', 'apt-ftparchive', 'apt-get', 'apt-key', 'apt-listbugs', + 'apt-listchanges', 'apt-mark', 'apt-mirror', 'apt-sortpkgs', + 'apt-src', 'apticron', 'aptitude', 'aptsh', 'apxs', 'apxs2', 'ar', + 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', 'autoheader', + 'automake', 'awk', + + 'apachectl start', 'apachectl stop', 'apachectl restart', + 'apachectl graceful', 'apachectl graceful-stop', + 'apachectl configtest', 'apachectl status', 'apachectl fullstatus', + 'apachectl help', 'apache2ctl start', 'apache2ctl stop', + 'apache2ctl restart', 'apache2ctl graceful', + 'apache2ctl graceful-stop', 'apache2ctl configtest', + 'apache2ctl status', 'apache2ctl fullstatus', 'apache2ctl help', + + 'apt-cache add', 'apt-cache depends', 'apt-cache dotty', + 'apt-cache dump', 'apt-cache dumpavail', 'apt-cache gencaches', + 'apt-cache pkgnames', 'apt-cache policy', 'apt-cache rdepends', + 'apt-cache search', 'apt-cache show', 'apt-cache showauto', + 'apt-cache showpkg', 'apt-cache showsrc', 'apt-cache stats', + 'apt-cache unmet', 'apt-cache xvcg', 'apt-cdrom add', + 'apt-cdrom ident', 'apt-config dump', 'apt-config shell', + 'apt-file find', 'apt-file list', 'apt-file purge', + 'apt-file search', 'apt-file shot', 'apt-file update', + 'apt-get autoclean', 'apt-get autoremove', 'apt-get build-dep', + 'apt-get check', 'apt-get clean', 'apt-get dist-upgrade', + 'apt-get dselect-upgrade', 'apt-get install', 'apt-get markauto', + 'apt-get purge', 'apt-get remove', 'apt-get source', + 'apt-get unmarkauto', 'apt-get update', 'apt-get upgrade', + 'apt-key add', 'apt-key adv', 'apt-key del', 'apt-key export', + 'apt-key exportall', 'apt-key finger', 'apt-key list', + 'apt-key net-update', 'apt-key update', 'apt-listbugs apt', + 'apt-listbugs list', 'apt-listbugs rss', 'apt-src build', + 'apt-src clean', 'apt-src import', 'apt-src install', + 'apt-src list', 'apt-src location', 'apt-src name', + 'apt-src remove', 'apt-src update', 'apt-src upgrade', + 'apt-src version', 'basename', 'bash', 'bc', 'bison', 'bunzip2', 'bzcat', 'bzcmp', 'bzdiff', 'bzegrep', 'bzfgrep', 'bzgrep', @@ -104,6 +141,14 @@ $language_data = array ( 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', 'col', 'cp', 'cpio', 'cpp', 'csh', 'cut', 'cvs', 'cvs-pserver', + 'cvs add', 'cvs admin', 'cvs annotate', 'cvs checkout', + 'cvs commit', 'cvs diff', 'cvs edit', 'cvs editors', 'cvs export', + 'cvs history', 'cvs import', 'cvs init', 'cvs log', 'cvs login', + 'cvs logout', 'cvs ls', 'cvs pserver', 'cvs rannotate', + 'cvs rdiff', 'cvs release', 'cvs remove', 'cvs rlog', 'cvs rls', + 'cvs rtag', 'cvs server', 'cvs status', 'cvs tag', 'cvs unedit', + 'cvs update', 'cvs version', 'cvs watch', 'cvs watchers', + 'dash', 'date', 'dc', 'dch', 'dcop', 'dd', 'ddate', 'ddd', 'deallocvt', 'debconf', 'defoma', 'depmod', 'df', 'dh', 'dialog', 'diff', 'diff3', 'dig', 'dir', 'dircolors', 'directomatic', @@ -120,7 +165,47 @@ $language_data = array ( 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', 'gzexe', 'gzip', - 'git', 'gitaction', 'git-add', 'git-add--interactive', 'git-am', + 'git', 'git add', 'git add--interactive', 'git am', 'git annotate', + 'git apply', 'git archive', 'git bisect', 'git bisect--helper', + 'git blame', 'git branch', 'git bundle', 'git cat-file', + 'git check-attr', 'git checkout', 'git checkout-index', + 'git check-ref-format', 'git cherry', 'git cherry-pick', + 'git clean', 'git clone', 'git commit', 'git commit-tree', + 'git config', 'git count-objects', 'git daemon', 'git describe', + 'git diff', 'git diff-files', 'git diff-index', 'git difftool', + 'git difftool--helper', 'git diff-tree', 'git fast-export', + 'git fast-import', 'git fetch', 'git fetch-pack', + 'git filter-branch', 'git fmt-merge-msg', 'git for-each-ref', + 'git format-patch', 'git fsck', 'git fsck-objects', 'git gc', + 'git get-tar-commit-id', 'git grep', 'git hash-object', 'git help', + 'git http-backend', 'git http-fetch', 'git http-push', + 'git imap-send', 'git index-pack', 'git init', 'git init-db', + 'git instaweb', 'git log', 'git lost-found', 'git ls-files', + 'git ls-remote', 'git ls-tree', 'git mailinfo', 'git mailsplit', + 'git merge', 'git merge-base', 'git merge-file', 'git merge-index', + 'git merge-octopus', 'git merge-one-file', 'git merge-ours', + 'git merge-recursive', 'git merge-resolve', 'git merge-subtree', + 'git mergetool', 'git merge-tree', 'git mktag', 'git mktree', + 'git mv', 'git name-rev', 'git notes', 'git pack-objects', + 'git pack-redundant', 'git pack-refs', 'git patch-id', + 'git peek-remote', 'git prune', 'git prune-packed', 'git pull', + 'git push', 'git quiltimport', 'git read-tree', 'git rebase', + 'git rebase--interactive', 'git receive-pack', 'git reflog', + 'git relink', 'git remote', 'git remote-ftp', 'git remote-ftps', + 'git remote-http', 'git remote-https', 'git remote-testgit', + 'git repack', 'git replace', 'git repo-config', 'git request-pull', + 'git rerere', 'git reset', 'git revert', 'git rev-list', + 'git rev-parse', 'git rm', 'git send-pack', 'git shell', + 'git shortlog', 'git show', 'git show-branch', 'git show-index', + 'git show-ref', 'git stage', 'git stash', 'git status', + 'git stripspace', 'git submodule', 'git symbolic-ref', 'git tag', + 'git tar-tree', 'git unpack-file', 'git unpack-objects', + 'git update-index', 'git update-ref', 'git update-server-info', + 'git upload-archive', 'git upload-pack', 'git var', + 'git verify-pack', 'git verify-tag', 'git web--browse', + 'git whatchanged', 'git write-tree', + + 'gitaction', 'git-add', 'git-add--interactive', 'git-am', 'git-annotate', 'git-apply', 'git-archive', 'git-bisect', 'git-bisect--helper', 'git-blame', 'git-branch', 'git-bundle', 'git-cat-file', 'git-check-attr', 'git-checkout', @@ -166,6 +251,9 @@ $language_data = array ( 'id', 'ifconfig', 'ifdown', 'ifup', 'igawk', 'install', + 'ip', 'ip addr', 'ip addrlabel', 'ip link', 'ip maddr', 'ip mroute', + 'ip neigh', 'ip route', 'ip rule', 'ip tunnel', 'ip xfrm', + 'join', 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', @@ -200,6 +288,20 @@ $language_data = array ( 'svnadmin', 'svndumpfilter', 'svnlook', 'svnmerge', 'svnmucc', 'svnserve', 'svnshell', 'svnsync', 'svnversion', 'svnwrap', 'sync', + 'svn add', 'svn ann', 'svn annotate', 'svn blame', 'svn cat', + 'svn changelist', 'svn checkout', 'svn ci', 'svn cl', 'svn cleanup', + 'svn co', 'svn commit', 'svn copy', 'svn cp', 'svn del', + 'svn delete', 'svn di', 'svn diff', 'svn export', 'svn h', + 'svn help', 'svn import', 'svn info', 'svn list', 'svn lock', + 'svn log', 'svn ls', 'svn merge', 'svn mergeinfo', 'svn mkdir', + 'svn move', 'svn mv', 'svn pd', 'svn pdel', 'svn pe', 'svn pedit', + 'svn pg', 'svn pget', 'svn pl', 'svn plist', 'svn praise', + 'svn propdel', 'svn propedit', 'svn propget', 'svn proplist', + 'svn propset', 'svn ps', 'svn pset', 'svn remove', 'svn ren', + 'svn rename', 'svn resolve', 'svn resolved', 'svn revert', 'svn rm', + 'svn st', 'svn stat', 'svn status', 'svn sw', 'svn switch', + 'svn unlock', 'svn up', 'svn update', + 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'tree', 'true', @@ -216,7 +318,14 @@ $language_data = array ( 'xargs', 'xhost', 'xmodmap', 'xset', - 'yacc', 'yes', 'ypdomainname', + 'yacc', 'yes', 'ypdomainname', 'yum', + + 'yum check-update', 'yum clean', 'yum deplist', 'yum erase', + 'yum groupinfo', 'yum groupinstall', 'yum grouplist', + 'yum groupremove', 'yum groupupdate', 'yum info', 'yum install', + 'yum list', 'yum localinstall', 'yum localupdate', 'yum makecache', + 'yum provides', 'yum remove', 'yum resolvedep', 'yum search', + 'yum shell', 'yum update', 'yum upgrade', 'yum whatprovides', 'zcat', 'zcmp', 'zdiff', 'zdump', 'zegrep', 'zfgrep', 'zforce', 'zgrep', 'zip', 'zipgrep', 'zipinfo', 'zless', 'zmore', 'znew', @@ -252,7 +361,8 @@ $language_data = array ( 0 => 'color: #666666; font-style: italic;', 1 => 'color: #800000;', 2 => 'color: #cc0000; font-style: italic;', - 3 => 'color: #000000; font-weight: bold;' + 3 => 'color: #000000; font-weight: bold;', + 4 => 'color: #666666;' ), 'ESCAPE_CHAR' => array( 1 => 'color: #000099; font-weight: bold;', @@ -318,10 +428,13 @@ $language_data = array ( 'DISALLOWED_BEFORE' => '$' ), 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%=\\/])" + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%=\\/:])", + 2 => array( + 'SPACE_AS_WHITESPACE' => false + ) + ) ) - ) ); ?> \ No newline at end of file diff --git a/inc/geshi/basic4gl.php b/inc/geshi/basic4gl.php index 7ac869304..ce409e8a4 100644 --- a/inc/geshi/basic4gl.php +++ b/inc/geshi/basic4gl.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Matthew Webb (bmatthew1@blueyonder.co.uk) * Copyright: (c) 2004 Matthew Webb (http://matthew-4gl.wikispaces.com) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/09/15 * * Basic4GL language file for GeSHi. diff --git a/inc/geshi/bf.php b/inc/geshi/bf.php index ba44e6caf..0529ec3c5 100644 --- a/inc/geshi/bf.php +++ b/inc/geshi/bf.php @@ -4,7 +4,7 @@ * ---------- * Author: Benny Baumann (BenBE@geshi.org) * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/10/31 * * Brainfuck language file for GeSHi. diff --git a/inc/geshi/bibtex.php b/inc/geshi/bibtex.php index e47e0665c..13685608b 100644 --- a/inc/geshi/bibtex.php +++ b/inc/geshi/bibtex.php @@ -4,7 +4,7 @@ * ----- * Author: Quinn Taylor (quinntaylor@mac.com) * Copyright: (c) 2009 Quinn Taylor (quinntaylor@mac.com), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2009/04/29 * * BibTeX language file for GeSHi. diff --git a/inc/geshi/blitzbasic.php b/inc/geshi/blitzbasic.php index e43ec4635..15f24fdbe 100644 --- a/inc/geshi/blitzbasic.php +++ b/inc/geshi/blitzbasic.php @@ -4,7 +4,7 @@ * -------------- * Author: P�draig O`Connel (info@moonsword.info) * Copyright: (c) 2005 P�draig O`Connel (http://moonsword.info) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 16.10.2005 * * BlitzBasic language file for GeSHi. diff --git a/inc/geshi/bnf.php b/inc/geshi/bnf.php index f52df9cb8..7cec792a9 100644 --- a/inc/geshi/bnf.php +++ b/inc/geshi/bnf.php @@ -4,7 +4,7 @@ * -------- * Author: Rowan Rodrik van der Molen (rowan@bigsmoke.us) * Copyright: (c) 2006 Rowan Rodrik van der Molen (http://www.bigsmoke.us/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2006/09/28 * * BNF (Backus-Naur form) language file for GeSHi. diff --git a/inc/geshi/boo.php b/inc/geshi/boo.php index 09d4ee40e..f56afee5f 100644 --- a/inc/geshi/boo.php +++ b/inc/geshi/boo.php @@ -4,7 +4,7 @@ * -------- * Author: Marcus Griep (neoeinstein+GeSHi@gmail.com) * Copyright: (c) 2007 Marcus Griep (http://www.xpdm.us) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2007/09/10 * * Boo language file for GeSHi. diff --git a/inc/geshi/c.php b/inc/geshi/c.php index b0e2987d7..7db6d3d50 100644 --- a/inc/geshi/c.php +++ b/inc/geshi/c.php @@ -7,7 +7,7 @@ * - Jack Lloyd (lloyd@randombit.net) * - Michael Mol (mikemol@gmail.com) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - * Release Version: 1.0.8.8 + * Release Version: 1.0.8.10 * Date Started: 2004/06/04 * * C language file for GeSHi. @@ -92,7 +92,85 @@ $language_data = array ( 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' ), 3 => array( - 'printf', 'cout' + // assert.h + 'assert', + + //complex.h + 'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan', + 'catanh', 'ccos', 'ccosh', 'cexp', 'cimag', 'cis', 'clog', 'conj', + 'cpow', 'cproj', 'creal', 'csin', 'csinh', 'csqrt', 'ctan', 'ctanh', + + //ctype.h + 'digittoint', 'isalnum', 'isalpha', 'isascii', 'isblank', 'iscntrl', + 'isdigit', 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace', + 'isupper', 'isxdigit', 'toascii', 'tolower', 'toupper', + + //inttypes.h + 'imaxabs', 'imaxdiv', 'strtoimax', 'strtoumax', 'wcstoimax', + 'wcstoumax', + + //locale.h + 'localeconv', 'setlocale', + + //math.h + 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp', + 'fabs', 'floor', 'frexp', 'ldexp', 'log', 'log10', 'modf', 'pow', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', + + //setjmp.h + 'longjmp', 'setjmp', + + //signal.h + 'raise', + + //stdarg.h + 'va_arg', 'va_copy', 'va_end', 'va_start', + + //stddef.h + 'offsetof', + + //stdio.h + 'clearerr', 'fclose', 'fdopen', 'feof', 'ferror', 'fflush', 'fgetc', + 'fgetpos', 'fgets', 'fopen', 'fprintf', 'fputc', 'fputchar', + 'fputs', 'fread', 'freopen', 'fscanf', 'fseek', 'fsetpos', 'ftell', + 'fwrite', 'getc', 'getch', 'getchar', 'gets', 'perror', 'printf', + 'putc', 'putchar', 'puts', 'remove', 'rename', 'rewind', 'scanf', + 'setbuf', 'setvbuf', 'snprintf', 'sprintf', 'sscanf', 'tmpfile', + 'tmpnam', 'ungetc', 'vfprintf', 'vfscanf', 'vprintf', 'vscanf', + 'vsprintf', 'vsscanf', + + //stdlib.h + 'abort', 'abs', 'atexit', 'atof', 'atoi', 'atol', 'bsearch', + 'calloc', 'div', 'exit', 'free', 'getenv', 'itoa', 'labs', 'ldiv', + 'ltoa', 'malloc', 'qsort', 'rand', 'realloc', 'srand', 'strtod', + 'strtol', 'strtoul', 'system', + + //string.h + 'memchr', 'memcmp', 'memcpy', 'memmove', 'memset', 'strcat', + 'strchr', 'strcmp', 'strcoll', 'strcpy', 'strcspn', 'strerror', + 'strlen', 'strncat', 'strncmp', 'strncpy', 'strpbrk', 'strrchr', + 'strspn', 'strstr', 'strtok', 'strxfrm', + + //time.h + 'asctime', 'clock', 'ctime', 'difftime', 'gmtime', 'localtime', + 'mktime', 'strftime', 'time', + + //wchar.h + 'btowc', 'fgetwc', 'fgetws', 'fputwc', 'fputws', 'fwide', + 'fwprintf', 'fwscanf', 'getwc', 'getwchar', 'mbrlen', 'mbrtowc', + 'mbsinit', 'mbsrtowcs', 'putwc', 'putwchar', 'swprintf', 'swscanf', + 'ungetwc', 'vfwprintf', 'vswprintf', 'vwprintf', 'wcrtomb', + 'wcscat', 'wcschr', 'wcscmp', 'wcscoll', 'wcscpy', 'wcscspn', + 'wcsftime', 'wcslen', 'wcsncat', 'wcsncmp', 'wcsncpy', 'wcspbrk', + 'wcsrchr', 'wcsrtombs', 'wcsspn', 'wcsstr', 'wcstod', 'wcstok', + 'wcstol', 'wcstoul', 'wcsxfrm', 'wctob', 'wmemchr', 'wmemcmp', + 'wmemcpy', 'wmemmove', 'wmemset', 'wprintf', 'wscanf', + + //wctype.h + 'iswalnum', 'iswalpha', 'iswcntrl', 'iswctype', 'iswdigit', + 'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace', + 'iswupper', 'iswxdigit', 'towctrans', 'towlower', 'towupper', + 'wctrans', 'wctype' ), 4 => array( 'auto', 'char', 'const', 'double', 'float', 'int', 'long', @@ -111,7 +189,8 @@ $language_data = array ( 'int8_t', 'int16_t', 'int32_t', 'int64_t', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t', + 'size_t', 'off_t' ), ), 'SYMBOLS' => array( diff --git a/inc/geshi/c_loadrunner.php b/inc/geshi/c_loadrunner.php new file mode 100644 index 000000000..4e5429cda --- /dev/null +++ b/inc/geshi/c_loadrunner.php @@ -0,0 +1,323 @@ + 'C (LoadRunner)', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + // Escape characters within strings (like \\) are not highlighted differently in LoadRunner, so + // I am using GeSHi escape characters (or regular expressions) to highlight LoadRunner {parameters}. + // LoadRunner {parameters} must begin with a letter and contain only alphanumeric characters and '_' + 'ESCAPE_REGEXP' => array( + 0 => "#\{[a-zA-Z]{1}[a-zA-Z_]{0,}\}#", + ), + + // Keywords + 'KEYWORDS' => array( + // Keywords from http://en.wikipedia.org/wiki/C_syntax + 1 => array( + 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', + 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', + 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return', + 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', + '_Bool', '_Complex', '_Imaginary' + ), + // C preprocessor directives from http://en.wikipedia.org/wiki/C_preprocessor + 2 => array( + '#define', '#if', '#ifdef', '#ifndef', '#include', '#else', '#elif', '#endif', '#pragma', '#undef' + ), + // Functions from lrun.h + 3 => array( + 'lr_start_transaction', 'lr_start_sub_transaction', 'lr_start_transaction_instance', 'lr_end_transaction', + 'lr_end_sub_transaction', 'lr_end_transaction_instance', 'lr_stop_transaction', 'lr_stop_transaction_instance', + 'lr_resume_transaction', 'lr_resume_transaction_instance', 'lr_wasted_time', 'lr_set_transaction', 'lr_user_data_point', + 'lr_user_data_point_instance', 'lr_user_data_point_ex', 'lr_user_data_point_instance_ex', 'lr_get_transaction_duration', + 'lr_get_trans_instance_duration', 'lr_get_transaction_think_time', 'lr_get_trans_instance_think_time', + 'lr_get_transaction_wasted_time', 'lr_get_trans_instance_wasted_time', 'lr_get_transaction_status', + 'lr_get_trans_instance_status', 'lr_set_transaction_status', 'lr_set_transaction_status_by_name', + 'lr_set_transaction_instance_status', 'lr_start_timer', 'lr_end_timer', 'lr_rendezvous', 'lr_rendezvous_ex', + 'lr_get_vuser_ip', 'lr_whoami', 'lr_get_host_name', 'lr_get_master_host_name', 'lr_get_attrib_long', + 'lr_get_attrib_string', 'lr_get_attrib_double', 'lr_paramarr_idx', 'lr_paramarr_random', 'lr_paramarr_len', + 'lr_param_unique', 'lr_param_sprintf', 'lr_load_dll', 'lr_continue_on_error', 'lr_decrypt', 'lr_abort', 'lr_exit', + 'lr_peek_events', 'lr_think_time', 'lr_debug_message', 'lr_log_message', 'lr_message', 'lr_error_message', + 'lr_output_message', 'lr_vuser_status_message', 'lr_fail_trans_with_error', 'lr_next_row', 'lr_advance_param', + 'lr_eval_string', 'lr_eval_string_ext', 'lr_eval_string_ext_free', 'lr_param_increment', 'lr_save_var', + 'lr_save_string', 'lr_save_int', 'lr_save_datetime', 'lr_save_searched_string', 'lr_set_debug_message', + 'lr_get_debug_message', 'lr_enable_ip_spoofing', 'lr_disable_ip_spoofing', 'lr_convert_string_encoding' + ), + // Constants from lrun.h + 4 => array( + 'DP_FLAGS_NO_LOG', 'DP_FLAGS_STANDARD_LOG', 'DP_FLAGS_EXTENDED_LOG', 'merc_timer_handle_t', 'LR_EXIT_VUSER', + 'LR_EXIT_ACTION_AND_CONTINUE', 'LR_EXIT_ITERATION_AND_CONTINUE', 'LR_EXIT_VUSER_AFTER_ITERATION', + 'LR_EXIT_VUSER_AFTER_ACTION', 'LR_EXIT_MAIN_ITERATION_AND_CONTINUE', 'LR_MSG_CLASS_DISABLE_LOG', + 'LR_MSG_CLASS_STANDARD_LOG', 'LR_MSG_CLASS_RETURNED_DATA', 'LR_MSG_CLASS_PARAMETERS', 'LR_MSG_CLASS_ADVANCED_TRACE', + 'LR_MSG_CLASS_EXTENDED_LOG', 'LR_MSG_CLASS_SENT_DATA', 'LR_MSG_CLASS_JIT_LOG_ON_ERROR', 'LR_SWITCH_OFF', 'LR_SWITCH_ON', + 'LR_SWITCH_DEFAULT', 'ONE_DAY', 'ONE_HOUR', 'ONE_MIN', 'DATE_NOW', 'TIME_NOW', 'LR_MSG_CLASS_BRIEF_LOG', + 'LR_MSG_CLASS_RESULT_DATA', 'LR_MSG_CLASS_FULL_TRACE', 'LR_MSG_CLASS_AUTO_LOG', 'LR_MSG_OFF', 'LR_MSG_ON', + 'LR_MSG_DEFAULT' + ), + // Functions from web_api.h + 5 => array( + 'web_reg_add_cookie', 'web_report_data_point', 'web_text_link', 'web_element', 'web_image_link', 'web_static_image', + 'web_image_submit', 'web_button', 'web_edit_field', 'web_radio_group', 'web_check_box', 'web_list', 'web_text_area', + 'web_map_area', 'web_eval_java_script', 'web_reg_dialog', 'web_reg_cross_step_download', 'web_browser', + 'web_set_rts_key', 'web_save_param_length', 'web_save_timestamp_param', 'web_load_cache', 'web_dump_cache', + 'web_add_cookie_ex' + ), + // Constants from web_api.h + 6 => array( + 'DESCRIPTION', 'ACTION', 'VERIFICATION', 'LR_NOT_FOUND', 'HTTP_INFO_TOTAL_REQUEST_STAT', + 'HTTP_INFO_TOTAL_RESPONSE_STAT', 'LRW_OPT_STOP_VUSER_ON_ERROR', 'LRW_OPT_DISPLAY_IMAGE_BODY' + ), + // Functions from as_web.h + 7 => array( + 'web_add_filter', 'web_add_auto_filter', 'web_add_auto_header', 'web_add_header', 'web_add_cookie', + 'web_cleanup_auto_headers', 'web_cleanup_cookies', 'web_concurrent_end', 'web_concurrent_start', 'web_create_html_param', + 'web_create_html_param_ex', 'web_custom_request', 'web_disable_keep_alive', 'web_enable_keep_alive', 'web_find', + 'web_get_int_property', 'web_image', 'web_image_check', 'web_link', 'web_global_verification', 'web_reg_find', + 'web_reg_save_param', 'web_convert_param', 'web_remove_auto_filter', 'web_remove_auto_header', 'web_revert_auto_header', + 'web_remove_cookie', 'web_save_header', 'web_set_certificate', 'web_set_certificate_ex', 'web_set_connections_limit', + 'web_set_max_html_param_len', 'web_set_max_retries', 'web_set_proxy', 'web_set_proxy_bypass', 'web_set_secure_proxy', + 'web_set_sockets_option', 'web_set_option', 'web_set_timeout', 'web_set_user', 'web_sjis_to_euc_param', + 'web_submit_data', 'web_submit_form', 'web_url', 'web_set_proxy_bypass_local', 'web_cache_cleanup', + 'web_create_html_query', 'web_create_radio_button_param', 'web_switch_net_layer' + ), + // Constants from as_web.h + 8 => array( + 'ENDFORM', 'LAST', 'ENDITEM', 'EXTRARES', 'ITEMDATA', 'STARTHIDDENS', 'ENDHIDDENS', 'CONNECT', 'RECEIVE', 'RESOLVE', + 'STEP', 'REQUEST', 'RESPONSE', 'STARTQUERY', 'ENDQUERY', 'INPROPS', 'OUTPROPS', 'ENDPROPS', 'RAW_BODY_START', + 'RAW_BODY_END', 'HTTP_INFO_RETURN_CODE', 'HTTP_INFO_DOWNLOAD_SIZE', 'HTTP_INFO_DOWNLOAD_TIME', + 'LRW_NET_SOCKET_OPT_LOAD_VERIFY_FILE', 'LRW_NET_SOCKET_OPT_DEFAULT_VERIFY_PATH', 'LRW_NET_SOCKET_OPT_SSL_VERSION', + 'LRW_NET_SOCKET_OPT_SSL_CIPHER_LIST', 'LRW_NET_SOCKET_OPT_SO_REUSE_ADDRESS', 'LRW_NET_SOCKET_OPT_USER_IP_ADDRESS', + 'LRW_NET_SOCKET_OPT_IP_ADDRESS_BY_INDEX', 'LRW_NET_SOCKET_OPT_HELP', 'LRW_NET_SOCKET_OPT_PRINT_USER_IP_ADDRESS_LIST', + 'LRW_OPT_HTML_CHAR_REF_BACKWARD_COMPATIBILITY', 'LRW_OPT_VALUE_YES', 'LRW_OPT_VALUE_NO' + ), + // Functions from as_sapgui.h + 9 => array( + 'sapgui_open_connection', 'sapgui_open_connection_ex', 'sapgui_logon', 'sapgui_create_session', + 'sapgui_create_new_session', 'sapgui_call_method', 'sapgui_call_method_ex', 'sapgui_set_property', + 'sapgui_get_property', 'sapgui_set_collection_property', 'sapgui_active_object_from_parent_method', + 'sapgui_active_object_from_parent_property', 'sapgui_call_method_of_active_object', + 'sapgui_call_method_of_active_object_ex', 'sapgui_set_property_of_active_object', 'sapgui_get_property_of_active_object', + 'sapgui_select_active_connection', 'sapgui_select_active_session', 'sapgui_select_active_window ', + 'sapgui_status_bar_get_text', 'sapgui_status_bar_get_param', 'sapgui_status_bar_get_type', 'sapgui_get_status_bar_text', + 'sapgui_get_active_window_title', 'sapgui_is_object_available', 'sapgui_is_tab_selected', 'sapgui_is_object_changeable', + 'sapgui_set_ok_code', 'sapgui_send_vkey', 'sapgui_resize_window', 'sapgui_window_resize', 'sapgui_window_maximize', + 'sapgui_window_close', 'sapgui_window_restore', 'sapgui_window_scroll_to_row', 'sapgui_press_button', + 'sapgui_select_radio_button', 'sapgui_set_password', 'sapgui_set_text', 'sapgui_select_menu', 'sapgui_select_tab', + 'sapgui_set_checkbox', 'sapgui_set_focus', 'sapgui_select_combobox_entry', 'sapgui_get_ok_code', + 'sapgui_is_radio_button_selected', 'sapgui_get_text', 'sapgui_is_checkbox_selected', 'sapgui_table_set_focus', + 'sapgui_table_press_button', 'sapgui_table_select_radio_button', 'sapgui_table_set_password', 'sapgui_table_set_text', + 'sapgui_table_set_checkbox', 'sapgui_table_select_combobox_entry', 'sapgui_table_set_row_selected', + 'sapgui_table_set_column_selected', 'sapgui_table_set_column_width', 'sapgui_table_reorder', 'sapgui_table_fill_data', + 'sapgui_table_get_text', 'sapgui_table_is_radio_button_selected', 'sapgui_table_is_checkbox_selected', + 'sapgui_table_is_row_selected', 'sapgui_table_is_column_selected', 'sapgui_table_get_column_width', + 'sapgui_grid_clear_selection', 'sapgui_grid_select_all', 'sapgui_grid_selection_changed', + 'sapgui_grid_press_column_header', 'sapgui_grid_select_cell', 'sapgui_grid_select_rows', 'sapgui_grid_select_column', + 'sapgui_grid_deselect_column', 'sapgui_grid_select_columns', 'sapgui_grid_select_cells', 'sapgui_grid_select_cell_row', + 'sapgui_grid_select_cell_column', 'sapgui_grid_set_column_order', 'sapgui_grid_set_column_width', + 'sapgui_grid_scroll_to_row', 'sapgui_grid_double_click', 'sapgui_grid_click', 'sapgui_grid_press_button', + 'sapgui_grid_press_total_row', 'sapgui_grid_set_cell_data', 'sapgui_grid_set_checkbox', + 'sapgui_grid_double_click_current_cell', 'sapgui_grid_click_current_cell', 'sapgui_grid_press_button_current_cell', + 'sapgui_grid_press_total_row_current_cell', 'sapgui_grid_press_F1', 'sapgui_grid_press_F4', 'sapgui_grid_press_ENTER', + 'sapgui_grid_press_toolbar_button', 'sapgui_grid_press_toolbar_context_button', 'sapgui_grid_open_context_menu', + 'sapgui_grid_select_context_menu', 'sapgui_grid_select_toolbar_menu', 'sapgui_grid_fill_data', + 'sapgui_grid_get_current_cell_row', 'sapgui_grid_get_current_cell_column', 'sapgui_grid_get_rows_count', + 'sapgui_grid_get_columns_count', 'sapgui_grid_get_cell_data', 'sapgui_grid_is_checkbox_selected', + 'sapgui_tree_scroll_to_node', 'sapgui_tree_set_hierarchy_header_width', 'sapgui_tree_set_selected_node', + 'sapgui_tree_double_click_node', 'sapgui_tree_press_key', 'sapgui_tree_press_button', 'sapgui_tree_set_checkbox', + 'sapgui_tree_double_click_item', 'sapgui_tree_click_link', 'sapgui_tree_open_default_context_menu', + 'sapgui_tree_open_node_context_menu', 'sapgui_tree_open_header_context_menu', 'sapgui_tree_open_item_context_menu', + 'sapgui_tree_select_context_menu', 'sapgui_tree_select_item', 'sapgui_tree_select_node', 'sapgui_tree_unselect_node', + 'sapgui_tree_unselect_all', 'sapgui_tree_select_column', 'sapgui_tree_unselect_column', 'sapgui_tree_set_column_order', + 'sapgui_tree_collapse_node', 'sapgui_tree_expand_node', 'sapgui_tree_scroll_to_item', 'sapgui_tree_set_column_width', + 'sapgui_tree_press_header', 'sapgui_tree_is_checkbox_selected', 'sapgui_tree_get_node_text', 'sapgui_tree_get_item_text', + 'sapgui_calendar_scroll_to_date', 'sapgui_calendar_focus_date', 'sapgui_calendar_select_interval', + 'sapgui_apogrid_select_all', 'sapgui_apogrid_clear_selection', 'sapgui_apogrid_select_cell', + 'sapgui_apogrid_deselect_cell', 'sapgui_apogrid_select_row', 'sapgui_apogrid_deselect_row', + 'sapgui_apogrid_select_column', 'sapgui_apogrid_deselect_column', 'sapgui_apogrid_scroll_to_row', + 'sapgui_apogrid_scroll_to_column', 'sapgui_apogrid_double_click', 'sapgui_apogrid_set_cell_data', + 'sapgui_apogrid_get_cell_data', 'sapgui_apogrid_is_cell_changeable', 'sapgui_apogrid_get_cell_format', + 'sapgui_apogrid_get_cell_tooltip', 'sapgui_apogrid_press_ENTER', 'sapgui_apogrid_open_cell_context_menu', + 'sapgui_apogrid_select_context_menu_item', 'sapgui_text_edit_scroll_to_line', 'sapgui_text_edit_set_selection_indexes', + 'sapgui_text_edit_set_unprotected_text_part', 'sapgui_text_edit_get_first_visible_line', + 'sapgui_text_edit_get_selection_index_start', 'sapgui_text_edit_get_selection_index_end', + 'sapgui_text_edit_get_number_of_unprotected_text_parts', 'sapgui_text_edit_double_click', + 'sapgui_text_edit_single_file_dropped', 'sapgui_text_edit_multiple_files_dropped', 'sapgui_text_edit_press_F1', + 'sapgui_text_edit_press_F4', 'sapgui_text_edit_open_context_menu', 'sapgui_text_edit_select_context_menu', + 'sapgui_text_edit_modified_status_changed', 'sapgui_htmlviewer_send_event', 'sapgui_htmlviewer_dom_get_property', + 'sapgui_toolbar_press_button', 'sapgui_toolbar_press_context_button', 'sapgui_toolbar_select_menu_item', + 'sapgui_toolbar_select_menu_item_by_text', 'sapgui_toolbar_select_context_menu_item', + 'sapgui_toolbar_select_context_menu_item_by_text' + ), + // Constants from as_sapgui.h + 10 => array( + 'BEGIN_OPTIONAL', 'END_OPTIONAL', 'al-keys', 'ENTER', 'HELP', 'F2', 'BACK', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', + 'F10', 'F11', 'ESC', 'SHIFT_F1', 'SHIFT_F2', 'SHIFT_F3', 'SHIFT_F4', 'SHIFT_F5', 'SHIFT_F6', 'SHIFT_F7', 'SHIFT_F8', + 'SHIFT_F9', 'SHIFT_F10', 'SHIFT_F11', 'SHIFT_F12', 'CTRL_F1', 'CTRL_F2', 'CTRL_F3', 'CTRL_F4', 'CTRL_F5', 'CTRL_F6', + 'CTRL_F7', 'CTRL_F8', 'CTRL_F9', 'CTRL_F10', 'CTRL_F11', 'CTRL_F12', 'CTRL_SHIFT_F1', 'CTRL_SHIFT_F2', 'CTRL_SHIFT_F3', + 'CTRL_SHIFT_F4', 'CTRL_SHIFT_F5', 'CTRL_SHIFT_F6', 'CTRL_SHIFT_F7', 'CTRL_SHIFT_F8', 'CTRL_SHIFT_F9', 'CTRL_SHIFT_F10', + 'CTRL_SHIFT_F11', 'CTRL_SHIFT_F12', 'CANCEL', 'CTRL_F', 'CTRL_PAGE_UP', 'PAGE_UP', 'PAGE_DOWN', 'CTRL_PAGE_DOWN', + 'CTRL_G', 'CTRL_P' + ), + ), + + // Symbols and Case Sensitivity + // Symbols from: http://en.wikipedia.org/wiki/C_syntax + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '%', + '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, // Standard C reserved keywords + 2 => true, // C preprocessor directives + 3 => true, // Functions from lrun.h + 4 => true, // Constants from lrun.h + 5 => true, // Functions from web_api.h + 6 => true, // Constants from web_api.h + 7 => true, // Functions from as_web.h + 8 => true, // Constants from as_web.h + 9 => true, // Functions from as_sapgui.h + 10 => true, // Constants from as_sapgui.h + ), + + // Styles + 'STYLES' => array( + 'KEYWORDS' => array( + // Functions are brown, constants and reserved words are blue + 1 => 'color: #0000ff;', // Standard C reserved keywords + 2 => 'color: #0000ff;', // C preprocessor directives + 3 => 'color: #8a0000;', // Functions from lrun.h + 4 => 'color: #0000ff;', // Constants from lrun.h + 5 => 'color: #8a0000;', // Functions from web_api.h + 6 => 'color: #0000ff;', // Constants from web_api.h + 7 => 'color: #8a0000;', // Functions from as_web.h + 8 => 'color: #0000ff;', // Constants from as_web.h + 9 => 'color: #8a0000;', // Functions from as_sapgui.h + 10 => 'color: #0000ff;', // Constants from as_sapgui.h + ), + 'COMMENTS' => array( + // Comments are grey + 1 => 'color: #9b9b9b;', + 'MULTI' => 'color: #9b9b9b;' + ), + 'ESCAPE_CHAR' => array( + // GeSHi cannot define a separate style for ESCAPE_REGEXP. The style for ESCAPE_CHAR also applies to ESCAPE_REGEXP. + // This is used for LoadRunner {parameters} + // {parameters} are pink + 0 => 'color: #c000c0;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + // Strings are green + 0 => 'color: #008080;' + ), + 'NUMBERS' => array( + // Numbers are green + 0 => 'color: #008080;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #008080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #008080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #008080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#008080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#008080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#008080;' + ), + 'METHODS' => array( + 1 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + + // URLs for Functions + 'URLS' => array( + 1 => '', // Standard C reserved keywords + 2 => '', // C preprocessor directives + 3 => '', // Functions from lrun.h + 4 => '', // Constants from lrun.h + 5 => '', // Functions from web_api.h + 6 => '', // Constants from web_api.h + 7 => '', // Functions from as_web.h + 8 => '', // Constants from as_web.h + 9 => '', // Functions from as_sapgui.h + 10 => '', // Constants from as_sapgui.h + ), + + // Object Orientation + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + + // Regular Expressions + // Note that REGEXPS are not applied within strings. + 'REGEXPS' => array( + ), + + // Contextual Highlighting and Strict Mode + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + + // Tabs + // Note that if you are using
 tags for your code, then the browser chooses how many spaces your tabs will translate to.
+    'TAB_WIDTH' => 4
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/c_mac.php b/inc/geshi/c_mac.php
index 1a034ae08..f80dc2ed2 100644
--- a/inc/geshi/c_mac.php
+++ b/inc/geshi/c_mac.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
  * Copyright: (c) 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * C for Macs language file for GeSHi.
diff --git a/inc/geshi/caddcl.php b/inc/geshi/caddcl.php
index 74310d6d9..6587cfed9 100644
--- a/inc/geshi/caddcl.php
+++ b/inc/geshi/caddcl.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * CAD DCL (Dialog Control Language) language file for GeSHi.
diff --git a/inc/geshi/cadlisp.php b/inc/geshi/cadlisp.php
index 9277e5192..00e3c6c5b 100644
--- a/inc/geshi/cadlisp.php
+++ b/inc/geshi/cadlisp.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/blog)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * AutoCAD/IntelliCAD Lisp language file for GeSHi.
diff --git a/inc/geshi/cfdg.php b/inc/geshi/cfdg.php
index ee17fdf53..31d32fa45 100644
--- a/inc/geshi/cfdg.php
+++ b/inc/geshi/cfdg.php
@@ -4,7 +4,7 @@
  * --------
  * Author: John Horigan 
  * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/03/11
  *
  * CFDG language file for GeSHi.
diff --git a/inc/geshi/cfm.php b/inc/geshi/cfm.php
index dd508eec7..f340c39ac 100644
--- a/inc/geshi/cfm.php
+++ b/inc/geshi/cfm.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Diego
  * Copyright: (c) 2006 Diego
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/02/25
  *
  * ColdFusion language file for GeSHi.
diff --git a/inc/geshi/chaiscript.php b/inc/geshi/chaiscript.php
index e1baad4db..dcd05dbf5 100644
--- a/inc/geshi/chaiscript.php
+++ b/inc/geshi/chaiscript.php
@@ -6,7 +6,7 @@
  * Copyright: (c) 2010 Jason Turner (lefticus@gmail.com),
  *            (c) 2009 Jonathan Turner,
  *            (c) 2004 Ben Keen (ben.keen@gmail.com), Benny Baumann (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/07/03
  *
  * ChaiScript language file for GeSHi.
diff --git a/inc/geshi/cil.php b/inc/geshi/cil.php
index 142c7743a..975572c64 100644
--- a/inc/geshi/cil.php
+++ b/inc/geshi/cil.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Marcus Griep (neoeinstein+GeSHi@gmail.com)
  * Copyright: (c) 2007 Marcus Griep (http://www.xpdm.us)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/10/24
  *
  * CIL (Common Intermediate Language) language file for GeSHi.
diff --git a/inc/geshi/clojure.php b/inc/geshi/clojure.php
index 4bcb9a3ae..bf21c7603 100644
--- a/inc/geshi/clojure.php
+++ b/inc/geshi/clojure.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Jess Johnson (jess@grok-code.com)
  * Copyright: (c) 2009 Jess Johnson (http://grok-code.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/09/20
  *
  * Clojure language file for GeSHi.
diff --git a/inc/geshi/cmake.php b/inc/geshi/cmake.php
index ccd855b0b..fcf45c691 100644
--- a/inc/geshi/cmake.php
+++ b/inc/geshi/cmake.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Daniel Nelson (danieln@eng.utah.edu)
  * Copyright: (c) 2009 Daniel Nelson
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/04/06
  *
  * CMake language file for GeSHi.
diff --git a/inc/geshi/cobol.php b/inc/geshi/cobol.php
index c1220a06f..c3ed01d4c 100644
--- a/inc/geshi/cobol.php
+++ b/inc/geshi/cobol.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: BenBE (BenBE@omorphia.org)
  * Copyright: (c) 2007-2008 BenBE (http://www.omorphia.de/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/07/02
  *
  * COBOL language file for GeSHi.
diff --git a/inc/geshi/coffeescript.php b/inc/geshi/coffeescript.php
new file mode 100644
index 000000000..f85541973
--- /dev/null
+++ b/inc/geshi/coffeescript.php
@@ -0,0 +1,146 @@
+ 'CoffeeScript',
+    'COMMENT_SINGLE' => array(1 => '#'),
+    'COMMENT_MULTI' => array('###' => '###'),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    //Longest quotemarks ALWAYS first
+    'QUOTEMARKS' => array('"""', "'''", '"', "'"),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+
+        /*
+        ** Set 1: control keywords
+        */
+        1 => array(
+            'break', 'by', 'catch', 'continue', 'else', 'finally', 'for', 'in', 'of', 'if',
+            'return', 'switch', 'then', 'throw', 'try', 'unless', 'when', 'while', 'until'
+            ),
+
+        /*
+        ** Set 2: logic keywords
+        */
+        2 => array(
+            'and', 'or', 'is', 'isnt', 'not'
+            ),
+
+        /*
+        ** Set 3: other keywords
+        */
+        3 => array(
+            'instanceof', 'new', 'delete', 'typeof',
+            'class', 'super', 'this', 'extends'
+            ),
+
+        /*
+        ** Set 4: constants
+        */
+        4 => array(
+            'true', 'false', 'on', 'off', 'yes', 'no',
+            'Infinity', 'NaN', 'undefined', 'null'
+            )
+        ),
+    'SYMBOLS' => array(
+            '(', ')', '[', ']', '{', '}', '*', '&', '|', '%', '!', ',', ';', '<', '>', '?', '`',
+            '+', '-', '*', '/', '->', '=>', '<<', '>>', '@', ':', '^'
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #ff7700;font-weight:bold;',
+            2 => 'color: #008000;',
+            3 => 'color: #dc143c;',
+            4 => 'color: #0000cd;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #808080; font-style: italic;',
+            'MULTI' => 'color: #808080; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: black;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #483d8b;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #ff4500;'
+            ),
+        'METHODS' => array(
+            1 => 'color: black;'
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #66cc66;'
+            ),
+        'REGEXPS' => array(
+            ),
+        'SCRIPT' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => ''
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        1 => '.'
+        ),
+    'REGEXPS' => array(
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+    'SCRIPT_DELIMITERS' => array(
+        0 => array(
+            ''
+            )
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        0 => true
+        )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/cpp-qt.php b/inc/geshi/cpp-qt.php
index 8523d16b7..3f6aa3079 100644
--- a/inc/geshi/cpp-qt.php
+++ b/inc/geshi/cpp-qt.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Iulian M
  * Copyright: (c) 2006 Iulian M
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/09/27
  *
  * C++ (with QT extensions) language file for GeSHi.
@@ -55,7 +55,7 @@ $language_data = array (
     'ESCAPE_CHAR' => '',
     'ESCAPE_REGEXP' => array(
         //Simple Single Char Escapes
-        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
+        1 => "#\\\\[abfnrtv\\\'\"?\n]#i",
         //Hexadecimal Char Specs
         2 => "#\\\\x[\da-fA-F]{2}#",
         //Hexadecimal Char Specs
diff --git a/inc/geshi/cpp.php b/inc/geshi/cpp.php
index 30f5a93f2..289ab9947 100644
--- a/inc/geshi/cpp.php
+++ b/inc/geshi/cpp.php
@@ -7,7 +7,7 @@
  *  - M. Uli Kusterer (witness.of.teachtext@gmx.net)
  *  - Jack Lloyd (lloyd@randombit.net)
  * Copyright: (c) 2004 Dennis Bayer, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/09/27
  *
  * C++ language file for GeSHi.
@@ -63,7 +63,7 @@ $language_data = array (
     'ESCAPE_CHAR' => '',
     'ESCAPE_REGEXP' => array(
         //Simple Single Char Escapes
-        1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i",
+        1 => "#\\\\[abfnrtv\\\'\"?\n]#i",
         //Hexadecimal Char Specs
         2 => "#\\\\x[\da-fA-F]{2}#",
         //Hexadecimal Char Specs
diff --git a/inc/geshi/csharp.php b/inc/geshi/csharp.php
index 6a9c3c2bd..e73f22d50 100644
--- a/inc/geshi/csharp.php
+++ b/inc/geshi/csharp.php
@@ -5,7 +5,7 @@
  * Author: Alan Juden (alan@judenware.org)
  * Revised by: Michael Mol (mikemol@gmail.com)
  * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * C# language file for GeSHi.
diff --git a/inc/geshi/css.php b/inc/geshi/css.php
index 51f261486..a8706bd26 100644
--- a/inc/geshi/css.php
+++ b/inc/geshi/css.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/18
  *
  * CSS language file for GeSHi.
@@ -58,7 +58,15 @@ $language_data = array (
         ),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array('"', "'"),
-    'ESCAPE_CHAR' => '\\',
+    'ESCAPE_CHAR' => '',
+    'ESCAPE_REGEXP' => array(
+        //Simple Single Char Escapes
+        //1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
+        //Hexadecimal Char Specs
+        2 => "#\\\\[\da-fA-F]{1,6}\s?#i",
+        //Unicode Char Specs
+        //3 => "#\\\\u[\da-fA-F]{1,8}#i",
+        ),
     'KEYWORDS' => array(
         1 => array(
             'aqua', 'azimuth', 'background-attachment', 'background-color',
@@ -153,7 +161,10 @@ $language_data = array (
             'MULTI' => 'color: #808080; font-style: italic;'
             ),
         'ESCAPE_CHAR' => array(
-            0 => 'color: #000099; font-weight: bold;'
+            0 => 'color: #000099; font-weight: bold;',
+            //1 => 'color: #000099; font-weight: bold;',
+            2 => 'color: #000099; font-weight: bold;'
+            //3 => 'color: #000099; font-weight: bold;'
             ),
         'BRACKETS' => array(
             0 => 'color: #00AA00;'
diff --git a/inc/geshi/cuesheet.php b/inc/geshi/cuesheet.php
index 81c607c10..e994a0aa3 100644
--- a/inc/geshi/cuesheet.php
+++ b/inc/geshi/cuesheet.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Benny Baumann (benbe@geshi.org)
  * Copyright: (c) 2009 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/12/21
  *
  * Cuesheet language file for GeSHi.
diff --git a/inc/geshi/d.php b/inc/geshi/d.php
index 5ef349d52..107d07b1a 100644
--- a/inc/geshi/d.php
+++ b/inc/geshi/d.php
@@ -4,7 +4,7 @@
  * -----
  * Author: Thomas Kuehne (thomas@kuehne.cn)
  * Copyright: (c) 2005 Thomas Kuehne (http://thomas.kuehne.cn/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/04/22
  *
  * D language file for GeSHi.
diff --git a/inc/geshi/dcs.php b/inc/geshi/dcs.php
index 4762ed906..bac2beea8 100644
--- a/inc/geshi/dcs.php
+++ b/inc/geshi/dcs.php
@@ -4,7 +4,7 @@
  * ---------------------------------
  * Author: Stelio Passaris (GeSHi@stelio.net)
  * Copyright: (c) 2009 Stelio Passaris (http://stelio.net/stiki/GeSHi)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/01/20
  *
  * DCS language file for GeSHi.
diff --git a/inc/geshi/delphi.php b/inc/geshi/delphi.php
index ff54af8f9..d7f19f832 100644
--- a/inc/geshi/delphi.php
+++ b/inc/geshi/delphi.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: J�rja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de)
  * Copyright: (c) 2004 J�rja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/26
  *
  * Delphi (Object Pascal) language file for GeSHi.
diff --git a/inc/geshi/diff.php b/inc/geshi/diff.php
index 5570406da..09cc50873 100644
--- a/inc/geshi/diff.php
+++ b/inc/geshi/diff.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Conny Brunnkvist (conny@fuchsia.se), W. Tasin (tasin@fhm.edu)
  * Copyright: (c) 2004 Fuchsia Open Source Solutions (http://www.fuchsia.se/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/12/29
  *
  * Diff-output language file for GeSHi.
diff --git a/inc/geshi/div.php b/inc/geshi/div.php
index 276e9e882..e8de7a525 100644
--- a/inc/geshi/div.php
+++ b/inc/geshi/div.php
@@ -4,7 +4,7 @@
  * ---------------------------------
  * Author: Gabriel Lorenzo (ermakina@gmail.com)
  * Copyright: (c) 2005 Gabriel Lorenzo (http://ermakina.gazpachito.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/06/19
  *
  * DIV language file for GeSHi.
diff --git a/inc/geshi/dos.php b/inc/geshi/dos.php
index 9484d3766..e84e1550a 100644
--- a/inc/geshi/dos.php
+++ b/inc/geshi/dos.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Alessandro Staltari (staltari@geocities.com)
  * Copyright: (c) 2005 Alessandro Staltari (http://www.geocities.com/SiliconValley/Vista/8155/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/07/05
  *
  * DOS language file for GeSHi.
@@ -66,7 +66,8 @@ $language_data = array (
     //DOS comment lines
     'COMMENT_REGEXP' => array(
         1 => "/^\s*@?REM\b.*$/mi",
-        2 => "/^\s*::.*$/m"
+        2 => "/^\s*::.*$/m",
+        3 => "/\^./"
         ),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array(),
@@ -100,7 +101,7 @@ $language_data = array (
             )
         ),
     'SYMBOLS' => array(
-        '(', ')', '@', '%'
+        '(', ')', '@', '%', '!', '|', '<', '>', '&'
         ),
     'CASE_SENSITIVE' => array(
         GESHI_COMMENTS => false,
@@ -119,6 +120,7 @@ $language_data = array (
         'COMMENTS' => array(
             1 => 'color: #808080; font-style: italic;',
             2 => 'color: #b100b1; font-style: italic;',
+            3 => 'color: #33cc33;'
             ),
         'ESCAPE_CHAR' => array(
             0 => 'color: #ff0000; font-weight: bold;'
@@ -143,7 +145,8 @@ $language_data = array (
         'REGEXPS' => array(
             0 => 'color: #b100b1; font-weight: bold;',
             1 => 'color: #448844;',
-            2 => 'color: #448888;'
+            2 => 'color: #448888;',
+            3 => 'color: #448888;'
             )
         ),
     'OOLANG' => false,
@@ -159,7 +162,7 @@ $language_data = array (
         /* Label */
         0 => array(
 /*            GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '\\2',
             GESHI_MODIFIERS => 'si',
             GESHI_BEFORE => '\\1',
@@ -182,6 +185,15 @@ $language_data = array (
             GESHI_MODIFIERS => 'si',
             GESHI_BEFORE => '\\1',
             GESHI_AFTER => '\\3'
+            ),
+        /* Arguments or variable evaluation */
+        3 => array(
+/*            GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(!(?:!(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^!>\n]*(?=!))((?)',
+            GESHI_REPLACE => '\\2',
+            GESHI_MODIFIERS => 'si',
+            GESHI_BEFORE => '\\1',
+            GESHI_AFTER => '\\3'
             )
         ),
     'STRICT_MODE_APPLIES' => GESHI_NEVER,
@@ -191,7 +203,20 @@ $language_data = array (
         ),
     'TAB_WIDTH' => 4,
     'PARSER_CONTROL' => array(
+        'ENABLE_FLAGS' => array(
+            'BRACKETS' => GESHI_NEVER,
+            'NUMBERS' => GESHI_NEVER
+            ),
         'KEYWORDS' => array(
+            1 => array(
+                'DISALLOWED_BEFORE' => '(? array(
+                'DISALLOWED_BEFORE' => '(? array(
+                'DISALLOWED_BEFORE' => '(? array(
                 'DISALLOWED_BEFORE' => '(? 'E',
+    'COMMENT_SINGLE' => array(1 => '#'),
+    'COMMENT_MULTI' => array('/**' => '*/'), // Note: This is method doc, not a general comment syntax.
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+
+    // FIXME: The escaping inside ` is actually doubling of any interior `, $, or @ -- backslash is NOT special
+    'QUOTEMARKS' => array('\'', '"', '`'),
+    'ESCAPE_CHAR' => '\\',
+
+    'KEYWORDS' => array(
+        // builtin control structures
+        1 => array(
+            'accum', 'break', 'try', 'continue', 'if', 'while', 'for', 'switch'
+            ),
+
+        // control structures subsidiary keywords
+        2 => array(
+            'catch', 'else', 'finally', 'in', 'exit'
+            ),
+
+        // named operators
+        3 => array(
+            'fn', 'via'
+            ),
+
+        // variable/function/object definers
+        4 => array(
+            'def', 'bind', 'var'
+            ),
+
+        // object definition subsidiary keywords
+        5 => array(
+            'extends', 'as', 'implements', 'guards', 'match', 'to', 'method'
+            ),
+
+        // builtin nouns in safeEnv
+        6 => array(
+            'null', 'false', 'true', 'throw', '__loop', '__makeList',
+            '__makeMap', '__makeProtocolDesc', '__makeMessageDesc',
+            '__makeParamDesc', 'any', 'void', 'boolean', '__makeOrderedSpace',
+            'ValueGuard', '__MatchContext', 'require', '__makeVerbFacet', 'NaN',
+            'Infinity', '__identityFunc', '__makeInt', '__makeFinalSlot',
+            '__makeVarSlot', '__makeGuardedSlot', '__makeGuard', '__makeTwine',
+            '__makeSourceSpan', '__auditedBy', 'Guard', 'near', 'pbc',
+            'PassByCopy', 'DeepPassByCopy', 'Data', 'Persistent', 'DeepFrozen',
+            'int', 'float64', 'char', 'String', 'Twine', 'TextWriter', 'List',
+            'Map', 'nullOk', 'Tuple', '__Portrayal', 'notNull', 'vow', 'rcvr',
+            'SturdyRef', 'simple__quasiParser', 'twine__quasiParser',
+            'rx__quasiParser', 'e__quasiParser', 'epatt__quasiParser',
+            'sml__quasiParser', 'term__quasiParser', 'traceln', '__equalizer',
+            '__comparer', 'Ref', 'E', 'promiseAllFulfilled', 'EIO', 'help',
+            'safeScope', '__eval', 'resource__uriGetter', 'type__uriGetter',
+            'import__uriGetter', 'elib__uriGetter', 'elang__uriGetter',
+            'opaque__uriGetter'
+            ),
+
+        // builtin nouns in privilegedEnv
+        7 => array(
+            'file__uriGetter', 'fileURL__uriGetter', 'jar__uriGetter',
+            'http__uriGetter', 'ftp__uriGetter', 'gopher__uriGetter',
+            'news__uriGetter', 'cap__uriGetter', 'makeCommand', 'stdout',
+            'stderr', 'stdin', 'print', 'println', 'interp', 'entropy', 'timer',
+            'introducer', 'identityMgr', 'makeSturdyRef', 'timeMachine',
+            'unsafe__uriGetter', 'currentVat', 'rune', 'awt__uriGetter',
+            'swing__uriGetter', 'JPanel__quasiParser', 'swt__uriGetter',
+            'currentDisplay', 'swtGrid__quasiParser', 'swtGrid`',
+            'privilegedScope'
+            ),
+
+        // reserved keywords
+        8 => array(
+            'abstract', 'an', 'assert', 'attribute', 'be', 'begin', 'behalf',
+            'belief', 'believe', 'believes', 'case', 'class', 'const',
+            'constructor', 'declare', 'default', 'define', 'defmacro',
+            'delicate', 'deprecated', 'dispatch', 'do', 'encapsulate',
+            'encapsulated', 'encapsulates', 'end', 'ensure', 'enum', 'eventual',
+            'eventually', 'export', 'facet', 'forall', 'function', 'given',
+            'hidden', 'hides', 'inline', 'is', 'know', 'knows', 'lambda', 'let',
+            'methods', 'module', 'namespace', 'native', 'obeys', 'octet',
+            'oneway', 'operator', 'package', 'private', 'protected', 'public',
+            'raises', 'reliance', 'reliant', 'relies', 'rely', 'reveal', 'sake',
+            'signed', 'static', 'struct', 'suchthat', 'supports', 'suspect',
+            'suspects', 'synchronized', 'this', 'transient', 'truncatable',
+            'typedef', 'unsigned', 'unum', 'uses', 'using', 'utf8', 'utf16',
+            'virtual', 'volatile', 'wstring'
+            )
+        ),
+    'SYMBOLS' => array(
+        1 => array(
+            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ','
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true,
+        6 => true,
+        7 => true,
+        8 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #b1b100;',
+            2 => 'color: #b1b100;',
+            3 => 'color: #b1b100;',
+            4 => 'color: #b1b100;',
+            5 => 'color: #b1b100;',
+            6 => 'color: #b1b100;',
+            7 => 'color: #b1b100;',
+            8 => 'color: #b1b100;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #666666; font-style: italic;',
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #009900;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #0000ff;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;',
+            ),
+        'METHODS' => array(
+            0 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            1 => 'color: #339933;'
+            ),
+        'REGEXPS' => array(),
+        'SCRIPT' => array()
+        ),
+    'URLS' => array(
+        1 => 'http://wiki.erights.org/wiki/{FNAME}',
+        2 => 'http://wiki.erights.org/wiki/{FNAME}',
+        3 => 'http://wiki.erights.org/wiki/{FNAME}',
+        4 => 'http://wiki.erights.org/wiki/{FNAME}',
+        5 => 'http://wiki.erights.org/wiki/{FNAME}',
+        6 => 'http://wiki.erights.org/wiki/{FNAME}',
+        7 => 'http://wiki.erights.org/wiki/{FNAME}',
+        8 => 'http://wiki.erights.org/wiki/{FNAME}'
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        1 => '.',
+        2 => '<-',
+        3 => '::'
+        ),
+    'REGEXPS' => array(),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(),
+    'HIGHLIGHT_STRICT_BLOCK' => array()
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/ecmascript.php b/inc/geshi/ecmascript.php
index 3e61b57cb..e220c839b 100644
--- a/inc/geshi/ecmascript.php
+++ b/inc/geshi/ecmascript.php
@@ -4,7 +4,7 @@
  * --------------
  * Author: Michel Mariani (http://www.tonton-pixel.com/site/)
  * Copyright: (c) 2010 Michel Mariani (http://www.tonton-pixel.com/site/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/01/08
  *
  * ECMAScript language file for GeSHi.
diff --git a/inc/geshi/eiffel.php b/inc/geshi/eiffel.php
index 89cef7965..66427acc7 100644
--- a/inc/geshi/eiffel.php
+++ b/inc/geshi/eiffel.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Zoran Simic (zsimic@axarosenberg.com)
  * Copyright: (c) 2005 Zoran Simic
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/06/30
  *
  * Eiffel language file for GeSHi.
diff --git a/inc/geshi/email.php b/inc/geshi/email.php
index 91a104840..68f875499 100644
--- a/inc/geshi/email.php
+++ b/inc/geshi/email.php
@@ -4,7 +4,7 @@
  * ---------------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/10/19
  *
  * Email (mbox \ eml \ RFC format) language file for GeSHi.
@@ -51,14 +51,14 @@ $language_data = array (
             'HTTP', 'SMTP', 'ASMTP', 'ESMTP'
             ),
         2 => array(
-            'Authentication-Results','Content-Description','Content-Type',
+            'Authentication-Results','Comment','Content-Description','Content-Type',
             'Content-Disposition','Content-Transfer-Encoding','Delivered-To',
             'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id',
             'MIME-Version','OpenPGP','Received','Received-SPF','References',
-            'Resend-From','Resend-To','Return-Path','User-Agent'
+            'Reply-To', 'Resend-From','Resend-To','Return-Path','User-Agent'
             ),
         3 => array(
-            'Date','From','Subject','To',
+            'Date','From','Sender','Subject','To','CC'
             ),
         4 => array(
             'by', 'for', 'from', 'id', 'with'
@@ -132,7 +132,7 @@ $language_data = array (
             ),
         //Email-Adresses or Mail-IDs
         2 => array(
-            GESHI_SEARCH => "\b[\w\.\-]+@\w+(?:(?:\.\w+)*\.\w{2,4})?",
+            GESHI_SEARCH => "\b(?\"?)[\w\.\-]+\k@(?!-)[\w\-]+(? "\\0",
             GESHI_MODIFIERS => "mi",
             GESHI_BEFORE => "",
@@ -178,7 +178,7 @@ $language_data = array (
         ),
     'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
     'SCRIPT_DELIMITERS' => array(
-        0 => "/(?P^)[A-Z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P$)/m"
+        0 => "/(?P^)[A-Za-z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P$)/m"
     ),
     'HIGHLIGHT_STRICT_BLOCK' => array(
         0 => true,
diff --git a/inc/geshi/epc.php b/inc/geshi/epc.php
new file mode 100644
index 000000000..764461fc2
--- /dev/null
+++ b/inc/geshi/epc.php
@@ -0,0 +1,154 @@
+ 'EPC',
+    'COMMENT_SINGLE' => array('//'),
+    'COMMENT_MULTI' => array('/*' => '*/'),
+    'COMMENT_REGEXP' => array(
+        //[Sections]
+        //1 => "/^\\[.*\\]/"
+        ),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array(
+        0 => '"',
+        1 => '$'
+        ),
+    'ESCAPE_CHAR' => '',
+    'KEYWORDS' => array(
+        1 => array(
+            'if', 'then', 'else', 'endif',
+            'and', 'or', 'xor', 'hysteresis'
+            ),
+        2 => array(
+            'read', 'write', 'event',
+            'gettime', 'settime', 'getdate', 'setdate', 'gettimedate', 'settimedate',
+            'hour', 'minute', 'second', 'changehour', 'changeminute', 'changesecond',
+            'date', 'month', 'day', 'dayofweek', 'sun', 'azimuth', 'elevation',
+            'sunrisehour', 'sunriseminute', 'sunsethour', 'sunsetminute',
+            'wtime', 'htime', 'mtime', 'stime',
+            'cwtime', 'chtime', 'cmtime', 'cstime',
+            'delay', 'after', 'cycle',
+            'readflash', 'writeflash',
+            'abs', 'acos', 'asin', 'atan', 'cos', 'ceil', 'average', 'exp', 'floor',
+            'log', 'max', 'min', 'mod', 'pow', 'sqrt', 'sin', 'tan', 'change', 'convert',
+            'eval', 'systemstart', 'random', 'comobject', 'sleep', 'scene', 'storescene', 'callscene',
+            'find', 'stringcast', 'stringset', 'stringformat', 'split', 'size',
+            'readrs232'. 'sendrs232', 'address', 'readknx',
+            'readudp', 'sendudp', 'connecttcp', 'closetcp', 'readtcp', 'sendtcp',
+            'resolve', 'sendmail',
+            'button', 'webbutton', 'chart', 'webchart', 'webdisplay', 'getslider', 'pshifter', 'mpshifter',
+            'getpslider', 'mbutton', 'mbbutton', 'mchart', 'mpchart', 'mpbutton', 'pdisplay', 'pchart',
+            'pbutton', 'setslider', 'setpslider', 'slider', 'pslider', 'page', 'line', 'header',
+            'footer', 'none', 'plink', 'link', 'frame', 'dframe'
+            )
+        ),
+    'SYMBOLS' => array(
+        0 => array(
+            '%', 'b01',
+            ),
+        1 => array(
+            '+', '-', '==', '>=', '=<',
+            ),
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #e63ec3;',
+            2 => 'color: #e63ec3;'
+            ),
+        'COMMENTS' => array(
+            0 => 'color: #0000ff;'
+            //1 => 'color: #ffa500;'
+            ),
+        'ESCAPE_CHAR' => array(
+            1 => 'color: #000099;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #000000;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #8a0808;',
+            1 => 'color: #6e6e6e;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #0b610b;'
+            ),
+        'METHODS' => array(
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #0b610b;',
+            1 => 'color: #e63ec3;'
+            ),
+        'REGEXPS' => array(
+            1 => 'color: #0b610b;'
+            ),
+        'SCRIPT' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => ''
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(
+        ),
+    'REGEXPS' => array(
+        // Numbers, e.g. 255u08
+        1 => "[0-9]*[subf][0136][12468]"
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        ),
+    'TAB_WIDTH' => 4,
+    'PARSER_CONTROL' => array(
+        'COMMENTS' => array(
+            'DISALLOWED_BEFORE' => '$'
+        ),
+        'KEYWORDS' => array(
+            'DISALLOWED_BEFORE' => "(?  "(?![\.\-a-zA-Z0-9_%=\\/])"
+        )
+    )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/erlang.php b/inc/geshi/erlang.php
index d98de2f37..ede55917c 100644
--- a/inc/geshi/erlang.php
+++ b/inc/geshi/erlang.php
@@ -7,7 +7,7 @@
  * - Uwe Dauernheim (uwe@dauernheim.net)
  * - Dan Forest-Barbier (dan@twisted.in)
  * Copyright: (c) 2008 Uwe Dauernheim (http://www.kreisquadratur.de/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008-09-27
  *
  * Erlang language file for GeSHi.
@@ -355,7 +355,7 @@ $language_data = array(
         2 => ':'
         ),
     'REGEXPS' => array(
-        //Macro definitions
+        //�Macro definitions
         0 => array(
             GESHI_SEARCH => '(-define\s*\()([a-zA-Z0-9_]+)(\(|,)',
             GESHI_REPLACE => '\2',
@@ -403,7 +403,7 @@ $language_data = array(
             GESHI_BEFORE => '\1',
             GESHI_AFTER => ''
             ),
-        // ASCIIcodes
+        // ASCII�codes
         6 => '(\$[a-zA-Z0-9_])',
         // Records
         7 => array(
@@ -423,8 +423,8 @@ $language_data = array(
     'PARSER_CONTROL' => array(
         'KEYWORDS' => array(
             3 => array(
-                'DISALLOWED_BEFORE' => '',
-                'DISALLOWED_AFTER' => '(?=\s*\()'
+                'DISALLOWED_BEFORE' => '(? ''//'(?=\s*\()'
             ),
             5 => array(
                 'DISALLOWED_BEFORE' => '(?<=\'|)',
diff --git a/inc/geshi/euphoria.php b/inc/geshi/euphoria.php
new file mode 100644
index 000000000..afd4ad7c4
--- /dev/null
+++ b/inc/geshi/euphoria.php
@@ -0,0 +1,140 @@
+ (1.0.8.9)
+ *  -  First Release
+ *
+ * TODO (updated )
+ * -------------------------
+ * seperate the funtions from the procedures, and have a slight color change for each.
+ *
+ *************************************************************************************
+ *
+ *     This file is part of GeSHi.
+ *
+ *   GeSHi is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   GeSHi is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with GeSHi; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+    'LANG_NAME' => 'Euphoria',
+    'COMMENT_SINGLE' => array(1 => '--'),
+    'COMMENT_MULTI' => array(), //Euphoria doesn't support multi-line comments
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array("'", '"'),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        1 => array( // keywords
+            'and', 'by', 'constant', 'do', 'else', 'elsif', 'end', 'exit',
+            'for', 'function', 'global', 'if', 'include', 'not', 'or',
+            'procedure', 'return', 'then', 'to', 'type', 'while', 'with',
+            'without', 'xor'
+            ),
+        2 => array( // built-ins
+            'abort', 'and_bits', 'append', 'arctan', 'atom', 'c_func', 'call',
+            'c_proc', 'call_func', 'call_proc', 'clear_screen', 'close', 'compare',
+            'command_line', 'cos', 'date', 'equal', 'find', 'find_from', 'floor',
+            'getc', 'getenv', 'gets', 'get_key', 'get_pixel', 'integer', 'length',
+            'log', 'machine_func', 'machine_proc', 'match', 'match_from',
+            'mem_copy', 'mem_set', 'not_bits', 'object', 'open', 'or_bits', 'peek',
+            'peek4s', 'peek4u', 'pixel', 'platform', 'poke', 'poke4', 'position',
+            'power', 'prepend', 'print', 'printf', 'profile', 'puts', 'rand',
+            'remainder', 'repeat', 'routine_id', 'sequence', 'sin', 'sprintf',
+            'sqrt', 'system', 'system_exec', 'tan', 'task_clock_stop',
+            'task_clock_start', 'task_create', 'task_list', 'task_schedule',
+            'task_self', 'task_status', 'task_suspend', 'task_yield', 'time',
+            'trace', 'xor_bits'
+            ),
+        ),
+    'SYMBOLS' => array(
+        0 => array(
+            '(', ')', '{', '}', '[', ']'
+            ),
+        1 => array(
+            '+', '-', '*', '/', '=', '&', '^'
+            ),
+        2 => array(
+            '&', '?', ','
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #0000ff; font-weight: bold;', // keywords
+            2 => 'color: #cc33ff; font-weight: bold;', // builtins
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #ff0000; font-style: italic;',
+            'MULTI' => '' // doesn't exist
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #009900; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #999900; font-weight: bold;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #00cc00;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc33cc; font-style: italic'
+            ),
+        'METHODS' => array( // Doesn't exist in Euphoria.  Everything is a function =)
+            0 => ''
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #999900;', // brackets
+            1 => 'color: #333333;', // operators
+            2 => 'color: #333333; font-style: bold' // print+concat
+            ),
+        'REGEXPS' => array(
+            ),
+        'SCRIPT' => array( // Never included in scripts.
+            )
+        ),
+    'REGEXPS' => array(
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => ''
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/f1.php b/inc/geshi/f1.php
new file mode 100644
index 000000000..13056b78b
--- /dev/null
+++ b/inc/geshi/f1.php
@@ -0,0 +1,151 @@
+ 'Formula One',
+    'COMMENT_SINGLE' => array(1 => '//'),
+    'COMMENT_MULTI' => array('{' => '}'),
+    'COMMENT_REGEXP' => array(
+        //Nested Comments
+        2 =>  "/(\{(?:\{.*\}|[^\{])*\})/m"
+        ),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array("'",'"'),
+    'ESCAPE_CHAR' => '',
+    'ESCAPE_REGEXP' => array(
+        //Simple Single Char Escapes
+        1 => "#\\\\[\\\\nrt\'\"?\n]#i",
+        //Hexadecimal Char Specs (Utf16 codes, Unicode versions only)
+        2 => "#\\\\u[\da-fA-F]{4}#",
+        ),
+    'NUMBERS' =>
+        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE |
+        GESHI_NUMBER_BIN_PREFIX_0B |
+        GESHI_NUMBER_OCT_PREFIX_0O |
+        GESHI_NUMBER_HEX_PREFIX |
+        GESHI_NUMBER_FLT_NONSCI |
+        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
+    'KEYWORDS' => array(
+        1 => array(
+            'pred','proc','subr','else','elsif','iff','if','then','false','true',
+            'case','of','use','local','mod','end','list','file','all','one','max','min','rel',
+            'external','Nil','_stdcall','_cdecl','_addressof','_pred','_file','_line'
+            ),
+        2 => array(
+            'Ascii','Bin','I','L','P','R','S','U'
+            ),
+        3 => array(
+            'Append','in','Dupl','Len','Print','_AllDifferent','_AllAscending',
+            '_AllDescending','_Ascending','_Descending'
+            )
+        ),
+    'SYMBOLS' => array(
+        0 => array('(', ')', '[', ']'),
+        1 => array('<', '>','='),
+        2 => array('+', '-', '*', '/'),
+        3 => array('&', '|'),
+        4 => array(':', ';')
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #0000ff;',
+            2 => 'color: #000080;',
+            3 => 'color: #000080;',
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #000000;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #008000; font-style: italic;',
+            2 => 'color: #008000; font-style: italic;',
+            'MULTI' => 'color: #008000; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;',
+            1 => 'color: #000099; font-weight: bold;',
+            2 => 'color: #009999; font-weight: bold;',
+            ),
+        'STRINGS' => array(
+            0 => 'color: #ff0000;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #800000;'
+            ),
+        'METHODS' => array(
+            1 => 'color: #202020;'
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #000000;',
+            1 => 'color: #000000;',
+            2 => 'color: #000000;',
+            3 => 'color: #000000;',
+            4 => 'color: #000000;'
+            ),
+        'REGEXPS' => array(
+            ),
+        'SCRIPT' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => 'http://www.f1compiler.com/f1helponline/f1_runtime_library.html#{FNAME}'
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        1 => '.'
+        ),
+    'REGEXPS' => array(
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        ),
+    'TAB_WIDTH' => 4
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/falcon.php b/inc/geshi/falcon.php
new file mode 100644
index 000000000..ce75f2057
--- /dev/null
+++ b/inc/geshi/falcon.php
@@ -0,0 +1,218 @@
+ (1.0.8.10)
+ *  -  First Release
+ *
+ *************************************************************************************
+ *
+ *     This file is part of GeSHi.
+ *
+ *   GeSHi is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   GeSHi is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with GeSHi; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * ************************************************************************************/
+
+$language_data = array (
+    'LANG_NAME' => 'Falcon',
+    'COMMENT_SINGLE' => array( 1 => '//' ),
+    'COMMENT_MULTI' => array( '/*' => '*/' ),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array( "'", '"' ),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        1 => array(
+            'break','case','catch','class','const','continue','def','default',
+            'dropping','elif','else','end','enum','for','forfirst','forlast',
+            'formiddle','from','function','global','if','init','innerfunc',
+            'launch','loop','object','raise','return','select','state','static',
+            'switch','try','while'
+        ),
+        2 => array(
+            'false','nil','true',
+        ),
+        3 => array(
+            'and','as','eq','fself','in','not','notin','or','provides','self','to'
+        ),
+        4 => array(
+            'directive','export','import','load','macro'
+        ),
+        5 => array(
+            'ArrayType','BooleanType','ClassMethodType','ClassType','DictionaryType',
+            'FunctionType','MemBufType','MethodType','NilType','NumericType','ObjectType',
+            'RangeType','StringType','LBindType'
+        ),
+        6 => array(
+            "CurrentTime","IOStream","InputStream","MemBufFromPtr","OutputStream",
+            "PageDict","ParseRFC2822","abs","acos","all",
+            "allp","any","anyp","argd","argv",
+            "arrayAdd","arrayBuffer","arrayCompact","arrayDel","arrayDelAll",
+            "arrayFill","arrayFind","arrayHead","arrayIns","arrayMerge",
+            "arrayNM","arrayRemove","arrayResize","arrayScan","arraySort",
+            "arrayTail","asin","assert","atan","atan2",
+            "attributes","baseClass","beginCritical","bless","brigade",
+            "broadcast","cascade","ceil","choice","chr",
+            "className","clone","combinations","compare","consume",
+            "cos","deg2rad","deoob","derivedFrom","describe",
+            "deserialize","dictBack","dictBest","dictClear","dictFill",
+            "dictFind","dictFront","dictGet","dictKeys","dictMerge",
+            "dictRemove","dictSet","dictValues","dirChange","dirCurrent",
+            "dirMake","dirMakeLink","dirReadLink","dirRemove","dolist",
+            "endCritical","epoch","eval","exit","exp",
+            "factorial","fileChgroup","fileChmod","fileChown","fileCopy",
+            "fileExt","fileMove","fileName","fileNameMerge","filePath",
+            "fileRemove","fileType","fileUnit","filter","fint",
+            "firstOf","floop","floor","fract","getAssert",
+            "getEnviron","getProperty","getSlot","getSystemEncoding","getenv",
+            "iff","include","input","inspect","int",
+            "isBound","isCallable","isoob","lbind","len",
+            "let","lit","log","map","max",
+            "metaclass","min","numeric","oob","ord",
+            "paramCount","paramIsRef","paramSet","parameter","passvp",
+            "permutations","pow","print","printl","properties",
+            "rad2deg","random","randomChoice","randomDice","randomGrab",
+            "randomPick","randomSeed","randomWalk","readURI","reduce",
+            "retract","round","seconds","serialize","set",
+            "setProperty","setenv","sin","sleep","stdErr",
+            "stdErrRaw","stdIn","stdInRaw","stdOut","stdOutRaw",
+            "strBack","strBackFind","strBackTrim","strBuffer","strCmpIgnoreCase",
+            "strEndsWith","strEscape","strEsq","strFill","strFind",
+            "strFromMemBuf","strFront","strFrontTrim","strLower","strMerge",
+            "strReplace","strReplicate","strSplit","strSplitTrimmed","strStartsWith",
+            "strToMemBuf","strTrim","strUnescape","strUnesq","strUpper",
+            "strWildcardMatch","subscribe","systemErrorDescription","tan","times",
+            "toString","transcodeFrom","transcodeTo","typeOf","unsetenv",
+            "unsubscribe","valof","vmFalconPath","vmIsMain","vmModuleName",
+            "vmModuleVersionInfo","vmSearchPath","vmSystemType","vmVersionInfo","vmVersionName",
+            "writeURI","xmap","yield","yieldOut"
+        ),
+        7 => array(
+            "AccessError","Array","BOM","Base64","Class",
+            "ClassMethod","CloneError","CmdlineParser","CodeError","Continuation",
+            "Dictionary","Directory","Error","FileStat","Format",
+            "Function","GarbagePointer","GenericError","Integer","InterruptedError",
+            "IoError","Iterator","LateBinding","List","MathError",
+            "MemoryBuffer","MessageError","Method","Numeric","Object",
+            "ParamError","ParseError","Path","Range","Semaphore",
+            "Sequence","Set","Stream","String","StringStream",
+            "SyntaxError","Table","TableError","TimeStamp","TimeZone",
+            "Tokenizer","TypeError","URI","VMSlot"
+        ),
+        8 => array(
+            "args","scriptName","scriptPath"
+        ),
+        9 => array(
+            "GC"
+        ),
+    ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => '',
+        5 => 'http://falconpl.org/project_docs/core/functions.html#typeOf',
+        6 => 'http://falconpl.org/project_docs/core/functions.html#{FNAME}',
+        7 => 'http://falconpl.org/project_docs/core/class_{FNAME}.html',
+        8 => 'http://falconpl.org/project_docs/core/globals.html#{FNAME}',
+        9 => 'http://falconpl.org/project_docs/core/object_{FNAME}.html)'
+    ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true,
+        6 => true,
+        7 => true,
+        8 => true,
+        9 => true
+    ),
+    'SYMBOLS' => array(
+        '(',')','$','%','&','/','{','[',']','=','}','?','+','-','#','*','@',
+        '<','>','|',',',':',';','\\','^'
+    ),
+    'REGEXPS' => array(
+        0 => array(
+            GESHI_SEARCH => '(\[)([a-zA-Z_]|\c{C})(?:[a-zA-Z0-9_]|\p{C})*(\])',
+            GESHI_REPLACE => '\\2',
+            GESHI_MODIFIERS => '',
+            GESHI_BEFORE => '\\1',
+            GESHI_AFTER => '\\3',
+
+        ),
+    ),
+    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+    'SCRIPT_DELIMITERS' => array(
+        0 => array( ' '?>' )
+    ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        0 => true
+    ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #000080;font-weight:bold;',
+            2 => 'color: #800000;font-weight:bold;',
+            3 => 'color: #800000;font-weight:bold;',
+            4 => 'color: #000080;font-weight:bold;',
+            5 => 'color: #000000;font-weight:bold;',
+            6 => 'font-weight:bold;',
+            7 => 'font-weight:bold;',
+            8 => 'font-weight:bold;'
+        ),
+        'COMMENTS' => array(
+            1 => 'color: #29B900;',
+            'MULTI' => 'color: #008080'
+        ),
+        'STRINGS' => array(
+            0 => 'color: #800000'
+        ),
+        'BRACKETS' => array(
+            0 => 'color: #000000'
+        ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #800000'
+        ),
+        'NUMBERS' => array(
+            0 => 'color: #000000'
+        ),
+        'METHODS' => array(
+            0 => 'color: #000000'
+        ),
+        'SYMBOLS' => array(
+            0 => 'color: #8B0513'
+        ),
+        'SCRIPT' => array(
+            0 => ''
+        ),
+        'REGEXPS' => array(
+            0 => 'color: #FF00FF'
+        )
+    ),
+
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        '.'
+    )
+);
+?>
\ No newline at end of file
diff --git a/inc/geshi/fo.php b/inc/geshi/fo.php
index 3a1d24021..e472f2271 100644
--- a/inc/geshi/fo.php
+++ b/inc/geshi/fo.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Tan-Vinh Nguyen (tvnguyen@web.de)
  * Copyright: (c) 2009 Tan-Vinh Nguyen
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/03/23
  *
  * fo language file for GeSHi.
diff --git a/inc/geshi/fortran.php b/inc/geshi/fortran.php
index 6eac52ae0..247e3e4b4 100644
--- a/inc/geshi/fortran.php
+++ b/inc/geshi/fortran.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: Cedric Arrabie (cedric.arrabie@univ-pau.fr)
  * Copyright: (C) 2006 Cetric Arrabie
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/04/22
  *
  * Fortran language file for GeSHi.
diff --git a/inc/geshi/freebasic.php b/inc/geshi/freebasic.php
index 35fc8ca6f..8ac2904eb 100644
--- a/inc/geshi/freebasic.php
+++ b/inc/geshi/freebasic.php
@@ -4,7 +4,7 @@
  * -------------
  * Author: Roberto Rossi
  * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/08/19
  *
  * FreeBasic (http://www.freebasic.net/) language file for GeSHi.
diff --git a/inc/geshi/fsharp.php b/inc/geshi/fsharp.php
index 56146958c..a900e4b60 100644
--- a/inc/geshi/fsharp.php
+++ b/inc/geshi/fsharp.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: julien ortin (jo_spam-divers@yahoo.fr)
  * Copyright: (c) 2009 julien ortin
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/09/20
  *
  * F# language file for GeSHi.
@@ -43,7 +43,8 @@
 $language_data = array(
     'LANG_NAME' => 'F#',
     'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
-    'COMMENT_MULTI' => array('(*' => '*)', '/*' => '*/'),
+    'COMMENT_MULTI' => array('/*' => '*/'),
+    'COMMENT_REGEXP' => array(3 => '/\(\*(?!\)).*?\*\)/'),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array("'", '"'),
     'HARDQUOTE' => array('@"', '"'),
@@ -153,7 +154,8 @@ $language_data = array(
         'COMMENTS' => array(
             'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */
             1 => 'color: #5d478b; font-style: italic;',
-            2 => 'color: #5d478b; font-style: italic;' /* light purple */
+            2 => 'color: #5d478b; font-style: italic;', /* light purple */
+            3 => 'color: #5d478b; font-style: italic;' /* light purple */
             ),
         'ESCAPE_CHAR' => array(
             ),
diff --git a/inc/geshi/gambas.php b/inc/geshi/gambas.php
index 0fc89bb59..b89db0382 100644
--- a/inc/geshi/gambas.php
+++ b/inc/geshi/gambas.php
@@ -5,7 +5,7 @@
  * Author: Jesus Guardon (jguardon@telefonica.net)
  * Copyright: (c) 2009 Jesus Guardon (http://gambas-es.org),
  *                     Benny Baumann (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/20
  *
  * GAMBAS language file for GeSHi.
diff --git a/inc/geshi/gdb.php b/inc/geshi/gdb.php
index ed7ee2ffa..284b589a0 100644
--- a/inc/geshi/gdb.php
+++ b/inc/geshi/gdb.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Milian Wolff (mail@milianw.de)
  * Copyright: (c) 2009 Milian Wolff
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/06/24
  *
  * GDB language file for GeSHi.
@@ -43,7 +43,7 @@ $language_data = array (
     'COMMENT_MULTI' => array(),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array('"'),
-    'ESCAPE_CHAR' => '',
+    'ESCAPE_CHAR' => '\\',
     'KEYWORDS' => array(
         0 => array(
             'Application',
@@ -54,8 +54,7 @@ $language_data = array (
             '[KCrash Handler]',
             ),
         ),
-    'NUMBERS' =>
-        GESHI_NUMBER_INT_BASIC,
+    'NUMBERS' => false,
     'SYMBOLS' => array(
         ),
     'CASE_SENSITIVE' => array(
@@ -79,7 +78,6 @@ $language_data = array (
             0 => 'color: #933;'
             ),
         'NUMBERS' => array(
-            0 => 'color: #cc66cc;',
             ),
         'METHODS' => array(
             ),
@@ -88,12 +86,14 @@ $language_data = array (
         'REGEXPS' => array(
             0 => 'color: #000066; font-weight:bold;',
             1 => 'color: #006600;',
-            2 => 'color: #000066;',
-            3 => 'color: #0066FF; text-style:italic;',
-            4 => 'color: #80B5FF; text-style:italic;',
-            5 => 'color: #A3007D;',
-            6 => 'color: #FF00BF;',
-            7 => 'font-weight: bold;'
+            2 => 'color: #B07E00;',
+            3 => 'color: #0057AE; text-style:italic;',
+            4 => 'color: #0057AE; text-style:italic;',
+            5 => 'color: #442886;',
+            6 => 'color: #442886; font-weight:bold;',
+            7 => 'color: #FF0000; font-weight:bold;',
+            8 => 'color: #006E26;',
+            9 => 'color: #555;',
             ),
         'SCRIPT' => array(
             )
@@ -132,7 +132,7 @@ $language_data = array (
             ),
         //Files with linenumbers
         3 => array(
-            GESHI_SEARCH => '(at )(.+)(:\d+\s*)$',
+            GESHI_SEARCH => '(at\s+)(.+)(:\d+\s*)$',
             GESHI_REPLACE => '\\2',
             GESHI_MODIFIERS => 'm',
             GESHI_BEFORE => '\\1',
@@ -140,16 +140,14 @@ $language_data = array (
             ),
         //Libs without linenumbers
         4 => array(
-            GESHI_SEARCH => '(from )(.+)(\s*)$',
+            GESHI_SEARCH => '(from\s+)(.+)(\s*)$',
             GESHI_REPLACE => '\\2',
             GESHI_MODIFIERS => 'm',
             GESHI_BEFORE => '\\1',
             GESHI_AFTER => '\\3'
             ),
-        //Hex mem address
-        5 => '0x[a-f0-9]+',
         //Line numbers
-        6 => array(
+        5 => array(
             GESHI_SEARCH => '(:)(\d+)(\s*)$',
             GESHI_REPLACE => '\\2',
             GESHI_MODIFIERS => 'm',
@@ -157,19 +155,44 @@ $language_data = array (
             GESHI_AFTER => '\\3'
             ),
         //Location
+        6 => array(
+            GESHI_SEARCH => '(\s+)(in\s+)?([^ 0-9][^ ]*)([ \n]+\()',
+            GESHI_REPLACE => '\\3',
+            GESHI_MODIFIERS => '',
+            GESHI_BEFORE => '\\1\\2',
+            GESHI_AFTER => '\\4'
+            ),
+        // interesting parts: abort, qFatal, assertions, null ptrs, ...
         7 => array(
-            GESHI_SEARCH => '( in )([^ \(\)]+)( \()',
-            GESHI_REPLACE => '\\2',
+            GESHI_SEARCH => '\b((?:\*__GI_)?(?:__assert_fail|abort)|qFatal|0x0)\b([^\.]|$)',
+            GESHI_REPLACE => '\\1',
             GESHI_MODIFIERS => '',
-            GESHI_BEFORE => '\\1',
-            GESHI_AFTER => '\\3'
+            GESHI_BEFORE => '',
+            GESHI_AFTER => '\\2'
+            ),
+        // Namespace / Classes
+        8 => array(
+            GESHI_SEARCH => '\b(\w+)(::)',
+            GESHI_REPLACE => '\\1',
+            GESHI_MODIFIERS => 'U',
+            GESHI_BEFORE => '',
+            GESHI_AFTER => '\\2'
             ),
+        // make ptr adresses and  uninteresting
+        9 => '\b(?:0x[a-f0-9]{2,}|value\s+optimized\s+out)\b'
         ),
     'STRICT_MODE_APPLIES' => GESHI_NEVER,
     'SCRIPT_DELIMITERS' => array(
         ),
     'HIGHLIGHT_STRICT_BLOCK' => array(
+        ),
+    'PARSER_CONTROL' => array(
+        'ENABLE_FLAGS' => array(
+            'NUMBERS' => false
+            ),
         )
 );
 
+// kate: replace-tabs on; indent-width 4;
+
 ?>
diff --git a/inc/geshi/genero.php b/inc/geshi/genero.php
index a7ccf5fee..1d70d752c 100644
--- a/inc/geshi/genero.php
+++ b/inc/geshi/genero.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Lars Gersmann (lars.gersmann@gmail.com)
  * Copyright: (c) 2007 Lars Gersmann, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/07/01
  *
  * Genero (FOURJ's Genero 4GL) language file for GeSHi.
diff --git a/inc/geshi/genie.php b/inc/geshi/genie.php
index 66bea6dc7..898f9ef10 100644
--- a/inc/geshi/genie.php
+++ b/inc/geshi/genie.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Nicolas Joseph (nicolas.joseph@valaide.org)
  * Copyright: (c) 2009 Nicolas Joseph
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/04/29
  *
  * Genie language file for GeSHi.
diff --git a/inc/geshi/gettext.php b/inc/geshi/gettext.php
index e1c88e185..1dc8f8d24 100644
--- a/inc/geshi/gettext.php
+++ b/inc/geshi/gettext.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Milian Wolff (mail@milianw.de)
  * Copyright: (c) 2008 Milian Wolff
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/05/25
  *
  * GNU Gettext .po/.pot language file for GeSHi.
diff --git a/inc/geshi/glsl.php b/inc/geshi/glsl.php
index f9a37ed07..d810db3f0 100644
--- a/inc/geshi/glsl.php
+++ b/inc/geshi/glsl.php
@@ -4,7 +4,7 @@
  * -----
  * Author: Benny Baumann (BenBE@omorphia.de)
  * Copyright: (c) 2008 Benny Baumann (BenBE@omorphia.de)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/03/20
  *
  * glSlang language file for GeSHi.
diff --git a/inc/geshi/gml.php b/inc/geshi/gml.php
index 3f8a06c4f..57c42d4c8 100644
--- a/inc/geshi/gml.php
+++ b/inc/geshi/gml.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Jos� Jorge Enr�quez (jenriquez@users.sourceforge.net)
  * Copyright: (c) 2005 Jos� Jorge Enr�quez Rodr�guez (http://www.zonamakers.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/06/21
  *
  * GML language file for GeSHi.
diff --git a/inc/geshi/gnuplot.php b/inc/geshi/gnuplot.php
index 980561d35..59b343eb1 100644
--- a/inc/geshi/gnuplot.php
+++ b/inc/geshi/gnuplot.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Milian Wolff (mail@milianw.de)
  * Copyright: (c) 2008 Milian Wolff (http://milianw.de)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/07/07
  *
  * Gnuplot script language file for GeSHi.
diff --git a/inc/geshi/go.php b/inc/geshi/go.php
new file mode 100644
index 000000000..a71c2515e
--- /dev/null
+++ b/inc/geshi/go.php
@@ -0,0 +1,375 @@
+ 'Go',
+    'COMMENT_SINGLE' => array(1 => '//'),
+    'COMMENT_MULTI' => array('/*' => '*/'),
+    'COMMENT_REGEXP' => array(
+        # Raw strings (escapes and linebreaks ignored)
+        2 => "#`[^`]*`#"
+        ),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"', "'"),
+    'ESCAPE_CHAR' => '',
+    'ESCAPE_REGEXP' => array(
+        1 => "#\\\\[abfnrtv\\\\\'\"]#",
+        2 => "#\\\\[0-7]{3}#",
+        3 => "#\\\\x[0-9a-fA-F]{2}#",
+        4 => "#\\\\u[0-9a-fA-F]{4}#",
+        5 => "#\\\\U[0-9a-fA-F]{8}#"
+        ),
+    'NUMBERS' => array(
+        # integer literals (possibly imaginary)
+        0 => '\b([1-9][0-9]*i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b',
+        # real floating point literals
+        1 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?)\b',
+        # imaginary floating point literals
+        2 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?i)\b'
+        ),
+    'KEYWORDS' => array(
+        # statements
+        1 => array(
+            'break', 'case', 'const', 'continue', 'default', 'defer', 'else',
+            'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package',
+            'range', 'return', 'select', 'switch', 'type', 'var'
+            ),
+        # literals
+        2 => array(
+            'nil', 'true', 'false'
+            ),
+        # built-in functions
+        3 => array(
+            'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx',
+            'real', 'imag', 'panic', 'recover', 'print', 'println'
+            ),
+        # built-in types
+        4 => array(
+            'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8',
+            'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64',
+            'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint',
+            'int', 'float', 'complex', 'uintptr', 'string'
+            ),
+        # library types
+        5 => array(
+            'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString',
+            'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir',
+            'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field',
+            'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node',
+            'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt',
+            'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError',
+            'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational',
+            'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher',
+            'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter',
+            'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment',
+            'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State',
+            'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc',
+            'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op',
+            'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType',
+            'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType',
+            'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError',
+            'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue',
+            'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType',
+            'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader',
+            'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type',
+            'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType',
+            'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag',
+            'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64',
+            'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64',
+            'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA',
+            'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32',
+            'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32',
+            'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex',
+            'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType',
+            'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType',
+            'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType',
+            'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError',
+            'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType',
+            'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue',
+            'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType',
+            'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType',
+            'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType',
+            'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError',
+            'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope',
+            'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue',
+            'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue',
+            'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable',
+            'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue',
+            'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag',
+            'flag.Value', 'flate.CorruptInputError', 'flate.InternalError',
+            'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError',
+            'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer',
+            'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError',
+            'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table',
+            'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater',
+            'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64',
+            'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError',
+            'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc',
+            'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux',
+            'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError',
+            'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage',
+            'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA',
+            'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted',
+            'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor',
+            'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter',
+            'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker',
+            'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader',
+            'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt',
+            'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper',
+            'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader',
+            'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder',
+            'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError',
+            'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler',
+            'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger',
+            'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load',
+            'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section',
+            'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment',
+            'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread',
+            'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError',
+            'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError',
+            'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn',
+            'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn',
+            'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError',
+            'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article',
+            'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch',
+            'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event',
+            'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError',
+            'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit',
+            'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process',
+            'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError',
+            'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError',
+            'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo',
+            'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff',
+            'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set',
+            'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor',
+            'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError',
+            'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError',
+            'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler',
+            'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited',
+            'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate',
+            'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError',
+            'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand',
+            'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError',
+            'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType',
+            'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir',
+            'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type',
+            'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value',
+            'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type',
+            'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value',
+            'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType',
+            'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value',
+            'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type',
+            'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType',
+            'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue',
+            'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType',
+            'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType',
+            'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType',
+            'reflect.StringValue', 'reflect.StructField', 'reflect.StructType',
+            'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type',
+            'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value',
+            'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type',
+            'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue',
+            'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType',
+            'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp',
+            'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest',
+            'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError',
+            'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey',
+            'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType',
+            'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type',
+            'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error',
+            'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType',
+            'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type',
+            'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType',
+            'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType',
+            'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType',
+            'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type',
+            'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type',
+            'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType',
+            'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error',
+            'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position',
+            'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event',
+            'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send',
+            'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface',
+            'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError',
+            'strings.Reader', 'sync.Mutex', 'sync.RWMutex',
+            'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent',
+            'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet',
+            'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec',
+            'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr',
+            'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t',
+            'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4',
+            'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit',
+            'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4',
+            'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t',
+            'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec',
+            'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t',
+            'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus',
+            'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer',
+            'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error',
+            'template.FormatterMap', 'template.Template', 'testing.Benchmark',
+            'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time',
+            'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState',
+            'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange',
+            'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface',
+            'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler',
+            'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate',
+            'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name',
+            'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm',
+            'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr',
+            'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement',
+            'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher',
+            'xtea.KeySizeError'
+            )
+        ),
+    'SYMBOLS' => array(
+        # delimiters
+        1 => array(
+            '(', ')', '{', '}', '[', ']', ',', ':', ';'
+            ),
+        # assignments
+        2 => array(
+            '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=',
+            '^=', '|=', '=', '++', '--'
+            ),
+        # operators
+        3 => array(
+            '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^',
+            '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'),
+        # vararg
+        4 => array(
+            '...'
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            # statements
+            1 => 'color: #b1b100; font-weight: bold;',
+            # literals
+            2 => 'color: #000000; font-weight: bold;',
+            # built-in functions
+            3 => 'color: #000066;',
+            # built-in types
+            4 => 'color: #993333;',
+            # library types
+            5 => 'color: #003399;'
+            ),
+        'COMMENTS' => array(
+            # single-line comments
+            1 => 'color: #666666; font-style: italic;',
+            # raw strings
+            2 => 'color: #0000ff;',
+            # multi-line comments
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            # simple escape
+            1 => 'color: #000099; font-weight: bold;',
+            # octal escape
+            2 => 'color: #000099;',
+            # hex escape
+            3 => 'color: #000099;',
+            # unicode escape
+            4 => 'color: #000099;',
+            # long unicode escape
+            5 => 'color: #000099;'
+            ),
+        'BRACKETS' => array(
+            ),
+        'STRINGS' => array(
+            0 => 'color: #0000ff;',
+            0 => 'color: #cc66cc;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;'
+            ),
+        'METHODS' => array(
+            0 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            # delimiters
+            1 => 'color: #339933;',
+            # assignments
+            2 => 'color: #339933;',
+            # operators
+            3 => 'color: #339933;',
+            # vararg (highlighted as a keyword)
+            4 => 'color: #000000; font-weight: bold;'
+            ),
+        'REGEXPS' => array(
+            # If CSS classes are enabled, these would be highlighted as numbers (nu0)
+            # integer literals (possibly imaginary)
+            //0 => 'color: #cc66cc;',
+            # real floating point literals
+            //1 => 'color: #cc66cc;',
+            # imaginary floating point literals
+            //2 => 'color: #cc66cc;'
+            ),
+        'SCRIPT' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => '',
+        5 => 'http://golang.org/search?q={FNAME}'
+        ),
+    'REGEXPS' => array(
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(1 => '.'),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(),
+    'HIGHLIGHT_STRICT_BLOCK' => array(),
+    'PARSER_CONTROL' => array(
+        'ENABLE_FLAGS' => array(
+            'BRACKETS' => GESHI_NEVER, # handled by symbols
+            )
+        )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/groovy.php b/inc/geshi/groovy.php
index f2a2e9ab5..8a250245a 100644
--- a/inc/geshi/groovy.php
+++ b/inc/geshi/groovy.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Ivan F. Villanueva B. (geshi_groovy@artificialidea.com)
  * Copyright: (c) 2006 Ivan F. Villanueva B.(http://www.artificialidea.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/04/29
  *
  * Groovy language file for GeSHi.
@@ -983,15 +983,15 @@ $language_data = array (
             )
         ),
     'URLS' => array(
-        1 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}',
-        2 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}',
+        1 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}',
+        2 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAMEL}',
         3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F',
-        4 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}',
-        5 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}',
-        6 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}',
-        7 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}',
-        8 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}',
-        9 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}'
+        4 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
+        5 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
+        6 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
+        7 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
+        8 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}',
+        9 => 'http://www.google.de/search?q=site%3Agroovy.codehaus.org/%20{FNAME}'
         ),
     'OOLANG' => true,
     'OBJECT_SPLITTERS' => array(
diff --git a/inc/geshi/gwbasic.php b/inc/geshi/gwbasic.php
index 7b2385de7..e35a322a4 100644
--- a/inc/geshi/gwbasic.php
+++ b/inc/geshi/gwbasic.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: José Gabriel Moya Yangüela (josemoya@gmail.com)
  * Copyright: (c) 2010 José Gabriel Moya Yangüela (http://doc.apagada.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/01/30
  *
  * GwBasic language file for GeSHi.
diff --git a/inc/geshi/haskell.php b/inc/geshi/haskell.php
index 4997a26c3..ce1b3bf69 100644
--- a/inc/geshi/haskell.php
+++ b/inc/geshi/haskell.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com)
  * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/08/27
  *
  * Haskell language file for GeSHi.
diff --git a/inc/geshi/hicest.php b/inc/geshi/hicest.php
index 6cb61f87c..67d8d114a 100644
--- a/inc/geshi/hicest.php
+++ b/inc/geshi/hicest.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Georg Petrich (spt@hicest.com)
  * Copyright: (c) 2010 Georg Petrich (http://www.HicEst.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/03/15
  *
  * HicEst language file for GeSHi.
diff --git a/inc/geshi/hq9plus.php b/inc/geshi/hq9plus.php
index 50a0f80c6..2cce643df 100644
--- a/inc/geshi/hq9plus.php
+++ b/inc/geshi/hq9plus.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/31
  *
  * HQ9+ language file for GeSHi.
diff --git a/inc/geshi/html4strict.php b/inc/geshi/html4strict.php
index 301513e4e..68ba72328 100644
--- a/inc/geshi/html4strict.php
+++ b/inc/geshi/html4strict.php
@@ -4,7 +4,7 @@
  * ---------------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/10
  *
  * HTML 4.01 strict language file for GeSHi.
@@ -59,41 +59,23 @@ $language_data = array (
     'KEYWORDS' => array(
         2 => array(
             'a', 'abbr', 'acronym', 'address', 'applet',
-
             'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b',
-
             'caption', 'center', 'cite', 'code', 'colgroup', 'col',
-
             'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt',
-
             'em',
-
             'fieldset', 'font', 'form', 'frame', 'frameset',
-
             'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html',
-
             'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
-
             'kbd',
-
             'label', 'legend', 'link', 'li',
-
             'map', 'meta',
-
             'noframes', 'noscript',
-
             'object', 'ol', 'optgroup', 'option',
-
             'param', 'pre', 'p',
-
             'q',
-
             'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's',
-
             'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt',
-
             'ul', 'u',
-
             'var',
             ),
         3 => array(
@@ -151,6 +133,7 @@ $language_data = array (
             0 => 'color: #66cc66;'
             ),
         'SCRIPT' => array(
+            -2 => 'color: #404040;', // CDATA
             -1 => 'color: #808080; font-style: italic;', // comments
             0 => 'color: #00bbdd;',
             1 => 'color: #ddbb00;',
@@ -170,6 +153,9 @@ $language_data = array (
         ),
     'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
     'SCRIPT_DELIMITERS' => array(
+        -2 => array(
+            ' ']]>'
+            ),
         -1 => array(
             ''
             ),
@@ -184,6 +170,7 @@ $language_data = array (
             )
     ),
     'HIGHLIGHT_STRICT_BLOCK' => array(
+        -2 => false,
         -1 => false,
         0 => false,
         1 => false,
@@ -200,4 +187,4 @@ $language_data = array (
     )
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/html5.php b/inc/geshi/html5.php
new file mode 100644
index 000000000..7ffd4a05d
--- /dev/null
+++ b/inc/geshi/html5.php
@@ -0,0 +1,212 @@
+ 'HTML',
+    'COMMENT_SINGLE' => array(),
+    'COMMENT_MULTI' => array(),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array("'", '"'),
+    'ESCAPE_CHAR' => '',
+    'KEYWORDS' => array(
+        2 => array(
+            'a', 'abbr', 'address', 'article', 'aside', 'audio'.
+
+            'base', 'bdo', 'blockquote', 'body', 'br', 'button', 'b',
+
+            'caption', 'cite', 'code', 'colgroup', 'col', 'canvas', 'command', 'datalist', 'details',
+
+            'dd', 'del', 'dfn', 'div', 'dl', 'dt',
+
+            'em', 'embed',
+
+            'fieldset', 'form', 'figcaption', 'figure', 'footer',
+
+            'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'header', 'hgroup',
+
+            'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i',
+
+            'kbd', 'keygen',
+
+            'label', 'legend', 'link', 'li',
+
+            'map', 'meta', 'mark', 'meter',
+
+            'noscript', 'nav',
+
+            'object', 'ol', 'optgroup', 'option', 'output',
+
+            'param', 'pre', 'p', 'progress',
+
+            'q',
+
+            'rp', 'rt', 'ruby',
+
+            'samp', 'script', 'select', 'small', 'span', 'strong', 'style', 'sub', 'sup', 's', 'section', 'source', 'summary',
+
+            'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'time',
+
+            'ul',
+
+            'var', 'video',
+
+            'wbr',
+            ),
+        3 => array(
+            'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', 'autocomplete', 'autofocus',
+            'background', 'bgcolor', 'border',
+            'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', 'contenteditable', 'contextmenu',
+            'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', 'draggable', 'dropzone',
+            'enctype',
+            'face', 'for', 'frame', 'frameborder', 'form', 'formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
+            'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', 'hidden',
+            'id', 'ismap',
+            'label', 'lang', 'language', 'link', 'longdesc',
+            'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', 'min', 'max',
+            'name', 'nohref', 'noresize', 'noshade', 'nowrap', 'novalidate',
+            'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onselect', 'onsubmit', 'onunload', 'onafterprint', 'onbeforeprint', 'onbeforeonload', 'onerror', 'onhaschange', 'onmessage', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpopstate', 'onredo', 'onresize', 'onstorage', 'onundo', 'oncontextmenu', 'onformchange', 'onforminput', 'oninput', 'oninvalid', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onmousewheel', 'onscroll', 'oncanplay', 'oncanplaythrough', 'ondurationchange', 'onemptied', 'onended', 'onloadeddata', 'onloadedmetadata', 'onloadstart', 'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreadystatechange', 'onseeked', 'onseeking', 'onstalled', 'onsuspend', 'ontimeupdate', 'onvolumechange', 'onwaiting',
+            'profile', 'prompt', 'pattern', 'placeholder',
+            'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', 'required',
+            'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', 'spellcheck', 'step',
+            'tabindex', 'target', 'text', 'title', 'type',
+            'usemap',
+            'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
+            'width'
+            )
+        ),
+    'SYMBOLS' => array(
+        '/', '='
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        2 => false,
+        3 => false,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            2 => 'color: #000000; font-weight: bold;',
+            3 => 'color: #000066;'
+            ),
+        'COMMENTS' => array(
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #66cc66;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #ff0000;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;'
+            ),
+        'METHODS' => array(
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #66cc66;'
+            ),
+        'SCRIPT' => array(
+            -2 => 'color: #404040;', // CDATA
+            -1 => 'color: #808080; font-style: italic;', // comments
+            0 => 'color: #00bbdd;',
+            1 => 'color: #ddbb00;',
+            2 => 'color: #009900;'
+            ),
+        'REGEXPS' => array(
+            )
+        ),
+    'URLS' => array(
+        2 => 'http://december.com/html/4/element/{FNAMEL}.html',
+        3 => ''
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(
+        ),
+    'REGEXPS' => array(
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
+    'SCRIPT_DELIMITERS' => array(
+        -2 => array(
+            ' ']]>'
+            ),
+        -1 => array(
+            ''
+            ),
+        0 => array(
+            ' '>'
+            ),
+        1 => array(
+            '&' => ';'
+            ),
+        2 => array(
+            '<' => '>'
+            )
+    ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        -2 => false,
+        -1 => false,
+        0 => false,
+        1 => false,
+        2 => true
+        ),
+    'TAB_WIDTH' => 4,
+    'PARSER_CONTROL' => array(
+        'KEYWORDS' => array(
+            2 => array(
+                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
+                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
+            )
+        )
+    )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/icon.php b/inc/geshi/icon.php
index 0712c21c3..e68c2f17f 100644
--- a/inc/geshi/icon.php
+++ b/inc/geshi/icon.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Matt Oates (mattoates@gmail.com)
  * Copyright: (c) 2010 Matt Oates (http://mattoates.co.uk)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/04/24
  *
  * Icon language file for GeSHi.
diff --git a/inc/geshi/idl.php b/inc/geshi/idl.php
index d2d9a92fa..84e57f30b 100644
--- a/inc/geshi/idl.php
+++ b/inc/geshi/idl.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Cedric Bosdonnat (cedricbosdo@openoffice.org)
  * Copyright: (c) 2006 Cedric Bosdonnat
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/08/20
  *
  * Unoidl language file for GeSHi.
diff --git a/inc/geshi/ini.php b/inc/geshi/ini.php
index e48cc045c..2ca7feb0b 100644
--- a/inc/geshi/ini.php
+++ b/inc/geshi/ini.php
@@ -4,7 +4,7 @@
  * --------
  * Author: deguix (cevo_deguix@yahoo.com.br)
  * Copyright: (c) 2005 deguix
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/03/27
  *
  * INI language file for GeSHi.
diff --git a/inc/geshi/inno.php b/inc/geshi/inno.php
index 9ec8cdfd9..b0878e298 100644
--- a/inc/geshi/inno.php
+++ b/inc/geshi/inno.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Thomas Klingler (hotline@theratech.de) based on delphi.php from J�rja Norbert (jnorbi@vipmail.hu)
  * Copyright: (c) 2004 J�rja Norbert, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/07/29
  *
  * Inno Script language inkl. Delphi (Object Pascal) language file for GeSHi.
diff --git a/inc/geshi/intercal.php b/inc/geshi/intercal.php
index cd800a8eb..06fd2b41b 100644
--- a/inc/geshi/intercal.php
+++ b/inc/geshi/intercal.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/31
  *
  * INTERCAL language file for GeSHi.
diff --git a/inc/geshi/io.php b/inc/geshi/io.php
index 94c278f03..3d6341fee 100644
--- a/inc/geshi/io.php
+++ b/inc/geshi/io.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2006 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/09/23
  *
  * Io language file for GeSHi. Thanks to Johnathan Wright for the suggestion and help
diff --git a/inc/geshi/j.php b/inc/geshi/j.php
index 61154c7ef..5d464c922 100644
--- a/inc/geshi/j.php
+++ b/inc/geshi/j.php
@@ -4,13 +4,15 @@
  * --------
  * Author: Ric Sherlock (tikkanz@gmail.com)
  * Copyright: (c) 2009 Ric Sherlock
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/11/10
  *
  * J language file for GeSHi.
  *
  * CHANGES
  * -------
+ *  2010/07/18 (1.0.8.10)
+ *   - Infinity and negative infinity recognized as numbers
  *  2010/03/01 (1.0.8.8)
  *   - Add support for label_xyz. and goto_xyz.
  *   - Fix highlighting of for_i.
@@ -29,7 +31,6 @@
  *  2009/11/12 (1.0.0)
  *   -  First Release
  *
- *
  * TODO (updated 2010/01/27)
  * -------------------------
  *  * combine keyword categories by using conditional regex statement in PARSER CONTROL?
@@ -53,7 +54,7 @@
  *
  ************************************************************************************/
 
-$language_data = array (
+$language_data = array(
     'LANG_NAME' => 'J',
     'COMMENT_SINGLE' => array(),
     'COMMENT_MULTI' => array(),
@@ -69,12 +70,7 @@ $language_data = array (
     'HARDESCAPE' => array("'"),
     'HARDCHAR' => "'",
     'NUMBERS' => array(
-        //Some instances of infinity are not correctly handled by GeSHi NUMBERS currently
-        //There are two solutions labelled "infinity Method A" and "infinity Method B"
-        //infinity Method B - requires following adjustment to line 3349 of geshi.php
-        //   preg_match('#\d#'  becomes  preg_match('#[\d_]#'
-        0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?)(?![\w\.\:])',       //infinity Method A
-        //0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', //infinity Method B
+        0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])',
         ),
     'KEYWORDS' => array(
         //Control words
@@ -87,40 +83,6 @@ $language_data = array (
         2 => array(
             'm', 'n', 'u', 'v', 'x', 'y'
             ),
-/*
-Commented out for now due to conflicts with Lang Check
-        //Primitives beginning with a symbol (except . or :)
-        6 => array(
-            '=', '<', '<.', '<:',                  //verbs
-            '_:','>', '>.', '>:',
-            '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:',
-            '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:',
-            ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:',
-            '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:',
-            '".', '":', '?', '?.',
-            '~', '\/;', '\\', '/.', '\\.', '}',             //adverbs
-            '^:', ';.', '!.', '!:',                         //conj
-            '"', '`', '`:', '@', '@.', '@:',
-            '&', '&.', '&:', '&.:',
-            '_.',                                           //nouns
-            '=.', '=:',                                     //other
-            ),
-        //Primitives beginning with a letter or number
-        7 => array(
-            'A.', 'c.', 'C.', 'e.', 'E.',                   //verbs
-            'i.', 'i:', 'I.', 'j.', 'L.', 'o.',
-            'p.', 'p..', 'p:', 'q:', 'r.', 's:', 'u:', 'x:',
-            '_9:', '_8:', '_7:', '_6:', '_5:', '_4:', '_3:', '_2:', '_1:',
-            '0:', '1:', '2:', '3:', '4:', '5:', '6:', '7:', '8:', '9:',
-            'b.', 'f.', 'M.', 't.', 't:',                   //adverbs
-            'd.', 'D.', 'D:', 'H.', 'L:', 'S:', 'T.',       //conj
-            'a.', 'a:',                                     //nouns
-            ),
-        //Primitives beginning with symbol . or :
-        8 => array(
-            '..', '.:', '.', ':.', '::', ':',               //conj
-            ),
-*/
         ),
     'SYMBOLS' => array(
         //Punctuation
@@ -132,17 +94,17 @@ Commented out for now due to conflicts with Lang Check
         GESHI_COMMENTS => false,
         1 => true,
         2 => true,
-//        6 => true,
-//        7 => true,
-//        8 => true,
+        //6 => true,
+        //7 => true,
+        //8 => true,
         ),
     'STYLES' => array(
         'KEYWORDS' => array(
             1 => 'color: #0000ff; font-weight: bold;',
             2 => 'color: #0000cc; font-weight: bold;',
-//            6 => 'color: #000000; font-weight: bold;',
-//            7 => 'color: #000000; font-weight: bold;',
-//            8 => 'color: #000000; font-weight: bold;',
+            //6 => 'color: #000000; font-weight: bold;',
+            //7 => 'color: #000000; font-weight: bold;',
+            //8 => 'color: #000000; font-weight: bold;',
             ),
         'COMMENTS' => array(
             1 => 'color: #666666; font-style: italic;',
@@ -171,7 +133,6 @@ Commented out for now due to conflicts with Lang Check
             ),
         'REGEXPS' => array(
             0 => 'color: #0000ff; font-weight: bold;',   //for_xyz. - same as kw1
-            1 => 'color: #009999; font-weight: bold;'    //infinity - same as nu0
             ),
         'SCRIPT' => array(
             )
@@ -179,16 +140,15 @@ Commented out for now due to conflicts with Lang Check
     'URLS' => array(
         1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm',
         2 => '',
-//        6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
-//        7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
-//        8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
+        //6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
+        //7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
+        //8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary',
         ),
     'OOLANG' => false,
     'OBJECT_SPLITTERS' => array(
         ),
     'REGEXPS' => array(
         0 => '\b(for|goto|label)_[a-zA-Z]\w*\.',   //for_xyz. - should be kw1
-        1 => '\b__?(?![\w\.\:])'                   //infinity - should be nu0
         ),
     'STRICT_MODE_APPLIES' => GESHI_NEVER,
     'SCRIPT_DELIMITERS' => array(
@@ -199,6 +159,9 @@ Commented out for now due to conflicts with Lang Check
         'ENABLE_FLAGS' => array(
             'BRACKETS' => GESHI_NEVER,
             ),
+        'NUMBERS' => array(
+            'PRECHECK_RX' => '#[\d_]#',            // underscore is valid number
+            ),
         'KEYWORDS' => array(
             //Control words
             2 => array(
@@ -224,4 +187,4 @@ Commented out for now due to conflicts with Lang Check
         )
 );
 
-?>
\ No newline at end of file
+?>
diff --git a/inc/geshi/java.php b/inc/geshi/java.php
index 3269dffe2..2f3d9fb96 100644
--- a/inc/geshi/java.php
+++ b/inc/geshi/java.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/10
  *
  * Java language file for GeSHi.
diff --git a/inc/geshi/java5.php b/inc/geshi/java5.php
index bc9af739a..6163995f8 100644
--- a/inc/geshi/java5.php
+++ b/inc/geshi/java5.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/10
  *
  * Java language file for GeSHi.
diff --git a/inc/geshi/javascript.php b/inc/geshi/javascript.php
index 429cdd653..93997a70c 100644
--- a/inc/geshi/javascript.php
+++ b/inc/geshi/javascript.php
@@ -4,7 +4,7 @@
  * --------------
  * Author: Ben Keen (ben.keen@gmail.com)
  * Copyright: (c) 2004 Ben Keen (ben.keen@gmail.com), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/20
  *
  * JavaScript language file for GeSHi.
@@ -45,8 +45,10 @@ $language_data = array (
     'LANG_NAME' => 'Javascript',
     'COMMENT_SINGLE' => array(1 => '//'),
     'COMMENT_MULTI' => array('/*' => '*/'),
-    //Regular Expressions
-    'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"),
+    'COMMENT_REGEXP' => array(
+        //Regular Expressions
+        2 => "/(?<=[\\s^])(s|tr|y)\\/(?!\*)(?!\s)(?:\\\\.|(?!\n)[^\\/\\\\])+(? GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array("'", '"'),
     'ESCAPE_CHAR' => '\\',
@@ -147,4 +149,4 @@ $language_data = array (
         )
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/jquery.php b/inc/geshi/jquery.php
index 54e653ed1..9374ec1ca 100644
--- a/inc/geshi/jquery.php
+++ b/inc/geshi/jquery.php
@@ -4,7 +4,7 @@
  * --------------
  * Author: Rob Loach (http://www.robloach.net)
  * Copyright: (c) 2009 Rob Loach (http://www.robloach.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/07/20
  *
  * jQuery 1.3 language file for GeSHi.
diff --git a/inc/geshi/kixtart.php b/inc/geshi/kixtart.php
index 62cb54652..f3f29e2e3 100644
--- a/inc/geshi/kixtart.php
+++ b/inc/geshi/kixtart.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Riley McArdle (riley@glyff.net)
  * Copyright: (c) 2007 Riley McArdle (http://www.glyff.net/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/08/31
  *
  * PHP language file for GeSHi.
diff --git a/inc/geshi/klonec.php b/inc/geshi/klonec.php
index e47e597ef..553763d61 100644
--- a/inc/geshi/klonec.php
+++ b/inc/geshi/klonec.php
@@ -4,7 +4,7 @@
  * --------
  * Author: AUGER Mickael
  * Copyright: Synchronic
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/04/16
  *
  * KLone with C language file for GeSHi.
diff --git a/inc/geshi/klonecpp.php b/inc/geshi/klonecpp.php
index 1a2d2082b..6fe0df1ef 100644
--- a/inc/geshi/klonecpp.php
+++ b/inc/geshi/klonecpp.php
@@ -4,7 +4,7 @@
  * --------
  * Author: AUGER Mickael
  * Copyright: Synchronic
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/04/16
  *
  * KLone with C++ language file for GeSHi.
diff --git a/inc/geshi/latex.php b/inc/geshi/latex.php
index 1ba3d409e..91c034236 100644
--- a/inc/geshi/latex.php
+++ b/inc/geshi/latex.php
@@ -4,7 +4,7 @@
  * -----
  * Author: efi, Matthias Pospiech (matthias@pospiech.eu)
  * Copyright: (c) 2006 efi, Matthias Pospiech (matthias@pospiech.eu), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/09/23
  *
  * LaTeX language file for GeSHi.
@@ -185,7 +185,7 @@ $language_data = array (
         8 => "\\\\(?:end|begin)(?=[^a-zA-Z])",
         // {parameters}
         9 => array(
-            GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*(?=\\})",
+            GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*?(?=\\})",
             GESHI_REPLACE => '\0',
             GESHI_MODIFIERS => 'Us',
             GESHI_BEFORE => '',
diff --git a/inc/geshi/lb.php b/inc/geshi/lb.php
new file mode 100644
index 000000000..390fe19a9
--- /dev/null
+++ b/inc/geshi/lb.php
@@ -0,0 +1,162 @@
+ 'Liberty BASIC',
+    'COMMENT_SINGLE' => array(1 => '\''),
+    'COMMENT_MULTI' => array(),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"'),
+    'ESCAPE_CHAR' => '',
+    'KEYWORDS' => array(
+        1 => array(
+            'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean',
+            'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case',
+            'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm',
+            'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump',
+            'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog',
+            'files', 'fontdialog', 'for', 'function', 'get', 'gettrim',
+            'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox',
+            'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp',
+            'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu',
+            'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on',
+            'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi',
+            'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr',
+            'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick',
+            'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan',
+            'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi',
+            'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor',
+            'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp',
+            'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while',
+            'word', 'xor'
+            ),
+        2 => array(
+            'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$',
+            'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd',
+            'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof',
+            'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not',
+            'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab',
+            'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val',
+            'winstring', 'word$'
+            ),
+        3 => array(
+            'BackgroundColor$', 'Com', 'ComboboxColor$', 'ComError', 'ComErrorNumber',
+            'CommandLine$', 'ComPortNumber', 'DefaultDir$',
+            'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$',
+            'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z',
+            'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z',
+            'Joy2button1', 'Joy2button2', 'ListboxColor$', 'MouseX', 'MouseY', 'Platform$',
+            'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', 'StartupDir$',
+            'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight',
+            'WindowWidth', 'UpperLeftX', 'UpperLeftY'
+            )
+        ),
+    'SYMBOLS' => array(
+        1 => array(
+            '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#'
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false,
+        2 => false,
+        3 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #0000FF;',
+            2 => 'color: #AD0080;',
+            3 => 'color: #008080;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #666666; font-style: italic;',
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #009900;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #008000;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #FF0000;',
+            ),
+        'METHODS' => array(
+            0 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            1 => 'color: #339933;'
+            ),
+        'REGEXPS' => array(),
+        'SCRIPT' => array()
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => ''
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(),
+    'REGEXPS' => array(),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(),
+    'HIGHLIGHT_STRICT_BLOCK' => array(),
+    'PARSER_CONTROL' => array(
+        'KEYWORDS' => array(
+            2 => array(
+                //In LB, the second keyword list is a list of built-in functions,
+                //and their names should not be highlighted unless being used
+                //as a function name.
+                'DISALLOWED_AFTER' => '(?=\s*\()'
+                )
+            )
+        )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/lisp.php b/inc/geshi/lisp.php
index a8f50691e..82aa7f69b 100644
--- a/inc/geshi/lisp.php
+++ b/inc/geshi/lisp.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * Generic Lisp language file for GeSHi.
diff --git a/inc/geshi/llvm.php b/inc/geshi/llvm.php
new file mode 100644
index 000000000..f58be2da8
--- /dev/null
+++ b/inc/geshi/llvm.php
@@ -0,0 +1,385 @@
+ 'LLVM Intermediate Representation',
+    'COMMENT_SINGLE' => array(1 => ';'),
+    'COMMENT_MULTI' => array(),
+    'HARDQUOTE' => array("\"", "\""),
+    'HARDESCAPE' => array("\"", "\\"),
+    'HARDCHAR' => "\\",
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"'),
+    'ESCAPE_CHAR' => '',
+    'ESCAPE_REGEXP' => array(
+        //Simple Single Char Escapes
+        // 1 => "#\\\\[nfrtv\$\"\n\\\\]#i",
+        //Hexadecimal Char Specs
+        // 2 => "#\\\\x[\da-fA-F]{1,2}#i",
+        //Octal Char Specs
+        // 3 => "#\\\\[0-7]{1,3}#",
+        //String Parsing of Variable Names
+        // 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i",
+        //Experimental extension supporting cascaded {${$var}} syntax
+        // 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i",
+        //Format String support in ""-Strings
+        // 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#"
+        ),
+    'NUMBERS' =>
+    GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO,
+    'KEYWORDS' => array(
+        0 => array(
+            'to', 'nuw', 'nsw', 'align', 'inbounds', 'entry', 'return'
+            ),
+        //Terminator Instructions
+        1 => array(
+            'ret', 'br', 'switch', 'indirectbr', 'invoke', 'unwind', 'unreachable'
+            ),
+        //Binary Operations
+        2 => array(
+            'add', 'fadd', 'sub', 'fsub', 'mul', 'fmul', 'udiv', 'sdiv', 'fdiv', 'urem', 'frem', 'srem'
+            ),
+        //Bitwise Binary Operations
+        3 => array(
+            'shl', 'lshr', 'ashr', 'and', 'or', 'xor'
+            ),
+        //Vector Operations
+        4 => array(
+            'extractelement', 'insertelement', 'shufflevector'
+            ),
+        //Aggregate Operations
+        5 => array(
+            'extractvalue', 'insertvalue'
+            ),
+        //Memory Access and Addressing Operations
+        6 => array(
+            'alloca', 'load', 'store', 'getelementptr'
+            ),
+        //Conversion Operations
+        7 => array(
+            'trunc', 'zext', 'sext', 'fptrunc', 'fpext', 'fptoui', 'fptosi',
+            'uitofp', 'sitofp', 'ptrtoint', 'inttoptr', 'bitcast'
+            ),
+        //Other Operations
+        8 => array(
+            'icmp', 'fcmp', 'phi', 'select', 'call', 'va_arg'
+            ),
+        //Linkage Types
+        9 => array(
+            'private', 'linker_private', 'linker_private_weak', 'linker_private_weak_def_auto',
+            'internal', 'available_externally', 'linkonce', 'common', 'weak', 'appending',
+            'extern_weak', 'linkonce_odr', 'weak_odr', 'externally visible', 'dllimport', 'dllexport',
+            ),
+        //Calling Conventions
+        10 => array(
+            'ccc', 'fastcc', 'coldcc', 'cc 10'
+            ),
+        //Named Types
+        11 => array(
+            'type'
+            ),
+        //Parameter Attributes
+        12 => array(
+            'zeroext', 'signext', 'inreg', 'byval', 'sret', 'noalias', 'nocapture', 'nest'
+            ),
+        //Function Attributes
+        13 => array(
+            'alignstack', 'alwaysinline', 'inlinehint', 'naked', 'noimplicitfloat', 'noinline', 'noredzone', 'noreturn',
+            'nounwind', 'optsize', 'readnone', 'readonly', 'ssp', 'sspreq',
+            ),
+        //Module-Level Inline Assembly
+        14 => array(
+            'module asm'
+            ),
+        //Data Layout
+        15 => array(
+            'target datalayout'
+            ),
+        //Primitive Types
+        16 => array(
+            'x86mmx',
+            'void',
+            'label',
+            'metadata',
+            'opaque'
+            ),
+        //Floating Point Types
+        17 => array(
+            'float', 'double', 'fp128', 'x86_fp80', 'ppc_fp128',
+            ),
+        //Simple Constants
+        18 => array(
+            'false', 'true', 'null'
+            ),
+        //Global Variable and Function Addresses
+        19 => array(
+            'global', 'addrspace', 'constant', 'section'
+            ),
+        //Functions
+        20 => array(
+            'declare', 'define'
+            ),
+        //Complex Constants
+        21 => array(
+            'zeroinitializer'
+            ),
+        //Undefined Values
+        22 => array(
+            'undef'
+            ),
+        //Addresses of Basic Blocks
+        23 => array(
+            'blockaddress'
+            ),
+        //Visibility Styles
+        24 => array(
+            'default', 'hidden', 'protected'
+            ),
+        25 => array(
+            'volatile'
+            ),
+        26 => array(
+            'tail'
+            ),
+        ),
+    'SYMBOLS' => array(
+        0 => array(
+            '(', ')', '[', ']', '{', '}',
+            '!', '@', '%', '&', '|', '/',
+            '<', '>',
+            '=', '-', '+', '*',
+            '.', ':', ',', ';'
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true,
+        6 => true,
+        7 => true,
+        8 => true,
+        9 => true,
+        10 => true,
+        11 => true,
+        12 => true,
+        13 => true,
+        14 => true,
+        15 => true,
+        16 => true,
+        17 => true,
+        18 => true,
+        19 => true,
+        20 => true,
+        21 => true,
+        22 => true,
+        23 => true,
+        24 => true,
+        25 => true,
+        26 => true,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            0 => 'color: #209090;',
+            1 => 'color: #0000F0;',
+            2 => 'color: #00F000; font-weight: bold;',
+            3 => 'color: #F00000;',
+            4 => 'color: #00F0F0; font-weight: bold;',
+            5 => 'color: #F000F0; font-weight: bold;',
+            6 => 'color: #403020; font-weight: bold;',
+            7 => 'color: #909090; font-weight: bold;',
+            8 => 'color: #009090; font-weight: bold;',
+            9 => 'color: #900090; font-weight: bold;',
+            10 => 'color: #909000; font-weight: bold;',
+            11 => 'color: #000090; font-weight: bold;',
+            12 => 'color: #900000; font-weight: bold;',
+            13 => 'color: #009000; font-weight: bold;',
+            14 => 'color: #F0F090; font-weight: bold;',
+            15 => 'color: #F090F0; font-weight: bold;',
+            16 => 'color: #90F0F0; font-weight: bold;',
+            17 => 'color: #9090F0; font-weight: bold;',
+            18 => 'color: #90F090; font-weight: bold;',
+            19 => 'color: #F09090; font-weight: bold;',
+            20 => 'color: #4040F0; font-weight: bold;',
+            21 => 'color: #40F040; font-weight: bold;',
+            22 => 'color: #F04040; font-weight: bold;',
+            23 => 'color: #F0F040; font-weight: bold;',
+            24 => 'color: #F040F0; font-weight: bold;',
+            25 => 'color: #40F0F0; font-weight: bold;',
+            26 => 'color: #904040; font-weight: bold;',
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #666666; font-style: italic;',
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;',
+            1 => 'color: #000099; font-weight: bold;',
+            2 => 'color: #660099; font-weight: bold;',
+            3 => 'color: #660099; font-weight: bold;',
+            4 => 'color: #006699; font-weight: bold;',
+            5 => 'color: #006699; font-weight: bold; font-style: italic;',
+            6 => 'color: #009933; font-weight: bold;',
+            'HARD' => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #009900;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #0000ff;',
+            'HARD' => 'color: #0000ff;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;',
+            GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
+            GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
+            GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
+            ),
+        'METHODS' => array(
+            1 => 'color: #004000;',
+            2 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #339933;',
+            ),
+        'REGEXPS' => array(
+            0 => 'color: #007088;',
+            1 => 'color: #007088;',
+            // 2 => 'color: #000088;',
+            3 => 'color: #700088;',
+            4 => 'color: #010088;',
+            // 5 => 'color: #610088;',
+            // 6 => 'color: #616088;',
+            // 7 => 'color: #616988;',
+            // 8 => 'color: #616908;',
+            9 => 'color: #6109F8;',
+            ),
+        'SCRIPT' => array(
+            0 => '',
+            1 => '',
+            2 => '',
+            3 => '',
+            4 => '',
+            5 => ''
+            )
+        ),
+    'URLS' => array(
+        0 => '',
+        1 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        2 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        3 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        4 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        5 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        6 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        7 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        8 => 'http://llvm.org/docs/LangRef.html#i_{FNAME}',
+        9 => 'http://llvm.org/docs/LangRef.html#linkage_{FNAME}',
+        10 => 'http://llvm.org/docs/LangRef.html#callingconv',
+        11 => 'http://llvm.org/docs/LangRef.html#namedtypes',
+        12 => 'http://llvm.org/docs/LangRef.html#paramattrs',
+        13 => 'http://llvm.org/docs/LangRef.html#fnattrs',
+        14 => 'http://llvm.org/docs/LangRef.html#moduleasm',
+        15 => 'http://llvm.org/docs/LangRef.html#datalayout',
+        16 => 'http://llvm.org/docs/LangRef.html#t_{FNAME}',
+        17 => 'http://llvm.org/docs/LangRef.html#t_floating',
+        18 => 'http://llvm.org/docs/LangRef.html#simpleconstants',
+        19 => 'http://llvm.org/docs/LangRef.html#globalvars',
+        20 => 'http://llvm.org/docs/LangRef.html#functionstructure',
+        21 => 'http://llvm.org/docs/LangRef.html#complexconstants',
+        22 => 'http://llvm.org/docs/LangRef.html#undefvalues',
+        23 => 'http://llvm.org/docs/LangRef.html#blockaddress',
+        24 => 'http://llvm.org/docs/LangRef.html#visibility',
+        25 => 'http://llvm.org/docs/LangRef.html#volatile',
+        26 => 'http://llvm.org/docs/LangRef.html#i_call',
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(
+        ),
+    'REGEXPS' => array(
+        //Variables
+        0 => '%[-a-zA-Z$\._][-a-zA-Z$\._0-9]*',
+        //Labels
+        // 1 => '[-a-zA-Z$\._0-9]+:',
+        1 => '(?]*<)',
+        //Strings
+        // 2 => '"[^"]+"',
+        //Unnamed variable slots
+        3 => '%[-]?[0-9]+',
+        //Integer Types
+        4 => array(
+            GESHI_SEARCH => '(? '\\0',
+            GESHI_MODIFIERS => '',
+            GESHI_BEFORE => '',
+            GESHI_AFTER => ''
+            ),
+        //Comments
+        // 5 => ';.*',
+        //Integer literals
+        // 6 => '\\b[-]?[0-9]+\\b',
+        //Floating point constants
+        // 7 => '\\b[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\b',
+        //Hex constants
+        // 8 => '\\b0x[0-9A-Fa-f]+\\b',
+        //Global variables
+        9 => array(
+            GESHI_SEARCH => '@[-a-zA-Z$\._][-a-zA-Z$\._0-9]*',
+            GESHI_REPLACE => '\\0',
+            GESHI_MODIFIERS => '',
+            GESHI_BEFORE => '',
+            GESHI_AFTER => ''
+            ),
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_MAYBE,
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        0 => true,
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true
+        ),
+    'SCRIPT_DELIMITERS' => array(),
+    'TAB_WIDTH' => 4
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/locobasic.php b/inc/geshi/locobasic.php
index a3e22a7be..55aacc263 100644
--- a/inc/geshi/locobasic.php
+++ b/inc/geshi/locobasic.php
@@ -4,7 +4,7 @@
  * -------------
  * Author: Nacho Cabanes
  * Copyright: (c) 2009 Nacho Cabanes (http://www.nachocabanes.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/03/22
  *
  * Locomotive Basic (Amstrad CPC series) language file for GeSHi.
diff --git a/inc/geshi/logtalk.php b/inc/geshi/logtalk.php
index fb77bd6d3..b4eba764c 100644
--- a/inc/geshi/logtalk.php
+++ b/inc/geshi/logtalk.php
@@ -4,14 +4,25 @@
  * -----------
  *
  * Author: Paulo Moura (pmoura@logtalk.org)
- * Copyright: (c) 2009 Paulo Moura (http://logtalk.org/)
- * Release Version: 1.0.8.8
+ * Copyright: (c) 2009-2011 Paulo Moura (http://logtalk.org/)
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/24
  *
  * Logtalk language file for GeSHi.
  *
  * CHANGES
  * -------
+ * 2011/01/18 (1.1.4)
+ *  -  Added syntax coloring of ignore/1
+ * 2010/11/28 (1.1.3)
+ *  -  Added syntax coloring of conforms_to_protocol/2-3
+ * 2010/09/14 (1.1.2)
+ *  -  Added syntax coloring of coinductive/1
+ * 2010/06/23 (1.1.1)
+ *  -  Added syntax coloring of e/0 and pi/0
+ *  -  Added syntax coloring of ground/1, numbervars/3, keysort/2, and sort/2
+ * 2010/05/15 (1.1.0)
+ *  -  Added syntax coloring of callable/1 and compare/3
  * 2009/10/28 (1.0.0)
  *  -  First Release
  *
@@ -76,7 +87,7 @@ $language_data = array(
             // entity directives
             'calls', 'initialization', 'op', 'uses',
             // predicate directives
-            'alias', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized',
+            'alias', 'coinductive', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized',
             // module directives
             'export', 'module', 'reexport', 'use_module'
             ),
@@ -111,7 +122,7 @@ $language_data = array(
             'current_category', 'current_object', 'current_protocol',
             'category_property', 'object_property', 'protocol_property',
             // entity relations
-            'complements_object',
+            'complements_object', 'conforms_to_protocol',
             'extends_category', 'extends_object', 'extends_protocol',
             'implements_protocol', 'imports_category',
             'instantiates_class', 'specializes_class',
@@ -125,7 +136,7 @@ $language_data = array(
             // database
             'abolish', 'asserta', 'assertz', 'clause', 'retract', 'retractall',
             // control
-            'call', 'catch', 'once', 'throw',
+            'call', 'catch', 'ignore', 'once', 'throw',
             // all solutions predicates
             'bagof', 'findall', 'forall', 'setof',
             // multi-threading meta-predicates
@@ -139,9 +150,11 @@ $language_data = array(
             'number_chars', 'number_codes',
             'char_code',
             // term creation and decomposition
-            'arg', 'copy_term', 'functor',
+            'arg', 'copy_term', 'functor', 'numbervars',
             // term testing
-            'atom', 'atomic', 'compound', 'float', 'integer', 'nonvar', 'number', 'sub_atom', 'var',
+            'atom', 'atomic', 'callable', 'compound', 'float', 'ground', 'integer', 'nonvar', 'number', 'sub_atom', 'var',
+            // term comparison
+            'compare',
             // stream selection and control
             'current_input', 'current_output', 'set_input', 'set_output',
             'open', 'close', 'flush_output', 'stream_property',
@@ -156,8 +169,10 @@ $language_data = array(
             'write', 'writeq', 'write_canonical', 'write_term',
             'read', 'read_term',
             'char_conversion', 'current_char_conversion',
-            //
-            'halt'
+            // hooks
+            'halt',
+            // sorting
+            'keysort', 'sort'
             ),
         // Built-in predicates (no arguments)
         5 => array(
@@ -180,7 +195,7 @@ $language_data = array(
             ),
         // Evaluable functors (no arguments)
         7 => array(
-            'mod', 'rem'
+            'e', 'pi', 'mod', 'rem'
             ),
         ),
     'SYMBOLS' => array(
diff --git a/inc/geshi/lolcode.php b/inc/geshi/lolcode.php
index a804913cc..bcbad11c6 100644
--- a/inc/geshi/lolcode.php
+++ b/inc/geshi/lolcode.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/31
  *
  * LOLcode language file for GeSHi.
diff --git a/inc/geshi/lotusformulas.php b/inc/geshi/lotusformulas.php
index 862adbc82..5b755e55a 100644
--- a/inc/geshi/lotusformulas.php
+++ b/inc/geshi/lotusformulas.php
@@ -4,7 +4,7 @@
  * ------------------------
  * Author: Richard Civil (info@richardcivil.net)
  * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/04/12
  *
  * @Formula/@Command language file for GeSHi.
diff --git a/inc/geshi/lotusscript.php b/inc/geshi/lotusscript.php
index 1ef2f3eee..c2b2f45f5 100644
--- a/inc/geshi/lotusscript.php
+++ b/inc/geshi/lotusscript.php
@@ -4,7 +4,7 @@
  * ------------------------
  * Author: Richard Civil (info@richardcivil.net)
  * Copyright: (c) 2008 Richard Civil (info@richardcivil.net), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/04/12
  *
  * LotusScript language file for GeSHi.
diff --git a/inc/geshi/lscript.php b/inc/geshi/lscript.php
index b7e313212..51852414b 100644
--- a/inc/geshi/lscript.php
+++ b/inc/geshi/lscript.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Arendedwinter (admin@arendedwinter.com)
  * Copyright: (c) 2008 Beau McGuigan (http://www.arendedwinter.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 15/11/2008
  *
  * Lightwave Script language file for GeSHi.
diff --git a/inc/geshi/lsl2.php b/inc/geshi/lsl2.php
index e5f40969b..828e2b91c 100644
--- a/inc/geshi/lsl2.php
+++ b/inc/geshi/lsl2.php
@@ -4,7 +4,7 @@
  * --------
  * Author: William Fry (william.fry@nyu.edu)
  * Copyright: (c) 2009 William Fry
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/02/04
  *
  * Linden Scripting Language (LSL2) language file for GeSHi.
diff --git a/inc/geshi/lua.php b/inc/geshi/lua.php
index abeaa54ea..2ec6c0b88 100644
--- a/inc/geshi/lua.php
+++ b/inc/geshi/lua.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/10
  *
  * LUA language file for GeSHi.
@@ -46,13 +46,29 @@ $language_data = array (
     'LANG_NAME' => 'Lua',
     'COMMENT_SINGLE' => array(1 => "--"),
     'COMMENT_MULTI' => array('--[[' => ']]'),
+    'COMMENT_REGEXP' => array(2 => "/\[(=*)\[.*?\]\1\]/s"),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array("'", '"'),
-    'ESCAPE_CHAR' => '\\',
+    'ESCAPE_CHAR' => '',
+    'ESCAPE_REGEXP' => array(
+        //Simple Single Char Escapes
+        1 => "#\\\\[\\\\abfnrtv\'\"]#i",
+        //Octal Char Specs
+        2 => "#\\\\\\d{1,3}#"
+        ),
+    'NUMBERS' =>
+        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_HEX_PREFIX |
+        GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F |
+        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
     'KEYWORDS' => array(
         1 => array(
-            'and','break','do','else','elseif','end','false','for','function','if',
-            'in','local','nil','not','or','repeat','return','then','true','until','while',
+            'break','do','else','elseif','end','for','function','if',
+            'local','repeat','return','then','until','while'
+            ),
+        2 => array(
+            'and','in','not','or'
+            ),
+        3 => array(
             '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring',
             'print','tonumber','tostring','type','unpack',
             '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT',
@@ -79,37 +95,57 @@ $language_data = array (
             'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename',
             'os.setlocale','os.time','os.tmpname',
             'string','table','math','coroutine','io','os','debug'
+            ),
+        4 => array(
+            'nil', 'false', 'true'
+            ),
+        5 => array(
+            'Nil', 'Boolean', 'Number', 'String', 'Userdata', 'Thread', 'Table'
             )
         ),
     'SYMBOLS' => array(
-        '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';'
+        '+', '-', '*', '/', '%', '^', '#',
+        '==', '~=', '<=', '>=', '<', '>', '=',
+        '(', ')', '{', '}', '[', ']',
+        ';', ':', ',', '.', '..', '...'
         ),
     'CASE_SENSITIVE' => array(
         GESHI_COMMENTS => false,
-        1 => true
+        1 => true,
+        2 => true,
+        3 => true,
+        4 => true,
+        5 => true
         ),
     'STYLES' => array(
         'KEYWORDS' => array(
-            1 => 'color: #b1b100;'
+            1 => 'color: #aa9900; font-weight: bold;',
+            2 => 'color: #aa9900; font-weight: bold;',
+            3 => 'color: #0000aa;',
+            4 => 'color: #aa9900;',
+            5 => 'color: #aa9900;'
             ),
         'COMMENTS' => array(
             1 => 'color: #808080; font-style: italic;',
+            2 => 'color: #ff0000;',
             'MULTI' => 'color: #808080; font-style: italic;'
             ),
         'ESCAPE_CHAR' => array(
-            0 => 'color: #000099; font-weight: bold;'
+            0 => 'color: #000099; font-weight: bold;',
+            1 => 'color: #000099; font-weight: bold;',
+            2 => 'color: #000099; font-weight: bold;'
             ),
         'BRACKETS' => array(
             0 => 'color: #66cc66;'
             ),
         'STRINGS' => array(
-            0 => 'color: #ff0000;'
+            0 => 'color: #ff6666;'
             ),
         'NUMBERS' => array(
             0 => 'color: #cc66cc;'
             ),
         'METHODS' => array(
-            0 => 'color: #b1b100;'
+            0 => 'color: #aa9900;'
             ),
         'SYMBOLS' => array(
             0 => 'color: #66cc66;'
@@ -120,7 +156,11 @@ $language_data = array (
             )
         ),
     'URLS' => array(
-        1 => ''
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => '',
+        5 => ''
         ),
     'OOLANG' => false,
     'OBJECT_SPLITTERS' => array(
@@ -134,4 +174,4 @@ $language_data = array (
         )
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/m68k.php b/inc/geshi/m68k.php
index 543b73c8b..081578158 100644
--- a/inc/geshi/m68k.php
+++ b/inc/geshi/m68k.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Benny Baumann (BenBE@omorphia.de)
  * Copyright: (c) 2007 Benny Baumann (http://www.omorphia.de/), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/02/06
  *
  * Motorola 68000 Assembler language file for GeSHi.
diff --git a/inc/geshi/magiksf.php b/inc/geshi/magiksf.php
index f3da7fcf2..b6f431ea8 100644
--- a/inc/geshi/magiksf.php
+++ b/inc/geshi/magiksf.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Sjoerd van Leent (svanleent@gmail.com)
  * Copyright: (c) 2010 Sjoerd van Leent
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/02/15
  *
  * MagikSF language file for GeSHi.
diff --git a/inc/geshi/make.php b/inc/geshi/make.php
index 689552312..2d5d73425 100644
--- a/inc/geshi/make.php
+++ b/inc/geshi/make.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Neil Bird 
  * Copyright: (c) 2008 Neil Bird
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/08/26
  *
  * make language file for GeSHi.
diff --git a/inc/geshi/mapbasic.php b/inc/geshi/mapbasic.php
index 0025d4e22..7d365263d 100644
--- a/inc/geshi/mapbasic.php
+++ b/inc/geshi/mapbasic.php
@@ -4,7 +4,7 @@
  * ------
  * Author: Tomasz Berus (t.berus@gisodkuchni.pl)
  * Copyright: (c) 2009 Tomasz Berus (http://sourceforge.net/projects/mbsyntax/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/11/25
  *
  * MapBasic language file for GeSHi.
diff --git a/inc/geshi/matlab.php b/inc/geshi/matlab.php
index 1f9c12b78..5c64a0d49 100644
--- a/inc/geshi/matlab.php
+++ b/inc/geshi/matlab.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: Florian Knorn (floz@gmx.de)
  * Copyright: (c) 2004 Florian Knorn (http://www.florian-knorn.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/02/09
  *
  * Matlab M-file language file for GeSHi.
diff --git a/inc/geshi/mirc.php b/inc/geshi/mirc.php
index 1b7df83aa..e9e0346e6 100644
--- a/inc/geshi/mirc.php
+++ b/inc/geshi/mirc.php
@@ -4,7 +4,7 @@
  * -----
  * Author: Alberto 'Birckin' de Areba (Birckin@hotmail.com)
  * Copyright: (c) 2006 Alberto de Areba
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/05/29
  *
  * mIRC Scripting language file for GeSHi.
diff --git a/inc/geshi/mmix.php b/inc/geshi/mmix.php
index 3e90dce29..8e57ad7b9 100644
--- a/inc/geshi/mmix.php
+++ b/inc/geshi/mmix.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2009 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/16
  *
  * MMIX Assembler language file for GeSHi.
diff --git a/inc/geshi/modula2.php b/inc/geshi/modula2.php
index 042e7404a..131543baa 100644
--- a/inc/geshi/modula2.php
+++ b/inc/geshi/modula2.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: Benjamin Kowarsch (benjamin@modula2.net)
  * Copyright: (c) 2009 Benjamin Kowarsch (benjamin@modula2.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/11/05
  *
  * Modula-2 language file for GeSHi.
diff --git a/inc/geshi/modula3.php b/inc/geshi/modula3.php
index ad827a3e6..21b2e255d 100644
--- a/inc/geshi/modula3.php
+++ b/inc/geshi/modula3.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: mbishop (mbishop@esoteriq.org)
  * Copyright: (c) 2009 mbishop (mbishop@esoteriq.org)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/01/21
  *
  * Modula-3 language file for GeSHi.
diff --git a/inc/geshi/mpasm.php b/inc/geshi/mpasm.php
index 59247ff69..70f12de48 100644
--- a/inc/geshi/mpasm.php
+++ b/inc/geshi/mpasm.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Bakalex (bakalex@gmail.com)
  * Copyright: (c) 2004 Bakalex, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/12/6
  *
  * Microchip Assembler language file for GeSHi.
diff --git a/inc/geshi/mxml.php b/inc/geshi/mxml.php
index df4c9d50e..72a071aae 100644
--- a/inc/geshi/mxml.php
+++ b/inc/geshi/mxml.php
@@ -4,7 +4,7 @@
  * -------
  * Author: David Spurr
  * Copyright: (c) 2007 David Spurr (http://www.defusion.org.uk/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/10/04
  *
  * MXML language file for GeSHi. Based on the XML file by Nigel McNie
diff --git a/inc/geshi/mysql.php b/inc/geshi/mysql.php
index ca171733f..b85377d1c 100644
--- a/inc/geshi/mysql.php
+++ b/inc/geshi/mysql.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Marjolein Katsma (marjolein.is.back@gmail.com)
  * Copyright: (c) 2008 Marjolein Katsma (http://blog.marjoleinkatsma.com/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008-12-12
  *
  * MySQL language file for GeSHi.
diff --git a/inc/geshi/newlisp.php b/inc/geshi/newlisp.php
index 027e86588..508f116b7 100644
--- a/inc/geshi/newlisp.php
+++ b/inc/geshi/newlisp.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: cormullion (cormullion@mac.com) Sept 2009
  * Copyright: (c) 2009 Cormullion (http://unbalanced-parentheses.nfshost.com/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/09/30
  *
  * newLISP language file for GeSHi.
diff --git a/inc/geshi/nsis.php b/inc/geshi/nsis.php
index 5631a8389..ab05ed82b 100644
--- a/inc/geshi/nsis.php
+++ b/inc/geshi/nsis.php
@@ -4,7 +4,7 @@
  * --------
  * Author: deguix (cevo_deguix@yahoo.com.br), Tux (http://tux.a4.cz/)
  * Copyright: (c) 2005 deguix, 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/12/03
  *
  * Nullsoft Scriptable Install System language file for GeSHi.
diff --git a/inc/geshi/oberon2.php b/inc/geshi/oberon2.php
index 8339f3fb8..33b828df5 100644
--- a/inc/geshi/oberon2.php
+++ b/inc/geshi/oberon2.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: mbishop (mbishop@esoteriq.org)
  * Copyright: (c) 2009 mbishop (mbishop@esoteriq.org)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/02/10
  *
  * Oberon-2 language file for GeSHi.
diff --git a/inc/geshi/objc.php b/inc/geshi/objc.php
index 5a5c5940f..3b2c593ef 100644
--- a/inc/geshi/objc.php
+++ b/inc/geshi/objc.php
@@ -5,7 +5,7 @@
  * Author: M. Uli Kusterer (witness.of.teachtext@gmx.net)
  * Contributors: Quinn Taylor (quinntaylor@mac.com)
  * Copyright: (c) 2008 Quinn Taylor, 2004 M. Uli Kusterer, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * Objective-C language file for GeSHi.
diff --git a/inc/geshi/objeck.php b/inc/geshi/objeck.php
new file mode 100644
index 000000000..5ab3642e5
--- /dev/null
+++ b/inc/geshi/objeck.php
@@ -0,0 +1,116 @@
+ 'Objeck Programming Language',
+    'COMMENT_SINGLE' => array(1 => '#'),
+    'COMMENT_MULTI' => array('#~' => '~#'),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"'),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        1 => array(
+            'virtual', 'if', 'else', 'do', 'while', 'use', 'bundle', 'native',
+            'static', 'public', 'private', 'class', 'function', 'method',
+            'select', 'other', 'enum', 'for', 'each', 'label', 'return', 'from'
+            ),
+        2 => array(
+            'Byte', 'Int', 'Nil', 'Float', 'Char', 'Bool', 'String'
+            ),
+        3 => array(
+            'true', 'false'
+            )
+        ),
+    'SYMBOLS' => array(
+        1 => array(
+            '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '&', '|', ':', ';', ',', '+=', '-=', '*=', '/=',
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => true,
+        2 => true,
+        3 => true
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #b1b100;',
+            2 => 'color: #b1b100;',
+            3 => 'color: #b1b100;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #666666; font-style: italic;',
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #009900;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #0000ff;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;',
+            ),
+        'METHODS' => array(
+            0 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            1 => 'color: #339933;'
+            ),
+        'REGEXPS' => array(),
+        'SCRIPT' => array()
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => ''
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        1 => '->'
+        ),
+    'REGEXPS' => array(),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(),
+    'HIGHLIGHT_STRICT_BLOCK' => array()
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/ocaml-brief.php b/inc/geshi/ocaml-brief.php
index 2e2a82fb2..d988409e8 100644
--- a/inc/geshi/ocaml-brief.php
+++ b/inc/geshi/ocaml-brief.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Flaie (fireflaie@gmail.com)
  * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/08/27
  *
  * OCaml (Objective Caml) language file for GeSHi.
diff --git a/inc/geshi/ocaml.php b/inc/geshi/ocaml.php
index 46e6a22aa..4e36f3c30 100644
--- a/inc/geshi/ocaml.php
+++ b/inc/geshi/ocaml.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Flaie (fireflaie@gmail.com)
  * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/08/27
  *
  * OCaml (Objective Caml) language file for GeSHi.
diff --git a/inc/geshi/oobas.php b/inc/geshi/oobas.php
index 6f6e13fc2..f4e15893a 100644
--- a/inc/geshi/oobas.php
+++ b/inc/geshi/oobas.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * OpenOffice.org Basic language file for GeSHi.
diff --git a/inc/geshi/oracle11.php b/inc/geshi/oracle11.php
index f57c3f044..bd3d30501 100644
--- a/inc/geshi/oracle11.php
+++ b/inc/geshi/oracle11.php
@@ -6,7 +6,7 @@
  * Contributions:
  * - Updated for 11i by Simon Redhead
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * Oracle 11i language file for GeSHi.
diff --git a/inc/geshi/oracle8.php b/inc/geshi/oracle8.php
index e470e0dd4..bc80735c4 100644
--- a/inc/geshi/oracle8.php
+++ b/inc/geshi/oracle8.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: Guy Wicks (Guy.Wicks@rbs.co.uk)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * Oracle 8 language file for GeSHi.
diff --git a/inc/geshi/oxygene.php b/inc/geshi/oxygene.php
index 3af03bfc2..cfab3d34f 100644
--- a/inc/geshi/oxygene.php
+++ b/inc/geshi/oxygene.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Carlo Kok (ck@remobjects.com), J�rja Norbert (jnorbi@vipmail.hu), Benny Baumann (BenBE@omorphia.de)
  * Copyright: (c) 2004 J�rja Norbert, Benny Baumann (BenBE@omorphia.de), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/01/11
  *
  * Delphi Prism (Oxygene) language file for GeSHi.
diff --git a/inc/geshi/oz.php b/inc/geshi/oz.php
index cd594d4ca..f371a6457 100644
--- a/inc/geshi/oz.php
+++ b/inc/geshi/oz.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Wolfgang Meyer (Wolfgang.Meyer@gmx.net)
  * Copyright: (c) 2010 Wolfgang Meyer
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/01/03
  *
  * Oz language file for GeSHi.
diff --git a/inc/geshi/pascal.php b/inc/geshi/pascal.php
index 7ee5729a6..2252a11de 100644
--- a/inc/geshi/pascal.php
+++ b/inc/geshi/pascal.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Tux (tux@inamil.cz)
  * Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/26
  *
  * Pascal language file for GeSHi.
diff --git a/inc/geshi/pcre.php b/inc/geshi/pcre.php
index a67cf2858..1944bfdb3 100644
--- a/inc/geshi/pcre.php
+++ b/inc/geshi/pcre.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/05/22
  *
  * PCRE language file for GeSHi.
diff --git a/inc/geshi/per.php b/inc/geshi/per.php
index b656c105e..9819c03f5 100644
--- a/inc/geshi/per.php
+++ b/inc/geshi/per.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Lars Gersmann (lars.gersmann@gmail.com)
  * Copyright: (c) 2007 Lars Gersmann
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/06/03
  *
  * Per (forms) (FOURJ's Genero 4GL) language file for GeSHi.
diff --git a/inc/geshi/perl.php b/inc/geshi/perl.php
index 5d1c4320b..487fd0515 100644
--- a/inc/geshi/perl.php
+++ b/inc/geshi/perl.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
  * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/20
  *
  * Perl language file for GeSHi.
diff --git a/inc/geshi/perl6.php b/inc/geshi/perl6.php
index 9ea20fc78..701e0b59c 100644
--- a/inc/geshi/perl6.php
+++ b/inc/geshi/perl6.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Kodi Arfer (kodiarfer {at} warpmail {period} net); forked from perl.php 1.0.8 by Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
  * Copyright: (c) 2009 Kodi Arfer, (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/11/07
  *
  * Perl 6 language file for GeSHi.
diff --git a/inc/geshi/pf.php b/inc/geshi/pf.php
index d59a609d5..a89e97ff0 100644
--- a/inc/geshi/pf.php
+++ b/inc/geshi/pf.php
@@ -4,7 +4,7 @@
  * --------
  * Author: David Berard (david@nfrance.com)
  * Copyright: (c) 2010 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/16
  * Based on bash.php
  *
diff --git a/inc/geshi/php-brief.php b/inc/geshi/php-brief.php
index c28d985f4..d47737883 100644
--- a/inc/geshi/php-brief.php
+++ b/inc/geshi/php-brief.php
@@ -4,7 +4,7 @@
  * -------------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/02
  *
  * PHP (brief version) language file for GeSHi.
diff --git a/inc/geshi/php.php b/inc/geshi/php.php
index ec6981134..b36544213 100644
--- a/inc/geshi/php.php
+++ b/inc/geshi/php.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/20
  *
  * PHP language file for GeSHi.
diff --git a/inc/geshi/pic16.php b/inc/geshi/pic16.php
index 626a768b0..94e098293 100644
--- a/inc/geshi/pic16.php
+++ b/inc/geshi/pic16.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Phil Mattison (mattison@ohmikron.com)
  * Copyright: (c) 2008 Ohmikron Corp. (http://www.ohmikron.com/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/07/30
  *
  * PIC16 Assembler language file for GeSHi.
diff --git a/inc/geshi/pike.php b/inc/geshi/pike.php
index 2b860ccd6..a3de9082e 100644
--- a/inc/geshi/pike.php
+++ b/inc/geshi/pike.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Rick E. (codeblock@eighthbit.net)
  * Copyright: (c) 2009 Rick E.
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/12/10
  *
  * Pike language file for GeSHi.
diff --git a/inc/geshi/pixelbender.php b/inc/geshi/pixelbender.php
index 82c64ae52..b9fe1aff2 100644
--- a/inc/geshi/pixelbender.php
+++ b/inc/geshi/pixelbender.php
@@ -4,7 +4,7 @@
  * ----------------
  * Author: Richard Olsson (r@richardolsson.se)
  * Copyright: (c) 2008 Richard Olsson (richardolsson.se)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/11/16
  *
  * Pixel Bender 1.0 language file for GeSHi.
diff --git a/inc/geshi/pli.php b/inc/geshi/pli.php
new file mode 100644
index 000000000..1d6eefd9b
--- /dev/null
+++ b/inc/geshi/pli.php
@@ -0,0 +1,200 @@
+ 'PL/I',
+    'COMMENT_SINGLE' => array(),
+    'COMMENT_MULTI' => array('/*' => '*/'),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"', '\''),
+    'ESCAPE_CHAR' => '',
+    'KEYWORDS' => array(
+        1 => array(
+            'abnormal', 'abs', 'acos', 'acosf', 'add', 'addbuff', 'addr',
+            'addrdata', 'alias', 'aligned', 'all', 'alloc', 'allocate',
+            'allocation', 'allocn', 'allocsize', 'any', 'anycondition', 'area',
+            'ascii', 'asin', 'asinf', 'asm', 'asmtdli', 'assembler',
+            'assignable', 'atan', 'atand', 'atanf', 'atanh', 'attach',
+            'attention', 'attn', 'auto', 'automatic', 'availablearea',
+            'backwards', 'based', 'begin', 'bigendian', 'bin', 'binary',
+            'binaryvalue', 'bind', 'binvalue', 'bit', 'bitloc', 'bitlocation',
+            'bkwd', 'blksize', 'bool', 'buf', 'buffered', 'buffers', 'bufnd',
+            'bufni', 'bufoff', 'bufsp', 'builtin', 'bx', 'by', 'byaddr', 'byte',
+            'byvalue', 'b4', 'call', 'cast', 'cds', 'ceil', 'center',
+            'centerleft', 'centerright', 'centre', 'centreleft', 'centreright',
+            'char', 'character', 'charg', 'chargraphic', 'charval', 'check',
+            'checkstg', 'close', 'cmpat', 'cobol', 'col', 'collate', 'column',
+            'comment', 'compare', 'compiledate', 'compiletime', 'completion',
+            'complex', 'cond', 'condition', 'conjg', 'conn', 'connected',
+            'consecutive', 'controlled', 'conv', 'conversion', 'copy', 'cos',
+            'cosd', 'cosf', 'cosh', 'count', 'counter', 'cpln', 'cplx', 'cs',
+            'cstg', 'ctl', 'ctlasa', 'ctl360', 'currentsize', 'currentstorage',
+            'data', 'datafield', 'date', 'datetime', 'days', 'daystodate',
+            'daystosecs', 'db', 'dcl', 'dec', 'decimal', 'declare', 'def',
+            'default', 'define', 'defined', 'delay', 'delete', 'descriptor',
+            'descriptors', 'detach', 'dft', 'dim', 'dimacross', 'dimension',
+            'direct', 'display', 'divide', 'do', 'downthru', 'edit', 'else',
+            'empty', 'end', 'endfile', 'endpage', 'entry', 'entryaddr', 'env',
+            'environment', 'epsilon', 'erf', 'erfc', 'error', 'event', 'excl',
+            'exclusive', 'exit', 'exp', 'expf', 'exponent', 'exports', 'ext',
+            'external', 'fb', 'fbs', 'fetch', 'file', 'fileddint', 'fileddtest',
+            'fileddword', 'fileid', 'fileopen', 'fileread', 'fileseek',
+            'filetell', 'filewrite', 'finish', 'first', 'fixed', 'fixedbin',
+            'fixeddec', 'fixedoverflow', 'float', 'floatbin', 'floatdec',
+            'floor', 'flush', 'fofl', 'format', 'fortran', 'free', 'from',
+            'fromalien', 'fs', 'gamma', 'generic', 'genkey', 'get', 'getenv',
+            'go', 'goto', 'graphic', 'gx', 'handle', 'hbound', 'hex', 'hexadec',
+            'heximage', 'high', 'huge', 'iand', 'ieee', 'ieor', 'if', 'ignore',
+            'imag', 'in', 'index', 'indexarea', 'indexed', 'init', 'initial',
+            'inline', 'inonly', 'inot', 'inout', 'input', 'int', 'inter',
+            'internal', 'into', 'invalidop', 'ior', 'irred', 'irreducible',
+            'isfinite', 'isigned', 'isinf', 'isll', 'ismain', 'isnan',
+            'isnormal', 'isrl', 'iszero', 'iunsigned', 'key', 'keyed',
+            'keyfrom', 'keylength', 'keyloc', 'keyto', 'label', 'last',
+            'lbound', 'leave', 'left', 'length', 'like', 'limited', 'line',
+            'lineno', 'linesize', 'linkage', 'list', 'littleendian', 'loc',
+            'locate', 'location', 'log', 'logf', 'loggamma', 'log10', 'log10f',
+            'log2', 'low', 'lowercase', 'lower2', 'maccol', 'maclmar',
+            'macname', 'macrmar', 'main', 'max', 'maxexp', 'maxlength',
+            'memconvert', 'memcu12', 'memcu14', 'memcu21', 'memcu24', 'memcu41',
+            'memcu42', 'memindex', 'memsearch', 'memsearchr', 'memverify',
+            'memverifyr', 'min', 'minexp', 'mod', 'mpstr', 'multiply', 'name',
+            'native', 'ncp', 'new', 'nocharg', 'nochargraphic', 'nocheck',
+            'nocmpat', 'noconv', 'noconversion', 'nodescriptor', 'noexecops',
+            'nofixedoverflow', 'nofofl', 'noinline', 'nolock', 'nomap',
+            'nomapin', 'nomapout', 'nonasgn', 'nonassignable', 'nonconnected',
+            'nonnative', 'noofl', 'nooverflow', 'norescan', 'normal', 'nosize',
+            'nostrg', 'nostringrange', 'nostringsize', 'nostrz', 'nosubrg',
+            'nosubscriptrange', 'noufl', 'nounderflow', 'nowrite', 'nozdiv',
+            'nozerodivide', 'null', 'offset', 'offsetadd', 'offsetdiff',
+            'offsetsubtract', 'offsetvalue', 'ofl', 'omitted', 'on', 'onarea',
+            'onchar', 'oncode', 'oncondcond', 'oncondid', 'oncount', 'onfile',
+            'ongsource', 'onkey', 'online', 'onloc', 'onoffset', 'onsource',
+            'onsubcode', 'onwchar', 'onwsource', 'open', 'optional', 'options',
+            'order', 'ordinal', 'ordinalname', 'ordinalpred', 'ordinalsucc',
+            'other', 'otherwise', 'outonly', 'output', 'overflow', 'package',
+            'packagename', 'page', 'pageno', 'pagesize', 'parameter', 'parmset',
+            'password', 'pending', 'pic', 'picspec', 'picture', 'places',
+            'pliascii', 'plicanc', 'plickpt', 'plidelete', 'plidump',
+            'pliebcdic', 'plifill', 'plifree', 'plimove', 'pliover', 'plirest',
+            'pliretc', 'pliretv', 'plisaxa', 'plisaxb', 'plisaxc', 'plisaxd',
+            'plisrta', 'plisrtb', 'plisrtc', 'plisrtd', 'plitdli', 'plitran11',
+            'plitran12', 'plitran21', 'plitran22', 'pointer', 'pointeradd',
+            'pointerdiff', 'pointersubtract', 'pointervalue', 'poly', 'pos',
+            'position', 'prec', 'precision', 'pred', 'present', 'print',
+            'priority', 'proc', 'procedure', 'procedurename', 'procname',
+            'prod', 'ptr', 'ptradd', 'ptrdiff', 'ptrsubtract', 'ptrvalue',
+            'put', 'putenv', 'quote', 'radix', 'raise2', 'random', 'range',
+            'rank', 'read', 'real', 'record', 'recsize', 'recursive', 'red',
+            'reducible', 'reentrant', 'refer', 'regional', 'reg12', 'release',
+            'rem', 'reorder', 'repattern', 'repeat', 'replaceby2', 'reply',
+            'reread', 'rescan', 'reserved', 'reserves', 'resignal', 'respec',
+            'retcode', 'return', 'returns', 'reuse', 'reverse', 'revert',
+            'rewrite', 'right', 'round', 'rounddec', 'samekey', 'scalarvarying',
+            'scale', 'search', 'searchr', 'secs', 'secstodate', 'secstodays',
+            'select', 'seql', 'sequential', 'serialize4', 'set', 'sign',
+            'signal', 'signed', 'sin', 'sind', 'sinf', 'sinh', 'sis', 'size',
+            'skip', 'snap', 'sourcefile', 'sourceline', 'sqrt', 'sqrtf',
+            'stackaddr', 'statement', 'static', 'status', 'stg', 'stmt', 'stop',
+            'storage', 'stream', 'strg', 'string', 'stringrange', 'stringsize',
+            'structure', 'strz', 'subrg', 'subscriptrange', 'substr',
+            'subtract', 'succ', 'sum', 'suppress', 'sysin', 'sysnull',
+            'sysparm', 'sysprint', 'system', 'sysversion', 'tally', 'tan',
+            'tand', 'tanf', 'tanh', 'task', 'then', 'thread', 'threadid',
+            'time', 'tiny', 'title', 'to', 'total', 'tpk', 'tpm', 'transient',
+            'translate', 'transmit', 'trim', 'trkofl', 'trunc', 'type', 'ufl',
+            'ulength', 'ulength16', 'ulength8', 'unal', 'unaligned',
+            'unallocated', 'unbuf', 'unbuffered', 'undefinedfile', 'underflow',
+            'undf', 'unlock', 'unsigned', 'unspec', 'until', 'update', 'upos',
+            'uppercase', 'upthru', 'usubstr', 'usurrogate', 'uvalid', 'uwidth',
+            'valid', 'validdate', 'value', 'var', 'varglist', 'vargsize',
+            'variable', 'varying', 'varyingz', 'vb', 'vbs', 'verify', 'verifyr',
+            'vs', 'vsam', 'wait', 'wchar', 'wcharval', 'weekday', 'when',
+            'whigh', 'while', 'widechar', 'wlow', 'write', 'xmlchar', 'y4date',
+            'y4julian', 'y4year', 'zdiv', 'zerodivide'
+            )
+        ),
+    'SYMBOLS' => array(
+        1 => array(
+            '+', '-', '*', '/', '=', '<', '>', '&', '^', '|', ':', '(', ')', ';', ','
+            )
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #b1b100;'
+            ),
+        'COMMENTS' => array(
+            'MULTI' => 'color: #666666; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #009900;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #0000ff;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #cc66cc;',
+            ),
+        'METHODS' => array(
+            0 => 'color: #004000;'
+            ),
+        'SYMBOLS' => array(
+            1 => 'color: #339933;'
+            ),
+        'REGEXPS' => array(),
+        'SCRIPT' => array()
+        ),
+    'URLS' => array(1 => ''),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(1 => '.'),
+    'REGEXPS' => array(),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(),
+    'HIGHLIGHT_STRICT_BLOCK' => array()
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/plsql.php b/inc/geshi/plsql.php
index e0145362c..8428ff4b6 100644
--- a/inc/geshi/plsql.php
+++ b/inc/geshi/plsql.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Victor Engmark 
  * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/10/26
  *
  * Oracle 9.2 PL/SQL language file for GeSHi.
diff --git a/inc/geshi/postgresql.php b/inc/geshi/postgresql.php
index 7f89fe2a4..0245b33ad 100644
--- a/inc/geshi/postgresql.php
+++ b/inc/geshi/postgresql.php
@@ -5,7 +5,7 @@
  * Author: Christophe Chauvet (christophe_at_kryskool_dot_org)
  * Contributors: Leif Biberg Kristensen  2010-05-03
  * Copyright: (c) 2007 Christophe Chauvet (http://kryskool.org/), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/07/20
  *
  * PostgreSQL language file for GeSHi.
diff --git a/inc/geshi/povray.php b/inc/geshi/povray.php
index c987a013e..eeda49f49 100644
--- a/inc/geshi/povray.php
+++ b/inc/geshi/povray.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Carl Fürstenberg (azatoth@gmail.com)
  * Copyright: © 2007 Carl Fürstenberg
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/07/11
  *
  * Povray language file for GeSHi.
diff --git a/inc/geshi/powerbuilder.php b/inc/geshi/powerbuilder.php
index ef86c242c..f978f3f5b 100644
--- a/inc/geshi/powerbuilder.php
+++ b/inc/geshi/powerbuilder.php
@@ -4,7 +4,7 @@
  * ------
  * Author: Doug Porter (powerbuilder.geshi@gmail.com)
  * Copyright: (c) 2009 Doug Porter
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/07/13
  *
  * PowerBuilder (PowerScript) language file for GeSHi.
diff --git a/inc/geshi/powershell.php b/inc/geshi/powershell.php
index c90538809..1d9003030 100644
--- a/inc/geshi/powershell.php
+++ b/inc/geshi/powershell.php
@@ -4,7 +4,7 @@
  * ---------------------------------
  * Author: Frode Aarebrot (frode@aarebrot.net)
  * Copyright: (c) 2008 Frode Aarebrot (http://www.aarebrot.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/06/20
  *
  * PowerShell language file for GeSHi.
diff --git a/inc/geshi/proftpd.php b/inc/geshi/proftpd.php
new file mode 100644
index 000000000..dd57d9b0a
--- /dev/null
+++ b/inc/geshi/proftpd.php
@@ -0,0 +1,374 @@
+ 'ProFTPd configuration',
+    'COMMENT_SINGLE' => array(1 => '#'),
+    'COMMENT_MULTI' => array(),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array("'", '"'),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        /*keywords*/
+        1 => array(
+            //mod_auth
+            'AccessDenyMsg', 'AccessGrantMsg', 'AnonRejectePasswords',
+            'AnonRequirePassword', 'AuthAliasOnly', 'AuthUsingAlias',
+            'CreateHome', 'DefaultChdir', 'DefaultRoot', 'GroupPassword',
+            'LoginPasswordPrompt', 'MaxClients', 'MaxClientsPerClass',
+            'MaxClientsPerHost', 'MaxClientsPerUser', 'MaxConnectionsPerHost',
+            'MaxHostsPerUser', 'MaxLoginAttempts', 'RequireValidShell',
+            'RootLogin', 'RootRevoke', 'TimeoutLogin', 'TimeoutSession',
+            'UseFtpUsers', 'UserAlias', 'UserDirRoot', 'UserPassword',
+
+            //mod_auth_file
+            'AuthGroupFile', 'AuthUserFile',
+
+            //mod_auth_pam
+            'AuthPAM', 'AuthPAMConfig',
+
+            //mod_auth_unix
+            'PersistentPasswd',
+
+            //mod_ban
+            'BanControlsACLs', 'BanEngine', 'BanLog', 'BanMessage', 'BanOnEvent',
+            'BanTable',
+
+            //mod_cap
+            'CapabilitiesEngine', 'CapabilitiesSet',
+
+            //mod_core
+            'Allow', 'AllowAll', 'AllowClass', 'AllowFilter',
+            'AllowForeignAddress', 'AllowGroup', 'AllowOverride',
+            'AllowRetrieveRestart', 'AllowStoreRestart', 'AllowUser',
+            'AnonymousGroup', 'AuthOrder', 'Bind', 'CDPath', 'Class', 'Classes',
+            'CommandBufferSize', 'DebugLevel', 'DefaultAddress',
+            'DefaultServer', 'DefaultTransferMode', 'DeferWelcome', 'Define',
+            'Deny', 'DenyAll', 'DenyClass', 'DenyFilter', 'DenyGroup',
+            'DenyUser', 'DisplayChdir', 'DisplayConnect', 'DisplayFirstChdir',
+            'DisplayGoAway', 'DisplayLogin', 'DisplayQuit', 'From', 'Group',
+            'GroupOwner', 'HideFiles', 'HideGroup', 'HideNoAccess', 'HideUser',
+            'IdentLookups', 'IgnoreHidden', 'Include', 'MasqueradeAddress',
+            'MaxConnectionRate', 'MaxInstances', 'MultilineRFC2228', 'Order',
+            'PassivePorts', 'PathAllowFilter', 'PathDenyFilter', 'PidFile',
+            'Port', 'RLimitCPU', 'RLimitMemory', 'RLimitOpenFiles', 'Satisfy',
+            'ScoreboardFile', 'ServerAdmin', 'ServerIdent', 'ServerName',
+            'ServerType', 'SetEnv', 'SocketBindTight', 'SocketOptions',
+            'SyslogFacility', 'SyslogLevel', 'tcpBackLog', 'tcpNoDelay',
+            'TimeoutIdle', 'TimeoutLinger', 'TimesGMT', 'TransferLog', 'Umask',
+            'UnsetEnv', 'UseIPv6', 'User', 'UseReverseDNS', 'UserOwner',
+            'UseUTF8', 'WtmpLog',
+
+            //mod_ctrls_admin
+            'AdminControlsACLs', 'AdminControlsEngine',
+
+            //mod_delay
+            'DelayEngine', 'DelayTable',
+
+            //mod_dynmasq
+            'DynMasqRefresh',
+
+            //mod_exec
+            'ExecBeforeCommand', 'ExecEngine', 'ExecEnviron', 'ExecLog',
+            'ExecOnCommand', 'ExecOnConnect', 'ExecOnError', 'ExecOnEvent',
+            'ExecOnExit', 'ExecOnRestart', 'ExecOptions', 'ExecTimeout',
+
+            //mod_ldap
+            'LDAPAliasDereference', 'LDAPAttr', 'LDAPAuthBinds',
+            'LDAPDefaultAuthScheme', 'LDAPDefaultGID', 'LDAPDefaultUID',
+            'LDAPDNInfo', 'LDAPDoAuth', 'LDAPDoGIDLookups',
+            'LDAPDoQuotaLookups', 'LDAPDoUIDLookups',
+            'LDAPForceGeneratedHomedir', 'LDAPForceHomedirOnDemand',
+            'LDAPGenerateHomedir', 'LDAPGenerateHomedirPrefix',
+            'LDAPGenerateHomedirPrefixNoUsername', 'LDAPHomedirOnDemand',
+            'LDAPHomedirOnDemandPrefix', 'LDAPHomedirOnDemandPrefixNoUsername',
+            'LDAPHomedirOnDemandSuffix', 'LDAPNegativeCache',
+            'LDAPProtocolVersion', 'LDAPQueryTimeout', 'LDAPSearchScope',
+            'LDAPServer',
+
+            //mod_load
+            'MaxLoad',
+
+            //mod_log
+            'AllowLogSymlinks', 'ExtendedLog', 'LogFormat', 'ServerLog',
+            'SystemLog',
+
+            //mod_ls'
+            'DirFakeGroup', 'DirFakeMode', 'DirFakeUser', 'ListOptions',
+            'ShowSymlinks', 'UseGlobbing',
+
+            //mod_quotatab
+            'QuotaDirectoryTally', 'QuotaDisplayUnits', 'QuotaEngine',
+            'QuotaExcludeFilter', 'QuotaLimitTable', 'QuotaLock', 'QuotaLog',
+            'QuotaOptions', 'QuotaShowQuotas', 'QuotaTallyTable',
+
+            //mod_quotatab_file
+
+            //mod_quotatab_ldap
+
+            //mod_quotatab_sql
+
+            //mod_radius
+            'RadiusAcctServer', 'RadiusAuthServer', 'RadiusEngine',
+            'RadiusGroupInfo', 'RadiusLog', 'RadiusNASIdentifier',
+            'RadiusQuotaInfo', 'RadiusRealm', 'RadiusUserInfo', 'RadiusVendor',
+
+            //mod_ratio
+            'AnonRatio', 'ByteRatioErrMsg', 'CwdRatioMsg', 'FileRatioErrMsg',
+            'GroupRatio', 'HostRatio', 'LeechRatioMsg', 'RatioFile', 'Ratios',
+            'RatioTempFile', 'SaveRatios', 'UserRatio',
+
+            //mod_readme
+            'DisplayReadme',
+
+            //mod_rewrite
+            'RewriteCondition', 'RewriteEngine', 'RewriteLock', 'RewriteLog',
+            'RewriteMap', 'RewriteRule',
+
+            //mod_sftp
+            'SFTPAcceptEnv', 'SFTPAuthMethods', 'SFTPAuthorizedHostKeys',
+            'SFTPAuthorizedUserKeys', 'SFTPCiphers', 'SFTPClientMatch',
+            'SFTPCompression', 'SFTPCryptoDevice', 'SFTPDHParamFile',
+            'SFTPDigests', 'SFTPDisplayBanner', 'SFTPEngine', 'SFTPExtensions',
+            'SFTPHostKey', 'SFTPKeyBlacklist', 'SFTPKeyExchanges', 'SFTPLog',
+            'SFTPMaxChannels', 'SFTPOptions', 'SFTPPassPhraseProvider',
+            'SFTPRekey', 'SFTPTrafficPolicy',
+
+            //mod_sftp_pam
+            'SFTPPAMEngine', 'SFTPPAMOptions', 'SFTPPAMServiceName',
+
+            //mod_sftp_sql
+
+            //mod_shaper
+            'ShaperAll', 'ShaperControlsACLs', 'ShaperEngine', 'ShaperLog',
+            'ShaperSession', 'ShaperTable',
+
+            //mod_sql
+            'SQLAuthenticate', 'SQLAuthTypes', 'SQLBackend', 'SQLConnectInfo',
+            'SQLDefaultGID', 'SQLDefaultHomedir', 'SQLDefaultUID', 'SQLEngine',
+            'SQLGroupInfo', 'SQLGroupWhereClause', 'SQLHomedirOnDemand',
+            'SQLLog', 'SQLLogFile', 'SQLMinID', 'SQLMinUserGID',
+            'SQLMinUserUID', 'SQLNamedQuery', 'SQLNegativeCache', 'SQLOptions',
+            'SQLRatios', 'SQLRatioStats', 'SQLShowInfo', 'SQLUserInfo',
+            'SQLUserWhereClause',
+
+            //mod_sql_passwd
+            'SQLPasswordEncoding', 'SQLPasswordEngine', 'SQLPasswordSaltFile',
+            'SQLPasswordUserSalt',
+
+            //mod_tls
+            'TLSCACertificateFile', 'TLSCACertificatePath',
+            'TLSCARevocationFile', 'TLSCARevocationPath',
+            'TLSCertificateChainFile', 'TLSCipherSuite', 'TLSControlsACLs',
+            'TLSCryptoDevice', 'TLSDHParamFile', 'TLSDSACertificateFile',
+            'TLSDSACertificateKeyFile', 'TLSEngine', 'TLSLog', 'TLSOptions',
+            'TLSPKCS12File', 'TLSPassPhraseProvider', 'TLSProtocol',
+            'TLSRandomSeed', 'TLSRenegotiate', 'TLSRequired',
+            'TLSRSACertificateFile', 'TLSRSACertificateKeyFile',
+            'TLSSessionCache', 'TLSTimeoutHandshake', 'TLSVerifyClient',
+            'TLSVerifyDepth', 'TLSVerifyOrder',
+
+            //mod_tls_shmcache
+
+            //mod_unique_id
+            'UniqueIDEngine',
+
+            //mod_wrap
+            'TCPAccessFiles', 'TCPAccessSyslogLevels', 'TCPGroupAccessFiles',
+            'TCPServiceName', 'TCPUserAccessFiles',
+
+            //mod_wrap2
+            'WrapAllowMsg', 'WrapDenyMsg', 'WrapEngine', 'WrapGroupTables',
+            'WrapLog', 'WrapServiceName', 'WrapTables', 'WrapUserTables',
+
+            //mod_wrap2_file
+
+            //mod_wrap2_sql
+
+            //mod_xfer
+            'AllowOverwrite', 'DeleteAbortedStores', 'DisplayFileTransfer',
+            'HiddenStor', 'HiddenStores', 'MaxRetrieveFileSize',
+            'MaxStoreFileSize', 'StoreUniquePrefix', 'TimeoutNoTransfer',
+            'TimeoutStalled', 'TransferRate', 'UseSendfile',
+
+            //unknown
+            'ScoreboardPath', 'ScoreboardScrub'
+            ),
+        /*keywords 3*/
+        3 => array(
+            //mod_core
+            'Anonymous',
+            'Class',
+            'Directory',
+            'IfDefine',
+            'IfModule',
+            'Limit',
+            'VirtualHost',
+
+            //mod_ifsession
+            'IfClass', 'IfGroup', 'IfUser',
+
+            //mod_version
+            'IfVersion'
+            ),
+        /*permissions*/
+        4 => array(
+            //mod_core
+            'ALL',
+            'CDUP',
+            'CMD',
+            'CWD',
+            'DELE',
+            'DIRS',
+            'LOGIN',
+            'MKD',
+            'READ',
+            'RETR',
+            'RMD',
+            'RNFR',
+            'RNTO',
+            'STOR',
+            'WRITE',
+            'XCWD',
+            'XMKD',
+            'XRMD',
+
+            //mod_copy
+            'SITE_CPFR', 'SITE_CPTO',
+
+            //mod_quotatab
+            'SITE_QUOTA',
+
+            //mod_site
+            'SITE_HELP', 'SITE_CHMOD', 'SITE_CHGRP',
+
+            //mod_site_misc
+            'SITE_MKDIR', 'SITE_RMDIR', 'SITE_SYMLINK', 'SITE_UTIME',
+            ),
+        /*keywords 2*/
+        2 => array(
+            'all','on','off','yes','no',
+            'standalone', 'inetd',
+            'default', 'auth', 'write',
+            'internet', 'local', 'limit', 'ip',
+            'from'
+            ),
+        ),
+    'SYMBOLS' => array(
+        '+', '-'
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false,
+        2 => false,
+        3 => false,
+        4 => false,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #00007f;',
+            2 => 'color: #0000ff;',
+            3 => 'color: #000000; font-weight:bold;',
+            4 => 'color: #000080; font-weight:bold;',
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #adadad; font-style: italic;',
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099; font-weight: bold;'
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #339933;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #7f007f;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #ff0000;'
+            ),
+        'METHODS' => array(
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #008000;'
+            ),
+        'REGEXPS' => array(
+            ),
+        'SCRIPT' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky',
+        2 => '',
+        3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:www.proftpd.org+inurl:docs&btnI=I%27m%20Feeling%20Lucky',
+        4 => ''
+        ),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array(
+        ),
+    'REGEXPS' => array(
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        ),
+    'PARSER_CONTROL' => array(
+        'ENABLE_FLAGS' => array(
+            'BRACKETS' => GESHI_NEVER,
+            'SYMBOLS' => GESHI_NEVER
+        ),
+        'KEYWORDS' => array(
+            2 => array(
+                'DISALLOWED_BEFORE' => '(?<=\s)(? '(?!\+)(?!\w)',
+            ),
+            3 => array(
+                'DISALLOWED_BEFORE' => '(?<=<|<\/)',
+                'DISALLOWED_AFTER' => '(?=\s|\/|>)',
+            ),
+            4 => array(
+                'DISALLOWED_BEFORE' => '(?<=\s)(? '(?!\+)(?=\/|(?:\s+\w+)*\s*>)',
+            )
+        )
+    )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/progress.php b/inc/geshi/progress.php
index 90c3bf0fa..affb62000 100644
--- a/inc/geshi/progress.php
+++ b/inc/geshi/progress.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Marco Aurelio de Pasqual (marcop@hdi.com.br)
  * Copyright: (c) 2008 Marco Aurelio de Pasqual, Benny Baumann (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/07/11
  *
  * Progress language file for GeSHi.
diff --git a/inc/geshi/prolog.php b/inc/geshi/prolog.php
index 4dd01ff7e..74d03374c 100644
--- a/inc/geshi/prolog.php
+++ b/inc/geshi/prolog.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/10/02
  *
  * Prolog language file for GeSHi.
diff --git a/inc/geshi/properties.php b/inc/geshi/properties.php
index 9fc8b8da4..08ba9a419 100644
--- a/inc/geshi/properties.php
+++ b/inc/geshi/properties.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Edy Hinzen
  * Copyright: (c) 2009 Edy Hinzen
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/04/03
  *
  * Property language file for GeSHi.
diff --git a/inc/geshi/providex.php b/inc/geshi/providex.php
index 0352ac2a1..b7232873a 100644
--- a/inc/geshi/providex.php
+++ b/inc/geshi/providex.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Jeff Wilder (jeff@coastallogix.com)
  * Copyright:  (c) 2008 Coastal Logix (http://www.coastallogix.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/10/18
  *
  * ProvideX language file for GeSHi.
diff --git a/inc/geshi/purebasic.php b/inc/geshi/purebasic.php
index b24986f57..213868d74 100644
--- a/inc/geshi/purebasic.php
+++ b/inc/geshi/purebasic.php
@@ -4,7 +4,7 @@
  * -------
  * Author: GuShH
  * Copyright: (c) 2009 Gustavo Julio Fiorenza
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 13/06/2009
  *
  * PureBasic language file for GeSHi.
diff --git a/inc/geshi/pycon.php b/inc/geshi/pycon.php
new file mode 100644
index 000000000..141d521f9
--- /dev/null
+++ b/inc/geshi/pycon.php
@@ -0,0 +1,64 @@
+>>).*?$(?:\n\.\.\..*?$)*($)/m';
+$language_data['HIGHLIGHT_STRICT_BLOCK'][-1] = true;
+
+$language_data['STYLES']['SCRIPT'][-1] = 'color: #222222;';
+
+if(!isset($language_data['COMMENT_REGEXP'])) {
+    $language_data['COMMENT_REGEXP'] = array();
+}
+
+$language_data['COMMENT_REGEXP'][-1] = '/(?:^|\A\s)(?:>>>|\.\.\.)/m';
+$language_data['STYLES']['COMMENTS'][-1] = 'color: #444444;';
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/python.php b/inc/geshi/python.php
index 1be7e2953..38d9a0b02 100644
--- a/inc/geshi/python.php
+++ b/inc/geshi/python.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * Python language file for GeSHi.
@@ -49,8 +49,13 @@ $language_data = array (
     'COMMENT_MULTI' => array(),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     //Longest quotemarks ALWAYS first
-    'QUOTEMARKS' => array('"""', '"', "'"),
+    'QUOTEMARKS' => array('"""', "'''", '"', "'"),
     'ESCAPE_CHAR' => '\\',
+    'NUMBERS' =>
+        GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_BIN_PREFIX_0B |
+        GESHI_NUMBER_OCT_PREFIX_0O | GESHI_NUMBER_HEX_PREFIX |
+        GESHI_NUMBER_FLT_NONSCI | GESHI_NUMBER_FLT_NONSCI_F |
+        GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO,
     'KEYWORDS' => array(
 
         /*
@@ -60,7 +65,7 @@ $language_data = array (
         1 => array(
             'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break',
             'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec',
-            'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as'
+            'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as', 'nonlocal'
             ),
 
         /*
@@ -172,7 +177,9 @@ $language_data = array (
             )
         ),
     'SYMBOLS' => array(
-            '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`'
+        '<', '>', '=', '!', '<=', '>=',             //·comparison·operators
+        '~', '@',                                   //·unary·operators
+        ';', ','                                    //·statement·separator
         ),
     'CASE_SENSITIVE' => array(
         GESHI_COMMENTS => false,
@@ -234,4 +241,4 @@ $language_data = array (
         )
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/q.php b/inc/geshi/q.php
index 9629ded4a..e4bb92da8 100644
--- a/inc/geshi/q.php
+++ b/inc/geshi/q.php
@@ -4,7 +4,7 @@
  * -----
  * Author: Ian Roddis (ian.roddis@proteanmind.net)
  * Copyright: (c) 2008 Ian Roddis (http://proteanmind.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/01/21
  *
  * q/kdb+ language file for GeSHi.
diff --git a/inc/geshi/qbasic.php b/inc/geshi/qbasic.php
index da4372258..ff61449d0 100644
--- a/inc/geshi/qbasic.php
+++ b/inc/geshi/qbasic.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/20
  *
  * QBasic/QuickBASIC language file for GeSHi.
diff --git a/inc/geshi/rails.php b/inc/geshi/rails.php
index 64d83ea16..0e825040e 100644
--- a/inc/geshi/rails.php
+++ b/inc/geshi/rails.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Moises Deniz
  * Copyright: (c) 2005 Moises Deniz
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/03/21
  *
  * Ruby (with Ruby on Rails Framework) language file for GeSHi.
diff --git a/inc/geshi/rebol.php b/inc/geshi/rebol.php
index a3889eec9..1e5dff626 100644
--- a/inc/geshi/rebol.php
+++ b/inc/geshi/rebol.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Lecanu Guillaume (Guillaume@LyA.fr)
  * Copyright: (c) 2004-2005 Lecanu Guillaume (Guillaume@LyA.fr)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/12/22
  *
  * Rebol language file for GeSHi.
diff --git a/inc/geshi/reg.php b/inc/geshi/reg.php
index bb2e845f3..9878f42f6 100644
--- a/inc/geshi/reg.php
+++ b/inc/geshi/reg.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Sean Hanna (smokingrope@gmail.com)
  * Copyright: (c) 2006 Sean Hanna
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 03/15/2006
  *
  * Microsoft Registry Editor language file for GeSHi.
diff --git a/inc/geshi/robots.php b/inc/geshi/robots.php
index baf286b7f..c0713a64c 100644
--- a/inc/geshi/robots.php
+++ b/inc/geshi/robots.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Christian Lescuyer (cl@goelette.net)
  * Copyright: (c) 2006 Christian Lescuyer http://xtian.goelette.info
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/02/17
  *
  * robots.txt language file for GeSHi.
diff --git a/inc/geshi/rpmspec.php b/inc/geshi/rpmspec.php
index 96dc9556f..243df94c7 100644
--- a/inc/geshi/rpmspec.php
+++ b/inc/geshi/rpmspec.php
@@ -4,7 +4,7 @@
  * ---------------------------------
  * Author: Paul Grinberg (gri6507 TA unity-linux TOD org)
  * Copyright: (c) 2010 Paul Grinberg
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/04/27
  *
  * RPM Spec language file for GeSHi.
diff --git a/inc/geshi/rsplus.php b/inc/geshi/rsplus.php
index b73f5ea77..41cdd158b 100644
--- a/inc/geshi/rsplus.php
+++ b/inc/geshi/rsplus.php
@@ -6,7 +6,7 @@
  * Contributors:
  *  - Benilton Carvalho (beniltoncarvalho@gmail.com)
  * Copyright: (c) 2009 Ron Fredericks (http://www.LectureMaker.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/03/28
  *
  * R language file for GeSHi.
diff --git a/inc/geshi/ruby.php b/inc/geshi/ruby.php
index 47ecbb2e2..c38d5a218 100644
--- a/inc/geshi/ruby.php
+++ b/inc/geshi/ruby.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Moises Deniz
  * Copyright: (c) 2007 Moises Deniz
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/03/21
  *
  * Ruby language file for GeSHi.
diff --git a/inc/geshi/sas.php b/inc/geshi/sas.php
index c4d426fa0..6f4ce285e 100644
--- a/inc/geshi/sas.php
+++ b/inc/geshi/sas.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Galen Johnson (solitaryr@gmail.com)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/12/27
  *
  * SAS language file for GeSHi. Based on the sas vim file.
@@ -44,7 +44,7 @@
 $language_data = array (
     'LANG_NAME' => 'SAS',
     'COMMENT_SINGLE' => array(),
-    'COMMENT_MULTI' => array('/*' => '*/'),
+    'COMMENT_MULTI' => array('/*' => '*/', '*' => ';'),
     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
     'QUOTEMARKS' => array("'", '"'),
     'ESCAPE_CHAR' => '\\',
@@ -287,4 +287,4 @@ $language_data = array (
         )
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/scala.php b/inc/geshi/scala.php
index 202c06c83..12462cf3b 100644
--- a/inc/geshi/scala.php
+++ b/inc/geshi/scala.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Franco Lombardo (franco@francolombardo.net)
  * Copyright: (c) 2008 Franco Lombardo, Benny Baumann
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/02/08
  *
  * Scala language file for GeSHi.
diff --git a/inc/geshi/scheme.php b/inc/geshi/scheme.php
index 2e2430bff..f687e79a7 100644
--- a/inc/geshi/scheme.php
+++ b/inc/geshi/scheme.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Jon Raphaelson (jonraphaelson@gmail.com)
  * Copyright: (c) 2005 Jon Raphaelson, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * Scheme language file for GeSHi.
diff --git a/inc/geshi/scilab.php b/inc/geshi/scilab.php
index d1ff6fc16..cd1ca70f1 100644
--- a/inc/geshi/scilab.php
+++ b/inc/geshi/scilab.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Christophe David (geshi@christophedavid.org)
  * Copyright: (c) 2008 Christophe David (geshi@christophedavid.org)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/08/04
  *
  * SciLab language file for GeSHi.
diff --git a/inc/geshi/sdlbasic.php b/inc/geshi/sdlbasic.php
index 876dc09a6..27aaf522b 100644
--- a/inc/geshi/sdlbasic.php
+++ b/inc/geshi/sdlbasic.php
@@ -4,7 +4,7 @@
  * ------------
  * Author: Roberto Rossi
  * Copyright: (c) 2005 Roberto Rossi (http://rsoftware.altervista.org)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/08/19
  *
  * sdlBasic (http://sdlbasic.sf.net) language file for GeSHi.
diff --git a/inc/geshi/smalltalk.php b/inc/geshi/smalltalk.php
index b475ad711..008bfcd1d 100644
--- a/inc/geshi/smalltalk.php
+++ b/inc/geshi/smalltalk.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Bananeweizen (Bananeweizen@gmx.de)
  * Copyright: (c) 2005 Bananeweizen (www.bananeweizen.de)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/03/27
  *
  * Smalltalk language file for GeSHi.
diff --git a/inc/geshi/smarty.php b/inc/geshi/smarty.php
index 7f4489289..1d8199936 100644
--- a/inc/geshi/smarty.php
+++ b/inc/geshi/smarty.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Alan Juden (alan@judenware.org)
  * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/07/10
  *
  * Smarty template language file for GeSHi.
diff --git a/inc/geshi/sql.php b/inc/geshi/sql.php
index 9e45e850d..6f7870196 100644
--- a/inc/geshi/sql.php
+++ b/inc/geshi/sql.php
@@ -3,14 +3,18 @@
  * sql.php
  * -------
  * Author: Nigel McNie (nigel@geshi.org)
+ * Contributors:
+ *  - Jürgen Thomas (Juergen.Thomas@vs-polis.de)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * SQL language file for GeSHi.
  *
  * CHANGES
  * -------
+ * 2010/07/19 (1.0.8.9)
+ *  -  Added many more keywords
  * 2008/05/23 (1.0.7.22)
  *  -  Added additional symbols for highlighting
  * 2004/11/27 (1.0.3)
@@ -58,30 +62,51 @@ $language_data = array (
     'ESCAPE_CHAR' => '\\',
     'KEYWORDS' => array(
         1 => array(
-            'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC',
-            'AUTO_INCREMENT', 'BETWEEN', 'BINARY', 'BOOLEAN',
-            'BOTH', 'BY', 'CHANGE', 'CHECK', 'COLUMN', 'COLUMNS',
-            'CREATE', 'CROSS', 'DATA', 'DATABASE', 'DATABASES',
-            'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE',
-            'DISTINCT', 'DROP', 'ENCLOSED', 'ESCAPED', 'EXISTS',
-            'EXPLAIN', 'FIELD', 'FIELDS', 'FLUSH', 'FOR',
-            'FOREIGN', 'FROM', 'FULL', 'FUNCTION', 'GRANT',
-            'GROUP', 'HAVING', 'IDENTIFIED', 'IF', 'IGNORE',
-            'IN', 'INDEX', 'INFILE', 'INNER', 'INSERT', 'INTO',
-            'IS', 'JOIN', 'KEY', 'KEYS', 'KILL', 'LANGUAGE',
-            'LEADING', 'LEFT', 'LIKE', 'LIMIT', 'LINES', 'LOAD',
-            'LOCAL', 'LOCK', 'LOW_PRIORITY', 'MODIFY', 'NATURAL',
-            'NEXTVAL', 'NOT', 'NULL', 'ON', 'OPTIMIZE', 'OPTION',
-            'OPTIONALLY', 'OR', 'ORDER', 'OUTER', 'OUTFILE',
-            'PRIMARY', 'PROCEDURAL', 'PROCEEDURE', 'READ',
-            'REFERENCES', 'REGEXP', 'RENAME', 'REPLACE',
-            'RETURN', 'REVOKE', 'RIGHT', 'RLIKE', 'SELECT',
-            'SET', 'SETVAL', 'SHOW', 'SONAME', 'STATUS',
-            'STRAIGHT_JOIN', 'TABLE', 'TABLES', 'TEMINATED',
-            'TEMPORARY', 'TO', 'TRAILING', 'TRIGGER', 'TRUNCATE',
-            'TRUSTED', 'UNION', 'UNIQUE', 'UNLOCK', 'UNSIGNED',
-            'UPDATE', 'USE', 'USING', 'VALUES', 'VARIABLES',
-            'VIEW', 'WHERE', 'WITH', 'WRITE', 'XOR', 'ZEROFILL'
+            'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT',
+            'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY',
+            'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER',
+            'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS',
+            'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT',
+            'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER',
+            'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE',
+            'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE',
+            'DOMAIN', 'DROP',
+            'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP',
+            'EXPLAIN', 'EXTRACT',
+            'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR',
+            'FOREIGN', 'FROM', 'FULL', 'FUNCTION',
+            'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED',
+            'HAVING', 'HOUR',
+            'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER',
+            'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL',
+            'INTO', 'IS',
+            'JOIN',
+            'KEY', 'KEYS', 'KILL',
+            'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD',
+            'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER',
+            'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH',
+            'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT',
+            'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC',
+            'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION',
+            'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER',
+            'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE',
+            'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE',
+            'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW',
+            'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT',
+            'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE',
+            'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME',
+            'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS',
+            'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM',
+            'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME',
+            'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE',
+            'TRUSTED', 'TYPE',
+            'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED',
+            'UPDATE', 'UPPER', 'USE', 'USER', 'USING',
+            'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW',
+            'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE',
+            'XOR',
+            'YEAR',
+            'ZEROFILL'
             )
         ),
     'SYMBOLS' => array(
diff --git a/inc/geshi/systemverilog.php b/inc/geshi/systemverilog.php
index 19405c097..142fd117b 100644
--- a/inc/geshi/systemverilog.php
+++ b/inc/geshi/systemverilog.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Sean O'Boyle
  * Copyright: (C) 2008 IntelligentDV
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/06/25
  *
  * SystemVerilog IEEE 1800-2009(draft8) language file for GeSHi.
@@ -52,9 +52,9 @@
  *        Project:  SyntaxFiles
  *
  * File: systemverilog.php
- * $LastChangedBy: seanoboyle $
- * $LastChangedDate: 2009-07-22 22:20:25 -0700 (Wed, 22 Jul 2009) $
- * $LastChangedRevision: 17 $
+ * $LastChangedBy: benbe $
+ * $LastChangedDate: 2011-02-11 20:31:50 +0100 (Fr, 11. Feb 2011) $
+ * $LastChangedRevision: 2430 $
  *
  ************************************************************************/
 
diff --git a/inc/geshi/tcl.php b/inc/geshi/tcl.php
index 2a07ccd46..c948ff261 100644
--- a/inc/geshi/tcl.php
+++ b/inc/geshi/tcl.php
@@ -4,7 +4,7 @@
  * ---------------------------------
  * Author: Reid van Melle (rvanmelle@gmail.com)
  * Copyright: (c) 2004 Reid van Melle (sorry@nowhere)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/05/05
  *
  * TCL/iTCL language file for GeSHi.
diff --git a/inc/geshi/teraterm.php b/inc/geshi/teraterm.php
index 443bf7b4c..510ad04c4 100644
--- a/inc/geshi/teraterm.php
+++ b/inc/geshi/teraterm.php
@@ -4,23 +4,29 @@
  * --------
  * Author: Boris Maisuradze (boris at logmett.com)
  * Copyright: (c) 2008 Boris Maisuradze (http://logmett.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/09/26
  *
  * Tera Term Macro language file for GeSHi.
  *
  *
- * This version of ttl.php was created for Tera Term 4.60 and LogMeTT 2.9.4.
+ * This version of teraterm.php was created for Tera Term 4.62 and LogMeTT 2.9.4.
  * Newer versions of these application can contain additional Macro commands
- * and/or keywords that are not listed here. The latest release of ttl.php
+ * and/or keywords that are not listed here. The latest release of teraterm.php
  * can be downloaded from Download section of LogMeTT.com
  *
  * CHANGES
  * -------
- * 2008/09/26 (1.0.8)
+ * 2008/09/26 (1.0.0)
  *   -  First Release for Tera Term 4.60 and below.
+ * 2009/03/22 (1.1.0)
+ *   -  First Release for Tera Term 4.62 and below.
+ * 2009/04/25 (1.1.1)
+ *   -  Second Release for Tera Term 4.62 and below.
+ * 2010/09/12 (1.1.2)
+ *   -  Second Release for Tera Term 4.67, LogMeTT 2.97, TTLEditor 1.2.1 and below.
  *
- * TODO (updated 2008/09/26)
+ * TODO (updated 2010/09/12)
  * -------------------------
  * *
  *
@@ -57,27 +63,29 @@ $language_data = array (
             'Beep',
             'BplusRecv',
             'BplusSend',
-            'Break',            // (version 4.53 or later)
+            'Break',
             'Call',
-            'CallMenu',         // (version 4.56 or later)
+            'CallMenu',
             'ChangeDir',
             'ClearScreen',
-            'Clipb2Var',        //(version 4.46 or later)
+            'Clipb2Var',
             'ClosesBox',
             'CloseTT',
             'Code2Str',
             'Connect',
-            'CRC32',            // (version 4.60 or later)
-            'CRC32File',        // (version 4.60 or later)
-            'CygConnect',       // (version 4.57 or later)
+            'CRC32',
+            'CRC32File',
+            'CygConnect',
             'DelPassword',
             'Disconnect',
-            'Do',               // (version 4.56 or later)
+            'DispStr',
+            'Do',
             'Else',
+            'ElseIf',
             'EnableKeyb',
             'End',
             'EndIf',
-            'EndUntil',         // (version 4.56 or later)
+            'EndUntil',
             'EndWhile',
             'Exec',
             'ExecCmnd',
@@ -88,32 +96,37 @@ $language_data = array (
             'FileCreate',
             'FileDelete',
             'FileMarkPtr',
-            'FilenameBox',      //(version 4.54 or later)
+            'FileNameBox',
             'FileOpen',
             'FileRead',
-            'FileReadln',       // (version 4.48 or later)
+            'FileReadln',
             'FileRename',
             'FileSearch',
             'FileSeek',
             'FileSeekBack',
+            'FileStat',
             'FileStrSeek',
             'FileStrSeek2',
+            'FileTruncate',
             'FileWrite',
-            'FileWriteln',
-            'FindOperations',
+            'FileWriteLn',
+            'FindClose',
+            'FindFirst',
+            'FindNext',
             'FlushRecv',
-            'ForNext',
+            'For',
             'GetDate',
-            'GetDir',           //(version 4.46 or later)
+            'GetDir',
             'GetEnv',
+            'GetHostname',
             'GetPassword',
             'GetTime',
             'GetTitle',
-            'GetVer',           //(version 4.58 or later)
+            'GetTTDir',
+            'Getver',
             'GoTo',
             'If',
-            'IfDefined',        // (version 4.46 or later)
-            'IfThenElseIf',
+            'IfDefined',
             'Include',
             'InputBox',
             'Int2Str',
@@ -121,73 +134,91 @@ $language_data = array (
             'KmtGet',
             'KmtRecv',
             'KmtSend',
-            'LoadKeyMap',
+            'LoadKeymap',
             'LogClose',
             'LogOpen',
             'LogPause',
             'LogStart',
             'LogWrite',
-            'Loop',             // (version 4.56 or later)
+            'Loop',
             'MakePath',
             'MessageBox',
-            'MPause',           // (version 4.27 or later)
+            'MPause',
+            'Next',
             'PasswordBox',
             'Pause',
-            'QuickvanRecv',
-            'QuickvanSend',
-            'Random',           //(version 4.27 or later)
-            'Recvln',
+            'QuickVANRecv',
+            'QuickVANSend',
+            'Random',
+            'RecvLn',
             'RestoreSetup',
             'Return',
-            'RotateLeft',       //(version 4.54 or later)
-            'RotateRight',      //(version 4.54 or later)
-            'ScpRecv',          // (version 4.57 or later)
-            'ScpSend',          // (version 4.57 or later)
+            'RotateLeft',
+            'RotateRight',
+            'ScpRecv',
+            'ScpSend',
             'Send',
             'SendBreak',
+            'SendBroadcast',
             'SendFile',
-            'SendKcode',
-            'Sendln',
-            'SetBaud',          // (version 4.58 or later)
+            'SendKCode',
+            'SendLn',
+            'SendLnBroadcast',
+            'SendMulticast',
+            'SetBaud',
             'SetDate',
+            'SetDebug',
             'SetDir',
             'SetDlgPos',
-            'SetDTR',           // (version 4.59 or later)
-            'SetRTS',           // (version 4.59 or later)
-            'SetEnv',           // (version 4.54 or later)
+            'SetDTR',
             'SetEcho',
+            'SetEnv',
             'SetExitCode',
+            'SetMulticastName',
+            'SetRTS',
             'SetSync',
             'SetTime',
             'SetTitle',
             'Show',
             'ShowTT',
-            'Sprintf',          // (version 4.52 or later)
+            'SPrintF',
+            'SPrintF2',
             'StatusBox',
             'Str2Code',
             'Str2Int',
             'StrCompare',
             'StrConcat',
             'StrCopy',
+            'StrInsert',
+            'StrJoin',
             'StrLen',
-            'StrMatch',         // (version 4.59 or later)
+            'StrMatch',
+            'StrRemove',
+            'StrReplace',
             'StrScan',
-            'Testlink',
+            'StrSpecial',
+            'StrSplit',
+            'StrTrim',
+            'TestLink',
             'Then',
-            'ToLower',          //(version 4.53 or later)
-            'ToUpper',          //(version 4.53 or later)
-            'Unlink',
-            'Until',            // (version 4.56 or later)
-            'Var2Clipb',        //(version 4.46 or later)
+            'ToLower',
+            'ToUpper',
+            'UnLink',
+            'Until',
+            'Var2Clipb',
             'Wait',
+            'Wait4All',
             'WaitEvent',
-            'Waitln',
+            'WaitLn',
+            'WaitN',
             'WaitRecv',
-            'WaitRegex',        // (version 4.21 or later)
+            'WaitRegEx',
             'While',
             'XmodemRecv',
             'XmodemSend',
             'YesNoBox',
+            'YmodemRecv',
+            'YmodemSend',
             'ZmodemRecv',
             'ZmodemSend'
             ),
@@ -204,6 +235,7 @@ $language_data = array (
             'groupmatchstr9',
             'inputstr',
             'matchstr',
+            'mtimeout',
             'param2',
             'param3',
             'param4',
@@ -225,11 +257,14 @@ $language_data = array (
             '$[6]',
             '$[7]',
             '$[8]',
+            '$[9]',
+            '$branch$',
+            '$computername$',
             '$connection$',
             '$email$',
             '$logdir$',
             '$logfilename$',
-            '$logit$',
+            '$lttfilename$',
             '$mobile$',
             '$name$',
             '$pager$',
@@ -239,7 +274,7 @@ $language_data = array (
             '$ttdir$',
             '$user$',
             '$windir$',
-            ),
+        ),
         /* Keyword Symbols */
         4 => array(
             'and',
@@ -249,9 +284,11 @@ $language_data = array (
             )
         ),
     'SYMBOLS' => array(
-        '(', ')', '[', ']',
-        '~', '!', '+', '-', '*', '/', '%', '>>', '<<', '<<<', '>>>', '&', '^', '|',
-        '<>', '<=', '>=', '=', '==', '<>', '!=', '&&', '||'
+        '(', ')', '[', ']', '{', '}',
+        '+', '-', '*', '/', '%',
+        '!', '&', '|', '^',
+        '<', '>', '=',
+        '?', ':', ';',
         ),
     'CASE_SENSITIVE' => array(
         GESHI_COMMENTS => false,
@@ -314,4 +351,4 @@ $language_data = array (
     'TAB_WIDTH' => 4
 );
 
-?>
+?>
\ No newline at end of file
diff --git a/inc/geshi/text.php b/inc/geshi/text.php
index 66f459293..dd219f599 100644
--- a/inc/geshi/text.php
+++ b/inc/geshi/text.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Sean Hanna (smokingrope@gmail.com)
  * Copyright: (c) 2006 Sean Hanna
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 04/23/2006
  *
  * Standard Text File (No Syntax Highlighting).
diff --git a/inc/geshi/thinbasic.php b/inc/geshi/thinbasic.php
index 693c698d6..c496cea6f 100644
--- a/inc/geshi/thinbasic.php
+++ b/inc/geshi/thinbasic.php
@@ -4,7 +4,7 @@
  * ------
  * Author: Eros Olmi (eros.olmi@thinbasic.com)
  * Copyright: (c) 2006 Eros Olmi (http://www.thinbasic.com), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/05/12
  *
  * thinBasic language file for GeSHi.
diff --git a/inc/geshi/tsql.php b/inc/geshi/tsql.php
index b915b087d..dddf51934 100644
--- a/inc/geshi/tsql.php
+++ b/inc/geshi/tsql.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Duncan Lock (dunc@dflock.co.uk)
  * Copyright: (c) 2006 Duncan Lock (http://dflock.co.uk/), Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/11/22
  *
  * T-SQL language file for GeSHi.
diff --git a/inc/geshi/typoscript.php b/inc/geshi/typoscript.php
index 525271428..c1e380689 100644
--- a/inc/geshi/typoscript.php
+++ b/inc/geshi/typoscript.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Jan-Philipp Halle (typo3@jphalle.de)
  * Copyright: (c) 2005 Jan-Philipp Halle (http://www.jphalle.de/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.9
  * Date Started: 2005/07/29
  *
  * TypoScript language file for GeSHi.
diff --git a/inc/geshi/unicon.php b/inc/geshi/unicon.php
index edad62df3..42fffc886 100644
--- a/inc/geshi/unicon.php
+++ b/inc/geshi/unicon.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Matt Oates (mattoates@gmail.com)
  * Copyright: (c) 2010 Matt Oates (http://mattoates.co.uk)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2010/04/20
  *
  * Unicon the Unified Extended Dialect of Icon language file for GeSHi.
diff --git a/inc/geshi/uscript.php b/inc/geshi/uscript.php
new file mode 100644
index 000000000..e06aa8ca7
--- /dev/null
+++ b/inc/geshi/uscript.php
@@ -0,0 +1,299 @@
+ 'Unreal Script',
+    'COMMENT_SINGLE' => array(
+            1 => '//',
+            2 => '#'
+            ),
+    'COMMENT_MULTI' => array('/*' => '*/'),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array("'", '"'),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        1 => array(        //declaration keywords
+            'simulated', 'state', 'class', 'function', 'event', 'var', 'local',
+            'ignores', 'globalconfig', 'config', 'abstract', 'nativereplication', 'native',
+            'auto', 'coerce', 'const', 'default',
+            'defaultproperties',
+            'enum', 'extends', 'expands', 'final', 'guid', 'latent', 'localized',
+            'new', 'noexport', 'operator', 'preoperator', 'optional', 'out',
+            'private', 'public', 'protected', 'reliable', 'replication',
+            'singular', 'static', 'struct', 'transient', 'unreliable',
+            'hidedropdown', 'cacheexempt', 'exec', 'delegate', 'import', 'placeable', 'exportstructs'
+            ),
+        2 => array(        //control flow keywords
+            'for', 'while', 'do', 'if', 'else', 'switch', 'case', 'return', 'break', 'continue',
+            'begin', 'loop', 'assert',
+            'foreach', 'AllActors', 'DynamicActors', 'ChildActors', 'BasedActors', 'TouchingActors',
+            'TraceActors', 'RadiusActors', 'VisibleActors', 'CollidingActors', 'VisibleCollidingActors'
+            ),
+        3 => array(        //global (object) functions
+            'log', 'warn', 'rot', 'vect', 'Rand', 'Min', 'Max', 'Clamp', 'Abs', 'Sin', 'ASin',
+            'Cos', 'ACos', 'Tan', 'ATan', 'Exp', 'Loge', 'Sqrt', 'Square', 'FRand', 'FMin', 'FMax', 'FClamp',
+            'Lerp', 'Smerp', 'Ceil', 'Round', 'VSize', 'Normal', 'Invert', 'VRand', 'MirrorVectorByNormal',
+            'GetAxes', 'GetUnAxes', 'RotRand', 'OrthoRotation', 'Normalize', 'ClockwiseFrom',
+            'Len', 'InStr', 'Mid', 'Left', 'Right', 'Caps', 'Chr', 'Asc', 'Locs',
+            'Divide', 'Split', 'StrCmp', 'Repl', 'Eval',
+            'InterpCurveEval', 'InterpCurveGetOutputRange', 'InterpCurveGetInputDomain',
+            'QuatProduct', 'QuatInvert', 'QuatRotateVector', 'QuatFindBetween', 'QuatFromAxisAndAngle',
+            'QuatFromRotator', 'QuatToRotator', 'QuatSlerp',
+            'Localize', 'GotoState', 'IsInState', 'GetStateName',
+            'ClassIsChildOf', 'IsA', 'Enable', 'Disable',
+            'GetPropertyText', 'SetPropertyText', 'GetEnum', 'DynamicLoadObject', 'FindObject',
+            'SaveConfig', 'ClearConfig', 'StaticSaveConfig', 'ResetConfig', 'StaticClearConfig',
+            'GetPerObjectNames', 'RandRange', 'StopWatch', 'IsOnConsole', 'IsSoaking',
+            'PlatformIsMacOS', 'PlatformIsUnix', 'PlatformIsWindows', 'PlatformIs64Bit',
+            'BeginState', 'EndState', 'Created', 'AllObjects', 'GetReferencers', 'GetItemName',
+            'ReplaceText', 'EatStr'
+            ),
+        4 => array(        //common almost-global (actor) functions
+            'ClientMessage', 'ConsoleCommand', 'CopyObjectToClipboard', 'TextToSpeech',
+            'Error', 'Sleep', 'SetCollision', 'SetCollisionSize', 'SetDrawScale', 'SetDrawScale3D',
+            'SetStaticMesh', 'SetDrawType', 'Move', 'SetLocation', 'SetRotation',
+            'SetRelativeLocation', 'SetRelativeRotation', 'MoveSmooth', 'AutonomousPhysics',
+            'SetBase', 'SetOwner', 'IsJoinedTo', 'GetMeshName', 'PlayAnim', 'LoopAnim', 'TweenAnim',
+            'IsAnimating', 'FinishAnim', 'HasAnim', 'StopAnimating', 'FreezeFrameAt', 'SetAnimFrame',
+            'IsTweening', 'AnimStopLooping', 'AnimEnd', 'LinkSkelAnim', 'LinkMesh', 'BoneRefresh',
+            'GetBoneCoords', 'GetBoneRotation', 'GetRootLocation', 'GetRootRotation', 'AttachToBone',
+            'DetachFromBone', 'SetBoneScale', 'UpdateURL', 'GetURLOption', 'SetPhysics', 'KAddImpulse',
+            'KImpact', 'KApplyForce', 'Clock', 'UnClock', 'Destroyed', 'GainedChild', 'LostChild',
+            'Tick', 'PostNetReceive', 'ClientTrigger', 'Trigger', 'UnTrigger', 'BeginEvent', 'EndEvent',
+            'Timer', 'HitWall', 'Falling', 'Landed', 'ZoneChange', 'PhysicsVolumeChange', 'Touch',
+            'PostTouch', 'UnTouch', 'Bump', 'BaseChange', 'Attach', 'Detach', 'SpecialHandling',
+            'EncroachingOn', 'EncroachedBy', 'RanInto', 'FinishedInterpolation', 'EndedRotation',
+            'UsedBy', 'FellOutOfWorld', 'KilledBy', 'TakeDamage', 'HealDamage', 'Trace', 'FastTrace',
+            'TraceThisActor', 'spawn', 'Destroy', 'TornOff', 'SetTimer', 'PlaySound', 'PlayOwnedSound',
+            'GetSoundDuration', 'MakeNoise', 'BeginPlay', 'GetAllInt', 'RenderOverlays', 'RenderTexture',
+            'PreBeginPlay', 'PostBeginPlay', 'PostNetBeginPlay', 'HurtRadius', 'Reset', 'Crash'
+            ),
+        5 => array(        //data types
+            'none', 'null',
+            'float', 'int', 'bool', 'byte', 'char', 'double', 'iterator', 'name', 'string',    //primitive
+            'plane', 'rotator', 'vector', 'spline',    'coords', 'Quat', 'Range', 'RangeVector', //structs
+            'Scale', 'Color', 'Box', 'IntBox', 'FloatBox', 'BoundingVolume', 'Matrix', 'InterpCurvePoint',
+            'InterpCurve', 'CompressedPosition', 'TMultiMap', 'PointRegion',
+            'KRigidBodyState', 'KSimParams', 'AnimRep', 'FireProperties',
+            'lodmesh', 'skeletalmesh', 'mesh', 'StaticMesh', 'MeshInstance',    //3d resources
+            'sound',    //sound resources
+            'material', 'texture', 'combiner', 'modifier', 'ColorModifier', 'FinalBlend',    //2d resources
+            'MaterialSequence', 'MaterialSwitch', 'OpacityModifier', 'TexModifier', 'TexEnvMap',
+            'TexCoordSource', 'TexMatrix', 'TexOscillator', 'TexPanner', 'TexRotator', 'TexScaler',
+            'RenderedMaterial', 'BitmapMaterial', 'ScriptedTexture', 'ShadowBitmapMaterial', 'Cubemap',
+            'FractalTexture', 'FireTexture', 'IceTexture', 'WaterTexture', 'FluidTexture', 'WaveTexture',
+            'WetTexture', 'ConstantMaterial', 'ConstantColor', 'FadeColor', 'ParticleMaterial',
+            'ProjectorMaterial', 'Shader', 'TerrainMaterial', 'VertexColor'
+            ),
+        6 => array(        //misc keywords
+            'false', 'true', 'self', 'super', 'MaxInt', 'Pi'
+            ),
+        7 => array(        //common actor enums & variables
+            'DT_None', 'DT_Sprite', 'DT_Mesh', 'DT_Brush', 'DT_RopeSprite',
+            'DT_VerticalSprite', 'DT_TerraForm', 'DT_SpriteAnimOnce', 'DT_StaticMesh', 'DT_DrawType',
+            'DT_Particle', 'DT_AntiPortal', 'DT_FluidSurface',
+            'PHYS_None', 'PHYS_Walking', 'PHYS_Falling', 'PHYS_Swimming', 'PHYS_Flying',
+            'PHYS_Rotating', 'PHYS_Projectile', 'PHYS_Interpolating', 'PHYS_MovingBrush', 'PHYS_Spider',
+            'PHYS_Trailer', 'PHYS_Ladder', 'PHYS_RootMotion', 'PHYS_Karma', 'PHYS_KarmaRagDoll',
+            'PHYS_Hovering', 'PHYS_CinMotion',
+            'ROLE_None', 'ROLE_DumbProxy', 'ROLE_SimulatedProxy',
+            'ROLE_AutonomousProxy', 'ROLE_Authority',
+            'STY_None', 'STY_Normal', 'STY_Masked', 'STY_Translucent', 'STY_Modulated', 'STY_Alpha',
+            'STY_Additive', 'STY_Subtractive', 'STY_Particle', 'STY_AlphaZ',
+            'OCCLUSION_None', 'OCCLUSION_BSP', 'OCCLUSION_Default', 'OCCLUSION_StaticMeshes',
+            'SLOT_None', 'SLOT_Misc', 'SLOT_Pain', 'SLOT_Interact', 'SLOT_Ambient', 'SLOT_Talk',
+            'SLOT_Interface', 'MTRAN_None', 'MTRAN_Instant', 'MTRAN_Segue', 'MTRAN_Fade',
+            'MTRAN_FastFade', 'MTRAN_SlowFade',
+
+            'DrawType', 'Physics', 'Owner', 'Base', 'Level', 'Game', 'Instigator', 'RemoteRole', 'Role',
+            'LifeSpan', 'Tag', 'Event', 'Location', 'Rotation', 'Velocity', 'Acceleration',
+            'RelativeLocation', 'RelativeRotation', 'DrawScale', 'DrawScale3D', 'Skins', 'Style',
+            'SoundVolume', 'SoundPitch', 'SoundRadius', 'TransientSoundVolume', 'TransientSoundRadius',
+            'CollisionRadius', 'CollisionHeight', 'Mass', 'Buoyancy', 'RotationRate', 'DesiredRotation'
+            ),
+        8 => array(        //common non-actor uscript classes
+            'Object',
+            'CacheManager', 'CameraEffect', 'Canvas', 'CheatManager', 'Commandlet', 'DecoText', 'GUI',
+            'InteractionMaster', 'Interactions', 'Interaction', 'KarmaParamsCollision', 'KarmaParamsRBFull',
+            'KarmaParamsSkel', 'KarmaParams', 'LevelSummary', 'Locale', 'Manifest', 'MaterialFactory',
+            'MeshObject', 'ObjectPool', 'Pallete',
+            'ParticleEmitter', 'MeshEmitter', 'BeamEmitter', 'SpriteEmitter', 'SparkEmitter', 'TrailEmitter',
+            'Player', 'PlayerInput', 'PlayInfo', 'ReachSpec', 'Resource', 'LatentScriptedAction', 'ScriptedAction',
+            'speciesType', 'StreamBase', 'Stream', 'EditorEngine', 'Engine', 'Time', 'WeaponFire',
+            'WebApplication', 'WebRequest', 'WebResponse', 'WebSkin', 'xPawnGibGroup', 'xPawnSoundGroup',
+            'xUtil'
+            ),
+        9 => array(        //common actor-based uscript classes
+            'Actor',
+            'Controller', 'AIController', 'ScriptedController', 'Bot', 'xBot',
+            'PlayerController', 'UnrealPlayer', 'xPlayer',
+            'DamageType', 'WeaponDamageType', 'Effects', 'Emitter', 'NetworkEmitter',
+            'Gib', 'HUD', 'HudBase', 'Info', 'FluidSurfaceInfo', 'Combo',
+            'GameInfo', 'UnrealMPGameInfo', 'DeathMatch', 'TeamGame', 'CTFGame',
+            'xCTFGame', 'xBombingRun', 'xDoubleDom', 'xTeamGame',
+            'ASGameInfo', 'Invasion', 'ONSOnslaughtGame', 'xDeathmatch',
+            'Mutator', 'Inventory', 'Ammunition', 'KeyInventory', 'Powerups', 'Armor', 'Weapon',
+            'InventoryAttachment', 'WeaponAttachment',
+            'KActor', 'KConstraint', 'KBSJoint', 'KCarWheelJoint', 'KConeLimit', 'KHinge', 'KTire',
+            'KVehicleFactory', 'Keypoint', 'AIScript', 'ScriptedSequence', 'ScriptedTrigger',
+            'AmbientSound', 'Light', 'SpotLight', 'SunLight', 'TriggerLight',
+            'MeshEffect', 'NavigationPoint', 'GameObjective', 'DestroyableObjective',
+            'PathNode', 'FlyingPathNode', 'RoadPathNode', 'InventorySpot', 'PlayerStart',
+            'Pawn', 'Vehicle', 'UnrealPawn', 'xPawn', 'Monster', 'ASVehicle', 'KVehicle', 'KCar',
+            'ONSWeaponPawn', 'SVehicle', 'ONSVehicle', 'ONSChopperCraft', 'ONSHoverCraft',
+            'ONSPlaneCraft', 'ONSTreadCraft', 'ONSWheeledCraft',
+            'Pickup', 'Ammo', 'UTAmmoPickup', 'ArmorPickup', 'KeyPickup', 'TournamentPickup',
+            'Projectile', 'Projector', 'DynamicProjector', 'ShadowProjector', 'xScorch',
+            'xEmitter', 'xPickupBase', 'xProcMesh', 'xWeatherEffect', 'PhysicsVolume', 'Volume'
+            ),
+        10 => array(    //symbol-like operators
+            'dot','cross'
+            )
+        ),
+    'SYMBOLS' => array(
+        '+','-','=','/','*','-','%','>','<','&','^','!','|','`','(',')','[',']','{','}',
+        '<<','>>','$','@'
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false,
+        2 => false,
+        3 => false,
+        4 => false,
+        5 => false,
+        6 => false,
+        7 => false,
+        8 => false,
+        9 => false,
+        10 => false,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #0000FF;',
+            2 => 'color: #0000FF;',
+            3 => 'color: #0066AA;',
+            4 => 'color: #0088FF;',
+            5 => 'color: #E000E0;',
+            6 => 'color: #900000;',
+            7 => 'color: #888800;',
+            8 => 'color: #AA6600;',
+            9 => 'color: #FF8800;',
+            10 => 'color: #0000FF;'
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #008080; font-style: italic;',
+            2 => 'color: #000000; font-weight: bold;',
+            'MULTI' => 'color: #008080; font-style: italic;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => ''
+            ),
+        'BRACKETS' => array(
+            0 => 'color: #000000;'
+            ),
+        'STRINGS' => array(
+            0 => 'color: #999999;'
+            ),
+        'NUMBERS' => array(
+            0 => 'color: #FF0000;'
+            ),
+        'METHODS' => array(
+            0 => 'color: #006600;'
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #669966;'
+            ),
+        'REGEXPS' => array(
+            0 => 'color: #E000E0;',
+            1 => 'color: #E000E0;'
+            ),
+        'SCRIPT' => array(
+            0 => ''
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => '',
+        5 => '',
+        6 => '',
+        7 => '',
+        8 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
+        9 => 'http://wiki.beyondunreal.com/wiki?search={FNAME}',
+        10 => ''
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array('.'),
+    'REGEXPS' => array(            //handle template-style variable definitions
+        0 => array(
+            GESHI_SEARCH => '(class\s*)<(\s*(\w+)\s*)>',
+            GESHI_REPLACE => "\${1}",
+            GESHI_MODIFIERS => 'i',
+            GESHI_BEFORE => '',
+            GESHI_AFTER => "< \${3} >"
+            ),
+        1 => array(
+            GESHI_SEARCH => '(array\s*)<(\s*(\w+)\s*)>',
+            GESHI_REPLACE => "\${1}",
+            GESHI_MODIFIERS => 'i',
+            GESHI_BEFORE => '',
+            GESHI_AFTER => "< \${3} >"
+            )
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        ),
+    'PARSER_CONTROL' => array(
+        'KEYWORDS' => array(
+            10 => array(
+                'DISALLOWED_BEFORE' => '(?)'
+                )
+            )
+        )
+);
+
+?>
diff --git a/inc/geshi/vala.php b/inc/geshi/vala.php
index 334398a87..a9d6b0745 100644
--- a/inc/geshi/vala.php
+++ b/inc/geshi/vala.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Nicolas Joseph (nicolas.joseph@valaide.org)
  * Copyright: (c) 2009 Nicolas Joseph
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/04/29
  *
  * Vala language file for GeSHi.
diff --git a/inc/geshi/vb.php b/inc/geshi/vb.php
index f24d86505..dd6545eb5 100644
--- a/inc/geshi/vb.php
+++ b/inc/geshi/vb.php
@@ -5,7 +5,7 @@
  * Author: Roberto Rossi (rsoftware@altervista.org)
  * Copyright: (c) 2004 Roberto Rossi (http://rsoftware.altervista.org),
  *                     Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/08/30
  *
  * Visual Basic language file for GeSHi.
diff --git a/inc/geshi/vbnet.php b/inc/geshi/vbnet.php
index f74775214..563bb993a 100644
--- a/inc/geshi/vbnet.php
+++ b/inc/geshi/vbnet.php
@@ -4,7 +4,7 @@
  * ---------
  * Author: Alan Juden (alan@judenware.org)
  * Copyright: (c) 2004 Alan Juden, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/06/04
  *
  * VB.NET language file for GeSHi.
diff --git a/inc/geshi/verilog.php b/inc/geshi/verilog.php
index 14c1d7172..9e4211eb9 100644
--- a/inc/geshi/verilog.php
+++ b/inc/geshi/verilog.php
@@ -4,7 +4,7 @@
  * -----------
  * Author: G�nter Dannoritzer 
  * Copyright: (C) 2008 Guenter Dannoritzer
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/05/28
  *
  * Verilog language file for GeSHi.
diff --git a/inc/geshi/vhdl.php b/inc/geshi/vhdl.php
index 6856933c7..f6ce941d4 100644
--- a/inc/geshi/vhdl.php
+++ b/inc/geshi/vhdl.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de)
  * Copyright: (c) 2005 Alexander Krause
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/06/15
  *
  * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi.
diff --git a/inc/geshi/vim.php b/inc/geshi/vim.php
index f4f93ad2e..68abc272e 100644
--- a/inc/geshi/vim.php
+++ b/inc/geshi/vim.php
@@ -6,7 +6,7 @@
  * Contributors:
  *  - Laurent Peuch (psycojoker@gmail.com)
  * Copyright: (c) 2008 Swaroop C H (http://www.swaroopch.com)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/10/19
  *
  * Vim scripting language file for GeSHi.
diff --git a/inc/geshi/visualfoxpro.php b/inc/geshi/visualfoxpro.php
index 7d804257f..322f34bae 100644
--- a/inc/geshi/visualfoxpro.php
+++ b/inc/geshi/visualfoxpro.php
@@ -4,7 +4,7 @@
  * ----------------
  * Author: Roberto Armellin (r.armellin@tin.it)
  * Copyright: (c) 2004 Roberto Armellin, Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/09/17
  *
  * Visual FoxPro language file for GeSHi.
diff --git a/inc/geshi/visualprolog.php b/inc/geshi/visualprolog.php
index 5afd7de8d..a51466dcd 100644
--- a/inc/geshi/visualprolog.php
+++ b/inc/geshi/visualprolog.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Thomas Linder Puls (puls@pdc.dk)
  * Copyright: (c) 2008 Thomas Linder Puls (puls@pdc.dk)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/11/20
  *
  * Visual Prolog language file for GeSHi.
diff --git a/inc/geshi/whitespace.php b/inc/geshi/whitespace.php
index c47775d44..3e19b60ce 100644
--- a/inc/geshi/whitespace.php
+++ b/inc/geshi/whitespace.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2009/10/31
  *
  * Whitespace language file for GeSHi.
diff --git a/inc/geshi/whois.php b/inc/geshi/whois.php
index 9b4b24179..ae851cd08 100644
--- a/inc/geshi/whois.php
+++ b/inc/geshi/whois.php
@@ -4,7 +4,7 @@
  * --------
  * Author: Benny Baumann (BenBE@geshi.org)
  * Copyright: (c) 2008 Benny Baumann (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/09/14
  *
  * Whois response (RPSL format) language file for GeSHi.
diff --git a/inc/geshi/winbatch.php b/inc/geshi/winbatch.php
index 949e61c14..d27fe070f 100644
--- a/inc/geshi/winbatch.php
+++ b/inc/geshi/winbatch.php
@@ -4,7 +4,7 @@
  * ------------
  * Author: Craig Storey (storey.craig@gmail.com)
  * Copyright: (c) 2004 Craig Storey (craig.xcottawa.ca)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2006/05/19
  *
  * WinBatch language file for GeSHi.
diff --git a/inc/geshi/xbasic.php b/inc/geshi/xbasic.php
index a2d85a6df..94a2debf1 100644
--- a/inc/geshi/xbasic.php
+++ b/inc/geshi/xbasic.php
@@ -4,9 +4,8 @@
  * ----------
  * Author: Jos Gabriel Moya Yangela (josemoya@gmail.com)
  * Copyright: (c) 2005 Jos Gabriel Moya Yangela (http://aprenderadesaprender.6te.net)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2005/11/23
- * Last Modified: $Date: 2010/01/30 00:42:00 $
  *
  * XBasic language file for GeSHi.
  *
diff --git a/inc/geshi/xml.php b/inc/geshi/xml.php
index efd3e6c33..4a420d1b7 100644
--- a/inc/geshi/xml.php
+++ b/inc/geshi/xml.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Nigel McNie (nigel@geshi.org)
  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2004/09/01
  *
  * XML language file for GeSHi. Based on the idea/file by Christian Weiske
diff --git a/inc/geshi/xorg_conf.php b/inc/geshi/xorg_conf.php
index 5cde8e171..e1fff61b5 100644
--- a/inc/geshi/xorg_conf.php
+++ b/inc/geshi/xorg_conf.php
@@ -4,7 +4,7 @@
  * ----------
  * Author: Milian Wolff (mail@milianw.de)
  * Copyright: (c) 2008 Milian Wolff (http://milianw.de)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2008/06/18
  *
  * xorg.conf language file for GeSHi.
diff --git a/inc/geshi/xpp.php b/inc/geshi/xpp.php
index 216c46eaf..d4d7b457d 100644
--- a/inc/geshi/xpp.php
+++ b/inc/geshi/xpp.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Simon Butcher (simon@butcher.name)
  * Copyright: (c) 2007 Simon Butcher (http://simon.butcher.name/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/02/27
  *
  * Axapta/Dynamics Ax X++ language file for GeSHi.
diff --git a/inc/geshi/yaml.php b/inc/geshi/yaml.php
new file mode 100644
index 000000000..1b3ce96f2
--- /dev/null
+++ b/inc/geshi/yaml.php
@@ -0,0 +1,150 @@
+: since PHP offers no variable-width lookbehind,
+ *      these blocks will still be highlighted even when commented out. As it happens,
+ *      any line ending with | or > could result in the unintentional highlighting of
+ *      all remaining lines in the file, just because I couldn't check for this regex
+ *      as a lookbehind:  '/:(\s+)(!!(\w+)(\s+))?/'
+ *      If there is a workaround for that, it needs implemented.
+ *   *  I may be missing some operators. I deliberately omitted inline array notation
+ *      as, in general, it's ugly and tends to conflict with plain-text. Ensuring all
+ *      highlighted list delimiters are not plain text would be as simple as checking
+ *      that they follow a colon directly. Alas, without variable-length lookbehinds,
+ *      if there is a way to do so in GeSHi I am unaware of it.
+ *   *  I kind of whored the comment regexp array. It seemed like a safe bet, so it's
+ *      where I crammed everything. Some of it may need moved elsewhere for neatness.
+ *   *  The !!typename highlight needs not to interfere with ": |" and ": >": Pairing
+ *      key: !!type | value is perfectly legal, but again due to lookbehind issues, I
+ *      can't add a case for that. Also, it is likely that multiple spaces can be put
+ *      between the colon and pipe symbol, which would also break it.
+ *
+ *************************************************************************************
+ *
+ *     This file is part of GeSHi.
+ *
+ *   GeSHi is free software; you can redistribute it and/or modify it
+ *   under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   GeSHi is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with GeSHi; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ ************************************************************************************/
+
+$language_data = array (
+    'LANG_NAME' => 'YAML',
+    'COMMENT_SINGLE' => array(),
+    'COMMENT_MULTI' => array(),
+    //Keys
+    'COMMENT_REGEXP' => array( // ENTRY ZERO  SHOULD CHECK FOR (\n(\s*)([^#%]+?):(\s+)(!!(\w+)(\s+))?) AS A LOOKBEHIND, BUT IT CAN'T.
+        0 => '/(?<=\s[\|>]\n)(\s+)(.*)((?=[\n$])(([\n^](\1(.*)|(?=[\n$])))*)|$)/', // Pipe blocks and > blocks.
+        1 => '/#(.*)/', // Blue # comments
+        2 => '/%(.*)/', // Red % comments
+        3 => '/(^|\n)([^#%^\n]+?)(?=: )/',  // Key-value names
+        4 => '/(^|\n)([^#%^\n]+?)(?=:\n)/',// Key-group names
+        5 => '/(?<=^---)(\s*)!(\S+)/',    // Comments after ---
+        6 => '/(?<=: )(\s*)\&(\S+)/',    // References
+        7 => '/(?<=: )(\s*)\*(\S+)/',   // Dereferences
+        8 => '/!!(\w+)/',              // Types
+        //9 => '/(?<=\n)(\s*)-(?!-)/',       // List items: This needs to search within comments 3 and 4, but I don't know how.
+        ),
+    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"'),
+    'ESCAPE_CHAR' => '',
+    'KEYWORDS' => array(
+        1 => array(
+            'all','any','none', "yes", "no"
+            ),
+        ),
+    'SYMBOLS' => array(
+        1 => array('---', '...'),
+        2 => array(': ', ">\n", "|\n", '<<:', ":\n") // It'd be nice if I could specify that the colon must
+        //                                              follow comment 3 or 4 to be considered, and the > and |
+        //                                              must follow such a colon.
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false,
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'font-weight: bold;'
+            ),
+        'COMMENTS' => array(
+            0 => 'color: #303050;background-color: #F5F5F5',
+            1 => 'color: blue;',
+            2 => 'font-weight: bold; color: red;',
+            3 => 'color: green;',
+            4 => 'color: #007F45;',
+            5 => 'color: #7f7fFF;',
+            6 => 'color: #FF7000;',
+            7 => 'color: #FF45C0;',
+            8 => 'font-weight: bold; color: #005F5F;',
+            //9 => 'font-weight: bold; color: #000000;',
+            ),
+        'ESCAPE_CHAR' => array(
+            ),
+        'BRACKETS' => array(
+            ),
+        'STRINGS' => array(
+            0 => 'color: #CF00CF;'
+            ),
+        'NUMBERS' => array(
+            // 0 => 'color: #33f;' // Don't highlight numbers, really...
+            ),
+        'METHODS' => array(
+            1 => '',
+            2 => ''
+            ),
+        'SYMBOLS' => array(
+            1 => 'color: cyan;',
+            2 => 'font-weight: bold; color: brown;'
+            ),
+        'REGEXPS' => array(
+            ),
+        'SCRIPT' => array(
+            0 => ''
+            )
+        ),
+    'URLS' => array(1 => ''),
+    'OOLANG' => false,
+    'OBJECT_SPLITTERS' => array( ),
+    'REGEXPS' => array( ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array( ),
+    'HIGHLIGHT_STRICT_BLOCK' => array( )
+);
+
+?>
\ No newline at end of file
diff --git a/inc/geshi/z80.php b/inc/geshi/z80.php
index f28593cd2..cb92e9692 100644
--- a/inc/geshi/z80.php
+++ b/inc/geshi/z80.php
@@ -4,7 +4,7 @@
  * -------
  * Author: Benny Baumann (BenBE@omorphia.de)
  * Copyright: (c) 2007-2008 Benny Baumann (http://www.omorphia.de/)
- * Release Version: 1.0.8.8
+ * Release Version: 1.0.8.10
  * Date Started: 2007/02/06
  *
  * ZiLOG Z80 Assembler language file for GeSHi.
diff --git a/inc/geshi/zxbasic.php b/inc/geshi/zxbasic.php
new file mode 100644
index 000000000..b32b8950a
--- /dev/null
+++ b/inc/geshi/zxbasic.php
@@ -0,0 +1,150 @@
+ 'ZXBasic',
+    'COMMENT_SINGLE' => array(
+        1 => "'",
+        2 => '#',
+        3 => 'REM'
+        ),
+    'COMMENT_MULTI' => array("/'" => "'/"),
+    'CASE_KEYWORDS' => GESHI_CAPS_UPPER, //GESHI_CAPS_NO_CHANGE,
+    'QUOTEMARKS' => array('"'),
+    'ESCAPE_CHAR' => '\\',
+    'KEYWORDS' => array(
+        1 => array(
+            "ASM", "BEEP", "BOLD", "BORDER", "BRIGHT", "ByRef", "ByVal", "CAST",
+            "CIRCLE", "CLS", "CONST", "CONTINUE", "DECLARE", "DIM", "DO",
+            "DRAW", "ELSE", "ELSEIF", "END", "EXIT", "FastCall", "FLASH", "FOR",
+            "FUNCTION", "GOTO", "GOSUB", "GO", "IF", "INK", "INVERSE", "ITALIC",
+            "LET", "LOAD", "LOOP", "NEXT", "OVER", "PAPER", "PAUSE", "PI",
+            "PLOT", "POKE", "PRINT", "RANDOMIZE", "REM", "RETURN", "SAVE",
+            "StdCall", "Sub", "THEN", "TO", "UNTIL", "VERIFY", "WEND", "WHILE",
+            ),
+
+        // types
+        2 => array(
+            'byte', 'ubyte', 'integer', 'uinteger', 'long', 'ulong', 'fixed',
+            'float', 'string'
+            ),
+
+        // Functions
+        3 => array(
+            "ABS", "ACS", "ASN", "ATN", "CHR", "CODE", "COS", "CSRLIN", "EXP",
+            "HEX", "HEX16", "INKEY", "INT", "LEN", "LN", "PEEK", "POS", "RND",
+            "SCREEN$", "SGN", "SIN", "SQR", "STR", "TAN", "VAL",
+            ),
+
+        // Operators and modifiers
+        4 => array(
+            "AT", "AS", "AND", "MOD", "NOT", "OR", "SHL", "SHR", "STEP", "XOR"
+            )
+        ),
+    'SYMBOLS' => array(
+        '(', ')'
+        ),
+    'CASE_SENSITIVE' => array(
+        GESHI_COMMENTS => false,
+        1 => false,
+        2 => false,
+        3 => false,
+        4 => false
+        ),
+    'STYLES' => array(
+        'KEYWORDS' => array(
+            1 => 'color: #000080; font-weight: bold;', // Commands
+            2 => 'color: #800080; font-weight: bold;', // Types
+            3 => 'color: #006000; font-weight: bold;', // Functions
+            4 => 'color: #801010; font-weight: bold;'  // Operators and Modifiers
+            ),
+        'COMMENTS' => array(
+            1 => 'color: #808080; font-style: italic;',
+            2 => 'color: #339933;',
+            3 => 'color: #808080; font-style: italic;',
+            'MULTI' => 'color: #808080; font-style: italic;'
+            ),
+        'BRACKETS' => array(
+            //0 => 'color: #66cc66;'
+            0 => 'color: #007676;'
+            ),
+        'STRINGS' => array(
+            //0 => 'color: #ff0000;'
+            0 => 'color: #A00000; font-style: italic;'
+            ),
+        'NUMBERS' => array(
+            //0 => 'color: #cc66cc;'
+            0 => 'color: #b05103;'// font-weight: bold;'
+            ),
+        'METHODS' => array(
+            0 => 'color: #66cc66;'
+            ),
+        'SYMBOLS' => array(
+            0 => 'color: #66cc66;'
+            ),
+        'ESCAPE_CHAR' => array(
+            0 => 'color: #000099;'
+            ),
+        'SCRIPT' => array(
+            ),
+        'REGEXPS' => array(
+            )
+        ),
+    'URLS' => array(
+        1 => '',
+        2 => '',
+        3 => '',
+        4 => ''
+        ),
+    'OOLANG' => true,
+    'OBJECT_SPLITTERS' => array(
+        1 => '.'
+        ),
+    'REGEXPS' => array(
+        ),
+    'STRICT_MODE_APPLIES' => GESHI_NEVER,
+    'SCRIPT_DELIMITERS' => array(
+        ),
+    'HIGHLIGHT_STRICT_BLOCK' => array(
+        )
+);
+
+?>
\ No newline at end of file
-- 
cgit v1.2.3


From 8cb3706df5ad54c654bffb76a69ac0ca1006521e Mon Sep 17 00:00:00 2001
From: Michael Hamann 
Date: Fri, 11 May 2012 10:33:15 +0200
Subject: Fix nested triggering of the same event

Previously when in an event handler the same event was triggered again,
only the handlers for the second event invocation were all executed, the
handling of the "outer" event stopped after the handling of the inner
event as they both used the same iterator of the hooks array. This
caused caching bugs e.g. when both the include and the indexmenu plugin
were enabled as both of them load metadata in the cache handler which
triggers another renderer cache event.
---
 inc/events.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'inc')

diff --git a/inc/events.php b/inc/events.php
index 09f3f3c0c..4e81f85c8 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -158,8 +158,7 @@ class Doku_Event_Handler {
         $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE');
 
         if (!empty($this->_hooks[$evt_name])) {
-            $hook = reset($this->_hooks[$evt_name]);
-            do {
+            foreach ($this->_hooks[$evt_name] as $hook) {
                 //        list($obj, $method, $param) = $hook;
                 $obj =& $hook[0];
                 $method = $hook[1];
@@ -171,7 +170,8 @@ class Doku_Event_Handler {
                     $obj->$method($event, $param);
                 }
 
-            } while ($event->_continue && $hook = next($this->_hooks[$evt_name]));
+                if (!$event->_continue) break;
+            }
         }
     }
 }
-- 
cgit v1.2.3


From 8414853140930bdf4f14cfee2f8a532d47c07129 Mon Sep 17 00:00:00 2001
From: Michael Hamann 
Date: Fri, 11 May 2012 17:34:26 +0200
Subject: tpl_get_action: Return empty params array instead of params string

This prevents an "Illegal string offset" error in PHP 5.4 in the test
cases (the integration tests failed here with PHP 5.4).
---
 inc/template.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'inc')

diff --git a/inc/template.php b/inc/template.php
index ab6aa925f..d007f47ef 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -580,7 +580,7 @@ function tpl_get_action($type) {
                     $accesskey = 'v';
                 }
             }else{
-                $params = '';
+                $params = array();
                 $type = 'show';
                 $accesskey = 'v';
             }
@@ -597,7 +597,7 @@ function tpl_get_action($type) {
             break;
         case 'top':
             $accesskey = 'x';
-            $params = '';
+            $params = array();
             $id = '#dokuwiki__top';
             break;
         case 'back':
@@ -606,7 +606,7 @@ function tpl_get_action($type) {
                 return false;
             }
             $id = $parent;
-            $params = '';
+            $params = array();
             $accesskey = 'b';
             break;
         case 'login':
-- 
cgit v1.2.3


From 16f15a8172591c8e5725677b192ec836030b424a Mon Sep 17 00:00:00 2001
From: Dominik Eckelmann 
Date: Mon, 14 May 2012 21:56:38 +0200
Subject: empty ID in wl() will be treated as $conf['start']

---
 inc/common.php | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

(limited to 'inc')

diff --git a/inc/common.php b/inc/common.php
index 6ea536c44..cd0780730 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -342,16 +342,18 @@ function idfilter($id,$ue=true){
  *
  * @author Andreas Gohr 
  */
-function wl($id='',$more='',$abs=false,$sep='&'){
+function wl($id='',$urlParameters='',$absolute=false,$separator='&'){
     global $conf;
-    if(is_array($more)){
-        $more = buildURLparams($more,$sep);
+    if(is_array($urlParameters)){
+        $urlParameters = buildURLparams($urlParameters,$separator);
     }else{
-        $more = str_replace(',',$sep,$more);
+        $urlParameters = str_replace(',',$separator,$urlParameters);
     }
-
-    $id    = idfilter($id);
-    if($abs){
+    if ($id === '') {
+        $id = $conf['start'];
+    }
+    $id = idfilter($id);
+    if($absolute){
         $xlink = DOKU_URL;
     }else{
         $xlink = DOKU_BASE;
@@ -359,16 +361,16 @@ function wl($id='',$more='',$abs=false,$sep='&'){
 
     if($conf['userewrite'] == 2){
         $xlink .= DOKU_SCRIPT.'/'.$id;
-        if($more) $xlink .= '?'.$more;
+        if($urlParameters) $xlink .= '?'.$urlParameters;
     }elseif($conf['userewrite']){
         $xlink .= $id;
-        if($more) $xlink .= '?'.$more;
+        if($urlParameters) $xlink .= '?'.$urlParameters;
     }elseif($id){
         $xlink .= DOKU_SCRIPT.'?id='.$id;
-        if($more) $xlink .= $sep.$more;
+        if($urlParameters) $xlink .= $separator.$urlParameters;
     }else{
         $xlink .= DOKU_SCRIPT;
-        if($more) $xlink .= '?'.$more;
+        if($urlParameters) $xlink .= '?'.$urlParameters;
     }
 
     return $xlink;
-- 
cgit v1.2.3


From ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2 Mon Sep 17 00:00:00 2001
From: Andreas Gohr 
Date: Wed, 16 May 2012 11:18:24 +0200
Subject: make sure SSO data for AD backend is always UTF-8

In some circumstances the username was set in latin1.
---
 inc/auth/ad.class.php | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'inc')

diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php
index bc4168527..e161c2939 100644
--- a/inc/auth/ad.class.php
+++ b/inc/auth/ad.class.php
@@ -70,6 +70,9 @@ class auth_ad extends auth_basic {
         }
 
         // Prepare SSO
+        if(!utf8_check($_SERVER['REMOTE_USER'])){
+            $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']);
+        }
         if($_SERVER['REMOTE_USER'] && $this->cnf['sso']){
             // remove possible NTLM domain
             list($dom,$usr) = explode('\\',$_SERVER['REMOTE_USER'],2);
-- 
cgit v1.2.3


From 5a9866e97863490816d932e98e8e170e49405d43 Mon Sep 17 00:00:00 2001
From: Andreas Gohr 
Date: Sun, 20 May 2012 09:44:46 +0200
Subject: do not surpress any errors when loading plugin files

When a plugin file exists, we can assume it is the correct file and load
it without error supression. This makes it much easier to detect and
debug problematic plugins.
---
 inc/load.php                   | 9 +++++----
 inc/plugincontroller.class.php | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

(limited to 'inc')

diff --git a/inc/load.php b/inc/load.php
index 9f54034a3..7a410e452 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -96,11 +96,12 @@ function load_autoload($name){
     // Plugin loading
     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
-        // how to load this class.
+        // try to load the wanted plugin file
         $c = ((count($m) === 4) ? "/{$m[3]}" : '');
-        @include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
+        $plg = DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
+        if(@file_exists($plg)){
+            include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
+        }
         return;
     }
 }
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 208d7dae9..11636fb91 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -169,7 +169,7 @@ class Doku_Plugin_Controller {
         $plugins = array();
         foreach($files as $file) {
             if(file_exists($file)) {
-                @include_once($file);
+                include_once($file);
             }
         }
         return $plugins;
-- 
cgit v1.2.3


From c07c5d9357d0e1796b24abac74d9628b41098242 Mon Sep 17 00:00:00 2001
From: Robert Nitsch 
Date: Mon, 21 May 2012 19:43:03 +0200
Subject: Fixes messages.txt's modification timestamp not being updated.

This bug occurs on systems where writing a zero-length string to an
empty file does not update the file's modification timestamp.

This leads to the messages.txt being downloaded almost endlessly, causing
long delays for logged-in users. Visitors are not affected, because the
messages.txt is only updated for logged-in users.
---
 inc/infoutils.php | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'inc')

diff --git a/inc/infoutils.php b/inc/infoutils.php
index 2b8486906..ff752cd0f 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -25,11 +25,14 @@ function checkUpdateMessages(){
 
     // check if new messages needs to be fetched
     if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
+        dbglog("checkUpdatesMessages(): downloading messages.txt");
         $http = new DokuHTTPClient();
         $http->timeout = 8;
         $data = $http->get(DOKU_MESSAGEURL.$updateVersion);
         io_saveFile($cf,$data);
+        @touch($cf);
     }else{
+        dbglog("checkUpdatesMessages(): messages.txt up to date");
         $data = io_readFile($cf);
     }
 
-- 
cgit v1.2.3


From c7ed57e282e091fd8eb74bc3dbc8b8381a45acef Mon Sep 17 00:00:00 2001
From: Roman Franchuk 
Date: Tue, 22 May 2012 17:50:38 +0200
Subject: Ukrainian language update

---
 inc/lang/uk/install.html |  2 +-
 inc/lang/uk/lang.php     | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

(limited to 'inc')

diff --git a/inc/lang/uk/install.html b/inc/lang/uk/install.html
index 084da8662..0c4a32544 100644
--- a/inc/lang/uk/install.html
+++ b/inc/lang/uk/install.html
@@ -1,4 +1,4 @@
-

Ця сторінка допомагає при першій установці та настройці ДокуВікі. +

Ця сторінка допомагає при першій установці та налаштуванні ДокуВікі. Більше інформації про програму установки можна знайти на сторінці документації.

ДокуВікі використовую звичайні файли для зберігання сторінок вікі та іншої інформації, diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 28756e2a1..b06cb9158 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -28,7 +28,7 @@ $lang['btn_top'] = 'Повернутися наверх'; $lang['btn_newer'] = '<< більш нові'; $lang['btn_older'] = 'більш старі >>'; $lang['btn_revs'] = 'Старі ревізії'; -$lang['btn_recent'] = 'Недавні зміни'; +$lang['btn_recent'] = 'Останні зміни'; $lang['btn_upload'] = 'Завантажити'; $lang['btn_cancel'] = 'Скасувати'; $lang['btn_index'] = 'Зміст'; @@ -37,7 +37,7 @@ $lang['btn_login'] = 'Увійти'; $lang['btn_logout'] = 'Вийти'; $lang['btn_admin'] = 'Керування'; $lang['btn_update'] = 'Оновити'; -$lang['btn_delete'] = 'Знищити'; +$lang['btn_delete'] = 'Видалити'; $lang['btn_back'] = 'Назад'; $lang['btn_backlink'] = 'Посилання сюди'; $lang['btn_backtomedia'] = 'Назад до вибору медіа-файлу'; @@ -49,6 +49,7 @@ $lang['btn_recover'] = 'Відновити чернетку'; $lang['btn_draftdel'] = 'Знищити чернетку'; $lang['btn_revert'] = 'Відновити'; $lang['btn_register'] = 'Реєстрація'; +$lang['btn_apply'] = 'Застосувати'; $lang['loggedinas'] = 'Ви'; $lang['user'] = 'Користувач'; $lang['pass'] = 'Пароль'; @@ -92,7 +93,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'] = 'Шукати файли'; @@ -234,7 +235,7 @@ $lang['subscr_m_receive'] = 'Отримувати'; $lang['subscr_style_every'] = 'повідомляти на пошту про кожну зміну'; $lang['subscr_style_digest'] = 'лист з дайджестом для зміни кожної сторінки (кожні %.2f днів)'; $lang['subscr_style_list'] = 'список змінених сторінок від часу отримання останнього листа (кожні %.2f днів)'; -$lang['authmodfailed'] = 'Неправильна настройка автентифікації користувача. Будь ласка, повідомте про це адміністратора.'; +$lang['authmodfailed'] = 'Неправильні налаштування автентифікації користувача. Будь ласка, повідомте про це адміністратора.'; $lang['authtempfail'] = 'Автентифікація користувача тимчасово не доступна. Якщо це буде продовжуватись, будь ласка, повідомте адміністратора.'; $lang['i_chooselang'] = 'Виберіть мову'; $lang['i_installer'] = 'Програма установки ДокуВікі'; @@ -251,7 +252,7 @@ $lang['i_confexists'] = '%s вже існує'; $lang['i_writeerr'] = 'Неможливо створити %s. Необхідно перевірити права доступа для файлу/папки та створити файл вручну.'; $lang['i_badhash'] = 'Невпізнаний або модифікований dokuwiki.php (hash=%s)'; $lang['i_badval'] = '%s - невірне або пусте значення.'; -$lang['i_success'] = 'Настройку завершено. Ми можете знищити файл install.php. +$lang['i_success'] = 'Налаштування завершено. Ви можете знищити файл install.php. Перейдіть до вашої нової ДокуВікі'; $lang['i_failure'] = 'При збереженні файлу конфігурації виникли помилки. Можливо вам доведеться виправити їх самостійно до початку використання вашої нової ДокуВікі.'; -- cgit v1.2.3 From f32f3fdf247618fa521b53042b833cc41d37b0a2 Mon Sep 17 00:00:00 2001 From: Erial Krale Date: Tue, 22 May 2012 17:51:35 +0200 Subject: Korean language update --- inc/lang/ko/lang.php | 1 + inc/lang/ko/mailwrap.html | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 inc/lang/ko/mailwrap.html (limited to 'inc') diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 84fdb3c48..7b29715d9 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -94,6 +94,7 @@ $lang['searchmedia_in'] = ' %s에서 검색'; $lang['txt_upload'] = '업로드 파일을 선택합니다.'; $lang['txt_filename'] = '업로드 파일 이름을 입력합니다.(선택 사항)'; $lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.'; +$lang['maxuploadsize'] = '최대 업로드 용량. 파일당 %s'; $lang['lockedby'] = '현재 잠금 사용자'; $lang['lockexpire'] = '잠금 해제 시간'; $lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; diff --git a/inc/lang/ko/mailwrap.html b/inc/lang/ko/mailwrap.html new file mode 100644 index 000000000..093df1ef5 --- /dev/null +++ b/inc/lang/ko/mailwrap.html @@ -0,0 +1,13 @@ + + + @TITLE@ + + + + + @HTMLBODY@ + +


+ 이 편지는 @DOKUWIKIURL@의 도쿠위키에서 생성되었습니다. + + \ No newline at end of file -- cgit v1.2.3 From 78035fe8ffc269afc488a230cb7c7f73e2fb10a0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 22 May 2012 21:49:59 +0200 Subject: don't rely on metadata for conflict detection This also fixes a problem wiht PHP 5.4 when there is metadata but the date key is empty. --- inc/actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 458926345..adc251bc4 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -506,7 +506,7 @@ function act_edit($act){ // Use the date of the newest revision, not of the revision we edit // This is used for conflict detection - if(!$DATE) $DATE = $INFO['meta']['date']['modified']; + if(!$DATE) $DATE = @filemtime(wikiFN($ID)); //check if locked by anyone - if not lock for my self //do not lock when the user can't edit anyway -- cgit v1.2.3 From 6b9c156c2d804458adf7d057c5c021d4c4658a9d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 27 May 2012 11:51:32 +0100 Subject: improved error message for savedir paths (FS#2502) --- inc/init.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index d57e12d7b..923bda352 100644 --- a/inc/init.php +++ b/inc/init.php @@ -234,9 +234,12 @@ function init_paths(){ 'tmpdir' => 'tmp'); foreach($paths as $c => $p){ - if(empty($conf[$c])) $conf[$c] = $conf['savedir'].'/'.$p; - $conf[$c] = init_path($conf[$c]); - if(empty($conf[$c])) nice_die("The $c ('$p') does not exist, isn't accessible or writable. + $path = $conf[$c]; + if(empty($path)) + $path = $conf['savedir'].'/'.$p; + $conf[$c] = init_path($path); + if(empty($conf[$c])) + nice_die("The $c ('$p') at $path is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?"); @@ -265,7 +268,7 @@ function init_lang($langCode) { } /** - * Checks the existance of certain files and creates them if missing. + * Checks the existence of certain files and creates them if missing. */ function init_files(){ global $conf; @@ -312,7 +315,7 @@ function init_files(){ * @author Andreas Gohr */ function init_path($path){ - // check existance + // check existence $p = fullpath($path); if(!@file_exists($p)){ $p = fullpath(DOKU_INC.$path); @@ -560,7 +563,7 @@ function fullpath($path,$exists=false){ } $finalpath = $root.implode('/', $newpath); - // check for existance when needed (except when unit testing) + // check for existence when needed (except when unit testing) if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) { return false; } -- cgit v1.2.3 From 7f086b678f95509d080486e46f683595be591727 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 27 May 2012 12:33:51 +0100 Subject: improved earlier change for paths error messages to not produce any notices --- inc/init.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index 923bda352..403fbe4ab 100644 --- a/inc/init.php +++ b/inc/init.php @@ -233,10 +233,8 @@ function init_paths(){ 'lockdir' => 'locks', 'tmpdir' => 'tmp'); - foreach($paths as $c => $p){ - $path = $conf[$c]; - if(empty($path)) - $path = $conf['savedir'].'/'.$p; + foreach($paths as $c => $p) { + $path = empty($conf[$c]) ? $conf['savedir'].'/'.$p : $conf[$c]; $conf[$c] = init_path($path); if(empty($conf[$c])) nice_die("The $c ('$p') at $path is not found, isn't accessible or writable. @@ -310,7 +308,7 @@ function init_files(){ * Returns absolute path * * This tries the given path first, then checks in DOKU_INC. - * Check for accessability on directories as well. + * Check for accessibility on directories as well. * * @author Andreas Gohr */ -- cgit v1.2.3 From 760450a2e2eaf08ec6f0b5315df5544885efd94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bc=2E=20Jan=20Kal=C3=A1b?= Date: Sun, 3 Jun 2012 11:35:50 +0300 Subject: formating --- inc/lang/cs/subscr_digest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/cs/subscr_digest.txt b/inc/lang/cs/subscr_digest.txt index 57b7240c5..1b1770965 100644 --- a/inc/lang/cs/subscr_digest.txt +++ b/inc/lang/cs/subscr_digest.txt @@ -12,7 +12,7 @@ Nová revize: @NEWPAGE@ Pro odhlášení z odebírání změn na této webové stránce se prosím příhlašte do wiki na adrese -@DOKUWIKIURL@,pak navštivte +@DOKUWIKIURL@, pak navštivte @SUBSCRIBE@ a odhlaště se z odebírání změn na stránce či ve jmenném prostoru. -- cgit v1.2.3 From aa5833b44e05fcb4a7430c5ae6ea09f079f4f54a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bc=2E=20Jan=20Kal=C3=A1b?= Date: Sun, 3 Jun 2012 11:36:45 +0300 Subject: format --- inc/lang/cs/subscr_list.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/cs/subscr_list.txt b/inc/lang/cs/subscr_list.txt index 82683c57f..f85be8a9f 100644 --- a/inc/lang/cs/subscr_list.txt +++ b/inc/lang/cs/subscr_list.txt @@ -9,7 +9,7 @@ Zde jsou: Pro odhlášení z odebírání změn se prosím příhlašte do wiki na adrese -@DOKUWIKIURL@,pak navštivte +@DOKUWIKIURL@, pak navštivte @SUBSCRIBE@ a odhlaště se z odebírání změn na stránce či ve jmenném prostoru. -- cgit v1.2.3 From 9b4ca79a79830dee7c4e35216c9a3541cfa63948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bc=2E=20Jan=20Kal=C3=A1b?= Date: Sun, 3 Jun 2012 11:37:08 +0300 Subject: format --- inc/lang/cs/subscr_single.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/cs/subscr_single.txt b/inc/lang/cs/subscr_single.txt index c0089c1b7..1ee33da09 100644 --- a/inc/lang/cs/subscr_single.txt +++ b/inc/lang/cs/subscr_single.txt @@ -15,7 +15,7 @@ Nová revize: @NEWPAGE@ Pro odhlášení z odebírání změn na této webové stránce se prosím příhlašte do wiki na adrese -@DOKUWIKIURL@,pak navštivte +@DOKUWIKIURL@, pak navštivte @SUBSCRIBE@ a odhlaště se z odebírání změn na stránce či ve jmenném prostoru. -- cgit v1.2.3 From e3ef52cdb2ca53f62839275fb578c5a972d93d71 Mon Sep 17 00:00:00 2001 From: Mikhail Krasilnikov Date: Fri, 8 Jun 2012 11:41:51 +0400 Subject: Allow multiple LDAP servers. --- inc/auth/ldap.class.php | 99 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 33 deletions(-) (limited to 'inc') diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index a6a15ee3d..9b6ff5023 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -387,49 +387,82 @@ class auth_ldap extends auth_basic { $this->bound = 0; $port = ($this->cnf['port']) ? $this->cnf['port'] : 389; - $this->con = @ldap_connect($this->cnf['server'],$port); - if(!$this->con){ - msg("LDAP: couldn't connect to LDAP server",-1); - return false; + if (!is_array($this->cnf['server'])) + { + $this->cnf['server'] = array($this->cnf['server']); } + $bound = false; + foreach ($this->cnf['server'] as $server) + { + $this->con = @ldap_connect($server, $port); + if (!$this->con) + { + continue; + } - //set protocol version and dependend options - if($this->cnf['version']){ - if(!@ldap_set_option($this->con, LDAP_OPT_PROTOCOL_VERSION, - $this->cnf['version'])){ - msg('Setting LDAP Protocol version '.$this->cnf['version'].' failed',-1); - if($this->cnf['debug']) - msg('LDAP version set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); - }else{ - //use TLS (needs version 3) - if($this->cnf['starttls']) { - if (!@ldap_start_tls($this->con)){ - msg('Starting TLS failed',-1); - if($this->cnf['debug']) - msg('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + /* + * When OpenLDAP 2.x.x is used, ldap_connect() will always return a resource as it does + * not actually connect but just initializes the connecting parameters. The actual + * connect happens with the next calls to ldap_* funcs, usually with ldap_bind(). + * + * So we should try to bind to server in order to check its availability. + */ + + //set protocol version and dependend options + if($this->cnf['version']){ + if(!@ldap_set_option($this->con, LDAP_OPT_PROTOCOL_VERSION, + $this->cnf['version'])){ + msg('Setting LDAP Protocol version '.$this->cnf['version'].' failed',-1); + if($this->cnf['debug']) + msg('LDAP version set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + }else{ + //use TLS (needs version 3) + if($this->cnf['starttls']) { + if (!@ldap_start_tls($this->con)){ + msg('Starting TLS failed',-1); + if($this->cnf['debug']) + msg('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } } - } - // needs version 3 - if(isset($this->cnf['referrals'])) { - if(!@ldap_set_option($this->con, LDAP_OPT_REFERRALS, - $this->cnf['referrals'])){ - msg('Setting LDAP referrals to off failed',-1); - if($this->cnf['debug']) - msg('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + // needs version 3 + if(isset($this->cnf['referrals'])) { + if(!@ldap_set_option($this->con, LDAP_OPT_REFERRALS, + $this->cnf['referrals'])){ + msg('Setting LDAP referrals to off failed',-1); + if($this->cnf['debug']) + msg('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } } } } - } - //set deref mode - if($this->cnf['deref']){ - if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->cnf['deref'])){ - msg('Setting LDAP Deref mode '.$this->cnf['deref'].' failed',-1); - if($this->cnf['debug']) - msg('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + //set deref mode + if($this->cnf['deref']){ + if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->cnf['deref'])){ + msg('Setting LDAP Deref mode '.$this->cnf['deref'].' failed',-1); + if($this->cnf['debug']) + msg('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } + } + /* As of PHP 5.3.0 we can set timeout to speedup skipping of invalid servers */ + if (defined('LDAP_OPT_NETWORK_TIMEOUT')) + { + ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); + } + $bound = ldap_bind($this->con); + if ($bound) + { + break; } } + if(!$bound) + { + msg("LDAP: couldn't connect to LDAP server",-1); + return false; + } + + $this->canDo['getUsers'] = true; return true; } -- cgit v1.2.3 From 7656ee3b68e4877d64b1931c584ad433da62632c Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sun, 10 Jun 2012 17:34:42 +0200 Subject: Fix for FS#2522 / Now all places of $lang['restored'] are covered with the restored-date information --- inc/actions.php | 2 +- inc/media.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index adc251bc4..e85cbfccc 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -498,7 +498,7 @@ function act_edit($act){ //set summary default if(!$SUM){ if($REV){ - $SUM = $lang['restored']; + $SUM = sprintf($lang['restored'], dformat($REV)); }elseif(!$INFO['exists']){ $SUM = $lang['created']; } diff --git a/inc/media.php b/inc/media.php index 841a5218e..2462a1deb 100644 --- a/inc/media.php +++ b/inc/media.php @@ -420,7 +420,7 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov media_notify($id,$fn,$imime,$old); // add a log entry to the media changelog if ($REV){ - addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_REVERT, $lang['restored'], $REV); + addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_REVERT, sprintf($lang['restored'], dformat($REV)), $REV); } elseif ($overwrite) { addMediaLogEntry($new, $id, DOKU_CHANGE_TYPE_EDIT); } else { -- cgit v1.2.3 From eae330b6dbdac1213ca6407b1bef7b706ed17066 Mon Sep 17 00:00:00 2001 From: lainme Date: Tue, 12 Jun 2012 20:08:23 +0200 Subject: chinese language update. related to FS#2360 --- inc/lang/zh/lang.php | 14 +++++++++++--- inc/lang/zh/mailwrap.html | 13 +++++++++++++ inc/lang/zh/resetpwd.txt | 3 +++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 inc/lang/zh/mailwrap.html create mode 100644 inc/lang/zh/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 9d125ce44..9ea0f5e7f 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -50,6 +50,7 @@ $lang['btn_backtomedia'] = '返回到媒体文件选择工具'; $lang['btn_subscribe'] = '订阅本页更改'; $lang['btn_profile'] = '更新个人信息'; $lang['btn_reset'] = '重设'; +$lang['btn_resendpwd'] = '设置新密码'; $lang['btn_draft'] = '编辑草稿'; $lang['btn_recover'] = '恢复草稿'; $lang['btn_draftdel'] = '删除草稿'; @@ -86,6 +87,7 @@ $lang['profnoempty'] = '不允许使用空的用户名或邮件地址 $lang['profchanged'] = '用户信息更新成功。'; $lang['pwdforget'] = '忘记密码?立即获取新密码'; $lang['resendna'] = '本维基不支持二次发送密码。'; +$lang['resendpwd'] = '设置新密码用于'; $lang['resendpwdmissing'] = '对不起,您必须填写所有的区域。'; $lang['resendpwdnouser'] = '对不起,在我们的用户数据中找不到该用户。'; $lang['resendpwdbadauth'] = '对不起,该认证码错误。请使用完整的确认链接。'; @@ -98,6 +100,7 @@ $lang['searchmedia_in'] = '在%s中查找'; $lang['txt_upload'] = '选择要上传的文件'; $lang['txt_filename'] = '上传并重命名为(可选)'; $lang['txt_overwrt'] = '覆盖已存在的同名文件'; +$lang['maxuploadsize'] = '上传限制。每个文件 %s'; $lang['lockedby'] = '目前已被下列人员锁定'; $lang['lockexpire'] = '预计锁定解除于'; $lang['js']['willexpire'] = '您对本页的独有编辑权将于一分钟之后解除。\n为了防止与其他人的编辑冲突,请使用预览按钮重设计时器。'; @@ -192,6 +195,11 @@ $lang['external_edit'] = '外部编辑'; $lang['summary'] = '编辑摘要'; $lang['noflash'] = '需要 Adobe Flash 插件 来播放本内容。 '; $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'] = '命名空间中改变的页面:'; @@ -262,6 +270,7 @@ $lang['subscr_style_digest'] = '对每个页面发送更改的摘要邮件( $lang['subscr_style_list'] = '自上封邮件以来更改的页面的列表(每 %.2f 天)'; $lang['authmodfailed'] = '错误的用户认证设置。请通知维基管理员。'; $lang['authtempfail'] = '用户认证暂时无法使用。如果该状态一直存在,请通知维基管理员。'; +$lang['authpwdexpire'] = '您的密码将在 %d 天内过期,请尽快更改'; $lang['i_chooselang'] = '选择您的语言'; $lang['i_installer'] = 'DokuWiki 安装工具'; $lang['i_wikiname'] = '维基名称'; @@ -288,7 +297,6 @@ $lang['i_pol1'] = '公共的维基(任何人都有读的权限 $lang['i_pol2'] = '关闭的维基(只有注册用户才有读、写、上传的权限)'; $lang['i_retry'] = '重试'; $lang['i_license'] = '请选择您希望的内容发布许可协议:'; - $lang['recent_global'] = '您当前看到的是%s 名称空间的变动。你还可以在查看整个维基的近期变动。'; $lang['years'] = '%d年前'; $lang['months'] = '%d月前'; @@ -312,8 +320,8 @@ $lang['media_namespaces'] = '选择命名空间'; $lang['media_files'] = '在 %s 中的文件'; $lang['media_upload'] = '上传到 %s 命名空间。'; $lang['media_search'] = '在 %s 命名空间中搜索。'; -$lang['media_view'] = '%s 在 %s'; -$lang['media_viewold'] = '%s '; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s 在 %s'; $lang['media_edit'] = '编辑 %s'; $lang['media_history'] = '%s 的历史纪录'; $lang['media_meta_edited'] = '元数据已编辑'; diff --git a/inc/lang/zh/mailwrap.html b/inc/lang/zh/mailwrap.html new file mode 100644 index 000000000..0f00d95b1 --- /dev/null +++ b/inc/lang/zh/mailwrap.html @@ -0,0 +1,13 @@ + + +@TITLE@ + + + + +@HTMLBODY@ + +

+本邮件由位于 @DOKUWIKIURL@ 的 Dokuwiki 自动创建。 + + \ No newline at end of file diff --git a/inc/lang/zh/resetpwd.txt b/inc/lang/zh/resetpwd.txt new file mode 100644 index 000000000..a9d59fdd3 --- /dev/null +++ b/inc/lang/zh/resetpwd.txt @@ -0,0 +1,3 @@ +====== 设置新密码 ====== + +请为您在本维基上的账户设置一个新密码。 \ No newline at end of file -- cgit v1.2.3 From 9cf8b6e0e4b94473739d2b36a906a848b9410f7f Mon Sep 17 00:00:00 2001 From: Aoi Karasu Date: Tue, 12 Jun 2012 20:12:02 +0200 Subject: Polish langauge update --- inc/lang/pl/lang.php | 5 +++++ inc/lang/pl/mailwrap.html | 13 +++++++++++++ inc/lang/pl/resetpwd.txt | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 inc/lang/pl/mailwrap.html create mode 100644 inc/lang/pl/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 3bde240d9..79d18bbf5 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -13,6 +13,7 @@ * @author Grzegorz Widła * @author Łukasz Chmaj * @author Begina Felicysym + * @author Aoi Karasu */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -48,6 +49,7 @@ $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'] = 'Podaj nowe hasło'; $lang['btn_draft'] = 'Edytuj szkic'; $lang['btn_recover'] = 'Przywróć szkic'; $lang['btn_draftdel'] = 'Usuń szkic'; @@ -84,6 +86,7 @@ $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'] = 'Podaj 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.'; @@ -96,6 +99,7 @@ $lang['searchmedia_in'] = 'Szukaj w %s'; $lang['txt_upload'] = 'Wybierz plik do wysłania'; $lang['txt_filename'] = 'Nazwa pliku (opcjonalnie)'; $lang['txt_overwrt'] = 'Nadpisać istniejący plik?'; +$lang['maxuploadsize'] = 'Maksymalny rozmiar wysyłanych danych wynosi %s dla jednego pliku.'; $lang['lockedby'] = 'Aktualnie zablokowane przez'; $lang['lockexpire'] = 'Blokada wygasa'; $lang['js']['willexpire'] = 'Twoja blokada edycji tej strony wygaśnie w ciągu minuty. \nW celu uniknięcia konfliktów użyj przycisku podglądu aby odnowić blokadę.'; @@ -265,6 +269,7 @@ $lang['subscr_style_digest'] = 'email ze streszczeniem zmian dla każdej ze st $lang['subscr_style_list'] = 'lista zmienionych stron od czasu ostatniego emaila'; $lang['authmodfailed'] = 'Błąd uwierzytelnienia. Powiadom administratora tego wiki.'; $lang['authtempfail'] = 'Uwierzytelnienie użytkownika jest w tej chwili niemożliwe. Jeśli ta sytuacja się powtórzy, powiadom administratora tego wiki.'; +$lang['authpwdexpire'] = 'Twoje hasło wygaśnie za %d dni. Należy je zmienić w krótkim czasie.'; $lang['i_chooselang'] = 'Wybierz język'; $lang['i_installer'] = 'Instalator DokuWiki'; $lang['i_wikiname'] = 'Nazwa Wiki'; diff --git a/inc/lang/pl/mailwrap.html b/inc/lang/pl/mailwrap.html new file mode 100644 index 000000000..61772866e --- /dev/null +++ b/inc/lang/pl/mailwrap.html @@ -0,0 +1,13 @@ + + +@TITLE@ + + + + +@HTMLBODY@ + +

+Ta wiadomość została wygenerowana przez DokuWiki na @DOKUWIKIURL@. + + \ No newline at end of file diff --git a/inc/lang/pl/resetpwd.txt b/inc/lang/pl/resetpwd.txt new file mode 100644 index 000000000..64d2d7d47 --- /dev/null +++ b/inc/lang/pl/resetpwd.txt @@ -0,0 +1,3 @@ +====== Ustalenie nowego hasła ====== + +Podaj, proszę, nowe hasło do Twojego konta w tym wiki. \ No newline at end of file -- cgit v1.2.3 From 87a99fa3f2b3acb3a82613dda4b0cb402de7efe5 Mon Sep 17 00:00:00 2001 From: Matteo Pasotti Date: Tue, 12 Jun 2012 20:14:03 +0200 Subject: Italian language update --- inc/lang/it/lang.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++- inc/lang/it/mailwrap.html | 13 +++++++++++++ inc/lang/it/resetpwd.txt | 1 + 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 inc/lang/it/mailwrap.html create mode 100644 inc/lang/it/resetpwd.txt (limited to 'inc') diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index eda33898b..70082caae 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -13,6 +13,7 @@ * @author Matteo Carnevali * @author Osman Tekin * @author Jacopo Corbetta + * @author Matteo Pasotti */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -48,11 +49,14 @@ $lang['btn_backtomedia'] = 'Torna alla selezione file'; $lang['btn_subscribe'] = 'Sottoscrivi modifiche'; $lang['btn_profile'] = 'Aggiorna profilo'; $lang['btn_reset'] = 'Annulla'; +$lang['btn_resendpwd'] = 'Imposta nuova password'; $lang['btn_draft'] = 'Modifica bozza'; $lang['btn_recover'] = 'Ripristina bozza'; $lang['btn_draftdel'] = 'Elimina bozza'; $lang['btn_revert'] = 'Ripristina'; $lang['btn_register'] = 'Registrazione'; +$lang['btn_apply'] = 'Applica'; +$lang['btn_media'] = 'Gestore Media'; $lang['loggedinas'] = 'Collegato come'; $lang['user'] = 'Nome utente'; $lang['pass'] = 'Password'; @@ -82,6 +86,7 @@ $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'] = 'Imposta 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.'; @@ -94,9 +99,10 @@ $lang['searchmedia_in'] = 'Cerca in %s'; $lang['txt_upload'] = 'Seleziona un file da caricare'; $lang['txt_filename'] = 'Carica come (opzionale)'; $lang['txt_overwrt'] = 'Sovrascrivi file esistente'; +$lang['maxuploadsize'] = 'Upload max. %s per ogni file.'; $lang['lockedby'] = 'Attualmente bloccato da'; $lang['lockexpire'] = 'Il blocco scade alle'; -$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; +$lang['js']['willexpire'] = 'Il tuo blocco su questa pagina scadrà tra circa un minuto.\nPer evitare incongruenze usa il pulsante di anteprima per prolungare il periodo di blocco.'; $lang['js']['notsavedyet'] = 'Le modifiche non salvate andranno perse.'; $lang['js']['searchmedia'] = 'Cerca file'; $lang['js']['keepopen'] = 'Tieni la finestra aperta durante la selezione'; @@ -127,6 +133,15 @@ $lang['js']['nosmblinks'] = 'I collegamenti con le risorse condivise di Win $lang['js']['linkwiz'] = 'Collegamento guidato'; $lang['js']['linkto'] = 'Collega a:'; $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?'; +$lang['js']['restore_confirm'] = 'Vuoi davvero ripristinare questa versione?'; +$lang['js']['media_diff'] = 'Guarda le differenze:'; +$lang['js']['media_diff_both'] = 'Fianco a Fianco'; +$lang['js']['media_select'] = 'Seleziona files..'; +$lang['js']['media_upload_btn'] = 'Upload'; +$lang['js']['media_done_btn'] = 'Fatto'; +$lang['js']['media_drop'] = 'Sgancia i files qui per caricarli'; +$lang['js']['media_cancel'] = 'rimuovi'; +$lang['js']['media_overwrt'] = 'Sovrascrivi i file esistenti'; $lang['rssfailed'] = 'Si è verificato un errore cercando questo feed: '; $lang['nothingfound'] = 'Nessun risultato trovato.'; $lang['mediaselect'] = 'Selezione dei file'; @@ -161,6 +176,8 @@ $lang['yours'] = 'la tua versione'; $lang['diff'] = 'differenze con la versione attuale'; $lang['diff2'] = 'differenze tra le versioni selezionate'; $lang['difflink'] = 'Link a questa pagina di confronto'; +$lang['diff_type'] = 'Guarda le differenze:'; +$lang['diff_side'] = 'Fianco a Fianco'; $lang['line'] = 'Linea'; $lang['breadcrumb'] = 'Traccia'; $lang['youarehere'] = 'Ti trovi qui'; @@ -173,11 +190,19 @@ $lang['external_edit'] = 'modifica esterna'; $lang['summary'] = 'Oggetto della modifica'; $lang['noflash'] = 'E\' necessario il plugin Adobe Flash per visualizzare questo contenuto.'; $lang['download'] = 'Scarica lo "snippet"'; +$lang['tools'] = 'Strumenti'; +$lang['user_tools'] = 'Strumenti Utente'; +$lang['site_tools'] = 'Strumenti Sito'; +$lang['page_tools'] = 'Strumenti Pagina'; +$lang['skip_to_content'] = 'salta al contenuto'; $lang['mail_newpage'] = 'pagina aggiunta:'; $lang['mail_changed'] = 'pagina modificata:'; $lang['mail_subscribe_list'] = 'pagine modificate nella categoria:'; $lang['mail_new_user'] = 'nuovo utente:'; $lang['mail_upload'] = 'file caricato:'; +$lang['changes_type'] = 'Guarda cambiamenti di'; +$lang['pages_changes'] = 'Pagine'; +$lang['both_changes'] = 'Sia pagine che media files'; $lang['qb_bold'] = 'Grassetto'; $lang['qb_italic'] = 'Corsivo'; $lang['qb_underl'] = 'Sottolineato'; @@ -218,6 +243,9 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Formato'; $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Parole chiave'; +$lang['img_width'] = 'Larghezza'; +$lang['img_height'] = 'Altezza'; +$lang['img_manager'] = 'Guarda nel gestore media'; $lang['subscr_subscribe_success'] = 'Aggiunto %s alla lista di sottoscrizioni %s'; $lang['subscr_subscribe_error'] = 'Impossibile aggiungere %s alla lista di sottoscrizioni %s'; $lang['subscr_subscribe_noaddress'] = 'Non esiste alcun indirizzo associato al tuo account, non puoi essere aggiunto alla lista di sottoscrizioni'; @@ -236,6 +264,7 @@ $lang['subscr_style_digest'] = 'email riassuntiva delle modifiche di ogni pagi $lang['subscr_style_list'] = 'elenco delle pagine modificate dall\'ultima email'; $lang['authmodfailed'] = 'La configurazione dell\'autenticazione non è corretta. Informa l\'amministratore di questo wiki.'; $lang['authtempfail'] = 'L\'autenticazione è temporaneamente non disponibile. Se questa situazione persiste, informa l\'amministratore di questo wiki.'; +$lang['authpwdexpire'] = 'La tua password scadrà in %d giorni, dovresti cambiarla quanto prima.'; $lang['i_chooselang'] = 'Scegli la lingua'; $lang['i_installer'] = 'Installazione di DokuWiki'; $lang['i_wikiname'] = 'Nome Wiki'; @@ -269,3 +298,20 @@ $lang['hours'] = '%d ore fa'; $lang['minutes'] = '%d minuti fa'; $lang['seconds'] = '%d secondi fa'; $lang['wordblock'] = 'La modifica non è stata salvata perché contiene testo bloccato (spam).'; +$lang['media_searchtab'] = 'Cerca'; +$lang['media_viewtab'] = 'Guarda'; +$lang['media_edittab'] = 'Modifica'; +$lang['media_historytab'] = 'Storia'; +$lang['media_list_rows'] = 'Righe'; +$lang['media_sort_name'] = 'Nome'; +$lang['media_sort_date'] = 'Data'; +$lang['media_namespaces'] = 'Scegli il namespace'; +$lang['media_files'] = 'File in %s'; +$lang['media_search'] = 'Cerca in %s'; +$lang['media_edit'] = 'Modifica %s'; +$lang['media_history'] = 'Storia di %s'; +$lang['media_perm_read'] = 'Spiacente, non hai abbastanza privilegi per leggere i files.'; +$lang['media_perm_upload'] = 'Spiacente, non hai abbastanza privilegi per caricare files.'; +$lang['media_update'] = 'Carica nuova versione'; +$lang['media_restore'] = 'Ripristina questa versione'; +$lang['plugin_install_err'] = 'Plugin installato non correttamente. Rinomino la cartella del plugin \'%s\' in \'%s\'.'; diff --git a/inc/lang/it/mailwrap.html b/inc/lang/it/mailwrap.html new file mode 100644 index 000000000..24a2bc8a9 --- /dev/null +++ b/inc/lang/it/mailwrap.html @@ -0,0 +1,13 @@ + + +@TITLE@ + + + + +@HTMLBODY@ + +

+Questa email è stata generata da DokuWiki presso @DOKUWIKIURL@. + + \ No newline at end of file diff --git a/inc/lang/it/resetpwd.txt b/inc/lang/it/resetpwd.txt new file mode 100644 index 000000000..450dd8301 --- /dev/null +++ b/inc/lang/it/resetpwd.txt @@ -0,0 +1 @@ +Inserisci perfavore una nuova password per il tuo account su questo wiki. \ No newline at end of file -- cgit v1.2.3 From 2bd8dcab4065546f3c86392d052aa8898780e9ee Mon Sep 17 00:00:00 2001 From: Mikhail Krasilnikov Date: Wed, 13 Jun 2012 13:48:10 +0400 Subject: Config method changed from array to comma separated string. --- inc/auth/ldap.class.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'inc') diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index 9b6ff5023..a0252ca2c 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -387,16 +387,12 @@ class auth_ldap extends auth_basic { $this->bound = 0; $port = ($this->cnf['port']) ? $this->cnf['port'] : 389; - if (!is_array($this->cnf['server'])) - { - $this->cnf['server'] = array($this->cnf['server']); - } $bound = false; - foreach ($this->cnf['server'] as $server) - { + $servers = explode(',', $this->cnf['server']); + foreach ($servers as $server) { + $server = trim($server); $this->con = @ldap_connect($server, $port); - if (!$this->con) - { + if (!$this->con) { continue; } @@ -445,19 +441,16 @@ class auth_ldap extends auth_basic { } } /* As of PHP 5.3.0 we can set timeout to speedup skipping of invalid servers */ - if (defined('LDAP_OPT_NETWORK_TIMEOUT')) - { + if (defined('LDAP_OPT_NETWORK_TIMEOUT')) { ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); } $bound = ldap_bind($this->con); - if ($bound) - { + if ($bound) { break; } } - if(!$bound) - { + if(!$bound) { msg("LDAP: couldn't connect to LDAP server",-1); return false; } -- cgit v1.2.3 From b2a83e66e70296a7a38e7524050a7a4268cc36f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Wed, 13 Jun 2012 22:11:54 +0200 Subject: Korean language update --- inc/lang/ko/admin.txt | 3 +- inc/lang/ko/backlinks.txt | 5 +- inc/lang/ko/conflict.txt | 5 +- inc/lang/ko/denied.txt | 3 +- inc/lang/ko/diff.txt | 4 +- inc/lang/ko/draft.txt | 5 +- inc/lang/ko/edit.txt | 2 +- inc/lang/ko/editrev.txt | 2 +- inc/lang/ko/index.txt | 5 +- inc/lang/ko/install.html | 24 ++- inc/lang/ko/lang.php | 331 +++++++++++++++++++++--------------------- inc/lang/ko/locked.txt | 4 +- inc/lang/ko/login.txt | 3 +- inc/lang/ko/mailtext.txt | 23 ++- inc/lang/ko/mailwrap.html | 2 +- inc/lang/ko/newpage.txt | 4 +- inc/lang/ko/norev.txt | 2 +- inc/lang/ko/password.txt | 11 +- inc/lang/ko/preview.txt | 5 +- inc/lang/ko/pwconfirm.txt | 14 +- inc/lang/ko/read.txt | 2 +- inc/lang/ko/recent.txt | 6 +- inc/lang/ko/register.txt | 3 +- inc/lang/ko/registermail.txt | 15 +- inc/lang/ko/resendpwd.txt | 5 +- inc/lang/ko/resetpwd.txt | 4 +- inc/lang/ko/revisions.txt | 5 +- inc/lang/ko/searchpage.txt | 4 +- inc/lang/ko/stopwords.txt | 18 ++- inc/lang/ko/subscr_digest.txt | 13 +- inc/lang/ko/subscr_form.txt | 2 +- inc/lang/ko/subscr_list.txt | 8 +- inc/lang/ko/subscr_single.txt | 11 +- inc/lang/ko/updateprofile.txt | 4 +- inc/lang/ko/uploadmail.txt | 23 ++- 35 files changed, 283 insertions(+), 297 deletions(-) (limited to 'inc') diff --git a/inc/lang/ko/admin.txt b/inc/lang/ko/admin.txt index 7dd0f58b3..c61db1a42 100644 --- a/inc/lang/ko/admin.txt +++ b/inc/lang/ko/admin.txt @@ -1,4 +1,3 @@ ====== 관리 작업 ====== -DokuWiki에서 사용가능한 관리 작업 목록을 아래에서 찾을 수 있습니다. - +DokuWiki에서 사용 가능한 관리 작업 목록을 아래에서 찾을 수 있습니다. \ No newline at end of file diff --git a/inc/lang/ko/backlinks.txt b/inc/lang/ko/backlinks.txt index 1711945e4..5c512e19d 100644 --- a/inc/lang/ko/backlinks.txt +++ b/inc/lang/ko/backlinks.txt @@ -1,4 +1,3 @@ -====== 백링크 ====== - -현재 페이지로 백링크되는 페이지 목록입니다. +====== 이전 링크 ====== +현재 문서를 가리키는 링크가 있는 문서 목록입니다. diff --git a/inc/lang/ko/conflict.txt b/inc/lang/ko/conflict.txt index 529296359..bd41ebf75 100644 --- a/inc/lang/ko/conflict.txt +++ b/inc/lang/ko/conflict.txt @@ -1,6 +1,5 @@ ====== 새 버전 있음 ====== -편집하신 문서의 새 버전이 있습니다. 당신이 편집하고 있는 동안 다른 사람이 동일한 파일을 편집하였을 경우 이런 일이 생길 수 있습니다. - -아래의 차이점을 면밀히 검토하시고, 어떤 버전을 저장하실지 결정하십시오. **저장**을 선택하시면, 당신의 버전이 저장됩니다. **취소** 를 선택하시면 현재 버전이 유지됩니다. +편집한 문서의 새 버전이 있습니다. 당신이 편집하고 있는 동안 다른 사람이 같은 파일을 편집하였을 경우 이런 일이 생길 수 있습니다. +아래의 차이점을 철저하게 검토하고 어떤 버전을 저장하실지 결정하십시오. **저장**을 선택하시면, 당신의 버전이 저장됩니다. **취소** 를 선택하시면 현재 버전이 유지됩니다. \ No newline at end of file diff --git a/inc/lang/ko/denied.txt b/inc/lang/ko/denied.txt index 316a660c0..f384a0a8c 100644 --- a/inc/lang/ko/denied.txt +++ b/inc/lang/ko/denied.txt @@ -1,4 +1,3 @@ ====== 권한 거절 ====== -계속할 수 있는 권한이 없습니다. 로그인하십시오. - +계속할 수 있는 권한이 없습니다. 로그인하십시오. \ No newline at end of file diff --git a/inc/lang/ko/diff.txt b/inc/lang/ko/diff.txt index 8cfb1da43..29189e9f0 100644 --- a/inc/lang/ko/diff.txt +++ b/inc/lang/ko/diff.txt @@ -1,5 +1,3 @@ ====== 차이점 ====== -이 페이지의 선택한 이전 버전과 현재 버전 사이의 차이점을 보여줍니다. - - +이 문서의 선택한 이전 버전과 현재 버전 사이의 차이점을 보여줍니다. \ No newline at end of file diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt index 3df8a5e86..a20bfb535 100644 --- a/inc/lang/ko/draft.txt +++ b/inc/lang/ko/draft.txt @@ -1,6 +1,5 @@ ====== 문서 초안이 있습니다. ====== -이 페이지의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용하여 편집을 계속 할 수 있습니다. 마지막 세션동안 저장된 문서 초안을 아래에서 볼 수 있습니다. - -확실하게 비정상적으로 종료된 세션을 //복구//할지 여부를 결정하고, 자동으로 저장되었던 초안을 //삭제//하거나 편집 과정을 취소하기 바랍니다. +이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용하여 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다. +비정상적으로 끝난 편집 세션을 //복구//할지 여부를 결정하고, 자동으로 저장되었던 초안을 //삭제//하거나 편집 과정을 취소하기 바랍니다. \ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index 9b59524f7..606c8429c 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1,2 +1,2 @@ -페이지를 편집하고 **저장**을 누르십시오. 위키 구문은 [[wiki:syntax]] 혹은 [[wiki:ko_syntax|(한글) 구문]]을 참고하십시오. 이 페이지를 **더 낫게 만들 자신이 있을** 때에만 편집하십시오. 실험을 하고 싶을 때에는, 먼저 [[playground:playground|연습장]] 에 가서 연습해 보십시오. +문서를 편집하고 **저장**을 누르세요. 위키 구문은 [[wiki:syntax]] 또는 [[wiki:ko_syntax|(한국어) 구문]]을 참고하세요. 이 문서를 **더 낫게 만들 자신이 있을** 때에만 편집하십시오. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. diff --git a/inc/lang/ko/editrev.txt b/inc/lang/ko/editrev.txt index 2715448d3..136eef733 100644 --- a/inc/lang/ko/editrev.txt +++ b/inc/lang/ko/editrev.txt @@ -1,2 +1,2 @@ -**문서의 이전 버전을 선택하였습니다!** 저장할 경우 이 자료의 새 버전을 만듭니다. +**문서의 이전 버전을 선택하였습니다!** 저장할 경우 이 데이터로 새 버전을 만듭니다. ---- \ No newline at end of file diff --git a/inc/lang/ko/index.txt b/inc/lang/ko/index.txt index 7ca9488e0..24eb9450c 100644 --- a/inc/lang/ko/index.txt +++ b/inc/lang/ko/index.txt @@ -1,4 +1,3 @@ -====== Index ====== - -이 페이지는 [[doku>namespaces|네임스페이스]] 에서 정렬한 모든 페이지의 목록입니다. +====== 사이트맵 ====== +이 페이지는 [[doku>namespaces|이름공간]]에서 정렬한 모든 문서의 목록입니다. \ No newline at end of file diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index 6b1bfaf75..6113d38b1 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -1,17 +1,15 @@

이 페이지는 Dokuwiki 설치와 환경 설정을 도와줍니다. -. 설치 과정에 대한 더 자세한 정보는 한글 설치문서와 -영문 설치문서를 참고하기 바랍니다. -

+설치 과정에 대한 더 자세한 정보는 (한국어) 설치 문서와 +(영어) 설치 문서를 참고하기 바랍니다.

-

DokuWiki는 위키 페이지와 페이지와 관련된 정보(그림,색인, 이전 버전 문서 등등)를 저장하기 위해 일반적인 텍스트 파일들을 사용합니다. 정상적으로 DokuWiki를 사용하려면 이 파일들을 담고 있는 디렉토리들에 대한 쓰기 권한을 가지고 있어야 합니다. -현재 설치 과정 중에는 디렉토리 권한 설정이 불가능합니다. 보통 직접 쉘 명령어를 사용하거나, 호스팅을 사용한다면 FTP나 호스팅 제어판(예. CPanel)을 사용해서 설정해야 합니다.

+

DokuWiki는 위키 문서와 문서와 관련된 정보(예를 들어 그림, 검색 색인, 이전 버전 문서)를 저장하기 위해 일반적인 텍스트 파일을 사용합니다. 정상적으로 DokuWiki를 사용하려면 이 파일을 담고 있는 디렉토리에 대한 쓰기 권한을 가지고 있어야 합니다. +현재 설치 과정 중에는 디렉토리 권한 설정이 불가능합니다. 보통 직접 쉘 명령어를 사용하거나, 호스팅을 사용한다면 FTP나 호스팅 제어판(예를 들어 CPanel)을 사용해서 설정해야 합니다.

-

현재 설치 과정중에 관리자로 로그인 후 DokuWiki의 관리 메뉴(플러그인 설치, 사용자 관리, 위키 페이지 접근 권한 관리, 옵션 설정)를 가능하게 ACL에 대한 환경 설정을 수행합니다. -이 것은 DokuWiki가 동작하는데 필요한 사항은 아니지만, 어찌되었든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.

+

현재 설치 과정중에 관리자로 로그인 후 DokuWiki의 관리 메뉴(플러그인 설치, 사용자 관리, 위키 문서 접근 권한 관리, 옵션 설정)를 가능하게 ACL에 대한 환경 설정을 수행합니다. +이 것은 DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.

-

숙련된 사용자들이나 특별한 설치 과정이 필요한 경우에 다음 링크들을 참조하기 바랍니다: -설치 과정(한글) -과 환경 설정(한글), -설치 과정(영문) -과 환경 설정(영문) -

+

숙련된 사용자들이나 특별한 설치 과정이 필요한 경우에 다음 링크들을 참고하기 바랍니다: +설치 과정(한국어) +과 환경 설정(한국어), +설치 과정(영어) +과 환경 설정(영어)

diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 7b29715d9..469e85bd6 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -9,6 +9,7 @@ * @author Song Younghwan * @author Seung-Chul Yoo * @author erial2@gmail.com + * @author Myeongjin */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -17,21 +18,21 @@ $lang['doublequoteclosing'] = '”'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; -$lang['btn_edit'] = '페이지 편집'; -$lang['btn_source'] = '소스 보기'; -$lang['btn_show'] = '페이지 보기'; -$lang['btn_create'] = '페이지 만들기'; +$lang['btn_edit'] = '문서 편집'; +$lang['btn_source'] = '내용 보기'; +$lang['btn_show'] = '문서 보기'; +$lang['btn_create'] = '문서 만들기'; $lang['btn_search'] = '찾기'; $lang['btn_save'] = '저장'; -$lang['btn_preview'] = '미리보기'; -$lang['btn_top'] = '맨위로'; +$lang['btn_preview'] = '미리 보기'; +$lang['btn_top'] = '맨 위로'; $lang['btn_newer'] = '<< 최근'; $lang['btn_older'] = '이전 >>'; -$lang['btn_revs'] = '이전 버전들'; -$lang['btn_recent'] = '최근 변경 목록'; -$lang['btn_upload'] = '업로드'; +$lang['btn_revs'] = '이전 버전'; +$lang['btn_recent'] = '최근 바뀜'; +$lang['btn_upload'] = '올리기'; $lang['btn_cancel'] = '취소'; -$lang['btn_index'] = '색인'; +$lang['btn_index'] = '사이트맵'; $lang['btn_secedit'] = '편집'; $lang['btn_login'] = '로그인'; $lang['btn_logout'] = '로그아웃'; @@ -41,68 +42,67 @@ $lang['btn_delete'] = '삭제'; $lang['btn_back'] = '뒤로'; $lang['btn_backlink'] = '이전 링크'; $lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기'; -$lang['btn_subscribe'] = '구독 신청'; -$lang['btn_profile'] = '개인정보 변경'; +$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'] = '패스워드'; -$lang['newpass'] = '새로운 패스워드'; -$lang['oldpass'] = '현재 패스워드 확인'; -$lang['passchk'] = '패스워드 다시 확인'; +$lang['user'] = '사용자 이름'; +$lang['pass'] = '비밀번호'; +$lang['newpass'] = '새 비밀번호'; +$lang['oldpass'] = '현재 비밀번호 확인'; +$lang['passchk'] = '비밀번호 다시 확인'; $lang['remember'] = '기억하기'; $lang['fullname'] = '실제 이름'; $lang['email'] = '이메일'; $lang['profile'] = '개인 정보'; -$lang['badlogin'] = '잘못된 사용자 이름이거나 패스워드입니다.'; -$lang['minoredit'] = '일부 내용 변경'; -$lang['draftdate'] = '문서 초안 자동저장 시간'; -$lang['nosecedit'] = '페이지가 수정되어 섹션정보가 달라져 페이지 전부를 다시 읽습니다.'; +$lang['badlogin'] = '잘못된 사용자 이름이거나 비밀번호입니다.'; +$lang['minoredit'] = '사소한 바뀜'; +$lang['draftdate'] = '문서 초안 자동 저장 시간'; +$lang['nosecedit'] = '문서가 수정되어 세션 정보가 달라져 문서 전부를 다시 읽습니다.'; $lang['regmissing'] = '모든 항목을 입력해야 합니다.'; $lang['reguexists'] = '같은 이름을 사용하는 사용자가 있습니다.'; -$lang['regsuccess'] = '사용자를 만들었습니다. 패스워드는 이메일로 보냈습니다.'; +$lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.'; $lang['regsuccess2'] = '사용자를 만들었습니다.'; -$lang['regmailfail'] = '패스워드를 이메일로 전송할 때 오류가 발생했습니다. 관리자에게 문의하기 바랍니다!'; -$lang['regbadmail'] = '이메일 주소가 틀렸습니다. - 오류라고 생각되면 관리자에게 문의하기 바랍니다.'; -$lang['regbadpass'] = '새로운 패스워드들이 일치하지 않습니다. 다시 입력하기 바랍니다.'; -$lang['regpwmail'] = 'DokuWiki 패스워드'; +$lang['regmailfail'] = '비밀번호를 이메일로 전송할 때 오류가 발생했습니다. 관리자에게 문의하기 바랍니다!'; +$lang['regbadmail'] = '이메일 주소가 잘못됐습니다. - 오류라고 생각하면 관리자에게 문의하기 바랍니다.'; +$lang['regbadpass'] = '새 비밀번호들이 일치하지 않습니다. 다시 입력하기 바랍니다.'; +$lang['regpwmail'] = 'DokuWiki 비밀번호'; $lang['reghere'] = '아직 등록하지 않았다면 등록하기 바랍니다.'; $lang['profna'] = '이 위키는 개인 정보 수정을 허용하지 않습니다.'; -$lang['profnochange'] = '변경사항이 없습니다.'; +$lang['profnochange'] = '바뀐 사항이 없습니다.'; $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니다.'; -$lang['profchanged'] = '개인정보 변경이 성공했습니다.'; -$lang['pwdforget'] = '패스워드를 잊어버린 경우 새로 발급받을 수 있습니다.'; -$lang['resendna'] = '이 위키는 패스워드 재발급을 지원하지 않습니다.'; -$lang['resendpwd'] = '새 암호 다음으로 전송 : '; -$lang['resendpwdmissing'] = '새로운 패스워드를 입력해야햡니다.'; -$lang['resendpwdnouser'] = '등록된 사용자가 아닙니다. 다시 확인 바랍니다.'; -$lang['resendpwdbadauth'] = '인증 코드가 틀립니다. 잘못된 링크인지 확인 바랍니다.'; +$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'] = '업로드 파일을 선택합니다.'; -$lang['txt_filename'] = '업로드 파일 이름을 입력합니다.(선택 사항)'; -$lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.'; -$lang['maxuploadsize'] = '최대 업로드 용량. 파일당 %s'; -$lang['lockedby'] = '현재 잠금 사용자'; +$lang['resendpwdsuccess'] = '새로운 비밀번호를 이메일로 보냈습니다.'; +$lang['license'] = '이 위키의 내용은 다음의 라이선스에 따릅니다:'; +$lang['licenseok'] = '참고: 이 문서를 편집할 경우 다음의 라이선스에 동의함을 의미합니다:'; +$lang['searchmedia'] = '파일 이름 찾기:'; +$lang['searchmedia_in'] = '%s에서 찾기'; +$lang['txt_upload'] = '올릴 파일을 선택합니다.'; +$lang['txt_filename'] = '올릭 파일 이름을 입력합니다. (선택 사항)'; +$lang['txt_overwrt'] = '이전 파일을 새로운 파일로 덮어쓰기'; +$lang['maxuploadsize'] = '최대 올리기 용량. 파일당 %s'; +$lang['lockedby'] = '현재 잠겨진 사용자'; $lang['lockexpire'] = '잠금 해제 시간'; -$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; -$lang['js']['notsavedyet'] = '저장하지 않은 변경은 지워집니다. -계속하시겠습니까?'; +$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리 보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; +$lang['js']['notsavedyet'] = '저장하지 않은 바뀜이 지워집니다.'; $lang['js']['searchmedia'] = '파일 찾기'; -$lang['js']['keepopen'] = '선택할 때 윈도우를 열어놓으시기 바랍니다.'; -$lang['js']['hidedetails'] = '자세한 정보 감추기'; +$lang['js']['keepopen'] = '선택할 때 창을 열어놓기'; +$lang['js']['hidedetails'] = '자세한 정보 숨기기'; $lang['js']['mediatitle'] = '링크 설정'; $lang['js']['mediadisplay'] = '링크 형태'; $lang['js']['mediaalign'] = '배치'; @@ -110,73 +110,72 @@ $lang['js']['mediasize'] = '그림 크기'; $lang['js']['mediatarget'] = '링크 목표'; $lang['js']['mediaclose'] = '닫기'; $lang['js']['mediainsert'] = '삽입'; -$lang['js']['mediadisplayimg'] = '그림보기'; +$lang['js']['mediadisplayimg'] = '그림을 보여줍니다.'; $lang['js']['mediadisplaylnk'] = '링크만 보여줍니다.'; $lang['js']['mediasmall'] = '작게'; $lang['js']['mediamedium'] = '중간'; $lang['js']['medialarge'] = '크게'; $lang['js']['mediaoriginal'] = '원본'; -$lang['js']['medialnk'] = '세부정보페이지로 링크'; +$lang['js']['medialnk'] = '자세한 정보 문서로 링크'; $lang['js']['mediadirect'] = '원본으로 직접 링크'; -$lang['js']['medianolnk'] = '링크 없슴'; +$lang['js']['medianolnk'] = '링크 없음'; $lang['js']['medianolink'] = '그림을 링크하지 않음'; $lang['js']['medialeft'] = '왼쪽 배치'; $lang['js']['mediaright'] = '오른쪽 배치'; -$lang['js']['mediacenter'] = '중앙 배치'; -$lang['js']['medianoalign'] = '배치 없슴'; -$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인터넷 익스플로러에서만 동작합니다. -그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; +$lang['js']['mediacenter'] = '가운데 배치'; +$lang['js']['medianoalign'] = '배치 없음'; +$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인터넷 익스플로러에서만 동작합니다.\n그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; $lang['js']['linkwiz'] = '링크 마법사'; $lang['js']['linkto'] = '다음으로 연결:'; -$lang['js']['del_confirm'] = '정말로 선택된 항목(들)을 삭제하시겠습니까?'; -$lang['js']['restore_confirm'] = '정말 이 버전으로 되돌리시겠습니까?'; -$lang['js']['media_diff'] = '차이점 보기 :'; +$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_select'] = '파일 선택...'; +$lang['js']['media_upload_btn'] = '올리기'; $lang['js']['media_done_btn'] = '완료'; -$lang['js']['media_drop'] = '업로드할 파일을 끌어넣으세요'; +$lang['js']['media_drop'] = '올릴 파일을 끌어넣으세요'; $lang['js']['media_cancel'] = '삭제'; -$lang['js']['media_overwrt'] = '이미있는 파일 덮어쓰기'; -$lang['rssfailed'] = 'feed 가져오기 실패: '; +$lang['js']['media_overwrt'] = '이미 있는 파일 덮어쓰기'; +$lang['rssfailed'] = '이 피드를 가져오는 동안 오류 발생:'; $lang['nothingfound'] = '아무 것도 없습니다.'; $lang['mediaselect'] = '미디어 파일 선택'; -$lang['fileupload'] = '미디어 파일 업로드'; -$lang['uploadsucc'] = '업로드 성공'; -$lang['uploadfail'] = '업로드 실패. 잘못된 권한 때문일지도 모릅니다.'; -$lang['uploadwrong'] = '업로드 거부. 금지된 확장자입니다!'; -$lang['uploadexist'] = '이미 파일이 존재합니다.'; -$lang['uploadbadcontent'] = '업로드된 파일이 파일 확장자 %s와 일치하지 않습니다.'; -$lang['uploadspam'] = '스팸 차단기가 업로드를 취소하였습니다.'; -$lang['uploadxss'] = '악성 코드의 가능성이 있어 업로드를 취소하였습니다.'; -$lang['uploadsize'] = '업로드한 파일이 너무 큽니다. (최대 %s)'; +$lang['fileupload'] = '미디어 파일 올리기'; +$lang['uploadsucc'] = '올리기 성공'; +$lang['uploadfail'] = '올리기 실패. 잘못된 권한 때문일지도 모릅니다.'; +$lang['uploadwrong'] = '올리기 거부. 금지된 확장자입니다!'; +$lang['uploadexist'] = '파일이 이미 존재합니다.'; +$lang['uploadbadcontent'] = '올린 파일이 파일 확장자 %s와 일치하지 않습니다.'; +$lang['uploadspam'] = '스팸 차단 목록이 올리기를 취소했습니다.'; +$lang['uploadxss'] = '악성 코드의 가능성이 있어 올리기를 취소했습니다.'; +$lang['uploadsize'] = '올린 파일이 너무 큽니다. (최대 %s)'; $lang['deletesucc'] = '"%s" 파일이 삭제되었습니다.'; $lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다. - 삭제 권한이 있는지 확인하기 바랍니다.'; $lang['mediainuse'] = '"%s" 파일을 삭제할 수 없습니다. - 아직 사용 중입니다.'; -$lang['namespaces'] = '네임스페이스'; +$lang['namespaces'] = '이름공간'; $lang['mediafiles'] = '사용 가능한 파일 목록'; -$lang['accessdenied'] = '이 페이지를 볼 권한이 없습니다.'; -$lang['mediausage'] = '이 파일을 참조하려면 다음 문법을 사용하기 바랍니다:'; +$lang['accessdenied'] = '이 문서를 볼 권한이 없습니다.'; +$lang['mediausage'] = '이 파일을 참고하려면 다음 문법을 사용하기 바랍니다:'; $lang['mediaview'] = '원본 파일 보기'; $lang['mediaroot'] = '루트(root)'; -$lang['mediaupload'] = '파일을 현재 네임스페이스로 업로드합니다. 하위 네임스페이스를 만들려면 파일 이름 앞에 콜론(:)으로 구분되는 이름을 붙이면 됩니다.'; -$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s으로 변경됐습니다!'; -$lang['reference'] = '참조'; -$lang['ref_inuse'] = '다음 페이지들에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:'; -$lang['ref_hidden'] = '페이지들의 몇몇 참조는 읽을 수 있는 권한이 없습니다.'; -$lang['hits'] = '히트 수'; -$lang['quickhits'] = '일치하는 페이지 이름'; +$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 파일 이름 앞에 콜론(:)으로 구분되는 이름을 붙이면 됩니다.'; +$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s으로 바뀌었습니다!'; +$lang['reference'] = '참고'; +$lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:'; +$lang['ref_hidden'] = '문서의 일부 참고는 읽을 수 있는 권한이 없습니다.'; +$lang['hits'] = '조회 수'; +$lang['quickhits'] = '일치하는 문서 이름'; $lang['toc'] = '목차'; $lang['current'] = '현재'; $lang['yours'] = '버전'; $lang['diff'] = '현재 버전과의 차이 보기'; -$lang['diff2'] = '선택된 버전들 간 차이 보기'; +$lang['diff2'] = '선택한 버전 간 차이 보기'; $lang['difflink'] = '차이 보기로 연결'; -$lang['diff_type'] = '버전간 차이 표시:'; +$lang['diff_type'] = '버전간 차이 보기:'; $lang['diff_inline'] = '인라인 방식'; -$lang['diff_side'] = '다중창 방식'; +$lang['diff_side'] = '다중 창 방식'; $lang['line'] = '줄'; $lang['breadcrumb'] = '추적'; $lang['youarehere'] = '현재 위치'; @@ -184,54 +183,54 @@ $lang['lastmod'] = '마지막 수정'; $lang['by'] = '작성자'; $lang['deleted'] = '삭제'; $lang['created'] = '새로 만듦'; -$lang['restored'] = '옛 버전 복구'; +$lang['restored'] = '이전 버전 복구 (%s)'; $lang['external_edit'] = '외부 편집기'; $lang['summary'] = '편집 요약'; -$lang['noflash'] = '이 컨텐츠를 표시하기 위해서 Adobe Flash Plugin이 필요합니다.'; +$lang['noflash'] = '이 컨텐츠를 표시하기 위해서 Adobe Flash 플러그인이 필요합니다.'; $lang['download'] = '조각 다운로드'; $lang['tools'] = '도구'; $lang['user_tools'] = '사용자 도구'; $lang['site_tools'] = '사이트 도구'; -$lang['page_tools'] = '페이지 도구'; +$lang['page_tools'] = '문서 도구'; $lang['skip_to_content'] = '컨텐츠 넘기기'; -$lang['mail_newpage'] = '페이지 추가:'; -$lang['mail_changed'] = '페이지 변경:'; -$lang['mail_subscribe_list'] = '네임스페이스에서 변경된 페이지:'; +$lang['mail_newpage'] = '문서 추가:'; +$lang['mail_changed'] = '문서 바뀜:'; +$lang['mail_subscribe_list'] = '이름공간에서 바뀐 문서:'; $lang['mail_new_user'] = '새로운 사용자:'; $lang['mail_upload'] = '파일 첨부:'; $lang['changes_type'] = '차이점 보기'; -$lang['pages_changes'] = '페이지'; +$lang['pages_changes'] = '문서'; $lang['media_changes'] = '미디어 파일'; -$lang['both_changes'] = '미디어 파일과 페이지 양쪽'; -$lang['qb_bold'] = '굵은 글'; -$lang['qb_italic'] = '이탤릭체 글'; -$lang['qb_underl'] = '밑줄 그어진 글'; -$lang['qb_code'] = '코드로 표시된 글'; -$lang['qb_strike'] = '취소 표시된 글'; -$lang['qb_h1'] = '1단계 헤드라인'; -$lang['qb_h2'] = '2단계 헤드라인'; -$lang['qb_h3'] = '3단계 헤드라인'; -$lang['qb_h4'] = '4단계 헤드라인'; -$lang['qb_h5'] = '5단계 헤드라인'; -$lang['qb_h'] = '표제'; -$lang['qb_hs'] = '표제 선택'; -$lang['qb_hplus'] = '상위 표제'; -$lang['qb_hminus'] = '하위 표제'; -$lang['qb_hequal'] = '동급 표제'; +$lang['both_changes'] = '미디어 파일과 문서 모두'; +$lang['qb_bold'] = '굵은 글씨'; +$lang['qb_italic'] = '기울인 글씨'; +$lang['qb_underl'] = '밑줄 그어진 글씨'; +$lang['qb_code'] = '코드 글씨'; +$lang['qb_strike'] = '취소선 글씨'; +$lang['qb_h1'] = '1단계 문단 제목'; +$lang['qb_h2'] = '2단계 문단 제목'; +$lang['qb_h3'] = '3단계 문단 제목'; +$lang['qb_h4'] = '4단계 문단 제목'; +$lang['qb_h5'] = '5단계 문단 제목'; +$lang['qb_h'] = '제목'; +$lang['qb_hs'] = '문단 제목 선택'; +$lang['qb_hplus'] = '상위 문단 제목'; +$lang['qb_hminus'] = '하위 문단 제목'; +$lang['qb_hequal'] = '동급 문단 제목'; $lang['qb_link'] = '내부 링크'; $lang['qb_extlink'] = '외부 링크'; -$lang['qb_hr'] = '수평선'; -$lang['qb_ol'] = '숫자 목록'; -$lang['qb_ul'] = '목록'; -$lang['qb_media'] = '이미지와 기타 파일 추가'; -$lang['qb_sig'] = '서명 추가'; +$lang['qb_hr'] = '가로줄'; +$lang['qb_ol'] = '순서 있는 목록'; +$lang['qb_ul'] = '순서 없는 목록'; +$lang['qb_media'] = '그림과 기타 파일 추가'; +$lang['qb_sig'] = '서명 넣기'; $lang['qb_smileys'] = '이모티콘'; -$lang['qb_chars'] = '특수문자'; -$lang['upperns'] = '상위 네임스페이스로 이동'; -$lang['admin_register'] = '새로운 사용자 추가'; -$lang['metaedit'] = '메타 데이타를 편집합니다.'; -$lang['metasaveerr'] = '메타 데이타 쓰기가 실패했습니다.'; -$lang['metasaveok'] = '메타 데이타가 저장되었습니다.'; +$lang['qb_chars'] = '특수 문자'; +$lang['upperns'] = '상위 이름공간으로 이동'; +$lang['admin_register'] = '새 사용자 추가'; +$lang['metaedit'] = '메타 데이터 편집'; +$lang['metasaveerr'] = '메타 데이터 쓰기 실패'; +$lang['metasaveok'] = '메타 데이타 저장됨'; $lang['img_backto'] = '뒤로'; $lang['img_title'] = '이름'; $lang['img_caption'] = '설명'; @@ -246,51 +245,49 @@ $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'] = '등록된 주소가 없기 때문에 구독목록에 등록되지 않았습니다'; -$lang['subscr_unsubscribe_success'] = '%s을(를) 구독목록 %s에서 제거하였습니다'; -$lang['subscr_unsubscribe_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에 구독되어 있지 않습니다'; -$lang['subscr_m_not_subscribed'] = '현재의 페이지나 네임스페이스에 구독등록이 되어있지 않습니다.'; +$lang['subscr_m_not_subscribed'] = '현재의 문서나 이름공간에 구독 등록이 되어있지 않습니다.'; $lang['subscr_m_new_header'] = '구독 추가'; -$lang['subscr_m_current_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'] = '각 페이지의 변화를 요약 (매 %.2f 일 마다)'; -$lang['subscr_style_list'] = '마지막 이메일 이후 변화된 페이지의 목록 (매 %.2f 일 마다)'; +$lang['subscr_style_every'] = '모든 바뀜을 이메일로 받기'; +$lang['subscr_style_digest'] = '각 문서의 바뀜을 요약 (매 %.2f 일 마다)'; +$lang['subscr_style_list'] = '마지막 이메일 이후 바뀐 문서의 목록 (매 %.2f 일 마다)'; $lang['authmodfailed'] = '잘못된 사용자 인증 설정입니다. 관리자에게 문의하기 바랍니다.'; $lang['authtempfail'] = '사용자 인증이 일시적으로 불가능합니다. 만일 계속해서 문제가 발생하면 관리자에게 문의하기 바랍니다.'; -$lang['authpwdexpire'] = '현재 암호를 설정하신지 %d 일이 지났습니다. 새로 설정해주시기 바랍니다.'; -$lang['i_chooselang'] = '사용하는 언어를 선택합니다.'; +$lang['authpwdexpire'] = '현재 비밀번호를 설정한지 %d 일이 지났습니다. 새로 설정해주시기 바랍니다.'; +$lang['i_chooselang'] = '사용할 언어를 선택하세요'; $lang['i_installer'] = 'DokuWiki 설치'; $lang['i_wikiname'] = '위키 이름'; -$lang['i_enableacl'] = 'ACL기능 사용(권장 사항)'; +$lang['i_enableacl'] = 'ACL 기능 사용 (권장 사항)'; $lang['i_superuser'] = '슈퍼 유저'; $lang['i_problems'] = '설치 중 아래와 같은 문제가 발생했습니다. 문제를 해결한 후 설치를 계속하기 바랍니다.'; -$lang['i_modified'] = '보안 상의 이유로 아래 스크립트는 수정되지 않은 새 Dokuwiki설치에서만 동작됩니다. -다운로드된 압축 패키지를 다시 설치하거나 DokuWiki 설치 과정을 참고해서 설치하기 바랍니다.'; -$lang['i_funcna'] = 'PHP함수 %s 사용이 불가능합니다. 호스트 제공자가 어떤 이유에서인지 막아 놓았을지 모릅니다.'; -$lang['i_phpver'] = 'PHP %s버전은 필요한 %s버전보다 오래되었습니다.PHP를 업그레이드할 필요가 있습니다.'; +$lang['i_modified'] = '보안 상의 이유로 이 스크립트는 수정되지 않은 새 Dokuwiki 설치에서만 동작됩니다. +다운로드한 압축 패키지를 다시 설치하거나 DokuWiki 설치 과정을 참고해서 설치하기 바랍니다.'; +$lang['i_funcna'] = '%s PHP 함수의 사용이 불가능합니다. 호스트 제공자가 어떤 이유에서인지 막아 놓았을지 모릅니다.'; +$lang['i_phpver'] = 'PHP %s 버전은 필요한 %s 버전보다 오래되었습니다. PHP를 업그레이드할 필요가 있습니다.'; $lang['i_permfail'] = 'DokuWiki는 %s에 쓰기 가능 권한이 없습니다. 먼저 이 디렉토리에 쓰기 권한이 설정되어야 합니다!'; -$lang['i_confexists'] = '%s는 이미 존재합니다.'; -$lang['i_writeerr'] = '%s을 만들 수 없습니다. 먼저 디렉토리/파일 권한을 확인하고 파일을 수동으로 만들기 바랍니다.'; -$lang['i_badhash'] = 'dokuwiki.php를 인식할 수 없거나 원본 파일이 아닙니다. (hash=%s)'; +$lang['i_confexists'] = '%s(은)는 이미 존재합니다.'; +$lang['i_writeerr'] = '%s(을)를 만들 수 없습니다. 먼저 디렉토리/파일 권한을 확인하고 파일을 수동으로 만들기 바랍니다.'; +$lang['i_badhash'] = 'dokuwiki.php를 인식할 수 없거나 원본 파일이 아닙니다. (해시=%s)'; $lang['i_badval'] = '%s - 유효하지 않거나 빈 값입니다.'; -$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. install.php를 지워도 상관없습니다. - 새로운 DokuWiki.'; -$lang['i_failure'] = '환경 설정 파일에 쓰는 도중 에러가 발생했습니다. -새로운 DokuWiki를 사용하기 전에 수동으로 문제를 해결할 필요가 있습니다.'; +$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다. 새 DokuWiki로 들어갑니다.'; +$lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다. 새 DokuWiki를 사용하기 전에 수동으로 문제를 해결할 필요가 있습니다.'; $lang['i_policy'] = '초기 ACL 정책'; -$lang['i_pol0'] = '개방형 위키 (누구나 읽기/쓰기/업로드가 가능합니다.)'; -$lang['i_pol1'] = '공개형 위키 (누구나 읽을 수 있지만, 등록된 사용자만 쓰기/업로드가 가능합니다.)'; -$lang['i_pol2'] = '폐쇄형 위키 (등록된 사용자만 읽기/쓰기/업로드가 가능합니다.)'; +$lang['i_pol0'] = '열린 위키 (누구나 읽기, 쓰기, 올리기가 가능합니다.)'; +$lang['i_pol1'] = '공개 위키 (누구나 읽을 수 있지만, 등록된 사용자만 쓰기와 올리기가 가능합니다.)'; +$lang['i_pol2'] = '닫힌 위키 (등록된 사용자만 읽기, 쓰기, 업로드가 가능합니다.)'; $lang['i_retry'] = '다시 시도'; -$lang['i_license'] = '내용의 배포를 위한 라이센스를 선택하세요.'; -$lang['recent_global'] = '%s 네임스페이스를 구독중입니다. 전체위키 변경사항 도 보실수 있습니다.'; +$lang['i_license'] = '내용을 배포하기 위한 라이선스를 선택하세요:'; +$lang['recent_global'] = '%s 이름공간을 구독 중입니다. 전체 위키 최근 바뀜도 볼 수 있습니다.'; $lang['years'] = '%d 년 전'; $lang['months'] = '%d 개월 전'; $lang['weeks'] = '%d 주 전'; @@ -299,27 +296,27 @@ $lang['hours'] = '%d 시간 전'; $lang['minutes'] = '%d 분 전'; $lang['seconds'] = '%d 초 전'; $lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장되지 않았습니다.'; -$lang['media_uploadtab'] = '업로드'; -$lang['media_searchtab'] = '검색'; +$lang['media_uploadtab'] = '올리기'; +$lang['media_searchtab'] = '찾기'; $lang['media_file'] = '파일'; $lang['media_viewtab'] = '보기'; $lang['media_edittab'] = '수정'; -$lang['media_historytab'] = '변경사항'; -$lang['media_list_thumbs'] = '썸네일'; +$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_namespaces'] = '이름공간 선택'; +$lang['media_files'] = '%s의 파일'; +$lang['media_upload'] = '%s에 올리기'; +$lang['media_search'] = '%s 찾기'; $lang['media_view'] = '%s'; -$lang['media_viewold'] = '%s 의 %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_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/ko/locked.txt b/inc/lang/ko/locked.txt index 24525fc46..176a792d6 100644 --- a/inc/lang/ko/locked.txt +++ b/inc/lang/ko/locked.txt @@ -1,3 +1,3 @@ -====== 페이지 잠금 ====== +====== 문서 잠금 ====== -다른 사용자가 이 페이지 편집을 위해 잠금을 실행하였습니다. 해당 사용자가 편집을 끝내거나 잠금이 해제될 때까지 기다리십시오. +다른 사용자가 이 문서를 편집하기 위해 잠금을 실행하였습니다. 해당 사용자가 편집을 끝내거나 잠금이 해제될 때까지 기다리십시오. \ No newline at end of file diff --git a/inc/lang/ko/login.txt b/inc/lang/ko/login.txt index 1aae449df..160b899d3 100644 --- a/inc/lang/ko/login.txt +++ b/inc/lang/ko/login.txt @@ -1,4 +1,3 @@ ====== 로그인 ====== -로그인하지 않았습니다! 아래에서 로그인하십시오. 로그인하려면 쿠키를 받도록 설정하여야 합니다. - +로그인하지 않았습니다! 아래에서 로그인하세요. 로그인하려면 쿠키를 받도록 설정하여야 합니다. \ No newline at end of file diff --git a/inc/lang/ko/mailtext.txt b/inc/lang/ko/mailtext.txt index 5c496435e..ead9d5695 100644 --- a/inc/lang/ko/mailtext.txt +++ b/inc/lang/ko/mailtext.txt @@ -1,17 +1,16 @@ -DokuWiki 페이지가 수정 혹은 추가되었습니다. 상세한 정보는 다음과 같습니다. +DokuWiki 문서가 추가 또는 변경되었습니다. 제세한 정보는 다음과 같습니다: -날짜 : @DATE@ -브라우저 : @BROWSER@ -IP 주소 : @IPADDRESS@ -호스트명 : @HOSTNAME@ -옛날버전 : @OLDPAGE@ -새버전 : @NEWPAGE@ -편집 요약 : @SUMMARY@ -사용자 : @USER@ +날짜 : @DATE@ +브라우저 : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 이름 : @HOSTNAME@ +이전 버전 : @OLDPAGE@ +새 버전 : @NEWPAGE@ +편집 요약 : @SUMMARY@ +사용자 : @USER@ @DIFF@ --- -이 메일은 @DOKUWIKIURL@ 의 DokuWiki 가 생성한 -이메일입니다. +-- +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/mailwrap.html b/inc/lang/ko/mailwrap.html index 093df1ef5..885730428 100644 --- a/inc/lang/ko/mailwrap.html +++ b/inc/lang/ko/mailwrap.html @@ -8,6 +8,6 @@ @HTMLBODY@

- 이 편지는 @DOKUWIKIURL@의 도쿠위키에서 생성되었습니다. + @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt index f8380bd84..87ac969d2 100644 --- a/inc/lang/ko/newpage.txt +++ b/inc/lang/ko/newpage.txt @@ -1,3 +1,3 @@ -====== 이 토픽은 아직 없습니다 ====== +====== 이 주제는 아직 없습니다 ====== -아직 없는 토픽 링크를 따라오셨습니다. **페이지 만들기** 버튼을 이용하여 새로 만들 수 있습니다. +아직 없는 주제에 대한 링크를 따라왔습니다. **문서 만들기** 버튼을 이용하여 새로 만들 수 있습니다. \ No newline at end of file diff --git a/inc/lang/ko/norev.txt b/inc/lang/ko/norev.txt index e1b4093b4..6758ce4ec 100644 --- a/inc/lang/ko/norev.txt +++ b/inc/lang/ko/norev.txt @@ -1,3 +1,3 @@ ====== 지정한 버전 없음 ====== -지정한 버전이 없습니다. **과거 버전** 버튼을 사용하여 이 문서의 버전 목록을 보십시오. +지정한 버전이 존재하지 않습니다. **이전 버전** 버튼을 사용하여 이 문서의 이전 버전 목록을 보세요. \ No newline at end of file diff --git a/inc/lang/ko/password.txt b/inc/lang/ko/password.txt index e0a22c59a..02b23d17c 100644 --- a/inc/lang/ko/password.txt +++ b/inc/lang/ko/password.txt @@ -1,10 +1,9 @@ -안녕하세요, @FULLNAME@! +@FULLNAME@ 안녕하세요! -@DOKUWIKIURL@ 의 @TITLE@ 의 사용자 정보입니다. +@DOKUWIKIURL@의 @TITLE@의 사용자 정보입니다. -사용자명 : @LOGIN@ -패스워드 : @PASSWORD@ +사용자 이름 : @LOGIN@ +비밀번호 : @PASSWORD@ -- -이 이메일은 @DOKUWIKIURL@ 의 DokuWiki 가 -생성한 것입니다. +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/preview.txt b/inc/lang/ko/preview.txt index 8bcc6a1eb..fec01dc43 100644 --- a/inc/lang/ko/preview.txt +++ b/inc/lang/ko/preview.txt @@ -1,4 +1,3 @@ -====== 미리보기 ====== - -이것은 입력하신 내용이 어떻게 보일지 미리보기하는 곳입니다. 아직은 **저장되지 않았다**는 점을 기억하십시오. +====== 미리 보기 ====== +이것은 입력한 내용이 어떻게 보일지 미리 보여줍니다. 아직 **저장되지 않았다**는 점을 기억하십시오! \ No newline at end of file diff --git a/inc/lang/ko/pwconfirm.txt b/inc/lang/ko/pwconfirm.txt index c022a52a9..1920f4a20 100644 --- a/inc/lang/ko/pwconfirm.txt +++ b/inc/lang/ko/pwconfirm.txt @@ -1,11 +1,13 @@ -안녕하세요. @FULLNAME@! +@FULLNAME@ 안녕하세요! -@DOKUWIKIURL@에 작성하신 @TITLE@을 보려면 새 패스워드가 필요하다는 요청을 누군가 받았다고 합니다. +누군가가 @DOKUWIKIURL@에 @TITLE@에 대해 +새 비밀번호가 필요하다고 요청했습니다. -새로운 패스워드를 요청한 적이 없다면 이 이메일을 무시해버리세요. +새로운 비밀번호 요청한 적이 없다면 이 이메일을 무시해버리세요. -@CONFIRM@에서 정말로 본인이 그런 요청을 했었는지 확인해 보기 바랍니다. +정말로 당신이 그러한 요청을 했는지 다음 링크에서 확인하기 바랍니다. --- +@CONFIRM@ -@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. +-- +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt index 6b5d7b3db..2daa39060 100644 --- a/inc/lang/ko/read.txt +++ b/inc/lang/ko/read.txt @@ -1,2 +1,2 @@ -이 페이지는 읽기 전용입니다. 소스를 볼 수는 있지만, 수정할 수는 없습니다. 연습은 [[public:playground|연습장]]에서 하십시오. 문제가 있다고 생각하시면 관리자에게 문의하십시오. +이 문서는 읽기 전용입니다. 소스를 볼 수는 있지만, 수정할 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하십시오. diff --git a/inc/lang/ko/recent.txt b/inc/lang/ko/recent.txt index f693c4bf1..f2ffb8c6f 100644 --- a/inc/lang/ko/recent.txt +++ b/inc/lang/ko/recent.txt @@ -1,5 +1,3 @@ -====== 최근 변경 ====== - -아래의 페이지는 최근에 변경된 것입니다. - +====== 최근 바뀜 ====== +아래의 문서는 최근에 바뀐 것입니다. \ No newline at end of file diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt index 24105efeb..e60368a74 100644 --- a/inc/lang/ko/register.txt +++ b/inc/lang/ko/register.txt @@ -1,4 +1,3 @@ ====== 새 사용자 등록 ====== -이 위키에 새 계정을 만들려면 아래의 모든 내용을 입력하세요. **제대로 된 이메일 주소**를 사용하세요. 암호를 입력하는 곳이 없다면 암호는 이 이메일로 보내집니다. 사용자명은 올바른 [[doku>pagename|pagename]] 이어야 합니다. - +이 위키에 새 계정을 만드려면 아래의 모든 내용을 입력하세요. **올바른 이메일 주소**를 사용하세요. 비밀번호를 입력하는 곳이 없다면 비밀번호는 이 이메일로 보내집니다. 사용자 이름은 올바른 [[doku>pagename|pagename]] 이어야 합니다. \ No newline at end of file diff --git a/inc/lang/ko/registermail.txt b/inc/lang/ko/registermail.txt index 4b1aa20a5..d06f93047 100644 --- a/inc/lang/ko/registermail.txt +++ b/inc/lang/ko/registermail.txt @@ -1,14 +1,13 @@ -새로운 사용자가 등록되었습니다: +새 사용자가 등록되었습니다: -사용자 이름 : @NEWUSER@ +사용자 이름 : @NEWUSER@ 사용자 실제 이름 : @NEWNAME@ -이메일 : @NEWEMAIL@ +이메일 : @NEWEMAIL@ -날짜 : @DATE@ -브라우저 : @BROWSER@ -IP주소 : @IPADDRESS@ -호스트 이름 : @HOSTNAME@ +날짜 : @DATE@ +브라우저 : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 이름 : @HOSTNAME@ -- - @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. diff --git a/inc/lang/ko/resendpwd.txt b/inc/lang/ko/resendpwd.txt index b06163e92..0ad46eb1e 100644 --- a/inc/lang/ko/resendpwd.txt +++ b/inc/lang/ko/resendpwd.txt @@ -1,4 +1,3 @@ -====== 새로운 패스워드 전송 ====== - -이 위키 계정에 대한 새 패스워드를 요구하기 위해 아래 폼에서 사용자 이름을 입력하세요. 확인 링크는 새로 등록된 이메일 주소로 발송됩니다. +====== 새로운 비밀번호 전송 ====== +이 위키 계정에 대한 새 비밀번호를 요구하기 위해 아래 양식에서 사용자 이름을 입력하세요. 확인 링크는 새로 등록한 이메일 주소로 발송됩니다. \ No newline at end of file diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt index b84674b82..bea380f83 100644 --- a/inc/lang/ko/resetpwd.txt +++ b/inc/lang/ko/resetpwd.txt @@ -1,3 +1,3 @@ -====== 새 암호 설정 ====== +====== 새 비밀번호 설정 ====== -이 위키의 계정의 새 암호를 입력해주세요. \ No newline at end of file +이 위키의 계정의 새 비밀번호를 입력하세요. \ No newline at end of file diff --git a/inc/lang/ko/revisions.txt b/inc/lang/ko/revisions.txt index 12d11894d..639b36c00 100644 --- a/inc/lang/ko/revisions.txt +++ b/inc/lang/ko/revisions.txt @@ -1,4 +1,3 @@ -====== 이전 버전 ====== - -이 문서의 옛날 버전은 다음과 같습니다. 이전 버전으로 돌아가려면, 아래에서 선택한 다음, **페이지 편집**을 클릭한 아후 저장하십시오. +====== 이전 판 ====== +이 문서의 이전 판은 다음과 같습니다. 이전 판으로 돌아가려면, 아래에서 선택한 다음 **문서 편집**을 클릭하고 나서 저장하세요. \ No newline at end of file diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 198d9a428..92faeb010 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 찾기 ====== -찾기 결과를 아래에서 볼 수 있습니다. 만일 원하는 것을 찾지 못하였다면, **페이지 편집** 버튼을 이용하여 질의 내용과 같은 이름의 페이지를 만들 수 있습니다. +아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 것을 찾지 못하였다면, **해당 버튼**을 사용하여 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다. -===== 결과 ===== +===== 결과 ===== \ No newline at end of file diff --git a/inc/lang/ko/stopwords.txt b/inc/lang/ko/stopwords.txt index bdb41deba..4b5551ce5 100644 --- a/inc/lang/ko/stopwords.txt +++ b/inc/lang/ko/stopwords.txt @@ -1,9 +1,11 @@ -# 색인이 만들어 지지 않는 단어 목록입니다.(한줄에 한단어) -# 이 파일을 편집한다면 UNIX줄 종료문자를 사용해야합니다.(단일 개행문자) -# 3문자이하 단어는 자동으로 무시되므로 3문자보다 짧은 단어는 포함시킬 필요가 없습니다. +# 색인이 만들어지지 않는 단어 목록입니다. (한줄에 한 단어) +# 이 파일을 편집한다면 UNIX 줄 종료 문자를 사용해야합니다.(단일 개행 문자) +# 3문자 이하 단어는 자동으로 무시되므로 3문자보다 짧은 단어는 포함시킬 필요가 없습니다. # http://www.ranks.nl/stopwords/을 기준으로 만들어진 목록입니다. about are +as +an and you your @@ -13,10 +15,18 @@ com for from into +if +in +is +it how +of +on +or that the this +to was what when @@ -26,4 +36,4 @@ will with und the -www +www \ No newline at end of file diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt index 2e9c87848..667d0ce2c 100644 --- a/inc/lang/ko/subscr_digest.txt +++ b/inc/lang/ko/subscr_digest.txt @@ -1,18 +1,19 @@ 안녕하세요! -@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. +@TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. -변경사항은 다음과 같습니다: +차이점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -옛날 것: @OLDPAGE@ -새 것: @NEWPAGE@ +이전 버전 : @OLDPAGE@ +새 버전 : @NEWPAGE@ -이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 -@SUBSCRIBE@ 를 방문하여 페이지나 이름공간의 구독을 취소하세요. + +이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 +@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_form.txt b/inc/lang/ko/subscr_form.txt index 31470f372..ed380ccee 100644 --- a/inc/lang/ko/subscr_form.txt +++ b/inc/lang/ko/subscr_form.txt @@ -1,3 +1,3 @@ ====== 구독 관리 ====== -이 페이지는 현재의 페이지와 네임스페이스의 구독을 관리할 수있도록 해줍니다. \ No newline at end of file +이 페이지는 현재의 문서와 이름공간의 구독을 관리할 수 있도록 해줍니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt index 2661a6a15..a3709cbd4 100644 --- a/inc/lang/ko/subscr_list.txt +++ b/inc/lang/ko/subscr_list.txt @@ -1,15 +1,15 @@ 안녕하세요! -@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. +@TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. -변경사항은 다음과 같습니다: +차이점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 -@SUBSCRIBE@ 를 방문하여 페이지나 이름공간의 구독을 취소하세요. +이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 +@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt index 1aa4d7efa..23973ed99 100644 --- a/inc/lang/ko/subscr_single.txt +++ b/inc/lang/ko/subscr_single.txt @@ -1,8 +1,7 @@ 안녕하세요! -@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. - -변경사항은 다음과 같습니다: +@TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. +차이점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ @@ -11,11 +10,11 @@ 날짜 : @DATE@ 사용자 : @USER@ 편집 요약 : @SUMMARY@ -구 버전 : @OLDPAGE@ +이전 버전 : @OLDPAGE@ 새 버전 : @NEWPAGE@ -이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 t -@NEWPAGE@ 를 방문하여 페이지나 이름공간의 구독을 취소하세요. +이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤 +@NEWPAGE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요. -- @DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file diff --git a/inc/lang/ko/updateprofile.txt b/inc/lang/ko/updateprofile.txt index 5ea331c05..ebf19d8ab 100644 --- a/inc/lang/ko/updateprofile.txt +++ b/inc/lang/ko/updateprofile.txt @@ -1,5 +1,3 @@ ====== 개인 정보 수정 ====== -변경하고 싶은 항목을 입력하기 바랍니다. 사용자 이름은 바꾸고 싶지 않겠지요? - - +바꾸고 싶은 항목을 입력하기 바랍니다. 사용자 이름은 바꿀 수 없습니다. \ No newline at end of file diff --git a/inc/lang/ko/uploadmail.txt b/inc/lang/ko/uploadmail.txt index 46c66a66b..8195c189a 100644 --- a/inc/lang/ko/uploadmail.txt +++ b/inc/lang/ko/uploadmail.txt @@ -1,15 +1,14 @@ -DokuWiki가 파일을 업로드하였습니다. +DokuWiki가 파일을 올렸습니다. -자세한 정보: - -파일 : @MEDIA@ -날짜 : @DATE@ -웹 브라우저 : @BROWSER@ -IP 주소 : @IPADDRESS@ -호스트명 : @HOSTNAME@ -크기 : @SIZE@ -파일 종류 : @MIME@ -사용자 : @USER@ +파일 : @MEDIA@ +이전 버전 : @OLD@ +날짜 : @DATE@ +브라우저 : @BROWSER@ +IP 주소 : @IPADDRESS@ +호스트 이름 : @HOSTNAME@ +크기 : @SIZE@ +MIME 종류 : @MIME@ +사용자 : @USER@ -- -이 메일은 @DOKUWIKIURL@의 DokuWiki가 생성한 메일입니다. \ No newline at end of file +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file -- cgit v1.2.3 From a257b0bd427ca5a7eb636d95f98aca831ec075b5 Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Thu, 14 Jun 2012 16:34:19 +0200 Subject: Cache that has exactly the same age as a dependency may be stale --- inc/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/cache.php b/inc/cache.php index ff78e37ae..e598baa47 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -69,7 +69,7 @@ class cache { if (!empty($this->depends['files'])) { foreach ($this->depends['files'] as $file) { - if ($this->_time < @filemtime($file)) return false; // cache older than files it depends on? + if ($this->_time <= @filemtime($file)) return false; // cache older than files it depends on? } } -- cgit v1.2.3 From b83823e5b0c95ae2365cfc20eb33094c6ab108f2 Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Thu, 14 Jun 2012 16:39:09 +0200 Subject: Split act_clean() into two functions so that plugins may use action string sanitization even for their own new actions --- inc/actions.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index e85cbfccc..eb2178ac1 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -30,7 +30,7 @@ function act_dispatch(){ if ($evt->advise_before()) { //sanitize $ACT - $ACT = act_clean($ACT); + $ACT = act_validate($ACT); //check if searchword was given - else just show $s = cleanID($QUERY); @@ -183,8 +183,6 @@ function act_sendheaders($headers) { /** * Sanitize the action command * - * Add all allowed commands here. - * * @author Andreas Gohr */ function act_clean($act){ @@ -205,6 +203,18 @@ function act_clean($act){ if($act == 'export_htmlbody') $act = 'export_xhtmlbody'; if($act === '') $act = 'show'; + return $act; +} + +/** + * Sanitize and validate action commands. + * + * Add all allowed commands here. + * + * @author Andreas Gohr + */ +function act_validate($act) { + $act = act_clean($act); // check if action is disabled if(!actionOK($act)){ -- cgit v1.2.3 From 3fb0e07d018fc6c8d173bd4a8a58c77ba00290fb Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Mon, 18 Jun 2012 21:30:11 +0200 Subject: Fix act_validate() --- inc/actions.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index eb2178ac1..4376af5f9 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -186,10 +186,6 @@ function act_sendheaders($headers) { * @author Andreas Gohr */ function act_clean($act){ - global $lang; - global $conf; - global $INFO; - // check if the action was given as array key if(is_array($act)){ list($act) = array_keys($act); @@ -214,6 +210,9 @@ function act_clean($act){ * @author Andreas Gohr */ function act_validate($act) { + global $conf; + global $INFO; + $act = act_clean($act); // check if action is disabled -- cgit v1.2.3 From 020ab112b3d5b5c640eb1a297ec77ff73cf2b0d7 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Jun 2012 02:30:00 -0400 Subject: Reference static variable through 'self::' as you're supposed to. --- inc/HTTPClient.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 26bee52a7..bb87056e2 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -284,11 +284,11 @@ class HTTPClient { // already connected? $connectionId = $this->_uniqueConnectionId($server,$port); - $this->_debug('connection pool', $this->connections); + $this->_debug('connection pool', self::$connections); $socket = null; - if (isset($this->connections[$connectionId])) { + if (isset(self::$connections[$connectionId])) { $this->_debug('reusing connection', $connectionId); - $socket = $this->connections[$connectionId]; + $socket = self::$connections[$connectionId]; } if (is_null($socket) || feof($socket)) { $this->_debug('opening connection', $connectionId); @@ -302,9 +302,9 @@ class HTTPClient { // keep alive? if ($this->keep_alive) { - $this->connections[$connectionId] = $socket; + self::$connections[$connectionId] = $socket; } else { - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); } } @@ -333,7 +333,7 @@ class HTTPClient { if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } @@ -348,7 +348,7 @@ class HTTPClient { if($ret === false){ $this->status = -100; $this->error = 'Failed writing to socket'; - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } $written += $ret; @@ -363,12 +363,12 @@ class HTTPClient { if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } if(feof($socket)){ $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } usleep(1000); @@ -382,7 +382,7 @@ class HTTPClient { if($match[1] > $this->max_bodysize){ $this->error = 'Reported content length exceeds allowed response size'; if ($this->max_bodysize_abort) - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } } @@ -390,7 +390,7 @@ class HTTPClient { // get Status if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) { $this->error = 'Server returned bad answer'; - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } $this->status = $m[2]; @@ -419,7 +419,7 @@ class HTTPClient { // close the connection because we don't handle content retrieval here // that's the easiest way to clean up the connection fclose($socket); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); if (empty($this->resp_headers['location'])){ $this->error = 'Redirect but no Location Header found'; @@ -448,7 +448,7 @@ class HTTPClient { // check if headers are as expected if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){ $this->error = 'The received headers did not match the given regexp'; - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } @@ -460,13 +460,13 @@ class HTTPClient { do { if(feof($socket)){ $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } $byte = fread($socket,1); @@ -484,7 +484,7 @@ class HTTPClient { if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; if ($this->max_bodysize_abort){ - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } else { break; @@ -497,7 +497,7 @@ class HTTPClient { if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } $r_body .= fread($socket,4096); @@ -505,7 +505,7 @@ class HTTPClient { if($this->max_bodysize && $r_size > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; if ($this->max_bodysize_abort) { - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); return false; } else { break; @@ -525,7 +525,7 @@ class HTTPClient { // close socket $status = socket_get_status($socket); fclose($socket); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); } // decode gzip if needed -- cgit v1.2.3 From a09831ea8abf0abcf3e7f72f0974dc5e0fc301c8 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Jun 2012 02:34:47 -0400 Subject: Avoid strict warnings about unset array keys. --- inc/HTTPClient.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index bb87056e2..524dd9a2c 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -227,7 +227,7 @@ class HTTPClient { $path = $uri['path']; if(empty($path)) $path = '/'; if(!empty($uri['query'])) $path .= '?'.$uri['query']; - if(isset($uri['port']) && !empty($uri['port'])) $port = $uri['port']; + if(!empty($uri['port'])) $port = $uri['port']; if(isset($uri['user'])) $this->user = $uri['user']; if(isset($uri['pass'])) $this->pass = $uri['pass']; @@ -249,7 +249,7 @@ class HTTPClient { // prepare headers $headers = $this->headers; $headers['Host'] = $uri['host']; - if($uri['port']) $headers['Host'].= ':'.$uri['port']; + if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port']; $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; if ($this->keep_alive) { @@ -583,7 +583,7 @@ class HTTPClient { $lines = explode("\n",$string); array_shift($lines); //skip first line (status) foreach($lines as $line){ - list($key, $val) = explode(':',$line,2); + @list($key, $val) = explode(':',$line,2); $key = trim($key); $val = trim($val); $key = strtolower($key); -- cgit v1.2.3 From fc6c2b2f78f7278af30dd2dd0758e90ae771322e Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Jun 2012 03:23:17 -0400 Subject: Correct handling of chunked transfer encoding. (FS#2535) --- inc/HTTPClient.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 524dd9a2c..a07d263dd 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -456,7 +456,7 @@ class HTTPClient { $r_body = ''; if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ do { - unset($chunk_size); + $chunk_size = ''; do { if(feof($socket)){ $this->error = 'Premature End of File (socket)'; @@ -471,13 +471,17 @@ class HTTPClient { } $byte = fread($socket,1); $chunk_size .= $byte; - } while (preg_match('/[a-zA-Z0-9]/',$byte)); // read chunksize including \r + } while (preg_match('/^[a-zA-Z0-9]?$/',$byte)); // read chunksize including \r $byte = fread($socket,1); // readtrailing \n $chunk_size = hexdec($chunk_size); if ($chunk_size) { - $this_chunk = fread($socket,$chunk_size); - $r_body .= $this_chunk; + $read_size = $chunk_size; + while ($read_size > 0) { + $this_chunk = fread($socket,$read_size); + $r_body .= $this_chunk; + $read_size -= strlen($this_chunk); + } $byte = fread($socket,2); // read trailing \r\n } -- cgit v1.2.3 From 189ba183ccac1cf7a2d02756895207c48431f70b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Jun 2012 23:02:26 -0400 Subject: Raise an exception on socket errors. This is the first step in refactoring the socket reader to be more resilient and easier to debug. --- inc/HTTPClient.php | 352 +++++++++++++++++++++++++---------------------------- 1 file changed, 167 insertions(+), 185 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index a07d263dd..f11621f6a 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -61,6 +61,8 @@ class DokuHTTPClient extends HTTPClient { } +class HTTPClientException extends Exception { } + /** * This class implements a basic HTTP client * @@ -308,220 +310,200 @@ class HTTPClient { } } - //set blocking - stream_set_blocking($socket,1); - - // build request - $request = "$method $request_url HTTP/".$this->http.HTTP_NL; - $request .= $this->_buildHeaders($headers); - $request .= $this->_getCookies(); - $request .= HTTP_NL; - $request .= $data; - - $this->_debug('request',$request); - - // select parameters - $sel_r = null; - $sel_w = array($socket); - $sel_e = null; - - // send request - $towrite = strlen($request); - $written = 0; - while($written < $towrite){ - // check timeout - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start); - unset(self::$connections[$connectionId]); - return false; - } - - // wait for stream ready or timeout (1sec) - if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ - usleep(1000); - continue; - } - - // write to stream - $ret = fwrite($socket, substr($request,$written,4096)); - if($ret === false){ - $this->status = -100; - $this->error = 'Failed writing to socket'; - unset(self::$connections[$connectionId]); - return false; - } - $written += $ret; - } - - // continue non-blocking - stream_set_blocking($socket,0); + try { + //set blocking + stream_set_blocking($socket,1); + + // build request + $request = "$method $request_url HTTP/".$this->http.HTTP_NL; + $request .= $this->_buildHeaders($headers); + $request .= $this->_getCookies(); + $request .= HTTP_NL; + $request .= $data; + + $this->_debug('request',$request); + + // select parameters + $sel_r = null; + $sel_w = array($socket); + $sel_e = null; + + // send request + $towrite = strlen($request); + $written = 0; + while($written < $towrite){ + // check timeout + if(time()-$start > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start), -100); + + // wait for stream ready or timeout (1sec) + if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ + usleep(1000); + continue; + } - // read headers from socket - $r_headers = ''; - do{ - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start); - unset(self::$connections[$connectionId]); - return false; - } - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset(self::$connections[$connectionId]); - return false; + // write to stream + $ret = fwrite($socket, substr($request,$written,4096)); + if($ret === false) + throw new HTTPClientException('Failed writing to socket', -100); + $written += $ret; } - usleep(1000); - $r_headers .= fgets($socket,1024); - }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); - $this->_debug('response headers',$r_headers); + // continue non-blocking + stream_set_blocking($socket,0); - // check if expected body size exceeds allowance - if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ - if($match[1] > $this->max_bodysize){ - $this->error = 'Reported content length exceeds allowed response size'; - if ($this->max_bodysize_abort) - unset(self::$connections[$connectionId]); - return false; + // read headers from socket + $r_headers = ''; + do{ + if(time()-$start > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start), -100); + if(feof($socket)) + throw new HTTPClientException('Premature End of File (socket)'); + usleep(1000); + $r_headers .= fgets($socket,1024); + }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); + + $this->_debug('response headers',$r_headers); + + // check if expected body size exceeds allowance + if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ + if($match[1] > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Reported content length exceeds allowed response size'); + else + $this->error = 'Reported content length exceeds allowed response size'; + } } - } - // get Status - if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) { - $this->error = 'Server returned bad answer'; - unset(self::$connections[$connectionId]); - return false; - } - $this->status = $m[2]; - - // handle headers and cookies - $this->resp_headers = $this->_parseHeaders($r_headers); - if(isset($this->resp_headers['set-cookie'])){ - foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ - list($cookie) = explode(';',$cookie,2); - list($key,$val) = explode('=',$cookie,2); - $key = trim($key); - if($val == 'deleted'){ - if(isset($this->cookies[$key])){ - unset($this->cookies[$key]); + // get Status + if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) + throw new HTTPClientException('Server returned bad answer'); + + $this->status = $m[2]; + + // handle headers and cookies + $this->resp_headers = $this->_parseHeaders($r_headers); + if(isset($this->resp_headers['set-cookie'])){ + foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ + list($cookie) = explode(';',$cookie,2); + list($key,$val) = explode('=',$cookie,2); + $key = trim($key); + if($val == 'deleted'){ + if(isset($this->cookies[$key])){ + unset($this->cookies[$key]); + } + }elseif($key){ + $this->cookies[$key] = $val; } - }elseif($key){ - $this->cookies[$key] = $val; } } - } - $this->_debug('Object headers',$this->resp_headers); + $this->_debug('Object headers',$this->resp_headers); - // check server status code to follow redirect - if($this->status == 301 || $this->status == 302 ){ - // close the connection because we don't handle content retrieval here - // that's the easiest way to clean up the connection - fclose($socket); - unset(self::$connections[$connectionId]); + // check server status code to follow redirect + if($this->status == 301 || $this->status == 302 ){ + if (empty($this->resp_headers['location'])){ + throw new HTTPClientException('Redirect but no Location Header found'); + }elseif($this->redirect_count == $this->max_redirect){ + throw new HTTPClientException('Maximum number of redirects exceeded'); + }else{ + // close the connection because we don't handle content retrieval here + // that's the easiest way to clean up the connection + fclose($socket); + unset(self::$connections[$connectionId]); - if (empty($this->resp_headers['location'])){ - $this->error = 'Redirect but no Location Header found'; - return false; - }elseif($this->redirect_count == $this->max_redirect){ - $this->error = 'Maximum number of redirects exceeded'; - return false; - }else{ - $this->redirect_count++; - $this->referer = $url; - // handle non-RFC-compliant relative redirects - if (!preg_match('/^http/i', $this->resp_headers['location'])){ - if($this->resp_headers['location'][0] != '/'){ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - dirname($uri['path']).'/'.$this->resp_headers['location']; - }else{ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - $this->resp_headers['location']; + $this->redirect_count++; + $this->referer = $url; + // handle non-RFC-compliant relative redirects + if (!preg_match('/^http/i', $this->resp_headers['location'])){ + if($this->resp_headers['location'][0] != '/'){ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + dirname($uri['path']).'/'.$this->resp_headers['location']; + }else{ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + $this->resp_headers['location']; + } } + // perform redirected request, always via GET (required by RFC) + return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - // perform redirected request, always via GET (required by RFC) - return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - } - // check if headers are as expected - if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){ - $this->error = 'The received headers did not match the given regexp'; - unset(self::$connections[$connectionId]); - return false; - } + // check if headers are as expected + if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)) + throw new HTTPClientException('The received headers did not match the given regexp'); - //read body (with chunked encoding if needed) - $r_body = ''; - if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ - do { - $chunk_size = ''; + //read body (with chunked encoding if needed) + $r_body = ''; + if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ + stream_set_blocking($socket,1); do { - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset(self::$connections[$connectionId]); - return false; + $chunk_size = ''; + do { + if(feof($socket)) + throw new HTTPClientException('Premature End of File (socket)'); + if(time()-$start > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start), -100); + $byte = fread($socket,1); + $chunk_size .= $byte; + } while (preg_match('/^[a-zA-Z0-9]?$/',$byte)); // read chunksize including \r + + $byte = fread($socket,1); // readtrailing \n + $chunk_size = hexdec($chunk_size); + if ($chunk_size) { + $read_size = $chunk_size; + while ($read_size > 0) { + $this_chunk = fread($socket,$read_size); + $r_body .= $this_chunk; + $read_size -= strlen($this_chunk); + } + $byte = fread($socket,2); // read trailing \r\n + } + + if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Allowed response size exceeded'); + $this->error = 'Allowed response size exceeded'; + break; } + } while ($chunk_size); + stream_set_blocking($socket,0); + }else{ + // read entire socket + while (!feof($socket)) { if(time()-$start > $this->timeout){ $this->status = -100; - $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start); + $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); unset(self::$connections[$connectionId]); return false; } - $byte = fread($socket,1); - $chunk_size .= $byte; - } while (preg_match('/^[a-zA-Z0-9]?$/',$byte)); // read chunksize including \r - - $byte = fread($socket,1); // readtrailing \n - $chunk_size = hexdec($chunk_size); - if ($chunk_size) { - $read_size = $chunk_size; - while ($read_size > 0) { - $this_chunk = fread($socket,$read_size); - $r_body .= $this_chunk; - $read_size -= strlen($this_chunk); - } - $byte = fread($socket,2); // read trailing \r\n - } - - if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort){ - unset(self::$connections[$connectionId]); - return false; - } else { - break; + $r_body .= fread($socket,4096); + $r_size = strlen($r_body); + if($this->max_bodysize && $r_size > $this->max_bodysize){ + $this->error = 'Allowed response size exceeded'; + if ($this->max_bodysize_abort) { + unset(self::$connections[$connectionId]); + return false; + } else { + break; + } } - } - } while ($chunk_size); - }else{ - // read entire socket - while (!feof($socket)) { - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); - unset(self::$connections[$connectionId]); - return false; - } - $r_body .= fread($socket,4096); - $r_size = strlen($r_body); - if($this->max_bodysize && $r_size > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort) { - unset(self::$connections[$connectionId]); - return false; - } else { + if(isset($this->resp_headers['content-length']) && + !isset($this->resp_headers['transfer-encoding']) && + $this->resp_headers['content-length'] == $r_size){ + // we read the content-length, finish here break; } } - if(isset($this->resp_headers['content-length']) && - !isset($this->resp_headers['transfer-encoding']) && - $this->resp_headers['content-length'] == $r_size){ - // we read the content-length, finish here - break; - } } + + } catch (HTTPClientException $err) { + $this->error = $err->getMessage(); + if ($err->getCode()) + $this->status = $err->getCode(); + unset(self::$connections[$connectionId]); + fclose($socket); + return false; } if (!$this->keep_alive || -- cgit v1.2.3 From 62699eac09eab66c5c19413bf629daf9d5d6247d Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 17 Jun 2012 01:06:18 -0400 Subject: Utility functions for reading from a socket. Reading from a socket is handled by functions that encapsulate the error handling and timeout conditions. _readData reads blocks of data. _readLine reads a single line. --- inc/HTTPClient.php | 113 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 38 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index f11621f6a..ab41257bd 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -281,9 +281,6 @@ class HTTPClient { $headers['Proxy-Authorization'] = 'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass); } - // stop time - $start = time(); - // already connected? $connectionId = $this->_uniqueConnectionId($server,$port); $this->_debug('connection pool', self::$connections); @@ -333,8 +330,9 @@ class HTTPClient { $written = 0; while($written < $towrite){ // check timeout - if(time()-$start > $this->timeout) - throw new HTTPClientException(sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start), -100); + $time_used = $this->_time() - $this->start; + if($time_used > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while sending request (%.3fs)',$time_used), -100); // wait for stream ready or timeout (1sec) if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ @@ -355,13 +353,9 @@ class HTTPClient { // read headers from socket $r_headers = ''; do{ - if(time()-$start > $this->timeout) - throw new HTTPClientException(sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start), -100); - if(feof($socket)) - throw new HTTPClientException('Premature End of File (socket)'); - usleep(1000); - $r_headers .= fgets($socket,1024); - }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); + $r_line = $this->_readLine($socket, 'headers'); + $r_headers .= $r_line; + }while($r_line != "\r\n" && $r_line != "\n"); $this->_debug('response headers',$r_headers); @@ -436,28 +430,19 @@ class HTTPClient { //read body (with chunked encoding if needed) $r_body = ''; if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ - stream_set_blocking($socket,1); do { $chunk_size = ''; do { - if(feof($socket)) - throw new HTTPClientException('Premature End of File (socket)'); - if(time()-$start > $this->timeout) - throw new HTTPClientException(sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start), -100); - $byte = fread($socket,1); + $byte = $this->_readData($socket, 1, 'chunk'); $chunk_size .= $byte; } while (preg_match('/^[a-zA-Z0-9]?$/',$byte)); // read chunksize including \r - - $byte = fread($socket,1); // readtrailing \n + $byte = $this->_readData($socket, 1, 'chunk'); // readtrailing \n $chunk_size = hexdec($chunk_size); + + // TODO: validate max_bodysize here to avoid the costly read if ($chunk_size) { - $read_size = $chunk_size; - while ($read_size > 0) { - $this_chunk = fread($socket,$read_size); - $r_body .= $this_chunk; - $read_size -= strlen($this_chunk); - } - $byte = fread($socket,2); // read trailing \r\n + $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); + $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n } if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ @@ -467,24 +452,16 @@ class HTTPClient { break; } } while ($chunk_size); - stream_set_blocking($socket,0); }else{ // read entire socket while (!feof($socket)) { - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); - unset(self::$connections[$connectionId]); - return false; - } - $r_body .= fread($socket,4096); + $r_body .= $this->_readData($socket, 0, 'response', true); $r_size = strlen($r_body); if($this->max_bodysize && $r_size > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; if ($this->max_bodysize_abort) { - unset(self::$connections[$connectionId]); - return false; + throw new HTTPClientException('Allowed response size exceeded'); } else { + $this->error = 'Allowed response size exceeded'; break; } } @@ -532,6 +509,66 @@ class HTTPClient { return true; } + /** + * Safely read data from a socket + * + * Reads up to a given number of bytes or throws an exception if the + * response times out or ends prematurely. If the number of bytes to + * read is negative, then it will read up to the absolute value, but + * may read less. A value of 0 returns an arbitrarily sized block, + * and a positive value will return exactly that many bytes. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param int $nbytes Number of bytes to read + * @param string $message Description of what is being read + * @param bool $ignore_eof End-of-file is not an error if this is set + * @author Tom N Harris + */ + function _readData($socket, $nbytes, $message, $ignore_eof = false) { + $r_data = ''; + $to_read = $nbytes ? $nbytes : 4096; + if ($to_read < 0) $to_read = -$to_read; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + if(!$ignore_eof && feof($socket)) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + //usleep(1000); + $bytes = fread($socket, $to_read); + $r_data .= $bytes; + $to_read -= strlen($bytes); + } while (strlen($r_data) < $nbytes); + return $r_data; + } + + /** + * Safely read a \n-terminated line from a socket + * + * Always returns a complete line, including the terminating \n. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param string $message Description of what is being read + * @author Tom N Harris + */ + function _readLine($socket, $message) { + $r_data = ''; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + if(feof($socket)) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + usleep(1000); + $r_data .= fgets($socket, 1024); + } while (!preg_match('/\n$/',$r_data)); + return $r_data; + } + /** * print debug info * -- cgit v1.2.3 From 50d1968dceb92179b9a581e34a84d516b81511ce Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 19 Jun 2012 22:40:39 -0400 Subject: Utility function for writing to a socket --- inc/HTTPClient.php | 71 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 32 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index ab41257bd..ea9b42862 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -308,8 +308,8 @@ class HTTPClient { } try { - //set blocking - stream_set_blocking($socket,1); + //set non-blocking + stream_set_blocking($socket, false); // build request $request = "$method $request_url HTTP/".$this->http.HTTP_NL; @@ -319,36 +319,7 @@ class HTTPClient { $request .= $data; $this->_debug('request',$request); - - // select parameters - $sel_r = null; - $sel_w = array($socket); - $sel_e = null; - - // send request - $towrite = strlen($request); - $written = 0; - while($written < $towrite){ - // check timeout - $time_used = $this->_time() - $this->start; - if($time_used > $this->timeout) - throw new HTTPClientException(sprintf('Timeout while sending request (%.3fs)',$time_used), -100); - - // wait for stream ready or timeout (1sec) - if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ - usleep(1000); - continue; - } - - // write to stream - $ret = fwrite($socket, substr($request,$written,4096)); - if($ret === false) - throw new HTTPClientException('Failed writing to socket', -100); - $written += $ret; - } - - // continue non-blocking - stream_set_blocking($socket,0); + $this->_sendData($socket, $request, 'request'); // read headers from socket $r_headers = ''; @@ -509,6 +480,42 @@ class HTTPClient { return true; } + /** + * Safely write data to a socket + * + * @param handle $socket An open socket handle + * @param string $data The data to write + * @param string $message Description of what is being read + * @author Tom N Harris + */ + function _sendData($socket, $data, $message) { + // select parameters + $sel_r = null; + $sel_w = array($socket); + $sel_e = null; + + // send request + $towrite = strlen($data); + $written = 0; + while($written < $towrite){ + // check timeout + $time_used = $this->_time() - $this->start; + if($time_used > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while sending %s (%.3fs)',$message, $time_used), -100); + if(feof($socket)) + throw new HTTPClientException("Socket disconnected while writing $message"); + + // wait for stream ready or timeout + if(@stream_select($sel_r, $sel_w, $sel_e, $this->timeout - $time_used) !== false){ + // write to stream + $nbytes = fwrite($socket, substr($data,$written,4096)); + if($nbytes === false) + throw new HTTPClientException("Failed writing to socket while sending $message", -100); + $written += $nbytes; + } + } + } + /** * Safely read data from a socket * -- cgit v1.2.3 From 288188afa98cd0ff65b2c2bf529fba0bff15f634 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 19 Jun 2012 23:42:00 -0400 Subject: HTTP headers are already parsed, there is no need for regexp --- inc/HTTPClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index ea9b42862..534ba220c 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -400,7 +400,8 @@ class HTTPClient { //read body (with chunked encoding if needed) $r_body = ''; - if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ + if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked') + || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ do { $chunk_size = ''; do { -- cgit v1.2.3 From 24f112d0c2604958ac73923f758d9d37f229ff11 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 20 Jun 2012 00:52:10 -0400 Subject: Efficiently wait on sockets --- inc/HTTPClient.php | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 534ba220c..f6ab91f4f 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -507,7 +507,8 @@ class HTTPClient { throw new HTTPClientException("Socket disconnected while writing $message"); // wait for stream ready or timeout - if(@stream_select($sel_r, $sel_w, $sel_e, $this->timeout - $time_used) !== false){ + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ // write to stream $nbytes = fwrite($socket, substr($data,$written,4096)); if($nbytes === false) @@ -533,6 +534,11 @@ class HTTPClient { * @author Tom N Harris */ function _readData($socket, $nbytes, $message, $ignore_eof = false) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + $r_data = ''; $to_read = $nbytes ? $nbytes : 4096; if ($to_read < 0) $to_read = -$to_read; @@ -544,10 +550,16 @@ class HTTPClient { -100); if(!$ignore_eof && feof($socket)) throw new HTTPClientException("Premature End of File (socket) while reading $message"); - //usleep(1000); - $bytes = fread($socket, $to_read); - $r_data .= $bytes; - $to_read -= strlen($bytes); + + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + $bytes = fread($socket, $to_read); + if($bytes === false) + throw new HTTPClientException("Failed reading from socket while reading $message", -100); + $r_data .= $bytes; + $to_read -= strlen($bytes); + } } while (strlen($r_data) < $nbytes); return $r_data; } @@ -562,6 +574,11 @@ class HTTPClient { * @author Tom N Harris */ function _readLine($socket, $message) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + $r_data = ''; do { $time_used = $this->_time() - $this->start; @@ -571,8 +588,12 @@ class HTTPClient { -100); if(feof($socket)) throw new HTTPClientException("Premature End of File (socket) while reading $message"); - usleep(1000); - $r_data .= fgets($socket, 1024); + + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + $r_data = fgets($socket, 1024); + } } while (!preg_match('/\n$/',$r_data)); return $r_data; } @@ -597,11 +618,19 @@ class HTTPClient { /** * Return current timestamp in microsecond resolution */ - function _time(){ + static function _time(){ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } + /** + * Calculate seconds and microseconds + */ + static function selecttimeout($time, &$sec, &$usec){ + $sec = floor($time); + $usec = (int)(($time - $sec) * 1000000); + } + /** * convert given header string to Header array * -- cgit v1.2.3 From fbf63b6e769b92fc1964c09132dfc937910d04f3 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 20 Jun 2012 01:29:15 -0400 Subject: Validate the size of a chunk before reading from the socket --- inc/HTTPClient.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index f6ab91f4f..901c46ec9 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -404,25 +404,26 @@ class HTTPClient { || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ do { $chunk_size = ''; - do { - $byte = $this->_readData($socket, 1, 'chunk'); + while (preg_match('/^[a-zA-Z0-9]?$/',$byte=$this->_readData($socket,1,'chunk'))){ + // read chunksize until \r $chunk_size .= $byte; - } while (preg_match('/^[a-zA-Z0-9]?$/',$byte)); // read chunksize including \r + if (strlen($chunk_size) > 128) // set an abritrary limit on the size of chunks + throw new HTTPClientException('Allowed response size exceeded'); + } $byte = $this->_readData($socket, 1, 'chunk'); // readtrailing \n $chunk_size = hexdec($chunk_size); - // TODO: validate max_bodysize here to avoid the costly read - if ($chunk_size) { - $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); - $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n - } - - if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ + if($this->max_bodysize && $chunk_size+strlen($r_body) > $this->max_bodysize){ if ($this->max_bodysize_abort) throw new HTTPClientException('Allowed response size exceeded'); $this->error = 'Allowed response size exceeded'; break; } + + if ($chunk_size) { + $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); + $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n + } } while ($chunk_size); }else{ // read entire socket -- cgit v1.2.3 From 769b429a77368df14e3753f624466f658e971df6 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 20 Jun 2012 03:00:18 -0400 Subject: HTTPClient will read up to max_bodysize if it can --- inc/HTTPClient.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 901c46ec9..b5e665cb1 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -402,6 +402,7 @@ class HTTPClient { $r_body = ''; if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked') || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ + $abort = false; do { $chunk_size = ''; while (preg_match('/^[a-zA-Z0-9]?$/',$byte=$this->_readData($socket,1,'chunk'))){ @@ -417,18 +418,19 @@ class HTTPClient { if ($this->max_bodysize_abort) throw new HTTPClientException('Allowed response size exceeded'); $this->error = 'Allowed response size exceeded'; - break; + $chunk_size = $this->max_bodysize - strlen($r_body); + $abort = true; } - if ($chunk_size) { + if ($chunk_size > 0) { $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n } - } while ($chunk_size); + } while ($chunk_size && !$abort); }else{ // read entire socket while (!feof($socket)) { - $r_body .= $this->_readData($socket, 0, 'response', true); + $r_body .= $this->_readData($socket, -$this->max_bodysize, 'response', true); $r_size = strlen($r_body); if($this->max_bodysize && $r_size > $this->max_bodysize){ if ($this->max_bodysize_abort) { -- cgit v1.2.3 From b3b97ef358f9141bc1f1b3ebec799a0ad0771f7e Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 20 Jun 2012 03:11:57 -0400 Subject: Skip over chunk extensions that nobody uses because RFC2616 says so --- inc/HTTPClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index b5e665cb1..73f5b89b4 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -411,7 +411,7 @@ class HTTPClient { if (strlen($chunk_size) > 128) // set an abritrary limit on the size of chunks throw new HTTPClientException('Allowed response size exceeded'); } - $byte = $this->_readData($socket, 1, 'chunk'); // readtrailing \n + $this->_readLine($socket, 'chunk'); // readtrailing \n $chunk_size = hexdec($chunk_size); if($this->max_bodysize && $chunk_size+strlen($r_body) > $this->max_bodysize){ -- cgit v1.2.3 From b16544225947102f664769aaeb02bd59a25fbaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Fri, 22 Jun 2012 09:56:20 +0200 Subject: Korean language update --- inc/lang/ko/backlinks.txt | 2 +- inc/lang/ko/conflict.txt | 2 +- inc/lang/ko/diff.txt | 4 +-- inc/lang/ko/draft.txt | 4 +-- inc/lang/ko/edit.txt | 3 +- inc/lang/ko/install.html | 10 +++--- inc/lang/ko/lang.php | 72 +++++++++++++++++++++---------------------- inc/lang/ko/mailtext.txt | 2 +- inc/lang/ko/preview.txt | 2 +- inc/lang/ko/read.txt | 2 +- inc/lang/ko/register.txt | 2 +- inc/lang/ko/resetpwd.txt | 2 +- inc/lang/ko/revisions.txt | 4 +-- inc/lang/ko/searchpage.txt | 2 +- inc/lang/ko/subscr_digest.txt | 3 +- inc/lang/ko/subscr_list.txt | 3 +- inc/lang/ko/subscr_single.txt | 2 +- inc/lang/ko/uploadmail.txt | 2 +- 18 files changed, 60 insertions(+), 63 deletions(-) (limited to 'inc') diff --git a/inc/lang/ko/backlinks.txt b/inc/lang/ko/backlinks.txt index 5c512e19d..ce77ca5a7 100644 --- a/inc/lang/ko/backlinks.txt +++ b/inc/lang/ko/backlinks.txt @@ -1,3 +1,3 @@ -====== 이전 링크 ====== +====== 가리키는 링크 ====== 현재 문서를 가리키는 링크가 있는 문서 목록입니다. diff --git a/inc/lang/ko/conflict.txt b/inc/lang/ko/conflict.txt index bd41ebf75..43988a62b 100644 --- a/inc/lang/ko/conflict.txt +++ b/inc/lang/ko/conflict.txt @@ -2,4 +2,4 @@ 편집한 문서의 새 버전이 있습니다. 당신이 편집하고 있는 동안 다른 사람이 같은 파일을 편집하였을 경우 이런 일이 생길 수 있습니다. -아래의 차이점을 철저하게 검토하고 어떤 버전을 저장하실지 결정하십시오. **저장**을 선택하시면, 당신의 버전이 저장됩니다. **취소** 를 선택하시면 현재 버전이 유지됩니다. \ No newline at end of file +아래의 차이를 철저하게 검토하고 어떤 버전을 저장하실지 결정하십시오. **저장**을 선택하면, 당신의 버전이 저장됩니다. **취소**를 선택하면 현재 버전이 유지됩니다. \ No newline at end of file diff --git a/inc/lang/ko/diff.txt b/inc/lang/ko/diff.txt index 29189e9f0..76b488d90 100644 --- a/inc/lang/ko/diff.txt +++ b/inc/lang/ko/diff.txt @@ -1,3 +1,3 @@ -====== 차이점 ====== +====== 차이 ====== -이 문서의 선택한 이전 버전과 현재 버전 사이의 차이점을 보여줍니다. \ No newline at end of file +이 문서의 선택한 이전 버전과 현재 버전 사이의 차이를 보여줍니다. \ No newline at end of file diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt index a20bfb535..861834e5d 100644 --- a/inc/lang/ko/draft.txt +++ b/inc/lang/ko/draft.txt @@ -1,5 +1,5 @@ -====== 문서 초안이 있습니다. ====== +====== 문서 초안 있음 ====== 이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용하여 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다. -비정상적으로 끝난 편집 세션을 //복구//할지 여부를 결정하고, 자동으로 저장되었던 초안을 //삭제//하거나 편집 과정을 취소하기 바랍니다. \ No newline at end of file +비정상적으로 끝난 편집 세션을 **복구**할지 여부를 결정하고, 자동으로 저장되었던 초안을 **삭제**하거나 편집 과정을 **취소**하기 바랍니다. \ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index 606c8429c..f52326a33 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1,2 +1 @@ -문서를 편집하고 **저장**을 누르세요. 위키 구문은 [[wiki:syntax]] 또는 [[wiki:ko_syntax|(한국어) 구문]]을 참고하세요. 이 문서를 **더 낫게 만들 자신이 있을** 때에만 편집하십시오. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. - +문서를 편집하고 **저장**을 누르세요. 위키 구문은 [[wiki:syntax]] 또는 [[wiki:ko_syntax|(한국어) 구문]]을 참고하세요. 이 문서를 **더 좋게 만들 자신이 있을 때**에만 편집하세요. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index 6113d38b1..f73b91294 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -8,8 +8,8 @@

현재 설치 과정중에 관리자로 로그인 후 DokuWiki의 관리 메뉴(플러그인 설치, 사용자 관리, 위키 문서 접근 권한 관리, 옵션 설정)를 가능하게 ACL에 대한 환경 설정을 수행합니다. 이 것은 DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.

-

숙련된 사용자들이나 특별한 설치 과정이 필요한 경우에 다음 링크들을 참고하기 바랍니다: -설치 과정(한국어) -과 환경 설정(한국어), -설치 과정(영어) -과 환경 설정(영어)

+

숙련된 사용자나 특별한 설치 과정이 필요한 경우에 다음 링크를 참고하기 바랍니다: +설치 과정 (한국어) +과 환경 설정 (한국어), +설치 과정 (영어) +과 환경 설정 (영어)

diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 469e85bd6..7b4e30a49 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -40,7 +40,7 @@ $lang['btn_admin'] = '관리'; $lang['btn_update'] = '변경'; $lang['btn_delete'] = '삭제'; $lang['btn_back'] = '뒤로'; -$lang['btn_backlink'] = '이전 링크'; +$lang['btn_backlink'] = '가리키는 링크'; $lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기'; $lang['btn_subscribe'] = '구독 관리'; $lang['btn_profile'] = '개인 정보 변경'; @@ -66,21 +66,21 @@ $lang['profile'] = '개인 정보'; $lang['badlogin'] = '잘못된 사용자 이름이거나 비밀번호입니다.'; $lang['minoredit'] = '사소한 바뀜'; $lang['draftdate'] = '문서 초안 자동 저장 시간'; -$lang['nosecedit'] = '문서가 수정되어 세션 정보가 달라져 문서 전부를 다시 읽습니다.'; +$lang['nosecedit'] = '문서가 수정되어 세션 정보의 유효 시간이 지나 문서 전부를 다시 읽습니다.'; $lang['regmissing'] = '모든 항목을 입력해야 합니다.'; $lang['reguexists'] = '같은 이름을 사용하는 사용자가 있습니다.'; $lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.'; $lang['regsuccess2'] = '사용자를 만들었습니다.'; $lang['regmailfail'] = '비밀번호를 이메일로 전송할 때 오류가 발생했습니다. 관리자에게 문의하기 바랍니다!'; -$lang['regbadmail'] = '이메일 주소가 잘못됐습니다. - 오류라고 생각하면 관리자에게 문의하기 바랍니다.'; -$lang['regbadpass'] = '새 비밀번호들이 일치하지 않습니다. 다시 입력하기 바랍니다.'; +$lang['regbadmail'] = '이메일 주소가 잘못됐습니다 - 오류라고 생각하면 관리자에게 문의하기 바랍니다.'; +$lang['regbadpass'] = '새 비밀번호가 일치하지 않습니다. 다시 입력하기 바랍니다.'; $lang['regpwmail'] = 'DokuWiki 비밀번호'; -$lang['reghere'] = '아직 등록하지 않았다면 등록하기 바랍니다.'; -$lang['profna'] = '이 위키는 개인 정보 수정을 허용하지 않습니다.'; +$lang['reghere'] = '계정이 없나요? 계정을 등록할 수 있습니다'; +$lang['profna'] = '이 위키는 개인 정보 수정을 허용하지 않습니다'; $lang['profnochange'] = '바뀐 사항이 없습니다.'; $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니다.'; $lang['profchanged'] = '개인 정보가 성공적으로 바뀌었습니다.'; -$lang['pwdforget'] = '비밀번호를 잊어버렸나요? 새로 발급받을 수 있습니다.'; +$lang['pwdforget'] = '비밀번호를 잊으셨나요? 새로 발급받을 수 있습니다'; $lang['resendna'] = '이 위키는 비밀번호 재발급을 지원하지 않습니다.'; $lang['resendpwd'] = '다음으로 새 비밀번호 전송'; $lang['resendpwdmissing'] = '모든 비밀번호를 입력해야 합니다.'; @@ -88,12 +88,12 @@ $lang['resendpwdnouser'] = '등록된 사용자가 아닙니다.'; $lang['resendpwdbadauth'] = '인증 코드가 잘못됐습니다. 잘못된 링크인지 확인 바랍니다.'; $lang['resendpwdconfirm'] = '확인 링크를 이메일로 보냈습니다.'; $lang['resendpwdsuccess'] = '새로운 비밀번호를 이메일로 보냈습니다.'; -$lang['license'] = '이 위키의 내용은 다음의 라이선스에 따릅니다:'; +$lang['license'] = '별도로 라이선스를 알리지 않을 경우, 이 위키의 내용은 다음의 라이선스에 따릅니다:'; $lang['licenseok'] = '참고: 이 문서를 편집할 경우 다음의 라이선스에 동의함을 의미합니다:'; $lang['searchmedia'] = '파일 이름 찾기:'; $lang['searchmedia_in'] = '%s에서 찾기'; -$lang['txt_upload'] = '올릴 파일을 선택합니다.'; -$lang['txt_filename'] = '올릭 파일 이름을 입력합니다. (선택 사항)'; +$lang['txt_upload'] = '올릴 파일 선택'; +$lang['txt_filename'] = '올릴 파일 이름 입력 (선택 사항)'; $lang['txt_overwrt'] = '이전 파일을 새로운 파일로 덮어쓰기'; $lang['maxuploadsize'] = '최대 올리기 용량. 파일당 %s'; $lang['lockedby'] = '현재 잠겨진 사용자'; @@ -124,7 +124,7 @@ $lang['js']['medialeft'] = '왼쪽 배치'; $lang['js']['mediaright'] = '오른쪽 배치'; $lang['js']['mediacenter'] = '가운데 배치'; $lang['js']['medianoalign'] = '배치 없음'; -$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인터넷 익스플로러에서만 동작합니다.\n그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; +$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 마이크로소프트 인터넷 익스플로러에서만 동작합니다.\n그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; $lang['js']['linkwiz'] = '링크 마법사'; $lang['js']['linkto'] = '다음으로 연결:'; $lang['js']['del_confirm'] = '정말 선택된 항목을 삭제하겠습니까?'; @@ -133,7 +133,7 @@ $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_select'] = '파일 선택…'; $lang['js']['media_upload_btn'] = '올리기'; $lang['js']['media_done_btn'] = '완료'; $lang['js']['media_drop'] = '올릴 파일을 끌어넣으세요'; @@ -147,24 +147,24 @@ $lang['uploadsucc'] = '올리기 성공'; $lang['uploadfail'] = '올리기 실패. 잘못된 권한 때문일지도 모릅니다.'; $lang['uploadwrong'] = '올리기 거부. 금지된 확장자입니다!'; $lang['uploadexist'] = '파일이 이미 존재합니다.'; -$lang['uploadbadcontent'] = '올린 파일이 파일 확장자 %s와 일치하지 않습니다.'; +$lang['uploadbadcontent'] = '올린 파일이 %s 파일 확장자와 일치하지 않습니다.'; $lang['uploadspam'] = '스팸 차단 목록이 올리기를 취소했습니다.'; $lang['uploadxss'] = '악성 코드의 가능성이 있어 올리기를 취소했습니다.'; $lang['uploadsize'] = '올린 파일이 너무 큽니다. (최대 %s)'; $lang['deletesucc'] = '"%s" 파일이 삭제되었습니다.'; -$lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다. - 삭제 권한이 있는지 확인하기 바랍니다.'; -$lang['mediainuse'] = '"%s" 파일을 삭제할 수 없습니다. - 아직 사용 중입니다.'; +$lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다 - 삭제 권한이 있는지 확인하기 바랍니다.'; +$lang['mediainuse'] = '"%s" 파일을 삭제할 수 없습니다 - 아직 사용 중입니다.'; $lang['namespaces'] = '이름공간'; $lang['mediafiles'] = '사용 가능한 파일 목록'; $lang['accessdenied'] = '이 문서를 볼 권한이 없습니다.'; $lang['mediausage'] = '이 파일을 참고하려면 다음 문법을 사용하기 바랍니다:'; $lang['mediaview'] = '원본 파일 보기'; -$lang['mediaroot'] = '루트(root)'; -$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 파일 이름 앞에 콜론(:)으로 구분되는 이름을 붙이면 됩니다.'; -$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s으로 바뀌었습니다!'; +$lang['mediaroot'] = '루트 (root)'; +$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 콜론(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭하여 선택할 수 있습니다.'; +$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s(으)로 바뀌었습니다!'; $lang['reference'] = '참고'; $lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:'; -$lang['ref_hidden'] = '문서의 일부 참고는 읽을 수 있는 권한이 없습니다.'; +$lang['ref_hidden'] = '문서의 일부 참고는 읽을 수 있는 권한이 없습니다'; $lang['hits'] = '조회 수'; $lang['quickhits'] = '일치하는 문서 이름'; $lang['toc'] = '목차'; @@ -186,19 +186,19 @@ $lang['created'] = '새로 만듦'; $lang['restored'] = '이전 버전 복구 (%s)'; $lang['external_edit'] = '외부 편집기'; $lang['summary'] = '편집 요약'; -$lang['noflash'] = '이 컨텐츠를 표시하기 위해서 Adobe Flash 플러그인이 필요합니다.'; +$lang['noflash'] = '이 콘텐츠를 표시하기 위해서 Adobe Flash 플러그인이 필요합니다.'; $lang['download'] = '조각 다운로드'; $lang['tools'] = '도구'; $lang['user_tools'] = '사용자 도구'; $lang['site_tools'] = '사이트 도구'; $lang['page_tools'] = '문서 도구'; -$lang['skip_to_content'] = '컨텐츠 넘기기'; +$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['changes_type'] = '차이 보기'; $lang['pages_changes'] = '문서'; $lang['media_changes'] = '미디어 파일'; $lang['both_changes'] = '미디어 파일과 문서 모두'; @@ -212,7 +212,7 @@ $lang['qb_h2'] = '2단계 문단 제목'; $lang['qb_h3'] = '3단계 문단 제목'; $lang['qb_h4'] = '4단계 문단 제목'; $lang['qb_h5'] = '5단계 문단 제목'; -$lang['qb_h'] = '제목'; +$lang['qb_h'] = '문단 제목'; $lang['qb_hs'] = '문단 제목 선택'; $lang['qb_hplus'] = '상위 문단 제목'; $lang['qb_hminus'] = '하위 문단 제목'; @@ -259,15 +259,15 @@ $lang['subscr_m_unsubscribe'] = '구독 취소'; $lang['subscr_m_subscribe'] = '구독'; $lang['subscr_m_receive'] = '받기'; $lang['subscr_style_every'] = '모든 바뀜을 이메일로 받기'; -$lang['subscr_style_digest'] = '각 문서의 바뀜을 요약 (매 %.2f 일 마다)'; -$lang['subscr_style_list'] = '마지막 이메일 이후 바뀐 문서의 목록 (매 %.2f 일 마다)'; +$lang['subscr_style_digest'] = '각 문서의 바뀜을 요약 (매 %.2f일 마다)'; +$lang['subscr_style_list'] = '마지막 이메일 이후 바뀐 문서의 목록 (매 %.2f일 마다)'; $lang['authmodfailed'] = '잘못된 사용자 인증 설정입니다. 관리자에게 문의하기 바랍니다.'; $lang['authtempfail'] = '사용자 인증이 일시적으로 불가능합니다. 만일 계속해서 문제가 발생하면 관리자에게 문의하기 바랍니다.'; -$lang['authpwdexpire'] = '현재 비밀번호를 설정한지 %d 일이 지났습니다. 새로 설정해주시기 바랍니다.'; +$lang['authpwdexpire'] = '현재 비밀번호를 설정한지 %d일이 지났습니다. 새로 설정해주시기 바랍니다.'; $lang['i_chooselang'] = '사용할 언어를 선택하세요'; $lang['i_installer'] = 'DokuWiki 설치'; $lang['i_wikiname'] = '위키 이름'; -$lang['i_enableacl'] = 'ACL 기능 사용 (권장 사항)'; +$lang['i_enableacl'] = 'ACL 기능 사용 (권장)'; $lang['i_superuser'] = '슈퍼 유저'; $lang['i_problems'] = '설치 중 아래와 같은 문제가 발생했습니다. 문제를 해결한 후 설치를 계속하기 바랍니다.'; $lang['i_modified'] = '보안 상의 이유로 이 스크립트는 수정되지 않은 새 Dokuwiki 설치에서만 동작됩니다. @@ -287,14 +287,14 @@ $lang['i_pol1'] = '공개 위키 (누구나 읽을 수 있지만, $lang['i_pol2'] = '닫힌 위키 (등록된 사용자만 읽기, 쓰기, 업로드가 가능합니다.)'; $lang['i_retry'] = '다시 시도'; $lang['i_license'] = '내용을 배포하기 위한 라이선스를 선택하세요:'; -$lang['recent_global'] = '%s 이름공간을 구독 중입니다. 전체 위키 최근 바뀜도 볼 수 있습니다.'; -$lang['years'] = '%d 년 전'; -$lang['months'] = '%d 개월 전'; -$lang['weeks'] = '%d 주 전'; -$lang['days'] = '%d 일 전'; -$lang['hours'] = '%d 시간 전'; -$lang['minutes'] = '%d 분 전'; -$lang['seconds'] = '%d 초 전'; +$lang['recent_global'] = '%s 이름공간을 구독 중입니다. 전체 위키의 최근 바뀜도 볼 수 있습니다.'; +$lang['years'] = '%d년 전'; +$lang['months'] = '%d개월 전'; +$lang['weeks'] = '%d주 전'; +$lang['days'] = '%d일 전'; +$lang['hours'] = '%d시간 전'; +$lang['minutes'] = '%d분 전'; +$lang['seconds'] = '%d초 전'; $lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장되지 않았습니다.'; $lang['media_uploadtab'] = '올리기'; $lang['media_searchtab'] = '찾기'; @@ -319,4 +319,4 @@ $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/ko/mailtext.txt b/inc/lang/ko/mailtext.txt index ead9d5695..219fe6e0b 100644 --- a/inc/lang/ko/mailtext.txt +++ b/inc/lang/ko/mailtext.txt @@ -1,4 +1,4 @@ -DokuWiki 문서가 추가 또는 변경되었습니다. 제세한 정보는 다음과 같습니다: +DokuWiki 문서가 추가 또는 변경되었습니다. 자세한 정보는 다음과 같습니다: 날짜 : @DATE@ 브라우저 : @BROWSER@ diff --git a/inc/lang/ko/preview.txt b/inc/lang/ko/preview.txt index fec01dc43..6563874ee 100644 --- a/inc/lang/ko/preview.txt +++ b/inc/lang/ko/preview.txt @@ -1,3 +1,3 @@ ====== 미리 보기 ====== -이것은 입력한 내용이 어떻게 보일지 미리 보여줍니다. 아직 **저장되지 않았다**는 점을 기억하십시오! \ No newline at end of file +이것은 입력한 내용이 어떻게 보일지 미리 보여줍니다. 아직 **저장되지 않았다**는 점을 기억해두십시오! \ No newline at end of file diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt index 2daa39060..9b2ec822f 100644 --- a/inc/lang/ko/read.txt +++ b/inc/lang/ko/read.txt @@ -1,2 +1,2 @@ -이 문서는 읽기 전용입니다. 소스를 볼 수는 있지만, 수정할 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하십시오. +이 문서는 읽기 전용입니다. 내용을 볼 수는 있지만, 수정할 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하십시오. diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt index e60368a74..6509bed91 100644 --- a/inc/lang/ko/register.txt +++ b/inc/lang/ko/register.txt @@ -1,3 +1,3 @@ ====== 새 사용자 등록 ====== -이 위키에 새 계정을 만드려면 아래의 모든 내용을 입력하세요. **올바른 이메일 주소**를 사용하세요. 비밀번호를 입력하는 곳이 없다면 비밀번호는 이 이메일로 보내집니다. 사용자 이름은 올바른 [[doku>pagename|pagename]] 이어야 합니다. \ No newline at end of file +이 위키에 새 계정을 만드려면 아래의 모든 내용을 입력하세요. **올바른 이메일 주소**를 사용하세요. 비밀번호를 입력하는 곳이 없다면 비밀번호는 이 이메일로 보내집니다. 사용자 이름은 올바른 [[doku>pagename|pagename]]이어야 합니다. \ No newline at end of file diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt index bea380f83..ed909456f 100644 --- a/inc/lang/ko/resetpwd.txt +++ b/inc/lang/ko/resetpwd.txt @@ -1,3 +1,3 @@ ====== 새 비밀번호 설정 ====== -이 위키의 계정의 새 비밀번호를 입력하세요. \ No newline at end of file +이 위키 계정의 새 비밀번호를 입력하세요. \ No newline at end of file diff --git a/inc/lang/ko/revisions.txt b/inc/lang/ko/revisions.txt index 639b36c00..64733d86d 100644 --- a/inc/lang/ko/revisions.txt +++ b/inc/lang/ko/revisions.txt @@ -1,3 +1,3 @@ -====== 이전 판 ====== +====== 이전 버전 ====== -이 문서의 이전 판은 다음과 같습니다. 이전 판으로 돌아가려면, 아래에서 선택한 다음 **문서 편집**을 클릭하고 나서 저장하세요. \ No newline at end of file +이 문서의 이전 버전은 다음과 같습니다. 이전 버전으로 돌아가려면, 아래에서 선택한 다음 **문서 편집**을 클릭하고 나서 저장하세요. \ No newline at end of file diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 92faeb010..2e8502b13 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 찾기 ====== -아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 것을 찾지 못하였다면, **해당 버튼**을 사용하여 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다. +아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 것을 찾지 못하였다면, **문서 만들기**나 **문서 편집** 버튼을 사용하여 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다. ===== 결과 ===== \ No newline at end of file diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt index 667d0ce2c..13459428f 100644 --- a/inc/lang/ko/subscr_digest.txt +++ b/inc/lang/ko/subscr_digest.txt @@ -1,8 +1,7 @@ 안녕하세요! @TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. - -차이점은 다음과 같습니다: +바뀐 점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt index a3709cbd4..68adf0de9 100644 --- a/inc/lang/ko/subscr_list.txt +++ b/inc/lang/ko/subscr_list.txt @@ -1,8 +1,7 @@ 안녕하세요! @TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. - -차이점은 다음과 같습니다: +바뀐 점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt index 23973ed99..6bd1885e6 100644 --- a/inc/lang/ko/subscr_single.txt +++ b/inc/lang/ko/subscr_single.txt @@ -1,7 +1,7 @@ 안녕하세요! @TITLE@ 위키의 @PAGE@ 문서가 바뀌었습니다. -차이점은 다음과 같습니다: +바뀐 점은 다음과 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/uploadmail.txt b/inc/lang/ko/uploadmail.txt index 8195c189a..675c0bd3f 100644 --- a/inc/lang/ko/uploadmail.txt +++ b/inc/lang/ko/uploadmail.txt @@ -1,4 +1,4 @@ -DokuWiki가 파일을 올렸습니다. +DokuWiki가 파일을 올렸습니다. 자세한 정보는 다음과 같습니다: 파일 : @MEDIA@ 이전 버전 : @OLD@ -- cgit v1.2.3 From 1731f979e843c43888c2c26142db87b4801bd98e Mon Sep 17 00:00:00 2001 From: Nguyen The Hung Date: Fri, 22 Jun 2012 10:01:44 +0200 Subject: Vietnamese language update --- inc/lang/vi/backlinks.txt | 4 +- inc/lang/vi/conflict.txt | 2 +- inc/lang/vi/denied.txt | 2 +- inc/lang/vi/edit.txt | 2 +- inc/lang/vi/editrev.txt | 2 +- inc/lang/vi/lang.php | 186 ++++++++++++++++++++++++++++++++++++++++++--- inc/lang/vi/login.txt | 2 +- inc/lang/vi/mailtext.txt | 2 +- inc/lang/vi/newpage.txt | 2 +- inc/lang/vi/norev.txt | 2 +- inc/lang/vi/password.txt | 2 +- inc/lang/vi/preview.txt | 2 +- inc/lang/vi/read.txt | 2 +- inc/lang/vi/revisions.txt | 2 +- inc/lang/vi/searchpage.txt | 2 +- 15 files changed, 189 insertions(+), 27 deletions(-) (limited to 'inc') diff --git a/inc/lang/vi/backlinks.txt b/inc/lang/vi/backlinks.txt index 231ab5d8c..eee624d96 100644 --- a/inc/lang/vi/backlinks.txt +++ b/inc/lang/vi/backlinks.txt @@ -1,3 +1,3 @@ -====== Nối về trước ====== +====== Liên kết đến trang vừa xem ====== -Đây là danh sách các trang hình như đã nối vào trang này. +Đây là danh sách các trang có liên kết đến trang vừa xem. diff --git a/inc/lang/vi/conflict.txt b/inc/lang/vi/conflict.txt index 0df1ddbe4..646dcbc45 100644 --- a/inc/lang/vi/conflict.txt +++ b/inc/lang/vi/conflict.txt @@ -2,4 +2,4 @@ Trang bạn đang biên soạn có một phiên bản mới hơn. Việc này xảy ra khi một bạn đổi trang ấy khi bạn đang biên soạn trang này. -Xem kỹ những thay đổi dưới đây, rồi quyết định giữ phiên bản nào. Nếu chọn ''bảo lưu'', phiên bản của bạn được giữ lại. Bấm ''huỷ'' để giữ phiên bản kia. +Xem kỹ những thay đổi dưới đây, rồi quyết định giữ phiên bản nào. Nếu chọn ''Lưu'', phiên bản của bạn được giữ lại. Bấm ''huỷ'' để giữ phiên bản kia. diff --git a/inc/lang/vi/denied.txt b/inc/lang/vi/denied.txt index e70ed5d5f..35acaeb62 100644 --- a/inc/lang/vi/denied.txt +++ b/inc/lang/vi/denied.txt @@ -1,3 +1,3 @@ ====== Không được phép vào ====== -Rất tiếc là bạn không được phép để tiếp tục. Bạn quen đăng nhập hay sao? +Rất tiếc là bạn không được phép để tiếp tục. Bạn quên đăng nhập hay sao? diff --git a/inc/lang/vi/edit.txt b/inc/lang/vi/edit.txt index b00316a7c..1c16f903c 100644 --- a/inc/lang/vi/edit.txt +++ b/inc/lang/vi/edit.txt @@ -1 +1 @@ -Biên soạn trang này và bấm ''Bảo lưu''. Xem [[wiki:syntax]] về cú pháp của Wiki. Xin bạn biên soạn trang này nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thí nghiệm, bạn có thể tập những bước đầu ở [[playground:playground]]. +Biên soạn trang này và bấm ''Lưu''. Xem [[wiki:syntax:vi|cú pháp của Wiki]] để biết cách soạn thảo. Xin bạn biên soạn trang này nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thử nghiệm, bạn có thể thử ở [[playground:playground| chỗ thử]]. diff --git a/inc/lang/vi/editrev.txt b/inc/lang/vi/editrev.txt index 076466c06..8a2031c4d 100644 --- a/inc/lang/vi/editrev.txt +++ b/inc/lang/vi/editrev.txt @@ -1,2 +1,2 @@ -**Bạn đã nạp một phiên bản cũ của văn kiện!** Nếu bảo lưu, bạn sẽ tạo phiên bản với dữ kiện này. +**Bạn đã nạp một phiên bản cũ của văn bản!** Nếu lưu nó, bạn sẽ tạo phiên bản mới với dữ kiện này. ---- diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 361e51e84..c9179f6b3 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -5,8 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author James Do */ -$lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; + + + +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '“'; //“ +$lang['doublequoteclosing'] = '”'; //” +$lang['singlequoteopening'] = '‘'; //‘ +$lang['singlequoteclosing'] = '’'; //’ +$lang['apostrophe'] = '’'; //’ $lang['btn_edit'] = 'Biên soạn trang này'; $lang['btn_source'] = 'Xem mã nguồn'; @@ -16,6 +24,8 @@ $lang['btn_search'] = 'Tìm'; $lang['btn_save'] = 'Lưu'; $lang['btn_preview']= 'Duyệt trước'; $lang['btn_top'] = 'Trở lên trên'; +$lang['btn_newer'] = '<< mới hơn'; +$lang['btn_older'] = 'cũ hơn >>'; $lang['btn_revs'] = 'Các phiên bản cũ'; $lang['btn_recent'] = 'Thay đổi gần đây'; $lang['btn_upload'] = 'Tải lên'; @@ -27,41 +37,126 @@ $lang['btn_logout'] = 'Thoát'; $lang['btn_admin'] = 'Quản lý'; $lang['btn_update'] = 'Cập nhật'; $lang['btn_delete'] = 'Xoá'; +$lang['btn_back'] = 'Quay lại'; +$lang['btn_backlink'] = "Liên kết tới đây"; +$lang['btn_profile'] = 'Cập nhật hồ sơ'; +$lang['btn_reset'] = 'Làm lại'; +$lang['btn_resendpwd'] = 'Gửi mật khẩu mới'; +$lang['btn_draft'] = 'Sửa bản nháp'; +$lang['btn_recover'] = 'Phục hồi bản nháp'; +$lang['btn_draftdel'] = 'Xóa bản nháp'; +$lang['btn_revert'] = 'Phục hồi'; $lang['btn_register'] = 'Đăng ký'; +$lang['btn_apply'] = 'Chấp nhận'; +$lang['btn_media'] = 'Quản lý tệp tin'; $lang['loggedinas'] = 'Username đang dùng'; $lang['user'] = 'Username'; -$lang['pass'] = 'Password'; +$lang['pass'] = 'Mật khẩu'; +$lang['newpass'] = 'Mật khẩu mới'; +$lang['oldpass'] = 'Nhập lại mật khẩu hiện tại'; +$lang['passchk'] = 'lần nữa'; $lang['remember'] = 'Lưu username/password lại'; $lang['fullname'] = 'Họ và tên'; $lang['email'] = 'E-Mail'; +$lang['profile'] = 'Hồ sơ thành viên'; $lang['badlogin'] = 'Username hoặc password không đúng.'; +$lang['minoredit'] = 'Minor Changes'; +$lang['draftdate'] = 'Bản nháp được tự động lưu lúc'; // full dformat date will be added +$lang['nosecedit'] = 'Các trang web đã được thay đổi trong khi chờ đợi, phần thông tin quá hạn đã được thay thế bằng trang đầy đủ.'; $lang['regmissing'] = 'Bạn cần điền vào tất cả các trường'; $lang['reguexists'] = 'Bạn khác đã dùng username này rồi.'; $lang['regsuccess'] = 'Đã tạo username, và đã gởi password.'; +$lang['regsuccess2'] = 'Thành viên vừa được tạo.'; $lang['regmailfail']= 'Không gởi password được. Xin bạn liên hệ với người quản lý.'; $lang['regbadmail'] = 'Email hình như không đúng. Xin bạn liên hệ với người quản lý.'; +$lang['regbadpass'] = 'Hai mật khẩu đưa ra là không giống nhau, xin vui lòng thử lại.'; $lang['regpwmail'] = 'Password DokuWiki của bạn là'; -$lang['reghere'] = 'Xin bạn đăng ký username nếu chưa có.'; +$lang['reghere'] = 'Xin bạn đăng ký username nếu chưa có'; + +$lang['profna'] = 'Wiki này không hỗ trợ sửa đổi hồ sơ cá nhân'; +$lang['profnochange'] = 'Không có thay đổi, không có gì để làm.'; +$lang['profnoempty'] = 'Không được để trống tên hoặc địa chỉ email.'; +$lang['profchanged'] = 'Cập nhật hồ sơ thành viên thành công.'; +$lang['pwdforget'] = 'Bạn quên mật khẩu? Tạo lại mật khẩu mới'; +$lang['resendna'] = 'Wiki này không hỗ trợ gửi lại mật khẩu.'; +$lang['resendpwd'] = 'Gửi mật khẩu mới cho'; +$lang['resendpwdmissing'] = 'Xin lỗi, bạn phải điền vào tất cả các trường.'; +$lang['resendpwdnouser'] = 'Xin lỗi, chúng tôi không thể tìm thấy thành viên này trong cơ sở dữ liệu của chúng tôi.'; +$lang['resendpwdbadauth'] = 'Xin lỗi, mã này xác thực không hợp lệ. Hãy chắc chắn rằng bạn sử dụng liên kết xác nhận đầy đủ.'; +$lang['resendpwdconfirm'] = 'Một liên kết xác nhận đã được gửi bằng email.'; +$lang['resendpwdsuccess'] = 'Mật khẩu mới của bạn đã được gửi bằng email.'; + +$lang['license'] = 'Trừ khi có ghi chú khác, nội dung trên wiki này được cấp phép theo giấy phép sau đây:'; +$lang['licenseok'] = 'Lưu ý: Bằng cách chỉnh sửa trang này, bạn đồng ý cấp giấy phép nội dung của bạn theo giấy phép sau:'; + +$lang['searchmedia'] = 'Tìm tên file:'; +$lang['searchmedia_in'] = 'Tìm ở %s'; $lang['txt_upload'] = 'Chọn tệp để tải lên'; $lang['txt_filename'] = 'Điền wikiname (tuỳ ý)'; +$lang['txt_overwrt'] = 'Ghi đè file trùng'; $lang['lockedby'] = 'Đang khoá bởi'; -$lang['lockexpire'] = 'Khoá sẽ hết hạn vào lúc'; -$lang['js']['willexpire'] = 'Khoá của bạn để biên soạn trang này sẽ hết hạn trong vòng 1 phút.\nĐể tránh xung đột, bạn nên bấm nút xem trước để lập lại thời gian khoá'; +$lang['lockexpire'] = 'Sẽ được mở khóa vào lúc'; +$lang['js']['willexpire'] = 'Trong một phút nữa bài viết sẽ được mở khóa để cho phép người khác chỉnh sửa.\nĐể tránh xung đột, bạn nên bấm nút Duyệt trước để lập lại thời gian khoá bài'; $lang['js']['notsavedyet'] = "Hiện có những thay đổi chưa được bảo lưu, và sẽ mất.\nBạn thật sự muốn tiếp tục?"; -$lang['rssfailed'] = 'Rút nguồn này gặp phải lỗi'; +$lang['js']['searchmedia'] = 'Tìm kiếm tập tin'; +$lang['js']['keepopen'] = 'Giữ cửa sổ đang mở trên lựa chọn'; +$lang['js']['hidedetails'] = 'Ẩn thông tin chi tiết'; +$lang['js']['mediatitle'] = 'Thiết lập liên kết'; +$lang['js']['mediadisplay'] = 'Kiểu liên kết'; +$lang['js']['mediaalign'] = 'Sắp hàng'; +$lang['js']['mediasize'] = 'Cỡ ảnh'; +$lang['js']['mediatarget'] = 'Đích của liên kết'; +$lang['js']['mediaclose'] = 'Đóng'; +$lang['js']['mediainsert'] = 'Chèn'; +$lang['js']['mediadisplayimg'] = 'Hiển thị ảnh.'; +$lang['js']['mediadisplaylnk'] = 'Chỉ hiển thị liên kết.'; +$lang['js']['mediasmall'] = 'Nhỏ'; +$lang['js']['mediamedium'] = 'Vừa'; +$lang['js']['medialarge'] = 'To'; +$lang['js']['mediaoriginal'] = 'Kích cỡ gốc'; +$lang['js']['medialnk'] = 'Liên kết tới trang chi tiết'; +$lang['js']['mediadirect'] = 'Liên kết trực tiếp tới ảnh gốc'; +$lang['js']['medianolnk'] = 'Không liên kết'; +$lang['js']['medianolink'] = 'Không liên kết tới ảnh'; +$lang['js']['medialeft'] = 'Căn ảnh sang trái.'; +$lang['js']['mediaright'] = 'Căn ảnh sang phải.'; +$lang['js']['mediacenter'] = 'Cản ảnh ra giữa.'; +$lang['js']['medianoalign'] = 'Không căn.'; +$lang['js']['nosmblinks'] = "Nối với các Windows shares chỉ có hiệu lực với Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['js']['linkwiz'] = 'Hộp thoại liên kết'; +$lang['js']['linkto'] = 'Liên kết tới:'; +$lang['js']['del_confirm']= 'Xoá mục này?'; +$lang['js']['restore_confirm'] = 'Sẵn sàng phục hồi phiên bản này?'; +$lang['js']['media_diff'] = 'So sánh:'; +$lang['js']['media_select'] = 'Chọn nhiều file…'; +$lang['js']['media_upload_btn'] = 'Tải lên'; +$lang['js']['media_done_btn'] = 'Xong'; +$lang['js']['media_drop'] = 'Kéo các file vào đây để tải lên'; +$lang['js']['media_overwrt'] = 'Ghi đè các file trùng'; + +$lang['rssfailed'] = 'Nguồn này gặp phải lỗi'; $lang['nothingfound']= 'Không tìm được gì'; -$lang['mediaselect'] = 'Chọn tệp media'; +$lang['mediaselect'] = 'Xem'; $lang['fileupload'] = 'Tải lên tệp media'; $lang['uploadsucc'] = 'Tải lên thành công'; -$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ phép?'; +$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ quyền?'; $lang['uploadwrong'] = 'Tải lên bị từ chối. Cấm tải loại tệp này'; -$lang['namespaces'] = 'Đề tài'; +$lang['uploadexist'] = 'Tệp tin bị trùng. Chưa có gì xảy ra.'; +$lang['namespaces'] = 'Thư mục'; $lang['mediafiles'] = 'Tệp có sẵn ở'; +$lang['accessdenied'] = 'Bạn không được phép xem trang này.'; +$lang['mediausage'] = 'Sử dụng cú pháp sau đây để dẫn đến tập tin này:'; +$lang['mediaview'] = 'Xem tệp gốc'; +$lang['mediaroot'] = 'thư mục gốc'; +$lang['mediaupload'] = 'Tải một tập tin lên thư mục hiện tại ở đây. Để tạo thư mục con, thêm nó vào trước tên tập tin của bạn, phân cách bằng dấu hai chấm sau khi bạn chọn các tập tin. File còn có thể được lựa chọn bằng cách kéo và thả.'; +$lang['mediaextchange'] = 'Phần mở rộng thay đổi từ .%s thành .%s!'; +$lang['ref_inuse'] = 'Không thể xóa tập tin vì nó đang được sử dụng cho các trang sau:'; +$lang['ref_hidden'] = 'Một số tài liệu sử dụng cho trang này bạn không được cấp phép truy cập.'; $lang['hits'] = 'Trùng'; $lang['quickhits'] = 'Trang trùng hợp'; @@ -69,24 +164,36 @@ $lang['toc'] = 'Nội dung'; $lang['current'] = 'hiện tại'; $lang['yours'] = 'Phiên bản hiện tại'; $lang['diff'] = 'cho xem khác biệt với phiên bản hiện tại'; +$lang['diff2'] = 'Sự khác biệt giữa các bản được lựa chọn'; +$lang['difflink'] = 'Liên kết để xem bản so sánh này'; +$lang['diff_type'] = 'Xem sự khác biệt:'; +$lang['diff_inline'] = 'Nội tuyến'; +$lang['diff_side'] = 'Xếp cạnh nhau'; $lang['line'] = 'Dòng'; $lang['breadcrumb'] = 'Trang đã xem'; +$lang['youarehere'] = 'Bạn đang ở đây'; $lang['lastmod'] = 'Thời điểm thay đổi'; $lang['by'] = 'do'; $lang['deleted'] = 'bị xoá'; $lang['created'] = 'được tạo ra'; $lang['restored'] = 'phiên bản cũ đã được khôi phục'; +$lang['external_edit'] = 'external edit'; $lang['summary'] = 'Tóm tắt biên soạn'; +$lang['noflash'] = 'Adobe Flash Plugin cần được cài để có thể xem nội dung này.'; $lang['mail_newpage'] = 'Trang được thêm:'; $lang['mail_changed'] = 'Trang thay đổi:'; -$lang['js']['nosmblinks'] = "Nối với các Windows shares chỉ có hiệu lực với Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['changes_type'] = 'Xem thay đổi của'; +$lang['pages_changes'] = 'Trang'; +$lang['media_changes'] = 'Tệp media'; +$lang['both_changes'] = 'Cả trang và các tập tin media'; $lang['qb_bold'] = 'Chữ đậm'; $lang['qb_italic'] = 'Chữ nghiêng'; $lang['qb_underl'] = 'Chữ gạch dưới'; $lang['qb_code'] = 'Chữ mã nguồn'; +$lang['qb_strike'] = 'Strike-through Text'; $lang['qb_h1'] = 'Đầu đề cấp 1'; $lang['qb_h2'] = 'Đầu đề cấp 2'; $lang['qb_h3'] = 'Đầu đề cấp 3'; @@ -100,7 +207,62 @@ $lang['qb_ul'] = 'Điểm trong danh sách không đánh số'; $lang['qb_media'] = 'Thêm ảnh và tệp khác'; $lang['qb_sig'] = 'Đặt chữ ký'; -$lang['js']['del_confirm']= 'Xoá mục này?'; +$lang['metaedit'] = 'Sửa Metadata'; +$lang['metasaveerr'] = 'Thất bại khi viết metadata'; +$lang['metasaveok'] = 'Metadata đã được lưu'; +$lang['img_backto'] = 'Quay lại'; +$lang['img_title'] = 'Tiêu đề'; +$lang['img_caption'] = 'Ghi chú'; +$lang['img_date'] = 'Ngày'; +$lang['img_fname'] = 'Tên file'; +$lang['img_fsize'] = 'Kích cỡ'; +$lang['img_artist'] = 'Người chụp'; +$lang['img_copyr'] = 'Bản quyền'; +$lang['img_format'] = 'Định dạng'; +$lang['img_camera'] = 'Camera'; +$lang['img_keywords'] = 'Từ khóa'; +$lang['img_width'] = 'Rộng'; +$lang['img_height'] = 'Cao'; +$lang['img_manager'] = 'Xem trong trình quản lý tệp media'; + +/* installer strings */ +$lang['i_chooselang'] = 'Chọn ngôn ngữ'; +$lang['i_retry'] = 'Thử lại'; + +$lang['years'] = 'cách đây %d năm'; +$lang['months'] = 'cách đây %d tháng'; +$lang['weeks'] = 'cách đây %d tuần'; +$lang['days'] = 'cách đây %d ngày'; +$lang['hours'] = 'cách đây %d giờ'; +$lang['minutes'] = 'cách đây %d phút'; +$lang['seconds'] = 'cách đây %d giây'; + +$lang['wordblock'] = 'Thay đổi của bạn đã không được lưu lại bởi vì nó có chứa văn bản bị chặn (spam).'; + +$lang['media_uploadtab'] = 'Tải lên'; +$lang['media_searchtab'] = 'Tìm'; +$lang['media_file'] = 'Tệp'; +$lang['media_viewtab'] = 'Xem'; +$lang['media_edittab'] = 'Sửa'; +$lang['media_historytab'] = 'Lịch sử'; +$lang['media_list_thumbs'] = 'Ảnh thu nhỏ'; +$lang['media_list_rows'] = 'Dòng'; +$lang['media_sort_name'] = 'Tên'; +$lang['media_sort_date'] = 'Ngày'; +$lang['media_namespaces'] = 'Chọn thư mục'; +$lang['media_files'] = 'Các tệp trong %s'; +$lang['media_upload'] = 'Tải lên %s'; +$lang['media_search'] = 'Tìm ở %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s ở %s'; +$lang['media_edit'] = 'Sửa %s'; +$lang['media_history'] = 'Lịch sử của %s'; +$lang['media_meta_edited'] = 'đã sửa metadata'; +$lang['media_perm_read'] = 'Sorry, bạn không đủ quyền truy cập.'; +$lang['media_perm_upload'] = 'Xin lỗi, bạn không đủ quyền để upload file lên.'; +$lang['media_update'] = 'Tải lên phiên bản mới'; +$lang['media_restore'] = 'Phục hồi phiên bản này'; +$lang['plugin_install_err'] = "Plugin không được cài đặt chính xác.Đổi tên thư mục plugin '%s' thành '%s'."; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/vi/login.txt b/inc/lang/vi/login.txt index 4265a79df..71a8b1a01 100644 --- a/inc/lang/vi/login.txt +++ b/inc/lang/vi/login.txt @@ -1,3 +1,3 @@ ====== Đăng nhập ====== -Hiện bạn chưa đăng nhập! Điền vào những chi tiết chứng minh ở phía dưới. Máy của bạn cần đặt chế độ nhận cookies để đăng nhập. +Hiện bạn chưa đăng nhập! Hãy khai báo thông tin đăng nhập vào ô ở phía dưới. Máy của bạn cần đặt chế độ nhận cookies để đăng nhập. diff --git a/inc/lang/vi/mailtext.txt b/inc/lang/vi/mailtext.txt index 3fcdf5595..836e02d24 100644 --- a/inc/lang/vi/mailtext.txt +++ b/inc/lang/vi/mailtext.txt @@ -12,5 +12,5 @@ User : @USER@ @DIFF@ -- -This mail was generated by DokuWiki at +Điện thư này tạo bởi DokuWiki ở @DOKUWIKIURL@ diff --git a/inc/lang/vi/newpage.txt b/inc/lang/vi/newpage.txt index b03bb5224..93f474b18 100644 --- a/inc/lang/vi/newpage.txt +++ b/inc/lang/vi/newpage.txt @@ -1,3 +1,3 @@ ====== Chưa có đề tài này ====== -Bạn vừa nối vào một đề tài chưa có. Bạn có tạo đề tài này bằng cách bấm vào nút ''Tạo trang này''. +Bạn kết nối vào một đề tài chưa có. Bạn có tạo đề tài này bằng cách bấm vào nút ''Tạo trang này'' ở góc trên, bên trái cửa sổ này. Nếu bạn không thấy nút này, thay vào đó là nút ''Xem mã nguồn'' chứng tỏ bạn không có quyền biên tập trang này, hãy đăng nhập thử xem bạn có quyền biên tập trang không. Nếu bạn nghĩ đây là một lỗi, hãy báo cho người quản trị. diff --git a/inc/lang/vi/norev.txt b/inc/lang/vi/norev.txt index 0fa27d898..224bd1db0 100644 --- a/inc/lang/vi/norev.txt +++ b/inc/lang/vi/norev.txt @@ -1,3 +1,3 @@ ====== Phiên bản chưa có ====== -Chưa có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cũ'' để xem danh sách các phiên bản của văn kiện này. +Chưa có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cũ'' để xem danh sách các phiên bản của văn bản này. diff --git a/inc/lang/vi/password.txt b/inc/lang/vi/password.txt index 589bbf067..798a20d33 100644 --- a/inc/lang/vi/password.txt +++ b/inc/lang/vi/password.txt @@ -6,4 +6,4 @@ Username: @LOGIN@ Password: @PASSWORD@ -- -Điện thư này xuất phát từ DokuWiki tại @DOKUWIKIURL@. +Điện thư này xuất phát từ @DOKUWIKIURL@. diff --git a/inc/lang/vi/preview.txt b/inc/lang/vi/preview.txt index 81069a2c4..f02a25142 100644 --- a/inc/lang/vi/preview.txt +++ b/inc/lang/vi/preview.txt @@ -1,3 +1,3 @@ ====== Xem trước ====== -Văn kiện của bạn sẽ thể hiện như sau. Nên nhớ: Văn kiện này **chưa được bảo lưu**! +Văn bản của bạn sẽ thể hiện như sau. Nên nhớ: Văn bản này **chưa được lưu**! diff --git a/inc/lang/vi/read.txt b/inc/lang/vi/read.txt index ffeffc7bf..eec69966b 100644 --- a/inc/lang/vi/read.txt +++ b/inc/lang/vi/read.txt @@ -1 +1 @@ -Trang này chỉ được đọc thôi. Bạn có thể xem mã nguồn, nhưng không được thay đổi. Xin bạn hỏi người quản lý nếu không đúng. +Trang này chỉ được đọc thôi. Bạn có thể xem mã nguồn, nhưng không được thay đổi. Hãy báo lại người quản lý nếu hệ thống hoạt động không đúng. diff --git a/inc/lang/vi/revisions.txt b/inc/lang/vi/revisions.txt index 943e3fff1..b9e9779ee 100644 --- a/inc/lang/vi/revisions.txt +++ b/inc/lang/vi/revisions.txt @@ -1,3 +1,3 @@ ====== Phiên bản cũ ====== -Sau đây là các phiên bản cũ của văn kiện này. Để quây về một phiên bản cũ, chọn ở phía dưới, bấm vào ''Biên soạn trang này'' để bảo lưu. +Sau đây là các phiên bản cũ của văn bản này. Để quay về một phiên bản cũ, bạn hãy chọn nó từ danh sách dưới đây, sau đó bấm vào nút ''Phục hồi'' hoặc nhấp nút ''Biên soạn trang này'' và lưu nó lại. diff --git a/inc/lang/vi/searchpage.txt b/inc/lang/vi/searchpage.txt index 821ca9f7b..7ded7a808 100644 --- a/inc/lang/vi/searchpage.txt +++ b/inc/lang/vi/searchpage.txt @@ -1,5 +1,5 @@ ====== Tìm ====== -Sau đây là kết quả của câu hỏi của bạn. Nếu bạn không thấy được những gì bạn đang tìm, bạn có thể một trang mới, cùng tên câu hỏi của bạn, bằng cách bấm vào nút ''Biên soạn trang này''. +Sau đây là kết quả mà bạn đã tìm. Nếu bạn không thấy được những gì bạn đang tìm, bạn có thể tạo một trang mới bằng cách bấm vào nút ''Biên soạn trang này'', khi đó bạn sẽ có 1 trang mới với tên trang chính là tuwfw khóa bạn đã tìm kiếm. ===== Kết quả ===== -- cgit v1.2.3 From 87ada0b835f589d890ec6cf9cc99e679f6ffef87 Mon Sep 17 00:00:00 2001 From: Dion Nicolaas Date: Fri, 22 Jun 2012 10:03:21 +0200 Subject: Dutch language update --- inc/lang/nl/edit.txt | 2 +- inc/lang/nl/lang.php | 17 +++++++++++++---- inc/lang/nl/mailwrap.html | 13 +++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 inc/lang/nl/mailwrap.html (limited to 'inc') diff --git a/inc/lang/nl/edit.txt b/inc/lang/nl/edit.txt index e539050bc..9718d0900 100644 --- a/inc/lang/nl/edit.txt +++ b/inc/lang/nl/edit.txt @@ -1 +1 @@ -Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. +Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki-syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 4644f5e5d..911ffdc10 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -51,6 +51,7 @@ $lang['btn_backtomedia'] = 'Terug naar Bestandsselectie'; $lang['btn_subscribe'] = 'Inschrijven wijzigingen'; $lang['btn_profile'] = 'Profiel aanpassen'; $lang['btn_reset'] = 'Wissen'; +$lang['btn_resendpwd'] = 'Nieuw wachtwoord bepalen'; $lang['btn_draft'] = 'Bewerk concept'; $lang['btn_recover'] = 'Herstel concept'; $lang['btn_draftdel'] = 'Verwijder concept'; @@ -87,6 +88,7 @@ $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'] = 'Nieuw wachtwoord bepalen 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.'; @@ -99,6 +101,7 @@ $lang['searchmedia_in'] = 'Zoek in %s'; $lang['txt_upload'] = 'Selecteer een bestand om te uploaden'; $lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)'; $lang['txt_overwrt'] = 'Overschrijf bestaand bestand'; +$lang['maxuploadsize'] = 'Max %s per bestand'; $lang['lockedby'] = 'Momenteel in gebruik door'; $lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op'; $lang['js']['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.'; @@ -193,6 +196,11 @@ $lang['external_edit'] = 'Externe bewerking'; $lang['summary'] = 'Samenvatting wijziging'; $lang['noflash'] = 'De Adobe Flash Plugin is vereist om de pagina te kunnen weergeven.'; $lang['download'] = 'Download fragment'; +$lang['tools'] = 'Hulpmiddelen'; +$lang['user_tools'] = 'Gebruikershulpmiddelen'; +$lang['site_tools'] = 'Site-hulpmiddelen'; +$lang['page_tools'] = 'Paginahulpmiddelen'; +$lang['skip_to_content'] = 'spring naar tekst'; $lang['mail_newpage'] = 'pagina toegevoegd:'; $lang['mail_changed'] = 'pagina aangepast:'; $lang['mail_subscribe_list'] = 'Pagina\'s veranderd in namespace:'; @@ -200,8 +208,8 @@ $lang['mail_new_user'] = 'nieuwe gebruiker:'; $lang['mail_upload'] = 'bestand geüpload:'; $lang['changes_type'] = 'Bekijk wijzigingen van'; $lang['pages_changes'] = 'Pagina\'s'; -$lang['media_changes'] = 'Media bestanden'; -$lang['both_changes'] = 'Zowel pagina\'s als media bestanden'; +$lang['media_changes'] = 'Mediabestanden'; +$lang['both_changes'] = 'Zowel pagina\'s als mediabestanden'; $lang['qb_bold'] = 'Vette tekst'; $lang['qb_italic'] = 'Cursieve tekst'; $lang['qb_underl'] = 'Onderstreepte tekst'; @@ -244,7 +252,7 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Trefwoorden'; $lang['img_width'] = 'Breedte'; $lang['img_height'] = 'Hoogte'; -$lang['img_manager'] = 'In media beheerder bekijken'; +$lang['img_manager'] = 'In mediabeheerder bekijken'; $lang['subscr_subscribe_success'] = '%s is ingeschreven voor %s'; $lang['subscr_subscribe_error'] = 'Fout bij inschrijven van %s voor %s'; $lang['subscr_subscribe_noaddress'] = 'Er is geen emailadres geassocieerd met uw account, u kunt daardoor niet worden ingeschreven.'; @@ -263,6 +271,7 @@ $lang['subscr_style_digest'] = 'Samenvattings-email met wijzigingen per pagina $lang['subscr_style_list'] = 'Lijst van veranderde pagina\'s sinds laatste email (elke %.2f dagen)'; $lang['authmodfailed'] = 'Ongeldige gebruikersauthenticatie-configuratie. Informeer de wikibeheerder.'; $lang['authtempfail'] = 'Gebruikersauthenticatie is tijdelijk niet beschikbaar. Als deze situatie zich blijft voordoen, informeer dan de wikibeheerder.'; +$lang['authpwdexpire'] = 'Je wachtwoord verloopt in %d dagen, je moet het binnenkort veranderen'; $lang['i_chooselang'] = 'Kies je taal'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Wikinaam'; @@ -304,7 +313,7 @@ $lang['media_list_thumbs'] = 'Miniatuurweergaven'; $lang['media_list_rows'] = 'Regels'; $lang['media_sort_name'] = 'Naam'; $lang['media_sort_date'] = 'Datum'; -$lang['media_namespaces'] = 'Kies naamruimte'; +$lang['media_namespaces'] = 'Kies namespace'; $lang['media_files'] = 'Bestanden in %s'; $lang['media_upload'] = 'Upload naar %s'; $lang['media_search'] = 'Zoeken in %s'; diff --git a/inc/lang/nl/mailwrap.html b/inc/lang/nl/mailwrap.html new file mode 100644 index 000000000..2ffe19a88 --- /dev/null +++ b/inc/lang/nl/mailwrap.html @@ -0,0 +1,13 @@ + + + @TITLE@ + + + + + @HTMLBODY@ + +

+ Deze mail is gegenereerd door DokuWiki op @DOKUWIKIURL@. + + \ No newline at end of file -- cgit v1.2.3 From 4d18e93617feab03d64a5e20ea2585a869b3e86a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 Jun 2012 12:52:34 +0200 Subject: fixed wrong comparison in Mailer::dump() --- inc/Mailer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 507150d00..93845497e 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -566,7 +566,7 @@ class Mailer { public function dump(){ $this->cleanHeaders(); $body = $this->prepareBody(); - if($body === 'false') return false; + if($body === false) return false; $headers = $this->prepareHeaders(); return $headers.MAILHEADER_EOL.$body; -- cgit v1.2.3 From 4c89a7f6d57c5017beea08f1e2d3658397495e96 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 Jun 2012 13:13:40 +0200 Subject: another bad comparison fixed --- inc/Mailer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 93845497e..7661eaa75 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -629,7 +629,7 @@ class Mailer { // make the body $body = $this->prepareBody(); - if($body === 'false') return false; + if($body === false) return false; // cook the headers $headers = $this->prepareHeaders(); -- cgit v1.2.3 From a89c75afdfc7a502d725e217e1a4731862384c02 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 Jun 2012 13:22:31 +0200 Subject: some code beautification --- inc/Mailer.class.php | 294 ++++++++++++++++++++++++++------------------------- 1 file changed, 150 insertions(+), 144 deletions(-) (limited to 'inc') diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 7661eaa75..fccf1dad9 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -11,20 +11,24 @@ // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) // think different -if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); +if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL', "\n"); #define('MAILHEADER_ASCIIONLY',1); +/** + * Mail Handling + */ class Mailer { - protected $headers = array(); - protected $attach = array(); - protected $html = ''; - protected $text = ''; + protected $headers = array(); + protected $attach = array(); + protected $html = ''; + protected $text = ''; - protected $boundary = ''; - protected $partid = ''; - protected $sendparam= null; + protected $boundary = ''; + protected $partid = ''; + protected $sendparam = null; + /** @var EmailAddressValidator */ protected $validator = null; protected $allowhtml = true; @@ -33,38 +37,38 @@ class Mailer { * * Initializes the boundary strings and part counters */ - public function __construct(){ + public function __construct() { global $conf; - $server = parse_url(DOKU_URL,PHP_URL_HOST); + $server = parse_url(DOKU_URL, PHP_URL_HOST); - $this->partid = md5(uniqid(rand(),true)).'@'.$server; - $this->boundary = '----------'.md5(uniqid(rand(),true)); + $this->partid = md5(uniqid(rand(), true)).'@'.$server; + $this->boundary = '----------'.md5(uniqid(rand(), true)); - $listid = join('.',array_reverse(explode('/',DOKU_BASE))).$server; - $listid = strtolower(trim($listid,'.')); + $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server; + $listid = strtolower(trim($listid, '.')); - $this->allowhtml = (bool) $conf['htmlmail']; + $this->allowhtml = (bool)$conf['htmlmail']; // add some default headers for mailfiltering FS#2247 - $this->setHeader('X-Mailer','DokuWiki '.getVersion()); + $this->setHeader('X-Mailer', 'DokuWiki '.getVersion()); $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); $this->setHeader('X-DokuWiki-Title', $conf['title']); $this->setHeader('X-DokuWiki-Server', $server); $this->setHeader('X-Auto-Response-Suppress', 'OOF'); - $this->setHeader('List-Id',$conf['title'].' <'.$listid.'>'); + $this->setHeader('List-Id', $conf['title'].' <'.$listid.'>'); } /** * Attach a file * - * @param $path Path to the file to attach - * @param $mime Mimetype of the attached file - * @param $name The filename to use - * @param $embed Unique key to reference this file from the HTML part + * @param string $path Path to the file to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part */ - public function attachFile($path,$mime,$name='',$embed=''){ - if(!$name){ + public function attachFile($path, $mime, $name = '', $embed = '') { + if(!$name) { $name = basename($path); } @@ -79,14 +83,14 @@ class Mailer { /** * Attach a file * - * @param $path The file contents to attach - * @param $mime Mimetype of the attached file - * @param $name The filename to use - * @param $embed Unique key to reference this file from the HTML part + * @param string $data The file contents to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part */ - public function attachContent($data,$mime,$name='',$embed=''){ - if(!$name){ - list($junk,$ext) = split('/',$mime); + public function attachContent($data, $mime, $name = '', $embed = '') { + if(!$name) { + list(, $ext) = explode('/', $mime); $name = count($this->attach).".$ext"; } @@ -101,18 +105,18 @@ class Mailer { /** * Callback function to automatically embed images referenced in HTML templates */ - protected function autoembed_cb($matches){ + protected function autoembed_cb($matches) { static $embeds = 0; $embeds++; // get file and mime type $media = cleanID($matches[1]); - list($ext, $mime) = mimetype($media); - $file = mediaFN($media); + list(, $mime) = mimetype($media); + $file = mediaFN($media); if(!file_exists($file)) return $matches[0]; //bad reference, keep as is // attach it and set placeholder - $this->attachFile($file,$mime,'','autoembed'.$embeds); + $this->attachFile($file, $mime, '', 'autoembed'.$embeds); return '%%autoembed'.$embeds.'%%'; } @@ -125,18 +129,18 @@ class Mailer { * @param string $value the value of the header * @param bool $clean remove all non-ASCII chars and line feeds? */ - public function setHeader($header,$value,$clean=true){ - $header = str_replace(' ','-',ucwords(strtolower(str_replace('-',' ',$header)))); // streamline casing - if($clean){ - $header = preg_replace('/[^\w \-\.\+\@]+/','',$header); - $value = preg_replace('/[^\w \-\.\+\@<>]+/','',$value); + public function setHeader($header, $value, $clean = true) { + $header = str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $header)))); // streamline casing + if($clean) { + $header = preg_replace('/[^\w \-\.\+\@]+/', '', $header); + $value = preg_replace('/[^\w \-\.\+\@<>]+/', '', $value); } // empty value deletes $value = trim($value); - if($value === ''){ + if($value === '') { if(isset($this->headers[$header])) unset($this->headers[$header]); - }else{ + } else { $this->headers[$header] = $value; } } @@ -147,7 +151,7 @@ class Mailer { * Whatever is set here is directly passed to PHP's mail() command as last * parameter. Depending on the PHP setup this might break mailing alltogether */ - public function setParameters($param){ + public function setParameters($param) { $this->sendparam = $param; } @@ -166,38 +170,40 @@ class Mailer { * @param array $html the HTML body, leave null to create it from $text * @param bool $wrap wrap the HTML in the default header/Footer */ - public function setBody($text, $textrep=null, $htmlrep=null, $html=null, $wrap=true){ + public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) { global $INFO; global $conf; - $htmlrep = (array) $htmlrep; - $textrep = (array) $textrep; + $htmlrep = (array)$htmlrep; + $textrep = (array)$textrep; // create HTML from text if not given - if(is_null($html)){ + if(is_null($html)) { $html = $text; $html = hsc($html); - $html = preg_replace('/^-----*$/m','
',$html); + $html = preg_replace('/^-----*$/m', '
', $html); $html = nl2br($html); } - if($wrap){ - $wrap = rawLocale('mailwrap','html'); - $html = preg_replace('/\n--
.*$/s','',$html); //strip signature - $html = str_replace('@HTMLBODY@',$html,$wrap); + if($wrap) { + $wrap = rawLocale('mailwrap', 'html'); + $html = preg_replace('/\n--
.*$/s', '', $html); //strip signature + $html = str_replace('@HTMLBODY@', $html, $wrap); } // copy over all replacements missing for HTML (autolink URLs) - foreach($textrep as $key => $value){ + foreach($textrep as $key => $value) { if(isset($htmlrep[$key])) continue; - if(preg_match('/^https?:\/\//i',$value)){ + if(preg_match('/^https?:\/\//i', $value)) { $htmlrep[$key] = ''.hsc($value).''; - }else{ + } else { $htmlrep[$key] = hsc($value); } } // embed media from templates - $html = preg_replace_callback('/@MEDIA\(([^\)]+)\)@/', - array($this,'autoembed_cb'),$html); + $html = preg_replace_callback( + '/@MEDIA\(([^\)]+)\)@/', + array($this, 'autoembed_cb'), $html + ); // prepare default replacements $ip = clientIP(); @@ -213,7 +219,7 @@ class Mailer { 'NAME' => $INFO['userinfo']['name'], 'MAIL' => $INFO['userinfo']['mail'], ); - $trep = array_merge($trep,(array) $textrep); + $trep = array_merge($trep, (array)$textrep); $hrep = array( 'DATE' => ''.hsc(dformat()).'', 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']), @@ -224,16 +230,16 @@ class Mailer { 'USER' => hsc($_SERVER['REMOTE_USER']), 'NAME' => hsc($INFO['userinfo']['name']), 'MAIL' => ''. - hsc($INFO['userinfo']['mail']).'', + hsc($INFO['userinfo']['mail']).'', ); - $hrep = array_merge($hrep,(array) $htmlrep); + $hrep = array_merge($hrep, (array)$htmlrep); // Apply replacements - foreach ($trep as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@',$substitution, $text); + foreach($trep as $key => $substitution) { + $text = str_replace('@'.strtoupper($key).'@', $substitution, $text); } - foreach ($hrep as $key => $substitution) { - $html = str_replace('@'.strtoupper($key).'@',$substitution, $html); + foreach($hrep as $key => $substitution) { + $html = str_replace('@'.strtoupper($key).'@', $substitution, $html); } $this->setHTML($html); @@ -247,7 +253,7 @@ class Mailer { * * You probably want to use setBody() instead */ - public function setHTML($html){ + public function setHTML($html) { $this->html = $html; } @@ -256,7 +262,7 @@ class Mailer { * * You probably want to use setBody() instead */ - public function setText($text){ + public function setText($text) { $this->text = $text; } @@ -266,7 +272,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function to($address){ + public function to($address) { $this->setHeader('To', $address, false); } @@ -276,7 +282,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function cc($address){ + public function cc($address) { $this->setHeader('Cc', $address, false); } @@ -286,7 +292,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function bcc($address){ + public function bcc($address) { $this->setHeader('Bcc', $address, false); } @@ -299,7 +305,7 @@ class Mailer { * @see setAddress * @param string $address from address */ - public function from($address){ + public function from($address) { $this->setHeader('From', $address, false); } @@ -308,7 +314,7 @@ class Mailer { * * @param string $subject the mail subject */ - public function subject($subject){ + public function subject($subject) { $this->headers['Subject'] = $subject; } @@ -322,65 +328,65 @@ class Mailer { * setAddress("föö , me@somewhere.com","TBcc"); * * @param string $address Multiple adresses separated by commas - * @param string returns the prepared header (can contain multiple lines) + * @return bool|string the prepared header (can contain multiple lines) */ - public function cleanAddress($address){ + public function cleanAddress($address) { // No named recipients for To: in Windows (see FS#652) $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; - $address = preg_replace('/[\r\n\0]+/',' ',$address); // remove attack vectors + $address = preg_replace('/[\r\n\0]+/', ' ', $address); // remove attack vectors $headers = ''; - $parts = explode(',',$address); - foreach ($parts as $part){ + $parts = explode(',', $address); + foreach($parts as $part) { $part = trim($part); // parse address - if(preg_match('#(.*?)<(.*?)>#',$part,$matches)){ + if(preg_match('#(.*?)<(.*?)>#', $part, $matches)) { $text = trim($matches[1]); $addr = $matches[2]; - }else{ + } else { $addr = $part; } // skip empty ones - if(empty($addr)){ + if(empty($addr)) { continue; } // FIXME: is there a way to encode the localpart of a emailaddress? - if(!utf8_isASCII($addr)){ - msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"),-1); + if(!utf8_isASCII($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"), -1); continue; } - if(is_null($this->validator)){ - $this->validator = new EmailAddressValidator(); + if(is_null($this->validator)) { + $this->validator = new EmailAddressValidator(); $this->validator->allowLocalAddresses = true; } - if(!$this->validator->check_email_address($addr)){ - msg(htmlspecialchars("E-Mail address <$addr> is not valid"),-1); + if(!$this->validator->check_email_address($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not valid"), -1); continue; } // text was given - if(!empty($text) && $names){ + if(!empty($text) && $names) { // add address quotes $addr = "<$addr>"; - if(defined('MAILHEADER_ASCIIONLY')){ + if(defined('MAILHEADER_ASCIIONLY')) { $text = utf8_deaccent($text); $text = utf8_strip($text); } - if(!utf8_isASCII($text)){ + if(!utf8_isASCII($text)) { $text = '=?UTF-8?B?'.base64_encode($text).'?='; } - }else{ + } else { $text = ''; } // add to header comma seperated - if($headers != ''){ + if($headers != '') { $headers .= ', '; } $headers .= $text.' '.$addr; @@ -397,30 +403,30 @@ class Mailer { * * Replaces placeholders in the HTML with the correct CIDs */ - protected function prepareAttachments(){ + protected function prepareAttachments() { $mime = ''; $part = 1; // embedded attachments - foreach($this->attach as $media){ + foreach($this->attach as $media) { // create content id $cid = 'part'.$part.'.'.$this->partid; // replace wildcards - if($media['embed']){ - $this->html = str_replace('%%'.$media['embed'].'%%','cid:'.$cid,$this->html); + if($media['embed']) { + $this->html = str_replace('%%'.$media['embed'].'%%', 'cid:'.$cid, $this->html); } $mime .= '--'.$this->boundary.MAILHEADER_EOL; $mime .= 'Content-Type: '.$media['mime'].';'.MAILHEADER_EOL; $mime .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $mime .= "Content-ID: <$cid>".MAILHEADER_EOL; - if($media['embed']){ + if($media['embed']) { $mime .= 'Content-Disposition: inline; filename="'.$media['name'].'"'.MAILHEADER_EOL; - }else{ + } else { $mime .= 'Content-Disposition: attachment; filename="'.$media['name'].'"'.MAILHEADER_EOL; } $mime .= MAILHEADER_EOL; //end of headers - $mime .= chunk_split(base64_encode($media['data']),74,MAILHEADER_EOL); + $mime .= chunk_split(base64_encode($media['data']), 74, MAILHEADER_EOL); $part++; } @@ -434,16 +440,15 @@ class Mailer { * * @return string the prepared mail body, false on errors */ - protected function prepareBody(){ - global $conf; + protected function prepareBody() { // no HTML mails allowed? remove HTML body - if(!$this->allowhtml){ + if(!$this->allowhtml) { $this->html = ''; } // check for body - if(!$this->text && !$this->html){ + if(!$this->text && !$this->html) { return false; } @@ -452,28 +457,28 @@ class Mailer { $body = ''; - if(!$this->html && !count($this->attach)){ // we can send a simple single part message - $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; + if(!$this->html && !count($this->attach)) { // we can send a simple single part message + $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; $this->headers['Content-Transfer-Encoding'] = 'base64'; - $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); - }else{ // multi part it is + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); + } else { // multi part it is $body .= "This is a multi-part message in MIME format.".MAILHEADER_EOL; // prepare the attachments $attachments = $this->prepareAttachments(); // do we have alternative text content? - if($this->text && $this->html){ + if($this->text && $this->html) { $this->headers['Content-Type'] = 'multipart/alternative;'.MAILHEADER_EOL. - ' boundary="'.$this->boundary.'XX"'; + ' boundary="'.$this->boundary.'XX"'; $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: text/plain; charset=UTF-8'.MAILHEADER_EOL; $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: multipart/related;'.MAILHEADER_EOL. - ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; + ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; } @@ -481,13 +486,13 @@ class Mailer { $body .= 'Content-Type: text/html; charset=UTF-8'.MAILHEADER_EOL; $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body .= chunk_split(base64_encode($this->html),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->html), 74, MAILHEADER_EOL); $body .= MAILHEADER_EOL; $body .= $attachments; $body .= '--'.$this->boundary.'--'.MAILHEADER_EOL; // close open multipart/alternative boundary - if($this->text && $this->html){ + if($this->text && $this->html) { $body .= '--'.$this->boundary.'XX--'.MAILHEADER_EOL; } } @@ -498,47 +503,47 @@ class Mailer { /** * Cleanup and encode the headers array */ - protected function cleanHeaders(){ + protected function cleanHeaders() { global $conf; // clean up addresses if(empty($this->headers['From'])) $this->from($conf['mailfrom']); - $addrs = array('To','From','Cc','Bcc'); - foreach($addrs as $addr){ - if(isset($this->headers[$addr])){ + $addrs = array('To', 'From', 'Cc', 'Bcc'); + foreach($addrs as $addr) { + if(isset($this->headers[$addr])) { $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); } } - if(isset($this->headers['Subject'])){ + if(isset($this->headers['Subject'])) { // add prefix to subject - if(empty($conf['mailprefix'])){ + if(empty($conf['mailprefix'])) { if(utf8_strlen($conf['title']) < 20) { $prefix = '['.$conf['title'].']'; - }else{ + } else { $prefix = '['.utf8_substr($conf['title'], 0, 20).'...]'; } - }else{ + } else { $prefix = '['.$conf['mailprefix'].']'; } $len = strlen($prefix); - if(substr($this->headers['Subject'],0,$len) != $prefix){ + if(substr($this->headers['Subject'], 0, $len) != $prefix) { $this->headers['Subject'] = $prefix.' '.$this->headers['Subject']; } // encode subject - if(defined('MAILHEADER_ASCIIONLY')){ + if(defined('MAILHEADER_ASCIIONLY')) { $this->headers['Subject'] = utf8_deaccent($this->headers['Subject']); $this->headers['Subject'] = utf8_strip($this->headers['Subject']); } - if(!utf8_isASCII($this->headers['Subject'])){ + if(!utf8_isASCII($this->headers['Subject'])) { $this->headers['Subject'] = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; } } // wrap headers - foreach($this->headers as $key => $val){ - $this->headers[$key] = wordwrap($val,78,MAILHEADER_EOL.' '); + foreach($this->headers as $key => $val) { + $this->headers[$key] = wordwrap($val, 78, MAILHEADER_EOL.' '); } } @@ -547,9 +552,9 @@ class Mailer { * * @returns string the headers */ - protected function prepareHeaders(){ + protected function prepareHeaders() { $headers = ''; - foreach($this->headers as $key => $val){ + foreach($this->headers as $key => $val) { $headers .= "$key: $val".MAILHEADER_EOL; } return $headers; @@ -563,9 +568,9 @@ class Mailer { * * @return string the mail, false on errors */ - public function dump(){ + public function dump() { $this->cleanHeaders(); - $body = $this->prepareBody(); + $body = $this->prepareBody(); if($body === false) return false; $headers = $this->prepareHeaders(); @@ -580,13 +585,13 @@ class Mailer { * @triggers MAIL_MESSAGE_SEND * @return bool true if the mail was successfully passed to the MTA */ - public function send(){ + public function send() { $success = false; // prepare hook data $data = array( // pass the whole mail class to plugin - 'mail' => $this, + 'mail' => $this, // pass references for backward compatibility 'to' => &$this->headers['To'], 'cc' => &$this->headers['Cc'], @@ -594,7 +599,7 @@ class Mailer { 'from' => &$this->headers['From'], 'subject' => &$this->headers['Subject'], 'body' => &$this->text, - 'params' => &$this->sendparams, + 'params' => &$this->sendparam, 'headers' => '', // plugins shouldn't use this // signal if we mailed successfully to AFTER event 'success' => &$success, @@ -602,47 +607,48 @@ class Mailer { // do our thing if BEFORE hook approves $evt = new Doku_Event('MAIL_MESSAGE_SEND', $data); - if ($evt->advise_before(true)) { + if($evt->advise_before(true)) { // clean up before using the headers $this->cleanHeaders(); // any recipients? - if(trim($this->headers['To']) === '' && - trim($this->headers['Cc']) === '' && - trim($this->headers['Bcc']) === '') return false; + if(trim($this->headers['To']) === '' && + trim($this->headers['Cc']) === '' && + trim($this->headers['Bcc']) === '' + ) return false; // The To: header is special - if(isset($this->headers['To'])){ + if(isset($this->headers['To'])) { $to = $this->headers['To']; unset($this->headers['To']); - }else{ + } else { $to = ''; } // so is the subject - if(isset($this->headers['Subject'])){ + if(isset($this->headers['Subject'])) { $subject = $this->headers['Subject']; unset($this->headers['Subject']); - }else{ + } else { $subject = ''; } // make the body - $body = $this->prepareBody(); + $body = $this->prepareBody(); if($body === false) return false; // cook the headers $headers = $this->prepareHeaders(); // add any headers set by legacy plugins - if(trim($data['headers'])){ + if(trim($data['headers'])) { $headers .= MAILHEADER_EOL.trim($data['headers']); } // send the thing - if(is_null($this->sendparam)){ - $success = @mail($to,$subject,$body,$headers); - }else{ - $success = @mail($to,$subject,$body,$headers,$this->sendparam); + if(is_null($this->sendparam)) { + $success = @mail($to, $subject, $body, $headers); + } else { + $success = @mail($to, $subject, $body, $headers, $this->sendparam); } } // any AFTER actions? -- cgit v1.2.3 From e3736c26cc7f6820143784f2552ad05de43b9ed1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 Jun 2012 13:44:47 +0200 Subject: some phpdoc updates --- inc/utf8.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 13 deletions(-) (limited to 'inc') diff --git a/inc/utf8.php b/inc/utf8.php index 54986e14e..7b7c19c6b 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -103,9 +103,9 @@ if(!function_exists('utf8_substr')){ * * @author Harry Fuecks * @author Chris Smith - * @param string - * @param integer number of UTF-8 characters offset (from left) - * @param integer (optional) length in UTF-8 characters from offset + * @param string $str + * @param int $offset number of UTF-8 characters offset (from left) + * @param int $length (optional) length in UTF-8 characters from offset * @return mixed string or false if failure */ function utf8_substr($str, $offset, $length = null) { @@ -221,6 +221,8 @@ if(!function_exists('utf8_ltrim')){ * * @author Andreas Gohr * @see ltrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_ltrim($str,$charlist=''){ @@ -239,6 +241,8 @@ if(!function_exists('utf8_rtrim')){ * * @author Andreas Gohr * @see rtrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_rtrim($str,$charlist=''){ @@ -257,6 +261,8 @@ if(!function_exists('utf8_trim')){ * * @author Andreas Gohr * @see trim() + * @param string $str + * @param string $charlist * @return string */ function utf8_trim($str,$charlist='') { @@ -348,7 +354,7 @@ if(!function_exists('utf8_ucwords')){ * You don't need to call this yourself * * @author Harry Fuecks - * @param array of matches corresponding to a single word + * @param array $matches matches corresponding to a single word * @return string with first char of the word in uppercase * @see utf8_ucwords * @see utf8_strtoupper @@ -408,9 +414,9 @@ if(!function_exists('utf8_stripspecials')){ * @param string $string The UTF8 string to strip of special chars * @param string $repl Replace special with this string * @param string $additional Additional chars to strip (used in regexp char class) + * @return string */ function utf8_stripspecials($string,$repl='',$additional=''){ - global $UTF8_SPECIAL_CHARS; global $UTF8_SPECIAL_CHARS2; static $specials = null; @@ -493,7 +499,7 @@ if(!function_exists('utf8_unhtml')){ * @author Tom N Harris * @param string $str UTF-8 encoded string * @param boolean $entities Flag controlling decoding of named entities. - * @return UTF-8 encoded string with numeric (and named) entities replaced. + * @return string UTF-8 encoded string with numeric (and named) entities replaced. */ function utf8_unhtml($str, $entities=null) { static $decoder = null; @@ -509,6 +515,12 @@ if(!function_exists('utf8_unhtml')){ } if(!function_exists('utf8_decode_numeric')){ + /** + * Decodes numeric HTML entities to their correct UTF-8 characters + * + * @param $ent string A numeric entity + * @return string + */ function utf8_decode_numeric($ent) { switch ($ent[2]) { case 'X': @@ -524,16 +536,37 @@ if(!function_exists('utf8_decode_numeric')){ } if(!class_exists('utf8_entity_decoder')){ + /** + * Encapsulate HTML entity decoding tables + */ class utf8_entity_decoder { var $table; + + /** + * Initializes the decoding tables + */ function __construct() { $table = get_html_translation_table(HTML_ENTITIES); $table = array_flip($table); $this->table = array_map(array(&$this,'makeutf8'), $table); } + + /** + * Wrapper aorund unicode_to_utf8() + * + * @param $c string + * @return mixed + */ function makeutf8($c) { return unicode_to_utf8(array(ord($c))); } + + /** + * Decodes any HTML entity to it's correct UTF-8 char equivalent + * + * @param $ent string An entity + * @return string + */ function decode($ent) { if ($ent[1] == '#') { return utf8_decode_numeric($ent); @@ -562,8 +595,8 @@ if(!function_exists('utf8_to_unicode')){ * * @author * @author Harry Fuecks - * @param string UTF-8 encoded string - * @param boolean Check for invalid sequences? + * @param string $str UTF-8 encoded string + * @param boolean $strict Check for invalid sequences? * @return mixed array of unicode code points or false if UTF-8 invalid * @see unicode_to_utf8 * @link http://hsivonen.iki.fi/php-utf8/ @@ -735,8 +768,8 @@ if(!function_exists('unicode_to_utf8')){ * output buffering to concatenate the UTF-8 string (faster) as well as * reference the array by it's keys * - * @param array of unicode code points representing a string - * @param boolean Check for invalid sequences? + * @param array $arr of unicode code points representing a string + * @param boolean $strict Check for invalid sequences? * @return mixed UTF-8 string or false if array contains invalid code points * @author * @author Harry Fuecks @@ -855,8 +888,8 @@ if(!function_exists('utf8_bad_replace')){ * * @author Harry Fuecks * @see http://www.w3.org/International/questions/qa-forms-utf-8 - * @param string to search - * @param string to replace bad bytes with (defaults to '?') - use ASCII + * @param string $str to search + * @param string $replace to replace bad bytes with (defaults to '?') - use ASCII * @return string */ function utf8_bad_replace($str, $replace = '') { @@ -1000,7 +1033,7 @@ if(!UTF8_MBSTRING){ /** * UTF-8 Case lookup table * - * This lookuptable defines the lower case letters to their correspponding + * This lookuptable defines the lower case letters to their corresponding * upper case letter in UTF-8 * * @author Andreas Gohr -- cgit v1.2.3 From 29fbab8dda3a6c084b02400830218b57bd39aeee Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 Jun 2012 14:08:40 +0200 Subject: code cleanup --- inc/PassHash.class.php | 277 +++++++++++++++++++++++++------------------------ 1 file changed, 142 insertions(+), 135 deletions(-) (limited to 'inc') diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index d825057f0..f85766723 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -16,65 +16,67 @@ class PassHash { * match true is is returned else false * * @author Andreas Gohr + * @param $clear string Clear-Text password + * @param $hash string Hash to compare against * @return bool */ - function verify_hash($clear,$hash){ - $method=''; - $salt=''; - $magic=''; + function verify_hash($clear, $hash) { + $method = ''; + $salt = ''; + $magic = ''; //determine the used method and salt $len = strlen($hash); - if(preg_match('/^\$1\$([^\$]{0,8})\$/',$hash,$m)){ + if(preg_match('/^\$1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'smd5'; $salt = $m[1]; $magic = '1'; - }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$hash,$m)){ + } elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'apr1'; $salt = $m[1]; $magic = 'apr1'; - }elseif(preg_match('/^\$P\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$P\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'P'; - }elseif(preg_match('/^\$H\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$H\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'H'; - }elseif(preg_match('/^sha1\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^sha1\$(.{5})\$/', $hash, $m)) { $method = 'djangosha1'; $salt = $m[1]; - }elseif(preg_match('/^md5\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^md5\$(.{5})\$/', $hash, $m)) { $method = 'djangomd5'; $salt = $m[1]; - }elseif(preg_match('/^\$2a\$(.{2})\$/',$hash,$m)){ + } elseif(preg_match('/^\$2a\$(.{2})\$/', $hash, $m)) { $method = 'bcrypt'; $salt = $hash; - }elseif(substr($hash,0,6) == '{SSHA}'){ + } elseif(substr($hash, 0, 6) == '{SSHA}') { $method = 'ssha'; - $salt = substr(base64_decode(substr($hash, 6)),20); - }elseif(substr($hash,0,6) == '{SMD5}'){ + $salt = substr(base64_decode(substr($hash, 6)), 20); + } elseif(substr($hash, 0, 6) == '{SMD5}') { $method = 'lsmd5'; - $salt = substr(base64_decode(substr($hash, 6)),16); - }elseif($len == 32){ + $salt = substr(base64_decode(substr($hash, 6)), 16); + } elseif($len == 32) { $method = 'md5'; - }elseif($len == 40){ + } elseif($len == 40) { $method = 'sha1'; - }elseif($len == 16){ + } elseif($len == 16) { $method = 'mysql'; - }elseif($len == 41 && $hash[0] == '*'){ + } elseif($len == 41 && $hash[0] == '*') { $method = 'my411'; - }elseif($len == 34){ + } elseif($len == 34) { $method = 'kmd5'; $salt = $hash; - }else{ + } else { $method = 'crypt'; - $salt = substr($hash,0,2); + $salt = substr($hash, 0, 2); } //crypt and compare $call = 'hash_'.$method; - if($this->$call($clear,$salt,$magic) === $hash){ + if($this->$call($clear, $salt, $magic) === $hash) { return true; } return false; @@ -83,13 +85,14 @@ class PassHash { /** * Create a random salt * - * @param int $len - The length of the salt + * @param int $len The length of the salt + * @return string */ - public function gen_salt($len=32){ + 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; } @@ -100,12 +103,12 @@ class PassHash { * If $salt is not null, the value is kept, but the lenght restriction is * applied. * - * @param stringref $salt - The salt, pass null if you want one generated - * @param int $len - The length of the salt + * @param string &$salt The salt, pass null if you want one generated + * @param int $len The length of the salt */ - public function init_salt(&$salt,$len=32){ + public function init_salt(&$salt, $len = 32) { if(is_null($salt)) $salt = $this->gen_salt($len); - if(strlen($salt) > $len) $salt = substr($salt,0,$len); + if(strlen($salt) > $len) $salt = substr($salt, 0, $len); } // Password hashing methods follow below @@ -122,36 +125,37 @@ class PassHash { * @author Andreas Gohr * @author * @link http://de.php.net/manual/en/function.crypt.php#73619 - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (apr1 or 1) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_smd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_smd5($clear, $salt = null) { + $this->init_salt($salt, 8); - if(defined('CRYPT_MD5') && CRYPT_MD5){ - return crypt($clear,'$1$'.$salt.'$'); - }else{ + if(defined('CRYPT_MD5') && CRYPT_MD5) { + return crypt($clear, '$1$'.$salt.'$'); + } else { // Fall back to PHP-only implementation return $this->hash_apr1($clear, $salt, '1'); } } - /** * Password hashing method 'lsmd5' * * Uses salted MD5 hashs. Salt is 8 bytes long. * * This is the format used by LDAP. + * + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_lsmd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_lsmd5($clear, $salt = null) { + $this->init_salt($salt, 8); return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); } - /** * Password hashing method 'apr1' * @@ -161,17 +165,17 @@ class PassHash { * * @author * @link http://de.php.net/manual/en/function.crypt.php#73619 - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (apr1 or 1) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param string $magic The hash identifier (apr1 or 1) + * @return string Hashed password */ - public function hash_apr1($clear, $salt=null, $magic='apr1'){ - $this->init_salt($salt,8); + public function hash_apr1($clear, $salt = null, $magic = 'apr1') { + $this->init_salt($salt, 8); - $len = strlen($clear); + $len = strlen($clear); $text = $clear.'$'.$magic.'$'.$salt; - $bin = pack("H32", md5($clear.$salt.$clear)); + $bin = pack("H32", md5($clear.$salt.$clear)); for($i = $len; $i > 0; $i -= 16) { $text .= substr($bin, 0, min(16, $i)); } @@ -181,22 +185,24 @@ class PassHash { $bin = pack("H32", md5($text)); for($i = 0; $i < 1000; $i++) { $new = ($i & 1) ? $clear : $bin; - if ($i % 3) $new .= $salt; - if ($i % 7) $new .= $clear; + if($i % 3) $new .= $salt; + if($i % 7) $new .= $clear; $new .= ($i & 1) ? $bin : $clear; $bin = pack("H32", md5($new)); } $tmp = ''; - for ($i = 0; $i < 5; $i++) { + for($i = 0; $i < 5; $i++) { $k = $i + 6; $j = $i + 12; - if ($j == 16) $j = 5; + if($j == 16) $j = 5; $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp; } $tmp = chr(0).chr(0).$bin[11].$tmp; - $tmp = strtr(strrev(substr(base64_encode($tmp), 2)), - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + $tmp = strtr( + strrev(substr(base64_encode($tmp), 2)), + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + ); return '$'.$magic.'$'.$salt.'$'.$tmp; } @@ -205,10 +211,10 @@ class PassHash { * * Uses MD5 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_md5($clear){ + public function hash_md5($clear) { return md5($clear); } @@ -217,10 +223,10 @@ class PassHash { * * Uses SHA1 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_sha1($clear){ + public function hash_sha1($clear) { return sha1($clear); } @@ -229,12 +235,12 @@ class PassHash { * * Uses salted SHA1 hashs. Salt is 4 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_ssha($clear, $salt=null){ - $this->init_salt($salt,4); + public function hash_ssha($clear, $salt = null) { + $this->init_salt($salt, 4); return '{SSHA}'.base64_encode(pack("H*", sha1($clear.$salt)).$salt); } @@ -243,13 +249,13 @@ class PassHash { * * Uses salted crypt hashs. Salt is 2 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_crypt($clear, $salt=null){ - $this->init_salt($salt,2); - return crypt($clear,$salt); + public function hash_crypt($clear, $salt = null) { + $this->init_salt($salt, 2); + return crypt($clear, $salt); } /** @@ -259,16 +265,16 @@ class PassHash { * * @link http://www.php.net/mysql * @author - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_mysql($clear){ - $nr=0x50305735; - $nr2=0x12345671; - $add=7; + public function hash_mysql($clear) { + $nr = 0x50305735; + $nr2 = 0x12345671; + $add = 7; $charArr = preg_split("//", $clear); - foreach ($charArr as $char) { - if (($char == '') || ($char == ' ') || ($char == '\t')) continue; + foreach($charArr as $char) { + if(($char == '') || ($char == ' ') || ($char == '\t')) continue; $charVal = ord($char); $nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8); $nr2 += ($nr2 << 8) ^ $nr; @@ -282,10 +288,10 @@ class PassHash { * * Uses SHA1 hashs. This method is used by MySQL 4.11 and above * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_my411($clear){ + public function hash_my411($clear) { return '*'.sha1(pack("H*", sha1($clear))); } @@ -297,16 +303,16 @@ class PassHash { * Salt is 2 bytes long, but stored at position 16, so you need to pass at * least 18 bytes. You can pass the crypted hash as salt. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_kmd5($clear, $salt=null){ + public function hash_kmd5($clear, $salt = null) { $this->init_salt($salt); - $key = substr($salt, 16, 2); - $hash1 = strtolower(md5($key . md5($clear))); - $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); + $key = substr($salt, 16, 2); + $hash1 = strtolower(md5($key.md5($clear))); + $hash2 = substr($hash1, 0, 16).$key.substr($hash1, 16); return $hash2; } @@ -321,54 +327,55 @@ class PassHash { * an exception. * * @link http://www.openwall.com/phpass/ - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param string $magic - the hash identifier (P or H) - * @param int $compute - the iteration count for new passwords - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param string $magic The hash identifier (P or H) + * @param int $compute The iteration count for new passwords + * @throws Exception + * @return string Hashed password */ - public function hash_pmd5($clear, $salt=null, $magic='P',$compute=8){ + public function hash_pmd5($clear, $salt = null, $magic = 'P', $compute = 8) { $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - if(is_null($salt)){ + if(is_null($salt)) { $this->init_salt($salt); $salt = $itoa64[$compute].$salt; // prefix iteration count } $iterc = $salt[0]; // pos 0 of salt is iteration count - $iter = strpos($itoa64,$iterc); + $iter = strpos($itoa64, $iterc); - if($iter > 30){ + if($iter > 30) { throw new Exception("Too high iteration count ($iter) in ". - __class__.'::'.__function__); + __CLASS__.'::'.__FUNCTION__); } $iter = 1 << $iter; - $salt = substr($salt,1,8); + $salt = substr($salt, 1, 8); // iterate - $hash = md5($salt . $clear, true); + $hash = md5($salt.$clear, true); do { - $hash = md5($hash . $clear, true); - } while (--$iter); + $hash = md5($hash.$clear, true); + } while(--$iter); // encode $output = ''; - $count = 16; - $i = 0; + $count = 16; + $i = 0; do { $value = ord($hash[$i++]); $output .= $itoa64[$value & 0x3f]; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 8; $output .= $itoa64[($value >> 6) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 16; $output .= $itoa64[($value >> 12) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; $output .= $itoa64[($value >> 18) & 0x3f]; - } while ($i < $count); + } while($i < $count); return '$'.$magic.'$'.$iterc.$salt.$output; } @@ -376,7 +383,7 @@ class PassHash { /** * Alias for hash_pmd5 */ - public function hash_hmd5($clear, $salt=null, $magic='H', $compute=8){ + public function hash_hmd5($clear, $salt = null, $magic = 'H', $compute = 8) { return $this->hash_pmd5($clear, $salt, $magic, $compute); } @@ -387,12 +394,12 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangosha1($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangosha1($clear, $salt = null) { + $this->init_salt($salt, 5); return 'sha1$'.$salt.'$'.sha1($salt.$clear); } @@ -403,16 +410,15 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangomd5($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangomd5($clear, $salt = null) { + $this->init_salt($salt, 5); return 'md5$'.$salt.'$'.md5($salt.$clear); } - /** * Passwordhashing method 'bcrypt' * @@ -424,20 +430,21 @@ class PassHash { * will break. When no salt is given, the iteration count can be set * through the $compute variable. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param int $compute - the iteration count (between 4 and 31) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param int $compute The iteration count (between 4 and 31) + * @throws Exception + * @return string Hashed password */ - public function hash_bcrypt($clear, $salt=null, $compute=8){ - if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1){ + public function hash_bcrypt($clear, $salt = null, $compute = 8) { + if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1) { throw new Exception('This PHP installation has no bcrypt support'); } - if(is_null($salt)){ + if(is_null($salt)) { if($compute < 4 || $compute > 31) $compute = 8; $salt = '$2a$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. - $this->gen_salt(22); + $this->gen_salt(22); } return crypt($clear, $salt); -- cgit v1.2.3 From 89177306a2278255d6a2203b5fff4a839183d3cd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 14:00:49 +0200 Subject: Introducing a $_REQUEST/POST/GET wrapper This new wrapper ensures types are correct and accessed parameters are actually set (with custom default fallbacks). The wrapper is available in the global $INPUT variable. It accesses $_REQUEST by default. If POST or GET is required, the post and get members can be used: $INPUT->int('foo',false); // access $_REQUEST['foo'], default false $INPUT->post->int('foo'); // access $_POST['foo'], default 0 $INPUT->get->int('foo'); // access $_GET['foo'], default 0 The codebase still needs to be updated to make use of this. --- inc/Input.class.php | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++ inc/init.php | 4 ++ inc/load.php | 1 + 3 files changed, 152 insertions(+) create mode 100644 inc/Input.class.php (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php new file mode 100644 index 000000000..f1967599f --- /dev/null +++ b/inc/Input.class.php @@ -0,0 +1,147 @@ + + */ +class Input { + + /** @var PostInput Access $_POST parameters */ + public $post; + /** @var GetInput Access $_GET parameters */ + public $get; + + protected $access; + + /** + * Intilizes the Input class and it subcomponents + */ + function __construct() { + $this->access = &$_REQUEST; + $this->post = new PostInput(); + $this->get = new GetInput(); + } + + /** + * Access a request parameter without any type conversion + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @return mixed + */ + public function param($name, $default = null) { + if(!isset($this->access[$name])) return $default; + return $this->access[$name]; + } + + /** + * Get a reference to a request parameter + * + * This avoids copying data in memory, when the parameter is not set it will be created + * and intialized with the given $default value before a reference is returned + * + * @param string $name Parameter name + * @param mixed $default Initialize parameter with if not set + * @return &mixed + */ + public function &ref($name, $default = '') { + if(!isset($this->access[$name])) { + $this->access[$name] = $default; + } + + $ref = &$this->access[$name]; + return $ref; + } + + /** + * Access a request parameter as int + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set or is an array + * @return int + */ + public function int($name, $default = 0) { + if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + + return (int) $this->access[$name]; + } + + /** + * Access a request parameter as string + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set or is an array + * @return string + */ + public function str($name, $default = '') { + if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + + return (string) $this->access[$name]; + } + + /** + * Access a request parameter as bool + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @return bool + */ + public function bool($name, $default = '') { + if(!isset($this->access[$name])) return $default; + + return (bool) $this->access[$name]; + } + + /** + * Access a request parameter as array + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @return array + */ + public function arr($name, $default = array()) { + if(!isset($this->access[$name])) return $default; + + return (array) $this->access[$name]; + } + +} + +/** + * Internal class used for $_POST access in Input class + */ +class PostInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_POST; + unset ($this->post); + unset ($this->get); + } +} + +/** + * Internal class used for $_GET access in Input class + */ +class GetInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_GET; + unset ($this->post); + unset ($this->get); + } +} \ No newline at end of file diff --git a/inc/init.php b/inc/init.php index 403fbe4ab..1907aea09 100644 --- a/inc/init.php +++ b/inc/init.php @@ -197,6 +197,10 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con // load libraries require_once(DOKU_INC.'inc/load.php'); +// input handle class +global $INPUT; +$INPUT = new Input(); + // initialize plugin controller $plugin_controller = new $plugin_controller_class(); diff --git a/inc/load.php b/inc/load.php index 7a410e452..b676518e7 100644 --- a/inc/load.php +++ b/inc/load.php @@ -62,6 +62,7 @@ function load_autoload($name){ 'Doku_Event' => DOKU_INC.'inc/events.php', 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', + 'Input' => DOKU_INC.'inc/Input.class.php', 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 'FeedParser' => DOKU_INC.'inc/FeedParser.php', -- cgit v1.2.3 From fd50d5c713878b03fdcd8d21f8209f968fe55646 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 14:35:23 +0200 Subject: added has() method to input class --- inc/Input.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index f1967599f..7665c609e 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -27,6 +27,19 @@ class Input { $this->get = new GetInput(); } + /** + * Check if a parameter was set + * + * Basically a wrapper around isset + * + * @see isset + * @param $name Parameter name + * @return bool + */ + public function has($name) { + return isset($this->access[$name]); + } + /** * Access a request parameter without any type conversion * -- cgit v1.2.3 From c4e18ef950a64e41101f06da0c4ca2e45bb21fb7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 15:16:47 +0200 Subject: added 3rd parameter to Input methods This allows to treat empty parameters as default --- inc/Input.class.php | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index 7665c609e..878f29550 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -33,7 +33,7 @@ class Input { * Basically a wrapper around isset * * @see isset - * @param $name Parameter name + * @param string $name Parameter name * @return bool */ public function has($name) { @@ -45,10 +45,12 @@ class Input { * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() * @return mixed */ - public function param($name, $default = null) { + public function param($name, $default = null, $nonempty = false) { if(!isset($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; return $this->access[$name]; } @@ -58,12 +60,13 @@ class Input { * This avoids copying data in memory, when the parameter is not set it will be created * and intialized with the given $default value before a reference is returned * - * @param string $name Parameter name - * @param mixed $default Initialize parameter with if not set + * @param string $name Parameter name + * @param mixed $default Initialize parameter with if not set + * @param bool $nonempty Init with $default if parameter is set but empty() * @return &mixed */ - public function &ref($name, $default = '') { - if(!isset($this->access[$name])) { + public function &ref($name, $default = '', $nonempty = false) { + if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) { $this->access[$name] = $default; } @@ -76,11 +79,13 @@ class Input { * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set or is an array + * @param bool $nonempty Return $default if parameter is set but empty() * @return int */ - public function int($name, $default = 0) { + public function int($name, $default = 0, $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; return (int) $this->access[$name]; } @@ -90,11 +95,13 @@ class Input { * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set or is an array + * @param bool $nonempty Return $default if parameter is set but empty() * @return string */ - public function str($name, $default = '') { + public function str($name, $default = '', $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; return (string) $this->access[$name]; } @@ -104,10 +111,12 @@ class Input { * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() * @return bool */ - public function bool($name, $default = '') { + public function bool($name, $default = '', $nonempty = false) { if(!isset($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; return (bool) $this->access[$name]; } @@ -117,10 +126,12 @@ class Input { * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() * @return array */ - public function arr($name, $default = array()) { + public function arr($name, $default = array(), $nonempty = false) { if(!isset($this->access[$name])) return $default; + if($nonempty && empty($this->access[$name])) return $default; return (array) $this->access[$name]; } -- cgit v1.2.3 From ff1769defb9de14a80792aed16652451a29f03da Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 15:21:26 +0200 Subject: another input wrapper fix --- inc/parserutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/parserutils.php b/inc/parserutils.php index 9384929bf..25d7cf131 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -739,7 +739,7 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){ * @author Andreas Gohr */ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { - global $conf, $config_cascade; + global $conf, $config_cascade, $INPUT; $language = strtolower($language); // remove any leading or trailing blank lines @@ -747,7 +747,7 @@ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { $cache = getCacheName($language.$code,".code"); $ctime = @filemtime($cache); - if($ctime && !$_REQUEST['purge'] && + if($ctime && !$INPUT->bool('purge') && $ctime > filemtime(DOKU_INC.'inc/geshi.php') && // geshi changed $ctime > @filemtime(DOKU_INC.'inc/geshi/'.$language.'.php') && // language syntax definition changed $ctime > filemtime(reset($config_cascade['main']['default']))){ // dokuwiki changed -- cgit v1.2.3 From ab5d26daf90483fc0ed3437c64011a5e8475970f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 16:07:18 +0200 Subject: code cleanup --- inc/auth.php | 596 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 320 insertions(+), 276 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index ed0e2dcf7..8489c2265 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -12,13 +12,13 @@ if(!defined('DOKU_INC')) die('meh.'); // some ACL level defines -define('AUTH_NONE',0); -define('AUTH_READ',1); -define('AUTH_EDIT',2); -define('AUTH_CREATE',4); -define('AUTH_UPLOAD',8); -define('AUTH_DELETE',16); -define('AUTH_ADMIN',255); +define('AUTH_NONE', 0); +define('AUTH_READ', 1); +define('AUTH_EDIT', 2); +define('AUTH_CREATE', 4); +define('AUTH_UPLOAD', 8); +define('AUTH_DELETE', 16); +define('AUTH_ADMIN', 255); /** * Initialize the auth system. @@ -29,26 +29,28 @@ define('AUTH_ADMIN',255); * * @todo backend loading maybe should be handled by the class autoloader * @todo maybe split into multiple functions at the XXX marked positions + * @triggers AUTH_LOGIN_CHECK + * @return bool */ -function auth_setup(){ +function auth_setup() { global $conf; + /* @var auth_basic $auth */ global $auth; global $AUTH_ACL; global $lang; - global $config_cascade; $AUTH_ACL = array(); if(!$conf['useacl']) return false; // load the the backend auth functions and instantiate the auth object XXX - if (@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { + if(@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { require_once(DOKU_INC.'inc/auth/basic.class.php'); require_once(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php'); $auth_class = "auth_".$conf['authtype']; - if (class_exists($auth_class)) { + if(class_exists($auth_class)) { $auth = new $auth_class(); - if ($auth->success == false) { + if($auth->success == false) { // degrade to unauthenticated user unset($auth); auth_logoff(); @@ -61,14 +63,14 @@ function auth_setup(){ nice_die($lang['authmodfailed']); } - if(!$auth) return; + if(!$auth) return false; // do the login either by cookie or provided credentials XXX - if (!isset($_REQUEST['u'])) $_REQUEST['u'] = ''; - if (!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; - if (!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; + if(!isset($_REQUEST['u'])) $_REQUEST['u'] = ''; + if(!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; + if(!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; $_REQUEST['http_credentials'] = false; - if (!$conf['rememberme']) $_REQUEST['r'] = false; + if(!$conf['rememberme']) $_REQUEST['r'] = false; // handle renamed HTTP_AUTHORIZATION variable (can happen when a fix like // the one presented at @@ -77,48 +79,50 @@ function auth_setup(){ if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; // streamline HTTP auth credentials (IIS/rewrite -> mod_php) - if(isset($_SERVER['HTTP_AUTHORIZATION'])){ - list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']) = + if(isset($_SERVER['HTTP_AUTHORIZATION'])) { + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } // if no credentials were given try to use HTTP auth (for SSO) - if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){ - $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; - $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW']; + if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) { + $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; + $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW']; $_REQUEST['http_credentials'] = true; } // apply cleaning $_REQUEST['u'] = $auth->cleanUser($_REQUEST['u']); - if(isset($_REQUEST['authtok'])){ + if(isset($_REQUEST['authtok'])) { // when an authentication token is given, trust the session auth_validateToken($_REQUEST['authtok']); - }elseif(!is_null($auth) && $auth->canDo('external')){ + } elseif(!is_null($auth) && $auth->canDo('external')) { // external trust mechanism in place - $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']); - }else{ + $auth->trustExternal($_REQUEST['u'], $_REQUEST['p'], $_REQUEST['r']); + } else { $evdata = array( - 'user' => $_REQUEST['u'], - 'password' => $_REQUEST['p'], - 'sticky' => $_REQUEST['r'], - 'silent' => $_REQUEST['http_credentials'], - ); + 'user' => $_REQUEST['u'], + 'password' => $_REQUEST['p'], + 'sticky' => $_REQUEST['r'], + 'silent' => $_REQUEST['http_credentials'], + ); trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper'); } //load ACL into a global array XXX $AUTH_ACL = auth_loadACL(); + + return true; } /** * Loads the ACL setup and handle user wildcards * * @author Andreas Gohr - * @returns array + * @return array */ -function auth_loadACL(){ +function auth_loadACL() { global $config_cascade; if(!is_readable($config_cascade['acl']['default'])) return array(); @@ -126,24 +130,32 @@ function auth_loadACL(){ $acl = file($config_cascade['acl']['default']); //support user wildcard - if(isset($_SERVER['REMOTE_USER'])){ + if(isset($_SERVER['REMOTE_USER'])) { $len = count($acl); - for($i=0; $i<$len; $i++){ + for($i = 0; $i < $len; $i++) { if($acl[$i]{0} == '#') continue; - list($id,$rest) = preg_split('/\s+/',$acl[$i],2); - $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id); - $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest); + list($id, $rest) = preg_split('/\s+/', $acl[$i], 2); + $id = str_replace('%USER%', cleanID($_SERVER['REMOTE_USER']), $id); + $rest = str_replace('%USER%', auth_nameencode($_SERVER['REMOTE_USER']), $rest); $acl[$i] = "$id\t$rest"; } } return $acl; } +/** + * Event hook callback for AUTH_LOGIN_CHECK + * + * @param $evdata + * @return bool + */ function auth_login_wrapper($evdata) { - return auth_login($evdata['user'], - $evdata['password'], - $evdata['sticky'], - $evdata['silent']); + return auth_login( + $evdata['user'], + $evdata['password'], + $evdata['sticky'], + $evdata['silent'] + ); } /** @@ -175,53 +187,56 @@ function auth_login_wrapper($evdata) { * @param bool $silent Don't show error on bad auth * @return bool true on successful auth */ -function auth_login($user,$pass,$sticky=false,$silent=false){ +function auth_login($user, $pass, $sticky = false, $silent = false) { global $USERINFO; global $conf; global $lang; + /* @var auth_basic $auth */ global $auth; + $sticky ? $sticky = true : $sticky = false; //sanity check - if (!$auth) return false; + if(!$auth) return false; - if(!empty($user)){ + if(!empty($user)) { //usual login - if ($auth->checkPass($user,$pass)){ + if($auth->checkPass($user, $pass)) { // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session + auth_setCookie($user, PMA_blowfish_encrypt($pass, $secret), $sticky); return true; - }else{ + } else { //invalid credentials - log off - if(!$silent) msg($lang['badlogin'],-1); + if(!$silent) msg($lang['badlogin'], -1); auth_logoff(); return false; } - }else{ + } else { // read cookie information - list($user,$sticky,$pass) = auth_getCookie(); - if($user && $pass){ + list($user, $sticky, $pass) = auth_getCookie(); + if($user && $pass) { // we got a cookie - see if we can trust it // get session info $session = $_SESSION[DOKU_COOKIE]['auth']; if(isset($session) && - $auth->useSessionCache($user) && - ($session['time'] >= time()-$conf['auth_security_timeout']) && - ($session['user'] == $user) && - ($session['pass'] == sha1($pass)) && //still crypted - ($session['buid'] == auth_browseruid()) ){ + $auth->useSessionCache($user) && + ($session['time'] >= time() - $conf['auth_security_timeout']) && + ($session['user'] == $user) && + ($session['pass'] == sha1($pass)) && //still crypted + ($session['buid'] == auth_browseruid()) + ) { // he has session, cookie and browser right - let him in $_SERVER['REMOTE_USER'] = $user; - $USERINFO = $session['info']; //FIXME move all references to session + $USERINFO = $session['info']; //FIXME move all references to session return true; } // no we don't trust it yet - recheck pass but silent $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - $pass = PMA_blowfish_decrypt($pass,$secret); - return auth_login($user,$pass,$sticky,true); + $pass = PMA_blowfish_decrypt($pass, $secret); + return auth_login($user, $pass, $sticky, true); } } //just to be sure @@ -239,8 +254,8 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ * @param string $token The authentication token * @return boolean true (or will exit on failure) */ -function auth_validateToken($token){ - if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']){ +function auth_validateToken($token) { + if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) { // bad token header("HTTP/1.0 401 Unauthorized"); print 'Invalid auth token - maybe the session timed out'; @@ -250,7 +265,7 @@ function auth_validateToken($token){ // still here? trust the session data global $USERINFO; $_SERVER['REMOTE_USER'] = $_SESSION[DOKU_COOKIE]['auth']['user']; - $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; + $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; return true; } @@ -262,7 +277,7 @@ function auth_validateToken($token){ * @author Andreas Gohr * @return string The auth token */ -function auth_createToken(){ +function auth_createToken() { $token = md5(mt_rand()); @session_start(); // reopen the session if needed $_SESSION[DOKU_COOKIE]['auth']['token'] = $token; @@ -281,14 +296,14 @@ function auth_createToken(){ * * @return string a MD5 sum of various browser headers */ -function auth_browseruid(){ - $ip = clientIP(true); - $uid = ''; +function auth_browseruid() { + $ip = clientIP(true); + $uid = ''; $uid .= $_SERVER['HTTP_USER_AGENT']; $uid .= $_SERVER['HTTP_ACCEPT_ENCODING']; $uid .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; $uid .= $_SERVER['HTTP_ACCEPT_CHARSET']; - $uid .= substr($ip,0,strpos($ip,'.')); + $uid .= substr($ip, 0, strpos($ip, '.')); return md5($uid); } @@ -304,15 +319,15 @@ function auth_browseruid(){ * @param bool $addsession if true, the sessionid is added to the salt * @return string */ -function auth_cookiesalt($addsession=false){ +function auth_cookiesalt($addsession = false) { global $conf; $file = $conf['metadir'].'/_htcookiesalt'; $salt = io_readFile($file); - if(empty($salt)){ - $salt = uniqid(rand(),true); - io_saveFile($file,$salt); + if(empty($salt)) { + $salt = uniqid(rand(), true); + io_saveFile($file, $salt); } - if($addsession){ + if($addsession) { $salt .= session_id(); } return $salt; @@ -327,10 +342,10 @@ function auth_cookiesalt($addsession=false){ * @author Andreas Gohr * @param bool $keepbc - when true, the breadcrumb data is not cleared */ -function auth_logoff($keepbc=false){ +function auth_logoff($keepbc = false) { global $conf; global $USERINFO; - global $INFO, $ID; + /* @var auth_basic $auth */ global $auth; // make sure the session is writable (it usually is) @@ -346,13 +361,13 @@ function auth_logoff($keepbc=false){ unset($_SESSION[DOKU_COOKIE]['bc']); if(isset($_SERVER['REMOTE_USER'])) unset($_SERVER['REMOTE_USER']); - $USERINFO=null; //FIXME + $USERINFO = null; //FIXME $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl())); + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } if($auth) $auth->logOff(); @@ -368,32 +383,34 @@ function auth_logoff($keepbc=false){ * * @author Andreas Gohr * @see auth_isadmin - * @param string user - Username - * @param array groups - List of groups the user is in - * @param bool adminonly - when true checks if user is admin + * @param string $user Username + * @param array $groups List of groups the user is in + * @param bool $adminonly when true checks if user is admin + * @return bool */ -function auth_ismanager($user=null,$groups=null,$adminonly=false){ +function auth_ismanager($user = null, $groups = null, $adminonly = false) { global $conf; global $USERINFO; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; if(is_null($user)) { - if (!isset($_SERVER['REMOTE_USER'])) { + if(!isset($_SERVER['REMOTE_USER'])) { return false; } else { $user = $_SERVER['REMOTE_USER']; } } - if(is_null($groups)){ + if(is_null($groups)) { $groups = (array) $USERINFO['grps']; } // check superuser match - if(auth_isMember($conf['superuser'],$user, $groups)) return true; + if(auth_isMember($conf['superuser'], $user, $groups)) return true; if($adminonly) return false; // check managers - if(auth_isMember($conf['manager'],$user, $groups)) return true; + if(auth_isMember($conf['manager'], $user, $groups)) return true; return false; } @@ -406,13 +423,15 @@ function auth_ismanager($user=null,$groups=null,$adminonly=false){ * The info is available through $INFO['isadmin'], too * * @author Andreas Gohr - * @see auth_ismanager + * @see auth_ismanager() + * @param string $user Username + * @param array $groups List of groups the user is in + * @return bool */ -function auth_isadmin($user=null,$groups=null){ - return auth_ismanager($user,$groups,true); +function auth_isadmin($user = null, $groups = null) { + return auth_ismanager($user, $groups, true); } - /** * Match a user and his groups against a comma separated list of * users and groups to determine membership status @@ -424,31 +443,32 @@ function auth_isadmin($user=null,$groups=null){ * @param $groups array groups the user is member of * @return bool true for membership acknowledged */ -function auth_isMember($memberlist,$user,array $groups){ +function auth_isMember($memberlist, $user, array $groups) { + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; // clean user and groups - if(!$auth->isCaseSensitive()){ - $user = utf8_strtolower($user); - $groups = array_map('utf8_strtolower',$groups); + if(!$auth->isCaseSensitive()) { + $user = utf8_strtolower($user); + $groups = array_map('utf8_strtolower', $groups); } - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),$groups); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), $groups); // extract the memberlist - $members = explode(',',$memberlist); - $members = array_map('trim',$members); + $members = explode(',', $memberlist); + $members = array_map('trim', $members); $members = array_unique($members); $members = array_filter($members); // compare cleaned values - foreach($members as $member){ + foreach($members as $member) { if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member); - if($member[0] == '@'){ - $member = $auth->cleanGroup(substr($member,1)); + if($member[0] == '@') { + $member = $auth->cleanGroup(substr($member, 1)); if(in_array($member, $groups)) return true; - }else{ + } else { $member = $auth->cleanUser($member); if($member == $user) return true; } @@ -468,12 +488,12 @@ function auth_isMember($memberlist,$user,array $groups){ * @param string $id page ID (needs to be resolved and cleaned) * @return int permission level */ -function auth_quickaclcheck($id){ +function auth_quickaclcheck($id) { global $conf; global $USERINFO; # if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - return auth_aclcheck($id,$_SERVER['REMOTE_USER'],$USERINFO['grps']); + return auth_aclcheck($id, $_SERVER['REMOTE_USER'], $USERINFO['grps']); } /** @@ -487,106 +507,110 @@ function auth_quickaclcheck($id){ * @param array $groups Array of groups the user is in * @return int permission level */ -function auth_aclcheck($id,$user,$groups){ +function auth_aclcheck($id, $user, $groups) { global $conf; global $AUTH_ACL; + /* @var auth_basic $auth */ global $auth; // if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - if (!$auth) return AUTH_NONE; + if(!$auth) return AUTH_NONE; //make sure groups is an array if(!is_array($groups)) $groups = array(); //if user is superuser or in superusergroup return 255 (acl_admin) - if(auth_isadmin($user,$groups)) { return AUTH_ADMIN; } + if(auth_isadmin($user, $groups)) { + return AUTH_ADMIN; + } $ci = ''; if(!$auth->isCaseSensitive()) $ci = 'ui'; - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),(array)$groups); - $user = auth_nameencode($user); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), (array) $groups); + $user = auth_nameencode($user); //prepend groups with @ and nameencode $cnt = count($groups); - for($i=0; $i<$cnt; $i++){ + for($i = 0; $i < $cnt; $i++) { $groups[$i] = '@'.auth_nameencode($groups[$i]); } - $ns = getNS($id); - $perm = -1; + $ns = getNS($id); + $perm = -1; - if($user || count($groups)){ + if($user || count($groups)) { //add ALL group $groups[] = '@ALL'; //add User if($user) $groups[] = $user; - }else{ + } else { $groups[] = '@ALL'; } //check exact match first - $matches = preg_grep('/^'.preg_quote($id,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + $matches = preg_grep('/^'.preg_quote($id, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } - if($perm > -1){ + if($perm > -1) { //we had a match - return it return $perm; } } //still here? do the namespace checks - if($ns){ + if($ns) { $path = $ns.':*'; - }else{ + } else { $path = '*'; //root document } - do{ - $matches = preg_grep('/^'.preg_quote($path,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + do { + $matches = preg_grep('/^'.preg_quote($path, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } //we had a match - return it - if ($perm != -1) { + if($perm != -1) { return $perm; } } //get next higher namespace - $ns = getNS($ns); + $ns = getNS($ns); - if($path != '*'){ + if($path != '*') { $path = $ns.':*'; if($path == ':*') $path = '*'; - }else{ + } else { //we did this already //looks like there is something wrong with the ACL //break here msg('No ACL setup yet! Denying access to everyone.'); return AUTH_NONE; } - }while(1); //this should never loop endless + } while(1); //this should never loop endless + return AUTH_NONE; } /** @@ -602,7 +626,7 @@ function auth_aclcheck($id,$user,$groups){ * @author Andreas Gohr * @see rawurldecode() */ -function auth_nameencode($name,$skip_group=false){ +function auth_nameencode($name, $skip_group = false) { global $cache_authname; $cache =& $cache_authname; $name = (string) $name; @@ -610,13 +634,17 @@ function auth_nameencode($name,$skip_group=false){ // never encode wildcard FS#1955 if($name == '%USER%') return $name; - if (!isset($cache[$name][$skip_group])) { - if($skip_group && $name{0} =='@'){ - $cache[$name][$skip_group] = '@'.preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",substr($name,1)); - }else{ - $cache[$name][$skip_group] = preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",$name); + if(!isset($cache[$name][$skip_group])) { + if($skip_group && $name{0} == '@') { + $cache[$name][$skip_group] = '@'.preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", substr($name, 1) + ); + } else { + $cache[$name][$skip_group] = preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", $name + ); } } @@ -631,20 +659,20 @@ function auth_nameencode($name,$skip_group=false){ * * @return string pronouncable password */ -function auth_pwgen(){ +function auth_pwgen() { $pw = ''; $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones - $v = 'aeiou'; //vowels - $a = $c.$v; //both + $v = 'aeiou'; //vowels + $a = $c.$v; //both //use two syllables... - for($i=0;$i < 2; $i++){ - $pw .= $c[rand(0, strlen($c)-1)]; - $pw .= $v[rand(0, strlen($v)-1)]; - $pw .= $a[rand(0, strlen($a)-1)]; + for($i = 0; $i < 2; $i++) { + $pw .= $c[rand(0, strlen($c) - 1)]; + $pw .= $v[rand(0, strlen($v) - 1)]; + $pw .= $a[rand(0, strlen($a) - 1)]; } //... and add a nice number - $pw .= rand(10,99); + $pw .= rand(10, 99); return $pw; } @@ -653,16 +681,16 @@ function auth_pwgen(){ * Sends a password to the given user * * @author Andreas Gohr - * + * @param string $user Login name of the user + * @param string $password The new password in clear text * @return bool true on success */ -function auth_sendPassword($user,$password){ - global $conf; +function auth_sendPassword($user, $password) { global $lang; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; - $hdrs = ''; $user = $auth->cleanUser($user); $userinfo = $auth->getUserData($user); @@ -670,15 +698,15 @@ function auth_sendPassword($user,$password){ $text = rawLocale('password'); $trep = array( - 'FULLNAME' => $userinfo['name'], - 'LOGIN' => $user, - 'PASSWORD' => $password - ); + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'PASSWORD' => $password + ); $mail = new Mailer(); $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); $mail->subject($lang['regpwmail']); - $mail->setBody($text,$trep); + $mail->setBody($text, $trep); return $mail->send(); } @@ -688,12 +716,12 @@ function auth_sendPassword($user,$password){ * This registers a new user - Data is read directly from $_POST * * @author Andreas Gohr - * * @return bool true on success, false on any error */ -function register(){ +function register() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; if(!$_POST['save']) return false; @@ -703,61 +731,63 @@ function register(){ $_POST['login'] = trim($auth->cleanUser($_POST['login'])); //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['fullname'])); + $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['email'])); - if( empty($_POST['login']) || + if(empty($_POST['login']) || empty($_POST['fullname']) || - empty($_POST['email']) ){ - msg($lang['regmissing'],-1); + empty($_POST['email']) + ) { + msg($lang['regmissing'], -1); return false; } - if ($conf['autopasswd']) { - $pass = auth_pwgen(); // automatically generate password - } elseif (empty($_POST['pass']) || - empty($_POST['passchk'])) { - msg($lang['regmissing'], -1); // complain about missing passwords + if($conf['autopasswd']) { + $pass = auth_pwgen(); // automatically generate password + } elseif(empty($_POST['pass']) || + empty($_POST['passchk']) + ) { + msg($lang['regmissing'], -1); // complain about missing passwords return false; - } elseif ($_POST['pass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + } elseif($_POST['pass'] != $_POST['passchk']) { + msg($lang['regbadpass'], -1); // complain about misspelled passwords return false; } else { - $pass = $_POST['pass']; // accept checked and valid password + $pass = $_POST['pass']; // accept checked and valid password } //check mail - if(!mail_isvalid($_POST['email'])){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($_POST['email'])) { + msg($lang['regbadmail'], -1); return false; } //okay try to create the user - if(!$auth->triggerUserMod('create', array($_POST['login'],$pass,$_POST['fullname'],$_POST['email']))){ - msg($lang['reguexists'],-1); + if(!$auth->triggerUserMod('create', array($_POST['login'], $pass, $_POST['fullname'], $_POST['email']))) { + msg($lang['reguexists'], -1); return false; } // create substitutions for use in notification email $substitutions = array( - 'NEWUSER' => $_POST['login'], - 'NEWNAME' => $_POST['fullname'], - 'NEWEMAIL' => $_POST['email'], - ); + 'NEWUSER' => $_POST['login'], + 'NEWNAME' => $_POST['fullname'], + 'NEWEMAIL' => $_POST['email'], + ); - if (!$conf['autopasswd']) { - msg($lang['regsuccess2'],1); + if(!$conf['autopasswd']) { + msg($lang['regsuccess2'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; } // autogenerated password? then send him the password - if (auth_sendPassword($_POST['login'],$pass)){ - msg($lang['regsuccess'],1); + if(auth_sendPassword($_POST['login'], $pass)) { + msg($lang['regsuccess'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; - }else{ - msg($lang['regmailfail'],-1); + } else { + msg($lang['regmailfail'], -1); return false; } } @@ -771,61 +801,66 @@ function updateprofile() { global $conf; global $INFO; global $lang; + /* @var auth_basic $auth */ global $auth; if(empty($_POST['save'])) return false; if(!checkSecurityToken()) return false; if(!actionOK('profile')) { - msg($lang['profna'],-1); + msg($lang['profna'], -1); return false; } - if ($_POST['newpass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + if($_POST['newpass'] != $_POST['passchk']) { + msg($lang['regbadpass'], -1); // complain about misspelled passwords return false; } //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['fullname'])); + $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['email'])); - if ((empty($_POST['fullname']) && $auth->canDo('modName')) || - (empty($_POST['email']) && $auth->canDo('modMail'))) { - msg($lang['profnoempty'],-1); + if((empty($_POST['fullname']) && $auth->canDo('modName')) || + (empty($_POST['email']) && $auth->canDo('modMail')) + ) { + msg($lang['profnoempty'], -1); return false; } - if (!mail_isvalid($_POST['email']) && $auth->canDo('modMail')){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($_POST['email']) && $auth->canDo('modMail')) { + msg($lang['regbadmail'], -1); return false; } - if ($_POST['fullname'] != $INFO['userinfo']['name'] && $auth->canDo('modName')) $changes['name'] = $_POST['fullname']; - if ($_POST['email'] != $INFO['userinfo']['mail'] && $auth->canDo('modMail')) $changes['mail'] = $_POST['email']; - if (!empty($_POST['newpass']) && $auth->canDo('modPass')) $changes['pass'] = $_POST['newpass']; + $changes = array(); + if($_POST['fullname'] != $INFO['userinfo']['name'] && $auth->canDo('modName')) $changes['name'] = $_POST['fullname']; + if($_POST['email'] != $INFO['userinfo']['mail'] && $auth->canDo('modMail')) $changes['mail'] = $_POST['email']; + if(!empty($_POST['newpass']) && $auth->canDo('modPass')) $changes['pass'] = $_POST['newpass']; - if (!count($changes)) { + if(!count($changes)) { msg($lang['profnochange'], -1); return false; } - if ($conf['profileconfirm']) { - if (!$auth->checkPass($_SERVER['REMOTE_USER'], $_POST['oldpass'])) { - msg($lang['badlogin'],-1); + if($conf['profileconfirm']) { + if(!$auth->checkPass($_SERVER['REMOTE_USER'], $_POST['oldpass'])) { + msg($lang['badlogin'], -1); return false; } } - if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { + if($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { // update cookie and session with the changed data - if ($changes['pass']){ - list($user,$sticky,$pass) = auth_getCookie(); - $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky)); - auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + if($changes['pass']) { + list( /*user*/, $sticky, /*pass*/) = auth_getCookie(); + $pass = PMA_blowfish_encrypt($changes['pass'], auth_cookiesalt(!$sticky)); + auth_setCookie($_SERVER['REMOTE_USER'], $pass, (bool) $sticky); } return true; } + + return false; } /** @@ -842,68 +877,69 @@ function updateprofile() { * * @return bool true on success, false on any error */ -function act_resendpwd(){ +function act_resendpwd() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; if(!actionOK('resendpwd')) { - msg($lang['resendna'],-1); + msg($lang['resendna'], -1); return false; } - $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + $token = preg_replace('/[^a-f0-9]+/', '', $_REQUEST['pwauth']); - if($token){ + if($token) { // 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); + 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); + if((time() - filemtime($tfile)) > (3 * 60 * 60 * 24)) { + msg($lang['resendpwdbadauth'], -1); unset($_REQUEST['pwauth']); @unlink($tfile); return false; } - $user = io_readfile($tfile); + $user = io_readfile($tfile); $userinfo = $auth->getUserData($user); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; } - if(!$conf['autopasswd']){ // we let the user choose a password + 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); + if($_REQUEST['pass'] != $_REQUEST['passchk']) { + msg($lang['regbadpass'], -1); return false; } $pass = $_REQUEST['pass']; - if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { - msg('error modifying user data',-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 + } 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); + 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); + if(auth_sendPassword($user, $pass)) { + msg($lang['resendpwdsuccess'], 1); } else { - msg($lang['regmailfail'],-1); + msg($lang['regmailfail'], -1); } } @@ -915,7 +951,7 @@ function act_resendpwd(){ if(!$_POST['save']) return false; - if (empty($_POST['login'])) { + if(empty($_POST['login'])) { msg($lang['resendpwdmissing'], -1); return false; } else { @@ -931,30 +967,29 @@ function act_resendpwd(){ // generate auth token $token = md5(auth_cookiesalt().$user); //secret but user based $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - $url = wl('',array('do'=>'resendpwd','pwauth'=>$token),true,'&'); + $url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&'); - io_saveFile($tfile,$user); + io_saveFile($tfile, $user); $text = rawLocale('pwconfirm'); $trep = array( - 'FULLNAME' => $userinfo['name'], - 'LOGIN' => $user, - 'CONFIRM' => $url - ); + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'CONFIRM' => $url + ); $mail = new Mailer(); $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); $mail->subject($lang['regpwmail']); - $mail->setBody($text,$trep); - if($mail->send()){ - msg($lang['resendpwdconfirm'],1); - }else{ - msg($lang['regmailfail'],-1); + $mail->setBody($text, $trep); + if($mail->send()) { + msg($lang['resendpwdconfirm'], 1); + } else { + msg($lang['regmailfail'], -1); } return true; } - - return false; // never reached + // never reached } /** @@ -964,32 +999,37 @@ function act_resendpwd(){ * is chosen. * * @author Andreas Gohr + * @param string $clear The clear text password + * @param string $method The hashing method + * @param string $salt A salt, null for random * @return string The crypted password */ -function auth_cryptPassword($clear,$method='',$salt=null){ +function auth_cryptPassword($clear, $method = '', $salt = null) { global $conf; if(empty($method)) $method = $conf['passcrypt']; - $pass = new PassHash(); - $call = 'hash_'.$method; + $pass = new PassHash(); + $call = 'hash_'.$method; - if(!method_exists($pass,$call)){ - msg("Unsupported crypt method $method",-1); + if(!method_exists($pass, $call)) { + msg("Unsupported crypt method $method", -1); return false; } - return $pass->$call($clear,$salt); + return $pass->$call($clear, $salt); } /** * Verifies a cleartext password against a crypted hash * - * @author Andreas Gohr - * @return bool + * @author Andreas Gohr + * @param string $clear The clear text password + * @param string $crypt The hash to compare with + * @return bool true if both match */ -function auth_verifyPassword($clear,$crypt){ +function auth_verifyPassword($clear, $crypt) { $pass = new PassHash(); - return $pass->verify_hash($clear,$crypt); + return $pass->verify_hash($clear, $crypt); } /** @@ -998,23 +1038,25 @@ function auth_verifyPassword($clear,$crypt){ * @param string $user username * @param string $pass encrypted password * @param bool $sticky whether or not the cookie will last beyond the session + * @return bool */ -function auth_setCookie($user,$pass,$sticky) { +function auth_setCookie($user, $pass, $sticky) { global $conf; + /* @var auth_basic $auth */ global $auth; global $USERINFO; - if (!$auth) return false; + if(!$auth) return false; $USERINFO = $auth->getUserData($user); // set cookie - $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); + $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - $time = $sticky ? (time()+60*60*24*365) : 0; //one year - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl())); + $time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; @@ -1022,6 +1064,8 @@ function auth_setCookie($user,$pass,$sticky) { $_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid(); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; $_SESSION[DOKU_COOKIE]['auth']['time'] = time(); + + return true; } /** @@ -1029,15 +1073,15 @@ function auth_setCookie($user,$pass,$sticky) { * * @returns array */ -function auth_getCookie(){ - if (!isset($_COOKIE[DOKU_COOKIE])) { +function auth_getCookie() { + if(!isset($_COOKIE[DOKU_COOKIE])) { return array(null, null, null); } - list($user,$sticky,$pass) = explode('|',$_COOKIE[DOKU_COOKIE],3); + list($user, $sticky, $pass) = explode('|', $_COOKIE[DOKU_COOKIE], 3); $sticky = (bool) $sticky; $pass = base64_decode($pass); $user = base64_decode($user); - return array($user,$sticky,$pass); + return array($user, $sticky, $pass); } //Setup VIM: ex: et ts=2 : -- cgit v1.2.3 From a12aaeb7e914180a4c67ca7456771b6d99d9c535 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 16:54:43 +0200 Subject: allow setting values via input class --- inc/Input.class.php | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index 878f29550..aa402c646 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -54,6 +54,16 @@ class Input { return $this->access[$name]; } + /** + * Sets a parameter + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + $this->access[$name] = $value; + } + /** * Get a reference to a request parameter * @@ -61,13 +71,13 @@ class Input { * and intialized with the given $default value before a reference is returned * * @param string $name Parameter name - * @param mixed $default Initialize parameter with if not set + * @param mixed $default If parameter is not set, initialize with this value * @param bool $nonempty Init with $default if parameter is set but empty() * @return &mixed */ public function &ref($name, $default = '', $nonempty = false) { if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) { - $this->access[$name] = $default; + $this->set($name, $default); } $ref = &$this->access[$name]; @@ -114,7 +124,7 @@ class Input { * @param bool $nonempty Return $default if parameter is set but empty() * @return bool */ - public function bool($name, $default = '', $nonempty = false) { + public function bool($name, $default = false, $nonempty = false) { if(!isset($this->access[$name])) return $default; if($nonempty && empty($this->access[$name])) return $default; @@ -152,10 +162,22 @@ class PostInput extends Input { unset ($this->post); unset ($this->get); } + + /** + * Sets a parameter in $_POST and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } } /** * Internal class used for $_GET access in Input class + */ class GetInput extends Input { protected $access; @@ -168,4 +190,15 @@ class GetInput extends Input { unset ($this->post); unset ($this->get); } + + /** + * Sets a parameter in $_GET and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } } \ No newline at end of file -- cgit v1.2.3 From d720a82c905d624b7fd40132514ae662a410c949 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 20:09:35 +0200 Subject: remove() implemented for Input class --- inc/Input.class.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index aa402c646..62c2688c8 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -30,7 +30,8 @@ class Input { /** * Check if a parameter was set * - * Basically a wrapper around isset + * Basically a wrapper around isset. When called on the $post and $get subclasses, + * the parameter is set to $_POST or $_GET and to $_REQUEST * * @see isset * @param string $name Parameter name @@ -40,6 +41,29 @@ class Input { return isset($this->access[$name]); } + /** + * Remove a parameter from the superglobals + * + * Basically a wrapper around unset. When NOT called on the $post and $get subclasses, + * the parameter will also be removed from $_POST or $_GET + * + * @see isset + * @param string $name Parameter name + * @return bool + */ + public function remove($name) { + if(isset($this->access[$name])) { + unset($this->access[$name]); + } + // also remove from sub classes + if(isset($this->post) && isset($_POST[$name])) { + unset($_POST[$name]); + } + if(isset($this->get) && isset($_GET[$name])) { + unset($_GET[$name]); + } + } + /** * Access a request parameter without any type conversion * -- cgit v1.2.3 From bcc94b2c17efc51fd78a25db43058d10e685679d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 20:11:43 +0200 Subject: Input wrapper for auth.php --- inc/auth.php | 97 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 42 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 8489c2265..dc1fc5b32 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -36,6 +36,8 @@ function auth_setup() { global $conf; /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; global $AUTH_ACL; global $lang; $AUTH_ACL = array(); @@ -66,11 +68,8 @@ function auth_setup() { if(!$auth) return false; // do the login either by cookie or provided credentials XXX - if(!isset($_REQUEST['u'])) $_REQUEST['u'] = ''; - if(!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; - if(!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; - $_REQUEST['http_credentials'] = false; - if(!$conf['rememberme']) $_REQUEST['r'] = false; + $INPUT->set('http_credentials', false); + if(!$conf['rememberme']) $INPUT->set('r', false); // handle renamed HTTP_AUTHORIZATION variable (can happen when a fix like // the one presented at @@ -85,27 +84,27 @@ function auth_setup() { } // if no credentials were given try to use HTTP auth (for SSO) - if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) { - $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; - $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW']; - $_REQUEST['http_credentials'] = true; + if(!$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) { + $INPUT->set('u', $_SERVER['PHP_AUTH_USER']); + $INPUT->set('p', $_SERVER['PHP_AUTH_PW']); + $INPUT->set('http_credentials', true); } // apply cleaning - $_REQUEST['u'] = $auth->cleanUser($_REQUEST['u']); + $INPUT->set('u', $auth->cleanUser($INPUT->str('u'))); - if(isset($_REQUEST['authtok'])) { + if($INPUT->str('authtok')) { // when an authentication token is given, trust the session - auth_validateToken($_REQUEST['authtok']); + auth_validateToken($INPUT->str('authtok')); } elseif(!is_null($auth) && $auth->canDo('external')) { // external trust mechanism in place - $auth->trustExternal($_REQUEST['u'], $_REQUEST['p'], $_REQUEST['r']); + $auth->trustExternal($INPUT->str('u'), $INPUT->str('p'), $INPUT->bool('r')); } else { $evdata = array( - 'user' => $_REQUEST['u'], - 'password' => $_REQUEST['p'], - 'sticky' => $_REQUEST['r'], - 'silent' => $_REQUEST['http_credentials'], + 'user' => $INPUT->str('u'), + 'password' => $INPUT->str('p'), + 'sticky' => $INPUT->bool('r'), + 'silent' => $INPUT->bool('http_credentials') ); trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper'); } @@ -799,12 +798,13 @@ function register() { */ function updateprofile() { global $conf; - global $INFO; global $lang; /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; - if(empty($_POST['save'])) return false; + if(!$INPUT->post->bool('save')) return false; if(!checkSecurityToken()) return false; if(!actionOK('profile')) { @@ -812,39 +812,48 @@ function updateprofile() { return false; } - if($_POST['newpass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + $changes = array(); + $changes['pass'] = $INPUT->post->str('newpass'); + $changes['name'] = $INPUT->post->str('fullname'); + $changes['mail'] = $INPUT->post->str('email'); + + // check misspelled passwords + if($changes['pass'] != $INPUT->post->str('passchk')) { + msg($lang['regbadpass'], -1); return false; } - //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['email'])); + // clean fullname and email + $changes['name'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['name'])); + $changes['mail'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['mail'])); - if((empty($_POST['fullname']) && $auth->canDo('modName')) || - (empty($_POST['email']) && $auth->canDo('modMail')) + // no empty name and email (except the backend doesn't support them) + if((empty($changes['name']) && $auth->canDo('modName')) || + (empty($changes['mail']) && $auth->canDo('modMail')) ) { msg($lang['profnoempty'], -1); return false; } - - if(!mail_isvalid($_POST['email']) && $auth->canDo('modMail')) { + if(!mail_isvalid($changes['mail']) && $auth->canDo('modMail')) { msg($lang['regbadmail'], -1); return false; } - $changes = array(); - if($_POST['fullname'] != $INFO['userinfo']['name'] && $auth->canDo('modName')) $changes['name'] = $_POST['fullname']; - if($_POST['email'] != $INFO['userinfo']['mail'] && $auth->canDo('modMail')) $changes['mail'] = $_POST['email']; - if(!empty($_POST['newpass']) && $auth->canDo('modPass')) $changes['pass'] = $_POST['newpass']; + $changes = array_filter($changes); + // check for unavailable capabilities + if(!$auth->canDo('modName')) unset($changes['name']); + if(!$auth->canDo('modMail')) unset($changes['mail']); + if(!$auth->canDo('modPass')) unset($changes['pass']); + + // anything to do? if(!count($changes)) { msg($lang['profnochange'], -1); return false; } if($conf['profileconfirm']) { - if(!$auth->checkPass($_SERVER['REMOTE_USER'], $_POST['oldpass'])) { + if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) { msg($lang['badlogin'], -1); return false; } @@ -882,13 +891,15 @@ function act_resendpwd() { global $conf; /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; if(!actionOK('resendpwd')) { msg($lang['resendna'], -1); return false; } - $token = preg_replace('/[^a-f0-9]+/', '', $_REQUEST['pwauth']); + $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth')); if($token) { // we're in token phase - get user info from token @@ -896,13 +907,13 @@ function act_resendpwd() { $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; if(!@file_exists($tfile)) { msg($lang['resendpwdbadauth'], -1); - unset($_REQUEST['pwauth']); + $INPUT->remove('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']); + $INPUT->remove('pwauth'); @unlink($tfile); return false; } @@ -915,14 +926,16 @@ function act_resendpwd() { } if(!$conf['autopasswd']) { // we let the user choose a password + $pass = $INPUT->str('pass'); + // password given correctly? - if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false; - if($_REQUEST['pass'] != $_REQUEST['passchk']) { + if(!$pass) return false; + if($pass != $INPUT->str('passchk')) { msg($lang['regbadpass'], -1); return false; } - $pass = $_REQUEST['pass']; + // change it if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { msg('error modifying user data', -1); return false; @@ -949,13 +962,13 @@ function act_resendpwd() { } else { // we're in request phase - if(!$_POST['save']) return false; + if(!$INPUT->post->bool('save')) return false; - if(empty($_POST['login'])) { + if(!$INPUT->post->str('login')) { msg($lang['resendpwdmissing'], -1); return false; } else { - $user = trim($auth->cleanUser($_POST['login'])); + $user = trim($auth->cleanUser($INPUT->post->str('login'))); } $userinfo = $auth->getUserData($user); -- cgit v1.2.3 From 591acd873d64abb271864b581c48ca419aa5d329 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 Jun 2012 00:37:21 +0200 Subject: some Input class fixes and unit tests --- inc/Input.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index 62c2688c8..1ea5e031f 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -104,8 +104,7 @@ class Input { $this->set($name, $default); } - $ref = &$this->access[$name]; - return $ref; + return $this->access[$name]; } /** @@ -143,6 +142,8 @@ class Input { /** * Access a request parameter as bool * + * Note: $nonempty is here for interface consistency and makes not much sense for booleans + * * @param string $name Parameter name * @param mixed $default Default to return if parameter isn't set * @param bool $nonempty Return $default if parameter is set but empty() @@ -165,6 +166,7 @@ class Input { */ public function arr($name, $default = array(), $nonempty = false) { if(!isset($this->access[$name])) return $default; + if(!is_array($this->access[$name])) return $default; if($nonempty && empty($this->access[$name])) return $default; return (array) $this->access[$name]; @@ -183,8 +185,6 @@ class PostInput extends Input { */ function __construct() { $this->access = &$_POST; - unset ($this->post); - unset ($this->get); } /** @@ -211,8 +211,6 @@ class GetInput extends Input { */ function __construct() { $this->access = &$_GET; - unset ($this->post); - unset ($this->get); } /** -- cgit v1.2.3 From 3272d797334d9d13a4e4ca43351b1607bb520445 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 Jun 2012 19:03:02 +0200 Subject: some code cleanup and php docs --- inc/auth.php | 6 +- inc/common.php | 832 +++++++++++++++++++++++++++++---------------------------- inc/init.php | 4 +- 3 files changed, 433 insertions(+), 409 deletions(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index dc1fc5b32..d0f21c825 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -501,9 +501,9 @@ function auth_quickaclcheck($id) { * * @author Andreas Gohr * - * @param string $id page ID (needs to be resolved and cleaned) - * @param string $user Username - * @param array $groups Array of groups the user is in + * @param string $id page ID (needs to be resolved and cleaned) + * @param string $user Username + * @param array|null $groups Array of groups the user is in * @return int permission level */ function auth_aclcheck($id, $user, $groups) { diff --git a/inc/common.php b/inc/common.php index cd0780730..768260bbf 100644 --- a/inc/common.php +++ b/inc/common.php @@ -11,11 +11,11 @@ if(!defined('DOKU_INC')) die('meh.'); /** * These constants are used with the recents function */ -define('RECENTS_SKIP_DELETED',2); -define('RECENTS_SKIP_MINORS',4); -define('RECENTS_SKIP_SUBSPACES',8); -define('RECENTS_MEDIA_CHANGES',16); -define('RECENTS_MEDIA_PAGES_MIXED',32); +define('RECENTS_SKIP_DELETED', 2); +define('RECENTS_SKIP_MINORS', 4); +define('RECENTS_SKIP_SUBSPACES', 8); +define('RECENTS_MEDIA_CHANGES', 16); +define('RECENTS_MEDIA_PAGES_MIXED', 32); /** * Wrapper around htmlspecialchars() @@ -23,7 +23,7 @@ define('RECENTS_MEDIA_PAGES_MIXED',32); * @author Andreas Gohr * @see htmlspecialchars() */ -function hsc($string){ +function hsc($string) { return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); } @@ -34,7 +34,7 @@ function hsc($string){ * * @author Andreas Gohr */ -function ptln($string,$indent=0){ +function ptln($string, $indent = 0) { echo str_repeat(' ', $indent)."$string\n"; } @@ -43,8 +43,8 @@ function ptln($string,$indent=0){ * * @author Andreas Gohr */ -function stripctl($string){ - return preg_replace('/[\x00-\x1F]+/s','',$string); +function stripctl($string) { + return preg_replace('/[\x00-\x1F]+/s', '', $string); } /** @@ -55,19 +55,19 @@ function stripctl($string){ * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html * @return string */ -function getSecurityToken(){ +function getSecurityToken() { return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']); } /** * Check the secret CSRF token */ -function checkSecurityToken($token=null){ +function checkSecurityToken($token = null) { if(!$_SERVER['REMOTE_USER']) return true; // no logged in user, no need for a check if(is_null($token)) $token = $_REQUEST['sectok']; - if(getSecurityToken() != $token){ - msg('Security Token did not match. Possible CSRF attack.',-1); + if(getSecurityToken() != $token) { + msg('Security Token did not match. Possible CSRF attack.', -1); return false; } return true; @@ -78,13 +78,10 @@ function checkSecurityToken($token=null){ * * @author Andreas Gohr */ -function formSecurityToken($print=true){ +function formSecurityToken($print = true) { $ret = '
'."\n"; - if($print){ - echo $ret; - }else{ - return $ret; - } + if($print) echo $ret; + return $ret; } /** @@ -93,7 +90,7 @@ function formSecurityToken($print=true){ * * @author Andreas Gohr */ -function pageinfo(){ +function pageinfo() { global $ID; global $REV; global $RANGE; @@ -102,32 +99,32 @@ function pageinfo(){ // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary - $info['id'] = $ID; + $info['id'] = $ID; $info['rev'] = $REV; // set info about manager/admin status. $info['isadmin'] = false; $info['ismanager'] = false; - if(isset($_SERVER['REMOTE_USER'])){ - $info['userinfo'] = $USERINFO; - $info['perm'] = auth_quickaclcheck($ID); - $info['subscribed'] = get_info_subscribed(); - $info['client'] = $_SERVER['REMOTE_USER']; + if(isset($_SERVER['REMOTE_USER'])) { + $info['userinfo'] = $USERINFO; + $info['perm'] = auth_quickaclcheck($ID); + $info['subscribed'] = get_info_subscribed(); + $info['client'] = $_SERVER['REMOTE_USER']; - if($info['perm'] == AUTH_ADMIN){ + if($info['perm'] == AUTH_ADMIN) { $info['isadmin'] = true; $info['ismanager'] = true; - }elseif(auth_ismanager()){ + } elseif(auth_ismanager()) { $info['ismanager'] = true; } // if some outside auth were used only REMOTE_USER is set - if(!$info['userinfo']['name']){ + if(!$info['userinfo']['name']) { $info['userinfo']['name'] = $_SERVER['REMOTE_USER']; } - }else{ - $info['perm'] = auth_aclcheck($ID,'',null); + } else { + $info['perm'] = auth_aclcheck($ID, '', null); $info['subscribed'] = false; $info['client'] = clientIP(true); } @@ -136,76 +133,76 @@ function pageinfo(){ $info['locked'] = checklock($ID); $info['filepath'] = fullpath(wikiFN($ID)); $info['exists'] = @file_exists($info['filepath']); - if($REV){ + if($REV) { //check if current revision was meant - if($info['exists'] && (@filemtime($info['filepath'])==$REV)){ + if($info['exists'] && (@filemtime($info['filepath']) == $REV)) { $REV = ''; - }elseif($RANGE){ + } elseif($RANGE) { //section editing does not work with old revisions! $REV = ''; $RANGE = ''; - msg($lang['nosecedit'],0); - }else{ + msg($lang['nosecedit'], 0); + } else { //really use old revision - $info['filepath'] = fullpath(wikiFN($ID,$REV)); + $info['filepath'] = fullpath(wikiFN($ID, $REV)); $info['exists'] = @file_exists($info['filepath']); } } $info['rev'] = $REV; - if($info['exists']){ + if($info['exists']) { $info['writable'] = (is_writable($info['filepath']) && - ($info['perm'] >= AUTH_EDIT)); - }else{ + ($info['perm'] >= AUTH_EDIT)); + } else { $info['writable'] = ($info['perm'] >= AUTH_CREATE); } - $info['editable'] = ($info['writable'] && empty($info['locked'])); - $info['lastmod'] = @filemtime($info['filepath']); + $info['editable'] = ($info['writable'] && empty($info['locked'])); + $info['lastmod'] = @filemtime($info['filepath']); //load page meta data $info['meta'] = p_get_metadata($ID); //who's the editor - if($REV){ + if($REV) { $revinfo = getRevisionInfo($ID, $REV, 1024); - }else{ - if (is_array($info['meta']['last_change'])) { + } else { + if(is_array($info['meta']['last_change'])) { $revinfo = $info['meta']['last_change']; } else { $revinfo = getRevisionInfo($ID, $info['lastmod'], 1024); // cache most recent changelog line in metadata if missing and still valid - if ($revinfo!==false) { + if($revinfo !== false) { $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } } } //and check for an external edit - if($revinfo!==false && $revinfo['date']!=$info['lastmod']){ + if($revinfo !== false && $revinfo['date'] != $info['lastmod']) { // cached changelog line no longer valid - $revinfo = false; + $revinfo = false; $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } - $info['ip'] = $revinfo['ip']; - $info['user'] = $revinfo['user']; - $info['sum'] = $revinfo['sum']; + $info['ip'] = $revinfo['ip']; + $info['user'] = $revinfo['user']; + $info['sum'] = $revinfo['sum']; // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID. // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor']. - if($revinfo['user']){ + if($revinfo['user']) { $info['editor'] = $revinfo['user']; - }else{ + } else { $info['editor'] = $revinfo['ip']; } // draft - $draft = getCacheName($info['client'].$ID,'.draft'); - if(@file_exists($draft)){ - if(@filemtime($draft) < @filemtime(wikiFN($ID))){ + $draft = getCacheName($info['client'].$ID, '.draft'); + if(@file_exists($draft)) { + if(@filemtime($draft) < @filemtime(wikiFN($ID))) { // remove stale draft @unlink($draft); - }else{ + } else { $info['draft'] = $draft; } } @@ -221,14 +218,14 @@ function pageinfo(){ * * @author Andreas Gohr */ -function buildURLparams($params, $sep='&'){ +function buildURLparams($params, $sep = '&') { $url = ''; $amp = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($amp) $url .= $sep; $url .= rawurlencode($key).'='; - $url .= rawurlencode((string)$val); + $url .= rawurlencode((string) $val); $amp = true; } return $url; @@ -241,29 +238,28 @@ function buildURLparams($params, $sep='&'){ * * @author Andreas Gohr */ -function buildAttributes($params,$skipempty=false){ - $url = ''; +function buildAttributes($params, $skipempty = false) { + $url = ''; $white = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($key{0} == '_') continue; if($val === '' && $skipempty) continue; if($white) $url .= ' '; $url .= $key.'="'; - $url .= htmlspecialchars ($val); + $url .= htmlspecialchars($val); $url .= '"'; $white = true; } return $url; } - /** * This builds the breadcrumb trail and returns it as array * * @author Andreas Gohr */ -function breadcrumbs(){ +function breadcrumbs() { // we prepare the breadcrumbs early for quick session closing static $crumbs = null; if($crumbs != null) return $crumbs; @@ -276,30 +272,30 @@ function breadcrumbs(){ $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents $file = wikiFN($ID); - if($ACT != 'show' || !@file_exists($file)){ + if($ACT != 'show' || !@file_exists($file)) { $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } // page names $name = noNSorNS($ID); - if (useHeading('navigation')) { + if(useHeading('navigation')) { // get page title - $title = p_get_first_heading($ID,METADATA_RENDER_USING_SIMPLE_CACHE); - if ($title) { + $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE); + if($title) { $name = $title; } } //remove ID from array - if (isset($crumbs[$ID])) { + if(isset($crumbs[$ID])) { unset($crumbs[$ID]); } //add to array $crumbs[$ID] = $name; //reduce size - while(count($crumbs) > $conf['breadcrumbs']){ + while(count($crumbs) > $conf['breadcrumbs']) { array_shift($crumbs); } //save to session @@ -318,18 +314,19 @@ function breadcrumbs(){ * * @author Andreas Gohr */ -function idfilter($id,$ue=true){ +function idfilter($id, $ue = true) { global $conf; - if ($conf['useslash'] && $conf['userewrite']){ - $id = strtr($id,':','/'); - }elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && - $conf['userewrite']) { - $id = strtr($id,':',';'); - } - if($ue){ + if($conf['useslash'] && $conf['userewrite']) { + $id = strtr($id, ':', '/'); + } elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && + $conf['userewrite'] + ) { + $id = strtr($id, ':', ';'); + } + if($ue) { $id = rawurlencode($id); - $id = str_replace('%3A',':',$id); //keep as colon - $id = str_replace('%2F','/',$id); //keep as slash + $id = str_replace('%3A', ':', $id); //keep as colon + $id = str_replace('%2F', '/', $id); //keep as slash } return $id; } @@ -342,33 +339,33 @@ function idfilter($id,$ue=true){ * * @author Andreas Gohr */ -function wl($id='',$urlParameters='',$absolute=false,$separator='&'){ +function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&') { global $conf; - if(is_array($urlParameters)){ - $urlParameters = buildURLparams($urlParameters,$separator); - }else{ - $urlParameters = str_replace(',',$separator,$urlParameters); + if(is_array($urlParameters)) { + $urlParameters = buildURLparams($urlParameters, $separator); + } else { + $urlParameters = str_replace(',', $separator, $urlParameters); } - if ($id === '') { + if($id === '') { $id = $conf['start']; } $id = idfilter($id); - if($absolute){ + if($absolute) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id; if($urlParameters) $xlink .= '?'.$urlParameters; - }elseif($conf['userewrite']){ + } elseif($conf['userewrite']) { $xlink .= $id; if($urlParameters) $xlink .= '?'.$urlParameters; - }elseif($id){ + } elseif($id) { $xlink .= DOKU_SCRIPT.'?id='.$id; if($urlParameters) $xlink .= $separator.$urlParameters; - }else{ + } else { $xlink .= DOKU_SCRIPT; if($urlParameters) $xlink .= '?'.$urlParameters; } @@ -383,29 +380,29 @@ function wl($id='',$urlParameters='',$absolute=false,$separator='&'){ * * @author Ben Coburn */ -function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ +function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&') { global $conf; - if(is_array($more)){ - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace(',',$sep,$more); + if(is_array($more)) { + $more = buildURLparams($more, $sep); + } else { + $more = str_replace(',', $sep, $more); } $format = rawurlencode($format); - $id = idfilter($id); - if($abs){ + $id = idfilter($id); + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id.'?do=export_'.$format; if($more) $xlink .= $sep.$more; - }elseif($conf['userewrite'] == 1){ + } elseif($conf['userewrite'] == 1) { $xlink .= '_export/'.$format.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ + } else { $xlink .= DOKU_SCRIPT.'?do=export_'.$format.$sep.'id='.$id; if($more) $xlink .= $sep.$more; } @@ -421,42 +418,43 @@ function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ * The $more parameter should always be given as array, the function then * will strip default parameters to produce even cleaner URLs * - * @param string $id - the media file id or URL - * @param mixed $more - string or array with additional parameters - * @param boolean $direct - link to detail page if false - * @param string $sep - URL parameter separator - * @param boolean $abs - Create an absolute URL + * @param string $id the media file id or URL + * @param mixed $more string or array with additional parameters + * @param bool $direct link to detail page if false + * @param string $sep URL parameter separator + * @param bool $abs Create an absolute URL + * @return string */ -function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ +function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; - if(is_array($more)){ + if(is_array($more)) { // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); if(!$more['w']) unset($more['w']); if(!$more['h']) unset($more['h']); if(isset($more['id']) && $direct) unset($more['id']); - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace('cache=cache','',$more); //skip default - $more = str_replace(',,',',',$more); - $more = str_replace(',',$sep,$more); + $more = buildURLparams($more, $sep); + } else { + $more = str_replace('cache=cache', '', $more); //skip default + $more = str_replace(',,', ',', $more); + $more = str_replace(',', $sep, $more); } - if($abs){ + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } // external URLs are always direct without rewriting - if(preg_match('#^(https?|ftp)://#i',$id)){ + if(preg_match('#^(https?|ftp)://#i', $id)) { $xlink .= 'lib/exe/fetch.php'; // add hash: - $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id),0,6); - if($more){ + $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6); + if($more) { $xlink .= $sep.$more; $xlink .= $sep.'media='.rawurlencode($id); - }else{ + } else { $xlink .= $sep.'media='.rawurlencode($id); } return $xlink; @@ -465,29 +463,29 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ $id = idfilter($id); // decide on scriptname - if($direct){ - if($conf['userewrite'] == 1){ + if($direct) { + if($conf['userewrite'] == 1) { $script = '_media'; - }else{ + } else { $script = 'lib/exe/fetch.php'; } - }else{ - if($conf['userewrite'] == 1){ + } else { + if($conf['userewrite'] == 1) { $script = '_detail'; - }else{ + } else { $script = 'lib/exe/detail.php'; } } // build URL based on rewrite mode - if($conf['userewrite']){ + if($conf['userewrite']) { $xlink .= $script.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ - if($more){ + } else { + if($more) { $xlink .= $script.'?'.$more; $xlink .= $sep.'media='.$id; - }else{ + } else { $xlink .= $script.'?media='.$id; } } @@ -495,15 +493,13 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ return $xlink; } - - /** * Just builds a link to a script * * @todo maybe obsolete * @author Andreas Gohr */ -function script($script='doku.php'){ +function script($script = 'doku.php') { return DOKU_BASE.DOKU_SCRIPT; } @@ -531,7 +527,7 @@ function script($script='doku.php'){ * @param string $text - optional text to check, if not given the globals are used * @return bool - true if a spam word was found */ -function checkwordblock($text=''){ +function checkwordblock($text = '') { global $TEXT; global $PRE; global $SUF; @@ -543,32 +539,32 @@ function checkwordblock($text=''){ if(!$text) $text = "$PRE $TEXT $SUF"; // we prepare the text a tiny bit to prevent spammers circumventing URL checks - $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i','\1http://\2 \2\3',$text); + $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i', '\1http://\2 \2\3', $text); $wordblocks = getWordblocks(); // how many lines to read at once (to work around some PCRE limits) - if(version_compare(phpversion(),'4.3.0','<')){ + if(version_compare(phpversion(), '4.3.0', '<')) { // old versions of PCRE define a maximum of parenthesises even if no // backreferences are used - the maximum is 99 // this is very bad performancewise and may even be too high still $chunksize = 40; - }else{ + } else { // read file in chunks of 200 - this should work around the // MAX_PATTERN_SIZE in modern PCRE $chunksize = 200; } - while($blocks = array_splice($wordblocks,0,$chunksize)){ + while($blocks = array_splice($wordblocks, 0, $chunksize)) { $re = array(); // build regexp from blocks - foreach($blocks as $block){ - $block = preg_replace('/#.*$/','',$block); + foreach($blocks as $block) { + $block = preg_replace('/#.*$/', '', $block); $block = trim($block); if(empty($block)) continue; - $re[] = $block; + $re[] = $block; } - if(count($re) && preg_match('#('.join('|',$re).')#si',$text,$matches)) { + if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) { // prepare event data - $data['matches'] = $matches; + $data['matches'] = $matches; $data['userinfo']['ip'] = $_SERVER['REMOTE_ADDR']; if($_SERVER['REMOTE_USER']) { $data['userinfo']['user'] = $_SERVER['REMOTE_USER']; @@ -592,42 +588,43 @@ function checkwordblock($text=''){ * a routable public address, prefering the ones suplied in the X * headers * - * @param boolean $single If set only a single IP is returned * @author Andreas Gohr + * @param boolean $single If set only a single IP is returned + * @return string */ -function clientIP($single=false){ - $ip = array(); +function clientIP($single = false) { + $ip = array(); $ip[] = $_SERVER['REMOTE_ADDR']; if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_FORWARDED_FOR']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_FORWARDED_FOR']))); if(!empty($_SERVER['HTTP_X_REAL_IP'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_REAL_IP']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_REAL_IP']))); // some IPv4/v6 regexps borrowed from Feyd // see: http://forums.devnetwork.net/viewtopic.php?f=38&t=53479 - $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; - $hex_digit = '[A-Fa-f0-9]'; - $h16 = "{$hex_digit}{1,4}"; + $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; + $hex_digit = '[A-Fa-f0-9]'; + $h16 = "{$hex_digit}{1,4}"; $IPv4Address = "$dec_octet\\.$dec_octet\\.$dec_octet\\.$dec_octet"; - $ls32 = "(?:$h16:$h16|$IPv4Address)"; + $ls32 = "(?:$h16:$h16|$IPv4Address)"; $IPv6Address = "(?:(?:{$IPv4Address})|(?:". - "(?:$h16:){6}$ls32" . - "|::(?:$h16:){5}$ls32" . - "|(?:$h16)?::(?:$h16:){4}$ls32" . - "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32" . - "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32" . - "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32" . - "|(?:(?:$h16:){0,4}$h16)?::$ls32" . - "|(?:(?:$h16:){0,5}$h16)?::$h16" . - "|(?:(?:$h16:){0,6}$h16)?::" . - ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; + "(?:$h16:){6}$ls32". + "|::(?:$h16:){5}$ls32". + "|(?:$h16)?::(?:$h16:){4}$ls32". + "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32". + "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32". + "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32". + "|(?:(?:$h16:){0,4}$h16)?::$ls32". + "|(?:(?:$h16:){0,5}$h16)?::$h16". + "|(?:(?:$h16:){0,6}$h16)?::". + ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; // remove any non-IP stuff - $cnt = count($ip); + $cnt = count($ip); $match = array(); - for($i=0; $i<$cnt; $i++){ - if(preg_match("/^$IPv4Address$/",$ip[$i],$match) || preg_match("/^$IPv6Address$/",$ip[$i],$match)) { + for($i = 0; $i < $cnt; $i++) { + if(preg_match("/^$IPv4Address$/", $ip[$i], $match) || preg_match("/^$IPv6Address$/", $ip[$i], $match)) { $ip[$i] = $match[0]; } else { $ip[$i] = ''; @@ -637,14 +634,14 @@ function clientIP($single=false){ $ip = array_values(array_unique($ip)); if(!$ip[0]) $ip[0] = '0.0.0.0'; // for some strange reason we don't have a IP - if(!$single) return join(',',$ip); + if(!$single) return join(',', $ip); // decide which IP to use, trying to avoid local addresses $ip = array_reverse($ip); - foreach($ip as $i){ - if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/',$i)){ + foreach($ip as $i) { + if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/', $i)) { continue; - }else{ + } else { return $i; } } @@ -659,42 +656,42 @@ function clientIP($single=false){ * * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code */ -function clientismobile(){ +function clientismobile() { if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) return true; - if(preg_match('/wap\.|\.wap/i',$_SERVER['HTTP_ACCEPT'])) return true; + if(preg_match('/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'])) return true; if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; $uamatches = 'midp|j2me|avantg|docomo|novarra|palmos|palmsource|240x320|opwv|chtml|pda|windows ce|mmp\/|blackberry|mib\/|symbian|wireless|nokia|hand|mobi|phone|cdm|up\.b|audio|SIE\-|SEC\-|samsung|HTC|mot\-|mitsu|sagem|sony|alcatel|lg|erics|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|\d\d\di|moto'; - if(preg_match("/$uamatches/i",$_SERVER['HTTP_USER_AGENT'])) return true; + if(preg_match("/$uamatches/i", $_SERVER['HTTP_USER_AGENT'])) return true; return false; } - /** * Convert one or more comma separated IPs to hostnames * * If $conf['dnslookups'] is disabled it simply returns the input string * * @author Glen Harris - * @returns a comma separated list of hostnames + * @param string $ips comma separated list of IP addresses + * @return string a comma separated list of hostnames */ -function gethostsbyaddrs($ips){ +function gethostsbyaddrs($ips) { global $conf; if(!$conf['dnslookups']) return $ips; $hosts = array(); - $ips = explode(',',$ips); + $ips = explode(',', $ips); if(is_array($ips)) { - foreach($ips as $ip){ + foreach($ips as $ip) { $hosts[] = gethostbyaddr(trim($ip)); } - return join(',',$hosts); + return join(',', $hosts); } else { return gethostbyaddr(trim($ips)); } @@ -707,7 +704,7 @@ function gethostsbyaddrs($ips){ * * @author Andreas Gohr */ -function checklock($id){ +function checklock($id) { global $conf; $lock = wikiLockFN($id); @@ -715,14 +712,14 @@ function checklock($id){ if(!@file_exists($lock)) return false; //lockfile expired - if((time() - filemtime($lock)) > $conf['locktime']){ + if((time() - filemtime($lock)) > $conf['locktime']) { @unlink($lock); return false; } //my own lock - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { return false; } @@ -734,18 +731,18 @@ function checklock($id){ * * @author Andreas Gohr */ -function lock($id){ +function lock($id) { global $conf; - if($conf['locktime'] == 0){ + if($conf['locktime'] == 0) { return; } $lock = wikiLockFN($id); - if($_SERVER['REMOTE_USER']){ - io_saveFile($lock,$_SERVER['REMOTE_USER']); - }else{ - io_saveFile($lock,clientIP()."\n".session_id()); + if($_SERVER['REMOTE_USER']) { + io_saveFile($lock, $_SERVER['REMOTE_USER']); + } else { + io_saveFile($lock, clientIP()."\n".session_id()); } } @@ -753,13 +750,14 @@ function lock($id){ * Unlock a page if it was locked by the user * * @author Andreas Gohr + * @param string $id page id to unlock * @return bool true if a lock was removed */ -function unlock($id){ +function unlock($id) { $lock = wikiLockFN($id); - if(@file_exists($lock)){ - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + if(@file_exists($lock)) { + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { @unlink($lock); return true; } @@ -773,8 +771,8 @@ function unlock($id){ * @see formText() for 2crlf conversion * @author Andreas Gohr */ -function cleanText($text){ - $text = preg_replace("/(\015\012)|(\015)/","\012",$text); +function cleanText($text) { + $text = preg_replace("/(\015\012)|(\015)/", "\012", $text); return $text; } @@ -786,8 +784,8 @@ function cleanText($text){ * @see cleanText() for 2unix conversion * @author Andreas Gohr */ -function formText($text){ - $text = str_replace("\012","\015\012",$text); +function formText($text) { + $text = str_replace("\012", "\015\012", $text); return htmlspecialchars($text); } @@ -796,8 +794,8 @@ function formText($text){ * * @author Andreas Gohr */ -function rawLocale($id,$ext='txt'){ - return io_readFile(localeFN($id,$ext)); +function rawLocale($id, $ext = 'txt') { + return io_readFile(localeFN($id, $ext)); } /** @@ -805,7 +803,7 @@ function rawLocale($id,$ext='txt'){ * * @author Andreas Gohr */ -function rawWiki($id,$rev=''){ +function rawWiki($id, $rev = '') { return io_readWikiPage(wikiFN($id, $rev), $id, $rev); } @@ -815,34 +813,33 @@ function rawWiki($id,$rev=''){ * @triggers COMMON_PAGETPL_LOAD * @author Andreas Gohr */ -function pageTemplate($id){ +function pageTemplate($id) { global $conf; - if (is_array($id)) $id = $id[0]; + if(is_array($id)) $id = $id[0]; // prepare initial event data $data = array( - 'id' => $id, // the id of the page to be created - 'tpl' => '', // the text used as template - 'tplfile' => '', // the file above text was/should be loaded from - 'doreplace' => true // should wildcard replacements be done on the text? + 'id' => $id, // the id of the page to be created + 'tpl' => '', // the text used as template + 'tplfile' => '', // the file above text was/should be loaded from + 'doreplace' => true // should wildcard replacements be done on the text? ); - $evt = new Doku_Event('COMMON_PAGETPL_LOAD',$data); - if($evt->advise_before(true)){ + $evt = new Doku_Event('COMMON_PAGETPL_LOAD', $data); + if($evt->advise_before(true)) { // the before event might have loaded the content already - if(empty($data['tpl'])){ + if(empty($data['tpl'])) { // if the before event did not set a template file, try to find one - if(empty($data['tplfile'])){ + if(empty($data['tplfile'])) { $path = dirname(wikiFN($id)); - $tpl = ''; - if(@file_exists($path.'/_template.txt')){ + if(@file_exists($path.'/_template.txt')) { $data['tplfile'] = $path.'/_template.txt'; - }else{ + } else { // search upper namespaces for templates - $len = strlen(rtrim($conf['datadir'],'/')); - while (strlen($path) >= $len){ - if(@file_exists($path.'/__template.txt')){ + $len = strlen(rtrim($conf['datadir'], '/')); + while(strlen($path) >= $len) { + if(@file_exists($path.'/__template.txt')) { $data['tplfile'] = $path.'/__template.txt'; break; } @@ -868,6 +865,12 @@ function pageTemplate($id){ * @author Andreas Gohr */ function parsePageTemplate(&$data) { + /** + * @var string $id the id of the page to be created + * @var string $tpl the text used as template + * @var string $tplfile the file above text was/should be loaded from + * @var bool $doreplace should wildcard replacements be done on the text? + */ extract($data); global $USERINFO; @@ -877,39 +880,41 @@ function parsePageTemplate(&$data) { $file = noNS($id); $page = strtr($file, $conf['sepchar'], ' '); - $tpl = str_replace(array( - '@ID@', - '@NS@', - '@FILE@', - '@!FILE@', - '@!FILE!@', - '@PAGE@', - '@!PAGE@', - '@!!PAGE@', - '@!PAGE!@', - '@USER@', - '@NAME@', - '@MAIL@', - '@DATE@', - ), - array( - $id, - getNS($id), - $file, - utf8_ucfirst($file), - utf8_strtoupper($file), - $page, - utf8_ucfirst($page), - utf8_ucwords($page), - utf8_strtoupper($page), - $_SERVER['REMOTE_USER'], - $USERINFO['name'], - $USERINFO['mail'], - $conf['dformat'], - ), $tpl); + $tpl = str_replace( + array( + '@ID@', + '@NS@', + '@FILE@', + '@!FILE@', + '@!FILE!@', + '@PAGE@', + '@!PAGE@', + '@!!PAGE@', + '@!PAGE!@', + '@USER@', + '@NAME@', + '@MAIL@', + '@DATE@', + ), + array( + $id, + getNS($id), + $file, + utf8_ucfirst($file), + utf8_strtoupper($file), + $page, + utf8_ucfirst($page), + utf8_ucwords($page), + utf8_strtoupper($page), + $_SERVER['REMOTE_USER'], + $USERINFO['name'], + $USERINFO['mail'], + $conf['dformat'], + ), $tpl + ); // we need the callback to work around strftime's char limit - $tpl = preg_replace_callback('/%./',create_function('$m','return strftime($m[0]);'),$tpl); + $tpl = preg_replace_callback('/%./', create_function('$m', 'return strftime($m[0]);'), $tpl); $data['tpl'] = $tpl; return $tpl; } @@ -924,17 +929,17 @@ function parsePageTemplate(&$data) { * * @author Andreas Gohr */ -function rawWikiSlices($range,$id,$rev=''){ +function rawWikiSlices($range, $id, $rev = '') { $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev); // Parse range - list($from,$to) = explode('-',$range,2); + list($from, $to) = explode('-', $range, 2); // Make range zero-based, use defaults if marker is missing $from = !$from ? 0 : ($from - 1); $to = !$to ? strlen($text) : ($to - 1); $slices[0] = substr($text, 0, $from); - $slices[1] = substr($text, $from, $to-$from); + $slices[1] = substr($text, $from, $to - $from); $slices[2] = substr($text, $to); return $slices; } @@ -948,14 +953,16 @@ function rawWikiSlices($range,$id,$rev=''){ * * @author Andreas Gohr */ -function con($pre,$text,$suf,$pretty=false){ - if($pretty){ - if ($pre !== '' && substr($pre, -1) !== "\n" && - substr($text, 0, 1) !== "\n") { +function con($pre, $text, $suf, $pretty = false) { + if($pretty) { + if($pre !== '' && substr($pre, -1) !== "\n" && + substr($text, 0, 1) !== "\n" + ) { $pre .= "\n"; } - if ($suf !== '' && substr($text, -1) !== "\n" && - substr($suf, 0, 1) !== "\n") { + if($suf !== '' && substr($text, -1) !== "\n" && + substr($suf, 0, 1) !== "\n" + ) { $text .= "\n"; } } @@ -970,7 +977,7 @@ function con($pre,$text,$suf,$pretty=false){ * @author Andreas Gohr * @author Ben Coburn */ -function saveWikiText($id,$text,$summary,$minor=false){ +function saveWikiText($id, $text, $summary, $minor = false) { /* Note to developers: This code is subtle and delicate. Test the behavior of the attic and changelog with dokuwiki and external edits @@ -981,31 +988,31 @@ function saveWikiText($id,$text,$summary,$minor=false){ global $lang; global $REV; // ignore if no changes were made - if($text == rawWiki($id,'')){ + if($text == rawWiki($id, '')) { return; } - $file = wikiFN($id); - $old = @filemtime($file); // from page - $wasRemoved = (trim($text) == ''); // check for empty or whitespace only - $wasCreated = !@file_exists($file); - $wasReverted = ($REV==true); - $newRev = false; - $oldRev = getRevisions($id, -1, 1, 1024); // from changelog - $oldRev = (int)(empty($oldRev)?0:$oldRev[0]); - if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old>=$oldRev) { + $file = wikiFN($id); + $old = @filemtime($file); // from page + $wasRemoved = (trim($text) == ''); // check for empty or whitespace only + $wasCreated = !@file_exists($file); + $wasReverted = ($REV == true); + $newRev = false; + $oldRev = getRevisions($id, -1, 1, 1024); // from changelog + $oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]); + if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) { // add old revision to the attic if missing saveOldRevision($id); // add a changelog entry if this edit came from outside dokuwiki - if ($old>$oldRev) { - addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=>true)); + if($old > $oldRev) { + addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=> true)); // remove soon to be stale instructions $cache = new cache_instructions($id, $file); $cache->removeCache(); } } - if ($wasRemoved){ + if($wasRemoved) { // Send "update" event with empty data, so plugins can react to page deletion $data = array(array($file, '', false), getNS($id), noNS($id), false); trigger_event('IO_WIKIPAGE_WRITE', $data); @@ -1024,37 +1031,40 @@ function saveWikiText($id,$text,$summary,$minor=false){ // remove empty namespaces io_sweepNS($id, 'datadir'); io_sweepNS($id, 'mediadir'); - }else{ + } else { // save file (namespace dir is created in io_writeWikiPage) io_writeWikiPage($file, $text, $id); // pre-save the revision, to keep the attic in sync $newRev = saveOldRevision($id); - $del = false; + $del = false; } // select changelog line type $extra = ''; - $type = DOKU_CHANGE_TYPE_EDIT; - if ($wasReverted) { - $type = DOKU_CHANGE_TYPE_REVERT; + $type = DOKU_CHANGE_TYPE_EDIT; + if($wasReverted) { + $type = DOKU_CHANGE_TYPE_REVERT; $extra = $REV; - } - else if ($wasCreated) { $type = DOKU_CHANGE_TYPE_CREATE; } - else if ($wasRemoved) { $type = DOKU_CHANGE_TYPE_DELETE; } - else if ($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { $type = DOKU_CHANGE_TYPE_MINOR_EDIT; } //minor edits only for logged in users + } else if($wasCreated) { + $type = DOKU_CHANGE_TYPE_CREATE; + } else if($wasRemoved) { + $type = DOKU_CHANGE_TYPE_DELETE; + } else if($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { + $type = DOKU_CHANGE_TYPE_MINOR_EDIT; + } //minor edits only for logged in users addLogEntry($newRev, $id, $type, $summary, $extra); // send notify mails - notify($id,'admin',$old,$summary,$minor); - notify($id,'subscribers',$old,$summary,$minor); + notify($id, 'admin', $old, $summary, $minor); + notify($id, 'subscribers', $old, $summary, $minor); // update the purgefile (timestamp of the last time anything within the wiki was changed) - io_saveFile($conf['cachedir'].'/purgefile',time()); + io_saveFile($conf['cachedir'].'/purgefile', time()); // if useheading is enabled, purge the cache of all linking pages - if(useHeading('content')){ + if(useHeading('content')) { $pages = ft_backlinks($id); - foreach ($pages as $page) { + foreach($pages as $page) { $cache = new cache_renderer($page, wikiFN($page), 'xhtml'); $cache->removeCache(); } @@ -1067,12 +1077,12 @@ function saveWikiText($id,$text,$summary,$minor=false){ * * @author Andreas Gohr */ -function saveOldRevision($id){ +function saveOldRevision($id) { global $conf; $oldf = wikiFN($id); if(!@file_exists($oldf)) return ''; $date = filemtime($oldf); - $newf = wikiFN($id,$date); + $newf = wikiFN($id, $date); io_writeWikiPage($newf, rawWiki($id), $id, $date); return $date; } @@ -1080,72 +1090,75 @@ function saveOldRevision($id){ /** * Sends a notify mail on page change or registration * - * @param string $id The changed page - * @param string $who Who to notify (admin|subscribers|register) - * @param int $rev Old page revision - * @param string $summary What changed - * @param boolean $minor Is this a minor edit? - * @param array $replace Additional string substitutions, @KEY@ to be replaced by value + * @param string $id The changed page + * @param string $who Who to notify (admin|subscribers|register) + * @param int|string $rev Old page revision + * @param string $summary What changed + * @param boolean $minor Is this a minor edit? + * @param array $replace Additional string substitutions, @KEY@ to be replaced by value * + * @return bool * @author Andreas Gohr */ -function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ +function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) { global $lang; global $conf; global $INFO; global $DIFF_INLINESTYLES; // decide if there is something to do, eg. whom to mail - if($who == 'admin'){ - if(empty($conf['notify'])) return; //notify enabled? + if($who == 'admin') { + if(empty($conf['notify'])) return false; //notify enabled? $text = rawLocale('mailtext'); $to = $conf['notify']; $bcc = ''; - }elseif($who == 'subscribers'){ - if(!$conf['subscribers']) return; //subscribers enabled? - if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors + } elseif($who == 'subscribers') { + if(!$conf['subscribers']) return false; //subscribers enabled? + if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors $data = array('id' => $id, 'addresslist' => '', 'self' => false); - trigger_event('COMMON_NOTIFY_ADDRESSLIST', $data, - 'subscription_addresslist'); + trigger_event( + 'COMMON_NOTIFY_ADDRESSLIST', $data, + 'subscription_addresslist' + ); $bcc = $data['addresslist']; - if(empty($bcc)) return; + if(empty($bcc)) return false; $to = ''; $text = rawLocale('subscr_single'); - }elseif($who == 'register'){ - if(empty($conf['registernotify'])) return; + } elseif($who == 'register') { + if(empty($conf['registernotify'])) return false; $text = rawLocale('registermail'); $to = $conf['registernotify']; $bcc = ''; - }else{ - return; //just to be safe + } else { + return false; //just to be safe } // prepare replacements (keys not set in hrep will be taken from trep) $trep = array( - 'NEWPAGE' => wl($id,'',true,'&'), + 'NEWPAGE' => wl($id, '', true, '&'), 'PAGE' => $id, 'SUMMARY' => $summary ); - $trep = array_merge($trep,$replace); + $trep = array_merge($trep, $replace); $hrep = array(); // prepare content - if($who == 'register'){ - $subject = $lang['mail_new_user'].' '.$summary; - }elseif($rev){ + if($who == 'register') { + $subject = $lang['mail_new_user'].' '.$summary; + } elseif($rev) { $subject = $lang['mail_changed'].' '.$id; - $trep['OLDPAGE'] = wl($id,"rev=$rev",true,'&'); - $df = new Diff(explode("\n",rawWiki($id,$rev)), - explode("\n",rawWiki($id))); + $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&'); + $df = new Diff(explode("\n", rawWiki($id, $rev)), + explode("\n", rawWiki($id))); $dformat = new UnifiedDiffFormatter(); $tdiff = $dformat->format($df); $DIFF_INLINESTYLES = true; - $dformat = new InlineDiffFormatter(); - $hdiff = $dformat->format($df); - $hdiff = ''.$hdiff.'
'; + $dformat = new InlineDiffFormatter(); + $hdiff = $dformat->format($df); + $hdiff = ''.$hdiff.'
'; $DIFF_INLINESTYLES = false; - }else{ + } else { $subject = $lang['mail_newpage'].' '.$id; $trep['OLDPAGE'] = '---'; $tdiff = rawWiki($id); @@ -1159,11 +1172,11 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $mail->to($to); $mail->bcc($bcc); $mail->subject($subject); - $mail->setBody($text,$trep,$hrep); - if($who == 'subscribers'){ + $mail->setBody($text, $trep, $hrep); + if($who == 'subscribers') { $mail->setHeader( 'List-Unsubscribe', - '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>', false ); } @@ -1176,8 +1189,8 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ * @author Andreas Gohr * @author Todd Augsburger */ -function getGoogleQuery(){ - if (!isset($_SERVER['HTTP_REFERER'])) { +function getGoogleQuery() { + if(!isset($_SERVER['HTTP_REFERER'])) { return ''; } $url = parse_url($_SERVER['HTTP_REFERER']); @@ -1187,21 +1200,21 @@ function getGoogleQuery(){ // temporary workaround against PHP bug #49733 // see http://bugs.php.net/bug.php?id=49733 if(UTF8_MBSTRING) $enc = mb_internal_encoding(); - parse_str($url['query'],$query); + parse_str($url['query'], $query); if(UTF8_MBSTRING) mb_internal_encoding($enc); $q = ''; if(isset($query['q'])) - $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast + $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast elseif(isset($query['p'])) - $q = $query['p']; // yahoo + $q = $query['p']; // yahoo elseif(isset($query['query'])) - $q = $query['query']; // lycos, netscape, clusty, hotbot - elseif(preg_match("#a9\.com#i",$url['host'])) // a9 - $q = urldecode(ltrim($url['path'],'/')); + $q = $query['query']; // lycos, netscape, clusty, hotbot + elseif(preg_match("#a9\.com#i", $url['host'])) // a9 + $q = urldecode(ltrim($url['path'], '/')); if($q === '') return ''; - $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/',$q,-1,PREG_SPLIT_NO_EMPTY); + $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY); return $q; } @@ -1211,19 +1224,19 @@ function getGoogleQuery(){ * @deprecated No longer used * @author Andreas Gohr */ -function setCorrectLocale(){ +function setCorrectLocale() { global $conf; global $lang; $enc = strtoupper($lang['encoding']); - foreach ($lang['locales'] as $loc){ + foreach($lang['locales'] as $loc) { //try locale - if(@setlocale(LC_ALL,$loc)) return; + if(@setlocale(LC_ALL, $loc)) return; //try loceale with encoding - if(@setlocale(LC_ALL,"$loc.$enc")) return; + if(@setlocale(LC_ALL, "$loc.$enc")) return; } //still here? try to set from environment - @setlocale(LC_ALL,""); + @setlocale(LC_ALL, ""); } /** @@ -1235,17 +1248,17 @@ function setCorrectLocale(){ * @author Aidan Lister * @version 1.0.0 */ -function filesize_h($size, $dec = 1){ +function filesize_h($size, $dec = 1) { $sizes = array('B', 'KB', 'MB', 'GB'); $count = count($sizes); - $i = 0; + $i = 0; - while ($size >= 1024 && ($i < $count - 1)) { + while($size >= 1024 && ($i < $count - 1)) { $size /= 1024; $i++; } - return round($size, $dec) . ' ' . $sizes[$i]; + return round($size, $dec).' '.$sizes[$i]; } /** @@ -1253,27 +1266,27 @@ function filesize_h($size, $dec = 1){ * * @author Andreas Gohr */ -function datetime_h($dt){ +function datetime_h($dt) { global $lang; $ago = time() - $dt; - if($ago > 24*60*60*30*12*2){ - return sprintf($lang['years'], round($ago/(24*60*60*30*12))); + if($ago > 24 * 60 * 60 * 30 * 12 * 2) { + return sprintf($lang['years'], round($ago / (24 * 60 * 60 * 30 * 12))); } - if($ago > 24*60*60*30*2){ - return sprintf($lang['months'], round($ago/(24*60*60*30))); + if($ago > 24 * 60 * 60 * 30 * 2) { + return sprintf($lang['months'], round($ago / (24 * 60 * 60 * 30))); } - if($ago > 24*60*60*7*2){ - return sprintf($lang['weeks'], round($ago/(24*60*60*7))); + if($ago > 24 * 60 * 60 * 7 * 2) { + return sprintf($lang['weeks'], round($ago / (24 * 60 * 60 * 7))); } - if($ago > 24*60*60*2){ - return sprintf($lang['days'], round($ago/(24*60*60))); + if($ago > 24 * 60 * 60 * 2) { + return sprintf($lang['days'], round($ago / (24 * 60 * 60))); } - if($ago > 60*60*2){ - return sprintf($lang['hours'], round($ago/(60*60))); + if($ago > 60 * 60 * 2) { + return sprintf($lang['hours'], round($ago / (60 * 60))); } - if($ago > 60*2){ - return sprintf($lang['minutes'], round($ago/(60))); + if($ago > 60 * 2) { + return sprintf($lang['minutes'], round($ago / (60))); } return sprintf($lang['seconds'], $ago); } @@ -1287,15 +1300,15 @@ function datetime_h($dt){ * @see datetime_h * @author Andreas Gohr */ -function dformat($dt=null,$format=''){ +function dformat($dt = null, $format = '') { global $conf; if(is_null($dt)) $dt = time(); $dt = (int) $dt; if(!$format) $format = $conf['dformat']; - $format = str_replace('%f',datetime_h($dt),$format); - return strftime($format,$dt); + $format = str_replace('%f', datetime_h($dt), $format); + return strftime($format, $dt); } /** @@ -1304,11 +1317,12 @@ function dformat($dt=null,$format=''){ * @author * @link http://www.php.net/manual/en/function.date.php#54072 * @param int $int_date: current date in UNIX timestamp + * @return string */ function date_iso8601($int_date) { - $date_mod = date('Y-m-d\TH:i:s', $int_date); + $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); + $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); $date_mod .= $time_zone; return $date_mod; } @@ -1322,16 +1336,16 @@ function date_iso8601($int_date) { function obfuscate($email) { global $conf; - switch ($conf['mailguard']) { + switch($conf['mailguard']) { case 'visible' : $obfuscate = array('@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '); return strtr($email, $obfuscate); case 'hex' : $encode = ''; - $len = strlen($email); - for ($x=0; $x < $len; $x++){ - $encode .= '&#x' . bin2hex($email{$x}).';'; + $len = strlen($email); + for($x = 0; $x < $len; $x++) { + $encode .= '&#x'.bin2hex($email{$x}).';'; } return $encode; @@ -1346,8 +1360,8 @@ function obfuscate($email) { * * @author Andreas Gohr */ -function unslash($string,$char="'"){ - return str_replace('\\'.$char,$char,$string); +function unslash($string, $char = "'") { + return str_replace('\\'.$char, $char, $string); } /** @@ -1356,10 +1370,10 @@ function unslash($string,$char="'"){ * @author * @link http://de3.php.net/manual/en/ini.core.php#79564 */ -function php_to_byte($v){ - $l = substr($v, -1); +function php_to_byte($v) { + $l = substr($v, -1); $ret = substr($v, 0, -1); - switch(strtoupper($l)){ + switch(strtoupper($l)) { case 'P': $ret *= 1024; case 'T': @@ -1370,10 +1384,10 @@ function php_to_byte($v){ $ret *= 1024; case 'K': $ret *= 1024; - break; + break; default; $ret *= 10; - break; + break; } return $ret; } @@ -1381,8 +1395,8 @@ function php_to_byte($v){ /** * Wrapper around preg_quote adding the default delimiter */ -function preg_quote_cb($string){ - return preg_quote($string,'/'); +function preg_quote_cb($string) { + return preg_quote($string, '/'); } /** @@ -1398,14 +1412,15 @@ function preg_quote_cb($string){ * @param int $max maximum chars you want for the whole string * @param int $min minimum number of chars to have left for middle shortening * @param string $char the shortening character to use + * @return string */ -function shorten($keep,$short,$max,$min=9,$char='…'){ +function shorten($keep, $short, $max, $min = 9, $char = '…') { $max = $max - utf8_strlen($keep); if($max < $min) return $keep; $len = utf8_strlen($short); if($len <= $max) return $keep.$short; - $half = floor($max/2); - return $keep.utf8_substr($short,0,$half-1).$char.utf8_substr($short,$len-$half); + $half = floor($max / 2); + return $keep.utf8_substr($short, 0, $half - 1).$char.utf8_substr($short, $len - $half); } /** @@ -1414,11 +1429,11 @@ function shorten($keep,$short,$max,$min=9,$char='…'){ * * @author Andy Webber */ -function editorinfo($username){ +function editorinfo($username) { global $conf; global $auth; - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': case 'email': case 'email_link': @@ -1429,13 +1444,13 @@ function editorinfo($username){ } if(isset($info) && $info) { - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': return hsc($info['name']); case 'email': return obfuscate($info['mail']); case 'email_link': - $mail=obfuscate($info['mail']); + $mail = obfuscate($info['mail']); return ''.$mail.''; default: return hsc($username); @@ -1451,20 +1466,21 @@ function editorinfo($username){ * * @author Andreas Gohr * @param string $type - type of image 'badge' or 'button' + * @return string */ -function license_img($type){ +function license_img($type) { global $license; global $conf; if(!$conf['license']) return ''; if(!is_array($license[$conf['license']])) return ''; - $lic = $license[$conf['license']]; - $try = array(); + $lic = $license[$conf['license']]; + $try = array(); $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.png'; $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.gif'; - if(substr($conf['license'],0,3) == 'cc-'){ + if(substr($conf['license'], 0, 3) == 'cc-') { $try[] = 'lib/images/license/'.$type.'/cc.png'; } - foreach($try as $src){ + foreach($try as $src) { if(@file_exists(DOKU_INC.$src)) return $src; } return ''; @@ -1476,12 +1492,15 @@ function license_img($type){ * If the memory_get_usage() function is not available the * function just assumes $bytes of already allocated memory * - * @param int $mem Size of memory you want to allocate in bytes - * @param int $used already allocated memory (see above) * @author Filip Oscadal * @author Andreas Gohr + * + * @param int $mem Size of memory you want to allocate in bytes + * @param int $bytes + * @internal param int $used already allocated memory (see above) + * @return bool */ -function is_mem_available($mem,$bytes=1048576){ +function is_mem_available($mem, $bytes = 1048576) { $limit = trim(ini_get('memory_limit')); if(empty($limit)) return true; // no limit set! @@ -1489,13 +1508,13 @@ function is_mem_available($mem,$bytes=1048576){ $limit = php_to_byte($limit); // get used memory if possible - if(function_exists('memory_get_usage')){ + if(function_exists('memory_get_usage')) { $used = memory_get_usage(); - }else{ + } else { $used = $bytes; } - if($used+$mem > $limit){ + if($used + $mem > $limit) { return false; } @@ -1510,10 +1529,10 @@ function is_mem_available($mem,$bytes=1048576){ * @link http://support.microsoft.com/kb/q176113/ * @author Andreas Gohr */ -function send_redirect($url){ +function send_redirect($url) { //are there any undisplayed messages? keep them in session for display global $MSG; - if (isset($MSG) && count($MSG) && !defined('NOSESSION')){ + if(isset($MSG) && count($MSG) && !defined('NOSESSION')) { //reopen session, store data and close session again @session_start(); $_SESSION[DOKU_COOKIE]['msg'] = $MSG; @@ -1524,22 +1543,23 @@ function send_redirect($url){ // work around IE bug // http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/ - list($url,$hash) = explode('#',$url); - if($hash){ - if(strpos($url,'?')){ + list($url, $hash) = explode('#', $url); + if($hash) { + if(strpos($url, '?')) { $url = $url.'&#'.$hash; - }else{ + } else { $url = $url.'?&#'.$hash; } } // check if running on IIS < 6 with CGI-PHP - if( isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && - (strpos($_SERVER['GATEWAY_INTERFACE'],'CGI') !== false) && + if(isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && + (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) && (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) && - $matches[1] < 6 ){ + $matches[1] < 6 + ) { header('Refresh: 0;url='.$url); - }else{ + } else { header('Location: '.$url); } exit; @@ -1559,12 +1579,14 @@ function send_redirect($url){ * or $_GET) * @param string $exc The text of the raised exception * + * @throws Exception + * @return mixed * @author Adrian Lang */ function valid_input_set($param, $valid_values, $array, $exc = '') { - if (isset($array[$param]) && in_array($array[$param], $valid_values)) { + if(isset($array[$param]) && in_array($array[$param], $valid_values)) { return $array[$param]; - } elseif (isset($valid_values['default'])) { + } elseif(isset($valid_values['default'])) { return $valid_values['default']; } else { throw new Exception($exc); @@ -1575,12 +1597,12 @@ 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) { + if(strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) { $parts = explode('#', $_COOKIE['DOKU_PREFS']); $cnt = count($parts); - for ($i = 0; $i < $cnt; $i+=2){ - if ($parts[$i] == $pref) { - return $parts[$i+1]; + for($i = 0; $i < $cnt; $i += 2) { + if($parts[$i] == $pref) { + return $parts[$i + 1]; } } } diff --git a/inc/init.php b/inc/init.php index 1907aea09..a28050736 100644 --- a/inc/init.php +++ b/inc/init.php @@ -3,7 +3,9 @@ * Initialize some defaults needed for DokuWiki */ -// start timing Dokuwiki execution +/** + * timing Dokuwiki execution + */ function delta_time($start=0) { return microtime(true)-((float)$start); } -- cgit v1.2.3 From 90f1b7bd60332450b32e4ec0b189ddb0ab11fdf8 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 27 Jun 2012 02:30:15 -0400 Subject: Input wrapper for action.php --- inc/actions.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index e85cbfccc..0c35bc88c 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -20,6 +20,7 @@ function act_dispatch(){ global $ID; global $INFO; global $QUERY; + global $INPUT; global $lang; global $conf; @@ -131,14 +132,14 @@ function act_dispatch(){ //handle admin tasks if($ACT == 'admin'){ // retrieve admin plugin name from $_REQUEST['page'] - if (!empty($_REQUEST['page'])) { + if (($page = $INPUT->str('page', '', true)) != '') { $pluginlist = plugin_list('admin'); - if (in_array($_REQUEST['page'], $pluginlist)) { + if (in_array($page, $pluginlist)) { // attempt to load the plugin - if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null){ + if ($plugin =& plugin_load('admin',$page) !== null){ if($plugin->forAdminOnly() && !$INFO['isadmin']){ // a manager tried to load a plugin that's for admins only - unset($_REQUEST['page']); + $INPUT->remove('page'); msg('For admins only',-1); }else{ $plugin->handle(); @@ -300,13 +301,14 @@ function act_draftdel($act){ function act_draftsave($act){ global $INFO; global $ID; + global $INPUT; global $conf; - if($conf['usedraft'] && $_POST['wikitext']){ + if($conf['usedraft'] && $INPUT->post->has('wikitext')) { $draft = array('id' => $ID, - 'prefix' => substr($_POST['prefix'], 0, -1), - 'text' => $_POST['wikitext'], - 'suffix' => $_POST['suffix'], - 'date' => (int) $_POST['date'], + 'prefix' => substr($INPUT->post->str('prefix'), 0, -1), + 'text' => $INPUT->post->str('wikitext'), + 'suffix' => $INPUT->post->str('suffix'), + 'date' => $INPUT->post->int('date'), 'client' => $INFO['client'], ); $cname = getCacheName($draft['client'].$ID,'.draft'); @@ -335,6 +337,7 @@ function act_save($act){ global $SUM; global $lang; global $INFO; + global $INPUT; //spam check if(checkwordblock()) { @@ -346,7 +349,7 @@ function act_save($act){ return 'conflict'; //save it - saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$_REQUEST['minor']); //use pretty mode for con + saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$INPUT->bool('minor')); //use pretty mode for con //unlock it unlock($ID); @@ -669,6 +672,7 @@ function act_subscription($act){ global $lang; global $INFO; global $ID; + global $INPUT; // subcriptions work for logged in users only if(!$_SERVER['REMOTE_USER']) return 'show'; @@ -676,8 +680,8 @@ function act_subscription($act){ // get and preprocess data. $params = array(); foreach(array('target', 'style', 'action') as $param) { - if (isset($_REQUEST["sub_$param"])) { - $params[$param] = $_REQUEST["sub_$param"]; + if ($INPUT->has("sub_$param")) { + $params[$param] = $INPUT->str("sub_$param"); } } -- cgit v1.2.3 From 7d01a0eac854c623a74ff7936d5eba9413aefe79 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 27 Jun 2012 02:48:49 -0400 Subject: more INPUT wrapper uses: cache purge, sectok, getID --- inc/cache.php | 3 ++- inc/common.php | 3 ++- inc/pageutils.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/cache.php b/inc/cache.php index ff78e37ae..204c6f006 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -84,7 +84,8 @@ class cache { * it should only overwrite a dependency when the new value is more stringent than the old */ function _addDependencies() { - if (isset($_REQUEST['purge'])) $this->depends['purge'] = true; // purge requested + global $INPUT; + if ($INPUT->has('purge')) $this->depends['purge'] = true; // purge requested } /** diff --git a/inc/common.php b/inc/common.php index 768260bbf..02ed2432b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -63,9 +63,10 @@ function getSecurityToken() { * Check the secret CSRF token */ function checkSecurityToken($token = null) { + global $INPUT; if(!$_SERVER['REMOTE_USER']) return true; // no logged in user, no need for a check - if(is_null($token)) $token = $_REQUEST['sectok']; + if(is_null($token)) $token = $INPUT->str('sectok'); if(getSecurityToken() != $token) { msg('Security Token did not match. Possible CSRF attack.', -1); return false; diff --git a/inc/pageutils.php b/inc/pageutils.php index c94d14624..95f791364 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -19,9 +19,10 @@ * @author Andreas Gohr */ function getID($param='id',$clean=true){ + global $INPUT; global $conf; - $id = isset($_REQUEST[$param]) ? $_REQUEST[$param] : null; + $id = $INPUT->str($param); //construct page id from request URI if(empty($id) && $conf['userewrite'] == 2){ -- cgit v1.2.3 From 8243e61012e1d4f5614a32a3d5d9e81c50036f1c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 27 Jun 2012 19:09:58 -0400 Subject: Limit size of reads when max_bodysize is set or content-length is present --- inc/HTTPClient.php | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 73f5b89b4..c3ccfbbf2 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -427,25 +427,25 @@ class HTTPClient { $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n } } while ($chunk_size && !$abort); + }elseif($this->max_bodysize){ + // read just over the max_bodysize + $r_body = $this->_readData($socket, $this->max_bodysize+1, 'response', true); + if(strlen($r_body) > $this->max_bodysize){ + if ($this->max_bodysize_abort) { + throw new HTTPClientException('Allowed response size exceeded'); + } else { + $this->error = 'Allowed response size exceeded'; + } + } + }elseif(isset($this->resp_headers['content-length']) && + !isset($this->resp_headers['transfer-encoding'])){ + // read up to the content-length + $r_body = $this->_readData($socket, $this->resp_headers['content-length'], 'response', true); }else{ // read entire socket + $r_size = 0; while (!feof($socket)) { - $r_body .= $this->_readData($socket, -$this->max_bodysize, 'response', true); - $r_size = strlen($r_body); - if($this->max_bodysize && $r_size > $this->max_bodysize){ - if ($this->max_bodysize_abort) { - throw new HTTPClientException('Allowed response size exceeded'); - } else { - $this->error = 'Allowed response size exceeded'; - break; - } - } - if(isset($this->resp_headers['content-length']) && - !isset($this->resp_headers['transfer-encoding']) && - $this->resp_headers['content-length'] == $r_size){ - // we read the content-length, finish here - break; - } + $r_body .= $this->_readData($socket, 0, 'response', true); } } @@ -525,10 +525,8 @@ class HTTPClient { * Safely read data from a socket * * Reads up to a given number of bytes or throws an exception if the - * response times out or ends prematurely. If the number of bytes to - * read is negative, then it will read up to the absolute value, but - * may read less. A value of 0 returns an arbitrarily sized block, - * and a positive value will return exactly that many bytes. + * response times out or ends prematurely. If $nbytes is 0, an arbitrarily + * sized block will be read. * * @param handle $socket An open socket handle in non-blocking mode * @param int $nbytes Number of bytes to read @@ -543,16 +541,19 @@ class HTTPClient { $sel_e = null; $r_data = ''; - $to_read = $nbytes ? $nbytes : 4096; - if ($to_read < 0) $to_read = -$to_read; + if ($nbytes <= 0) $nbytes = 4096; + $to_read = $nbytes; do { $time_used = $this->_time() - $this->start; if ($time_used > $this->timeout) throw new HTTPClientException( sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), -100); - if(!$ignore_eof && feof($socket)) - throw new HTTPClientException("Premature End of File (socket) while reading $message"); + if(feof($socket)) { + if(!$ignore_eof) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + break; + } // wait for stream ready or timeout self::selecttimeout($this->timeout - $time_used, $sec, $usec); -- cgit v1.2.3 From a6ba0720629e19619b1d72aa7aadea28a533f856 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 27 Jun 2012 19:38:46 -0400 Subject: Avoid timeout when content-length is 0 --- inc/HTTPClient.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'inc') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index c3ccfbbf2..a25846c31 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -445,7 +445,7 @@ class HTTPClient { // read entire socket $r_size = 0; while (!feof($socket)) { - $r_body .= $this->_readData($socket, 0, 'response', true); + $r_body .= $this->_readData($socket, 4096, 'response', true); } } @@ -525,8 +525,7 @@ class HTTPClient { * Safely read data from a socket * * Reads up to a given number of bytes or throws an exception if the - * response times out or ends prematurely. If $nbytes is 0, an arbitrarily - * sized block will be read. + * response times out or ends prematurely. * * @param handle $socket An open socket handle in non-blocking mode * @param int $nbytes Number of bytes to read @@ -541,7 +540,8 @@ class HTTPClient { $sel_e = null; $r_data = ''; - if ($nbytes <= 0) $nbytes = 4096; + // Does not return immediately so timeout and eof can be checked + if ($nbytes < 0) $nbytes = 0; $to_read = $nbytes; do { $time_used = $this->_time() - $this->start; @@ -555,16 +555,18 @@ class HTTPClient { break; } - // wait for stream ready or timeout - self::selecttimeout($this->timeout - $time_used, $sec, $usec); - if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ - $bytes = fread($socket, $to_read); - if($bytes === false) - throw new HTTPClientException("Failed reading from socket while reading $message", -100); - $r_data .= $bytes; - $to_read -= strlen($bytes); + if ($to_read > 0) { + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + $bytes = fread($socket, $to_read); + if($bytes === false) + throw new HTTPClientException("Failed reading from socket while reading $message", -100); + $r_data .= $bytes; + $to_read -= strlen($bytes); + } } - } while (strlen($r_data) < $nbytes); + } while ($to_read > 0 && strlen($r_data) < $nbytes); return $r_data; } -- cgit v1.2.3 From 5d0aaf958325f500ce69cfb79e69eb0d8f83fdeb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 28 Jun 2012 17:17:24 +0200 Subject: treat empty string inputs as unset for int and bool --- inc/Input.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/Input.class.php b/inc/Input.class.php index 1ea5e031f..f4174404a 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -118,6 +118,7 @@ class Input { public function int($name, $default = 0, $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; + if($this->access[$name] === '') return $default; if($nonempty && empty($this->access[$name])) return $default; return (int) $this->access[$name]; @@ -151,6 +152,8 @@ class Input { */ public function bool($name, $default = false, $nonempty = false) { if(!isset($this->access[$name])) return $default; + if(is_array($this->access[$name])) return $default; + if($this->access[$name] === '') return $default; if($nonempty && empty($this->access[$name])) return $default; return (bool) $this->access[$name]; @@ -223,4 +226,4 @@ class GetInput extends Input { parent::set($name, $value); $_REQUEST[$name] = $value; } -} \ No newline at end of file +} -- cgit v1.2.3 From 8108113c244529ec54f11271a6a15e3d1e0a048f Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 28 Jun 2012 22:15:56 -0400 Subject: Input validation for media manager --- inc/media.php | 66 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 26 deletions(-) (limited to 'inc') diff --git a/inc/media.php b/inc/media.php index 2462a1deb..6c92225ff 100644 --- a/inc/media.php +++ b/inc/media.php @@ -226,8 +226,9 @@ function media_delete($id,$auth){ */ function media_upload_xhr($ns,$auth){ if(!checkSecurityToken()) return false; + global $INPUT; - $id = $_GET['qqfile']; + $id = $INPUT->get->str('qqfile'); list($ext,$mime,$dl) = mimetype($id); $input = fopen("php://input", "r"); if (!($tmp = io_mktmpdir())) return false; @@ -247,7 +248,7 @@ function media_upload_xhr($ns,$auth){ 'mime' => $mime, 'ext' => $ext), $ns.':'.$id, - (($_REQUEST['ow'] == 'checked') ? true : false), + (($INPUT->get->str('ow') == 'checked') ? true : false), $auth, 'copy' ); @@ -270,9 +271,10 @@ function media_upload_xhr($ns,$auth){ function media_upload($ns,$auth,$file=false){ if(!checkSecurityToken()) return false; global $lang; + global $INPUT; // get file and id - $id = $_POST['mediaid']; + $id = $INPUT->post->str('mediaid'); if (!$file) $file = $_FILES['upload']; if(empty($id)) $id = $file['name']; @@ -294,7 +296,7 @@ function media_upload($ns,$auth,$file=false){ $res = media_save(array('name' => $file['tmp_name'], 'mime' => $imime, 'ext' => $iext), $ns.':'.$id, - $_REQUEST['ow'], $auth, 'move_uploaded_file'); + $INPUT->post->bool('ow'), $auth, 'move_uploaded_file'); if (is_array($res)) { msg($res[0], $res[1]); return false; @@ -641,7 +643,9 @@ function media_tabs_details($image, $selected_tab = ''){ * @author Kate Arzamastseva */ function media_tab_files_options(){ - global $lang, $NS; + global $lang; + global $NS; + global $INPUT; $form = new Doku_Form(array('class' => 'options', 'method' => 'get', 'action' => wl($ID))); $media_manager_params = media_managerURL(array(), '', false, true); @@ -649,8 +653,8 @@ function media_tab_files_options(){ $form->addHidden($pKey, $pVal); } $form->addHidden('sectok', null); - if (isset($_REQUEST['q'])) { - $form->addHidden('q', $_REQUEST['q']); + if ($INPUT->has('q')) { + $form->addHidden('q', $INPUT->str('q')); } $form->addElement('
    '.NL); foreach(array('list' => array('listType', array('thumbs', 'rows')), @@ -694,9 +698,10 @@ function _media_get_list_type() { } function _media_get_display_param($param, $values) { - if (isset($_REQUEST[$param]) && in_array($_REQUEST[$param], $values)) { + global $INPUT; + if (in_array($INPUT->str($param), $values)) { // FIXME: Set cookie - return $_REQUEST[$param]; + return $INPUT->str($param); } else { $val = get_doku_pref($param, $values['default']); if (!in_array($val, $values)) { @@ -746,10 +751,10 @@ function media_tab_upload($ns,$auth=null,$jump='') { */ function media_tab_search($ns,$auth=null) { global $lang; + global $INPUT; - $do = $_REQUEST['mediado']; - $query = $_REQUEST['q']; - if (!$query) $query = ''; + $do = $INPUT->str('mediado'); + $query = $INPUT->str('q'); echo '