From ef3e3cddddc43156f53958411f3396c9ef5dec60 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Feb 2014 14:55:51 +0100 Subject: Only use the whole text as search snippet when it's the first match --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index bd8e6b866..fdaa1a19b 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -333,7 +333,7 @@ function ft_snippet($id,$highlight){ $pre = min($pre,100-$post); } else if ($post>50) { $post = min($post, 100-$pre); - } else { + } else if ($offset == 0) { // both are less than 50, means the context is the whole string // make it so and break out of this loop - there is no need for the // complex snippet calculations -- cgit v1.2.3 From 43d58b76484489688582f407d73054a3d4ddcba1 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Feb 2014 15:34:03 +0100 Subject: Fix the snippet search to continue after the previous match --- inc/fulltext.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'inc') diff --git a/inc/fulltext.php b/inc/fulltext.php index fdaa1a19b..87b5a7370 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -354,12 +354,12 @@ function ft_snippet($id,$highlight){ } // set $offset for next match attempt - // substract strlen to avoid splitting a potential search success, - // this is an approximation as the search pattern may match strings - // of varying length and it will fail if the context snippet - // boundary breaks a matching string longer than the current match - $utf8_offset = $utf8_idx + $post; - $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$post)); + // continue matching after the current match + // if the current match is not the longest possible match starting at the current offset + // this prevents further matching of this snippet but for possible matches of length + // smaller than match length + context (at least 50 characters) this match is part of the context + $utf8_offset = $utf8_idx + $utf8_len; + $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$utf8_len)); $offset = utf8_correctIdx($text,$offset); } -- cgit v1.2.3 From acbf061c66059df3daf7cdbe7e8ec4182418dd20 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 22:09:04 +0100 Subject: add Reply-To and Sender to whitelist for cleanAddress FS#2916 --- 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 2ac2c1d60..480dc0e01 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -522,7 +522,7 @@ class Mailer { // clean up addresses if(empty($this->headers['From'])) $this->from($conf['mailfrom']); - $addrs = array('To', 'From', 'Cc', 'Bcc'); + $addrs = array('To', 'From', 'Cc', 'Bcc', 'Reply-To', 'Sender'); foreach($addrs as $addr) { if(isset($this->headers[$addr])) { $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); -- cgit v1.2.3 From 8c253612ce858dfc41922e084c065888b592e8bd Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 15 Feb 2014 22:09:24 +0100 Subject: improve PHPDocs of Mailer --- 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 480dc0e01..e32178bba 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -277,7 +277,7 @@ class Mailer { /** * Add the To: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function to($address) { @@ -287,7 +287,7 @@ class Mailer { /** * Add the Cc: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function cc($address) { @@ -297,7 +297,7 @@ class Mailer { /** * Add the Bcc: recipients * - * @see setAddress + * @see cleanAddress * @param string|array $address Multiple adresses separated by commas or as array */ public function bcc($address) { @@ -310,7 +310,7 @@ class Mailer { * This is set to $conf['mailfrom'] when not specified so you shouldn't need * to call this function * - * @see setAddress + * @see cleanAddress * @param string $address from address */ public function from($address) { @@ -333,9 +333,9 @@ class Mailer { * for headers. Addresses may not contain Non-ASCII data! * * Example: - * setAddress("föö , me@somewhere.com","TBcc"); + * cc("föö , me@somewhere.com","TBcc"); * - * @param string|array $address Multiple adresses separated by commas or as array + * @param string|array $addresses Multiple adresses separated by commas or as array * @return bool|string the prepared header (can contain multiple lines) */ public function cleanAddress($addresses) { -- cgit v1.2.3 From 17954bb5e3033069554ebb963fb9040c52b4760b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 22:46:32 +0000 Subject: added title to video/audio tags, use title for fallback links, refactored duplicate code --- inc/parser/xhtml.php | 51 ++++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 80701cd2e..9d75c271d 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1096,48 +1096,30 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret .= ' />'; - }elseif(media_supportedav($mime, 'video')){ + }elseif(media_supportedav($mime, 'video') || media_supportedav($mime, 'audio')){ // first get the $title - if (!is_null($title)) { - $title = $this->_xmlEntities($title); - } - if (!$title) { - // just show the sourcename - $title = $this->_xmlEntities(utf8_basename(noNS($src))); - } + $title = !is_null($title) ? $this->_xmlEntities($title) : false; if (!$render) { - // if the video is not supposed to be rendered - // return the title of the video - return $title; + // if the file is not supposed to be rendered + // return the title of the file (just the sourcename if there is no title) + return $title ? $title : $this->_xmlEntities(utf8_basename(noNS($src))); } $att = array(); $att['class'] = "media$align"; - - //add video(s) - $ret .= $this->_video($src, $width, $height, $att); - - }elseif(media_supportedav($mime, 'audio')){ - // first get the $title - if (!is_null($title)) { - $title = $this->_xmlEntities($title); + if ($title) { + $att['title'] = $title; } - if (!$title) { - // just show the sourcename - $title = $this->_xmlEntities(utf8_basename(noNS($src))); + + if (media_supportedav($mime, 'video')) { + //add video + $ret .= $this->_video($src, $width, $height, $att); } - if (!$render) { - // if the video is not supposed to be rendered - // return the title of the video - return $title; + if (media_supportedav($mime, 'audio')) { + //add audio + $ret .= $this->_audio($src, $att); } - $att = array(); - $att['class'] = "media$align"; - - //add audio - $ret .= $this->_audio($src, $att); - }elseif($mime == 'application/x-shockwave-flash'){ if (!$render) { // if the flash is not supposed to be rendered @@ -1282,7 +1264,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @return string */ function _video($src,$width,$height,$atts=null){ - // prepare width and height if(is_null($atts)) $atts = array(); $atts['width'] = (int) $width; @@ -1309,7 +1290,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // output source for each alternative video format foreach($alternatives as $mime => $file) { $url = ml($file,array('cache'=>$cache),true,'&'); - $title = $this->_xmlEntities(utf8_basename(noNS($file))); + $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= ''.NL; // alternative content (just a link to the file) @@ -1345,7 +1326,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // output source for each alternative audio format foreach($alternatives as $mime => $file) { $url = ml($file,array('cache'=>$cache),true,'&'); - $title = $this->_xmlEntities(utf8_basename(noNS($file))); + $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= ''.NL; // alternative content (just a link to the file) -- cgit v1.2.3 From b83a74f191b6ee9120c0c376509164285480ebac Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 15 Feb 2014 23:44:00 +0000 Subject: fixed typo in phpdoc --- inc/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/media.php b/inc/media.php index 56fa5d54b..fe155f0f3 100644 --- a/inc/media.php +++ b/inc/media.php @@ -2164,7 +2164,7 @@ function media_alternativefiles($src, $exts){ /** * Check if video/audio is supported to be embedded. * - * @param string $src - mimetype of media file + * @param string $mime - mimetype of media file * @param string $type - type of media files to check ('video', 'audio', or none) * @return boolean * -- cgit v1.2.3 From b95f73d374c43006a82eddd35b630bd10a9fbb5f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:20:54 +0000 Subject: Add ordering to event handlers Allows a sequence integer to be supplied when registering to handle an event. When processing an event, handlers (hooks) will be executed in ascending order of their sequence number. If two or more handlers have the same sequence number their order of execution is undefined. A handler wanting to be first, should use -PHP_MAX_INT. A handler wanting to be last can use PHP_MAX_INT. There may be conflicts if two or more plugins use these values in the expectation that they will guarantee being first or last. --- inc/events.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index f7b1a7a16..9c3169b34 100644 --- a/inc/events.php +++ b/inc/events.php @@ -148,9 +148,10 @@ class Doku_Event_Handler { * if NULL, method is assumed to be a globally available function * @param $method (function) event handler function * @param $param (mixed) data passed to the event handler + * @param $seq (int) sequence number for ordering hook execution (ascending) */ - 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, $seq=0) { + $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); } function process_event(&$event,$advise='') { @@ -158,8 +159,8 @@ class Doku_Event_Handler { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); if (!empty($this->_hooks[$evt_name])) { - foreach ($this->_hooks[$evt_name] as $hook) { - // list($obj, $method, $param) = $hook; + foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { + // list($obj, $method, $param, $seq) = $hook; $obj =& $hook[0]; $method = $hook[1]; $param = $hook[2]; @@ -174,6 +175,20 @@ class Doku_Event_Handler { } } } + + protected function sort_hooks($hooks) { + usort($hooks, array('Doku_Event_Handler','cmp_hooks')); + return $hooks; + } + + public static function cmp_hooks($a, $b) { + if ($a[3] == $b[3]) { + return 0; + } + + return ($a[3] < $b[3]) ? -1 : 1; + } + } /** -- cgit v1.2.3 From adb80b0288b9e3c7c4576056d5e1d0dc77bcb842 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:35:34 +0000 Subject: An event object used as a string will return its name - the event name --- inc/events.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index 9c3169b34..44ccdb8a6 100644 --- a/inc/events.php +++ b/inc/events.php @@ -32,6 +32,10 @@ class Doku_Event { } + function __toString() { + return $this->name; + } + /** * advise functions * -- cgit v1.2.3 From d668eb9fab52028922a60c337d370b956602a533 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 16:36:33 +0000 Subject: since php 5, no need to access objects by reference --- inc/events.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index 44ccdb8a6..ed60c95fe 100644 --- a/inc/events.php +++ b/inc/events.php @@ -164,10 +164,7 @@ class Doku_Event_Handler { if (!empty($this->_hooks[$evt_name])) { foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { - // list($obj, $method, $param, $seq) = $hook; - $obj =& $hook[0]; - $method = $hook[1]; - $param = $hook[2]; + list($obj, $method, $param, $seq) = $hook; if (is_null($obj)) { $method($event, $param); -- cgit v1.2.3 From b9bd3ecff7347bc96d59368f3f4ba4a271ecf0bd Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:15:07 +0000 Subject: add appropriate visibility keywords to event properties --- inc/events.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index ed60c95fe..e9ffa5a92 100644 --- a/inc/events.php +++ b/inc/events.php @@ -11,12 +11,12 @@ if(!defined('DOKU_INC')) die('meh.'); class Doku_Event { // public properties - var $name = ''; // READONLY event name, objects must register against this name to see the event - var $data = null; // READWRITE data relevant to the event, no standardised format (YET!) - var $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise + public $name = ''; // READONLY event name, objects must register against this name to see the event + public $data = null; // READWRITE data relevant to the event, no standardised format (YET!) + public $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise // event handlers may modify this if they are preventing the default action // to provide the after event handlers with event results - var $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action + public $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action // private properties, event handlers can effect these through the provided methods var $_default = true; // whether or not to carry out the default action associated with the event @@ -121,7 +121,7 @@ class Doku_Event_Handler { // public properties: none // private properties - var $_hooks = array(); // array of events and their registered handlers + protected $_hooks = array(); // array of events and their registered handlers /** * event_handler -- cgit v1.2.3 From 33416b823f72c23623d441e6341f564c41cd8f8f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:18:30 +0000 Subject: remove reference operator from object, no longer required --- inc/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index e9ffa5a92..91b0d181a 100644 --- a/inc/events.php +++ b/inc/events.php @@ -158,7 +158,7 @@ class Doku_Event_Handler { $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); } - function process_event(&$event,$advise='') { + function process_event($event,$advise='') { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); -- cgit v1.2.3 From cf0a922758503003100c988bf25eeaaa8e5b287c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 16 Feb 2014 20:19:09 +0000 Subject: Ensure hook array is always in the correct sequence Changed to sort on add from sort on process for efficiency. Some events (e.g. AUTH_ACL_CHECK) could be trigged many times in a single page request. --- inc/events.php | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index 91b0d181a..888b968b5 100644 --- a/inc/events.php +++ b/inc/events.php @@ -155,7 +155,13 @@ class Doku_Event_Handler { * @param $seq (int) sequence number for ordering hook execution (ascending) */ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) { - $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param, (int)$seq); + $seq = (int)$seq; + $doSort = !isset($this->_hooks[$event.'_'.$advise][$seq]); + $this->_hooks[$event.'_'.$advise][$seq][] = array($obj, $method, $param); + + if ($doSort) { + ksort($this->_hooks[$event.'_'.$advise]); + } } function process_event($event,$advise='') { @@ -163,33 +169,21 @@ class Doku_Event_Handler { $evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE'); if (!empty($this->_hooks[$evt_name])) { - foreach ($this->sort_hooks($this->_hooks[$evt_name]) as $hook) { - list($obj, $method, $param, $seq) = $hook; + foreach ($this->_hooks[$evt_name] as $sequenced_hooks) { + foreach ($sequenced_hooks as $hook) { + list($obj, $method, $param, $seq) = $hook; - if (is_null($obj)) { - $method($event, $param); - } else { - $obj->$method($event, $param); - } + if (is_null($obj)) { + $method($event, $param); + } else { + $obj->$method($event, $param); + } - if (!$event->_continue) break; + if (!$event->_continue) return; + } } } } - - protected function sort_hooks($hooks) { - usort($hooks, array('Doku_Event_Handler','cmp_hooks')); - return $hooks; - } - - public static function cmp_hooks($a, $b) { - if ($a[3] == $b[3]) { - return 0; - } - - return ($a[3] < $b[3]) ? -1 : 1; - } - } /** -- cgit v1.2.3 From f23eef27e07dfe76ab76fda68242d44de10e4022 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 17:56:58 +0100 Subject: PHPDocs internallink --- inc/parser/xhtml.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9d75c271d..315b4d640 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -562,6 +562,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * $search,$returnonly & $linktype are not for the renderer but are used * elsewhere - no need to implement them in other renderers * + * @param string $id pageid + * @param string|null $name link name + * @param string|null $search adds search url param + * @param bool $returnonly whether to return html or write to doc attribute + * @param string $linktype type to set use of headings + * @return void|string writes to doc attribute or returns html depends on $returnonly * @author Andreas Gohr */ function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') { -- cgit v1.2.3 From 0e2431b761b5c24b59109867ec74d7647d16131f Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:01:57 +0100 Subject: Improve PHPDocs, rename auth_basic to DokuWiki_Auth_Plugin --- inc/confutils.php | 3 ++- inc/subscription.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/confutils.php b/inc/confutils.php index 0ac003b72..31371d41f 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -237,13 +237,14 @@ function getConfigFiles($type) { * check if the given action was disabled in config * * @author Andreas Gohr + * @param string $action * @returns boolean true if enabled, false if disabled */ function actionOK($action){ static $disabled = null; if(is_null($disabled) || defined('SIMPLE_TEST')){ global $conf; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; // prepare disabled actions array and handle legacy options diff --git a/inc/subscription.php b/inc/subscription.php index ddf2f39e6..ddf30706b 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -288,7 +288,7 @@ class Subscription { public function send_bulk($page) { if(!$this->isenabled()) return 0; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $conf; global $USERINFO; @@ -651,7 +651,7 @@ class Subscription { public function notifyaddresses(&$data) { if(!$this->isenabled()) return; - /** @var auth_basic $auth */ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $conf; -- cgit v1.2.3 From d0f7cf78a9332d409d163cb5ec617059c72296ad Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:06:34 +0100 Subject: PHPDocs improvements and minor fixes feedcreator --- inc/feedcreator.class.php | 99 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 25 deletions(-) (limited to 'inc') diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php index 670a1bc29..b90da5724 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -185,6 +185,8 @@ class HtmlDescribable { */ var $descriptionTruncSize; + var $description; + /** * Returns a formatted description field, depending on descriptionHtmlSyndicated and * $descriptionTruncSize properties @@ -222,7 +224,7 @@ class FeedHtmlField { /** * Creates a new instance of FeedHtmlField. - * @param $string: if given, sets the rawFieldContent property + * @param string $parFieldContent: if given, sets the rawFieldContent property */ function FeedHtmlField($parFieldContent) { if ($parFieldContent) { @@ -267,8 +269,14 @@ class FeedHtmlField { * @author Kai Blankenhorn */ class UniversalFeedCreator extends FeedCreator { + /** @var FeedCreator */ var $_feed; + /** + * Sets format + * + * @param string $format + */ function _setFormat($format) { switch (strtoupper($format)) { @@ -344,7 +352,7 @@ class UniversalFeedCreator extends FeedCreator { * Creates a syndication feed based on the items previously added. * * @see FeedCreator::addItem() - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS" * @return string the contents of the feed. */ @@ -358,10 +366,10 @@ class UniversalFeedCreator extends FeedCreator { * header may be sent to redirect the use to the newly created file. * @since 1.4 * - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS" - * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response. + * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param boolean $displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response. */ function saveFeed($format="RSS0.91", $filename="", $displayContents=true) { $this->_setFormat($format); @@ -376,10 +384,10 @@ class UniversalFeedCreator extends FeedCreator { * before anything else, especially before you do the time consuming task to build the feed * (web fetching, for example). * - * @param string format format the feed should comply to. Valid values are: + * @param string $format format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3". - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) */ function useCached($format="RSS0.91", $filename="", $timeout=3600) { $this->_setFormat($format); @@ -390,7 +398,7 @@ class UniversalFeedCreator extends FeedCreator { /** * Outputs feed to the browser - needed for on-the-fly feed generation (like it is done in WordPress, etc.) * - * @param format string format the feed should comply to. Valid values are: + * @param $format string format the feed should comply to. Valid values are: * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3". */ function outputFeed($format='RSS0.91') { @@ -422,7 +430,13 @@ class FeedCreator extends HtmlDescribable { /** * Optional attributes of a feed. */ - var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays; + var $syndicationURL, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays; + /** + * Optional attribute of a feed + * + * @var FeedImage + */ + var $image = null; /** * The url of the external xsl stylesheet used to format the naked rss feed. @@ -430,13 +444,18 @@ class FeedCreator extends HtmlDescribable { */ var $xslStyleSheet = ""; + /** + * Style sheet for rss feed + */ + var $cssStyleSheet = ""; + /** * @access private + * @var FeedItem[] */ var $items = Array(); - /** * This feed's MIME content type. * @since 1.4 @@ -466,7 +485,7 @@ class FeedCreator extends HtmlDescribable { /** * Adds an FeedItem to the feed. * - * @param object FeedItem $item The FeedItem to add to the feed. + * @param FeedItem $item The FeedItem to add to the feed. * @access public */ function addItem($item) { @@ -482,8 +501,8 @@ class FeedCreator extends HtmlDescribable { * If the string is already shorter than $length, it is returned unchanged. * * @static - * @param string string A string to be truncated. - * @param int length the maximum length the string should be truncated to + * @param string $string A string to be truncated. + * @param int $length the maximum length the string should be truncated to * @return string the truncated string */ function iTrunc($string, $length) { @@ -527,8 +546,8 @@ class FeedCreator extends HtmlDescribable { /** * Creates a string containing all additional elements specified in * $additionalElements. - * @param elements array an associative array containing key => value pairs - * @param indentString string a string that will be inserted before every generated line + * @param $elements array an associative array containing key => value pairs + * @param $indentString string a string that will be inserted before every generated line * @return string the XML tags corresponding to $additionalElements */ function _createAdditionalElements($elements, $indentString="") { @@ -541,6 +560,9 @@ class FeedCreator extends HtmlDescribable { return $ae; } + /** + * Create elements for stylesheets + */ function _createStylesheetReferences() { $xml = ""; if ($this->cssStyleSheet) $xml .= "cssStyleSheet."\" type=\"text/css\"?>\n"; @@ -610,8 +632,8 @@ class FeedCreator extends HtmlDescribable { * before anything else, especially before you do the time consuming task to build the feed * (web fetching, for example). * @since 1.4 - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) + * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param $timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour) */ function useCached($filename="", $timeout=3600) { $this->_timeout = $timeout; @@ -629,8 +651,8 @@ class FeedCreator extends HtmlDescribable { * header may be sent to redirect the user to the newly created file. * @since 1.4 * - * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). - * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file. + * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()). + * @param $displayContents boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file. */ function saveFeed($filename="", $displayContents=true) { if ($filename=="") { @@ -667,6 +689,7 @@ class FeedCreator extends HtmlDescribable { * Usually, you won't need to use this. */ class FeedDate { + /** @var int */ var $unix; /** @@ -726,7 +749,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as an RFC 822 date. * - * @return a date in RFC 822 format + * @return string a date in RFC 822 format */ function rfc822() { //return gmdate("r",$this->unix); @@ -738,7 +761,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as an ISO 8601 date. * - * @return a date in ISO 8601 (RFC 3339) format + * @return string a date in ISO 8601 (RFC 3339) format */ function iso8601() { $date = gmdate("Y-m-d\TH:i:sO",$this->unix); @@ -751,7 +774,7 @@ class FeedDate { /** * Gets the date stored in this FeedDate as unix time stamp. * - * @return a date as a unix time stamp + * @return int a date as a unix time stamp */ function unix() { return $this->unix; @@ -777,7 +800,7 @@ class RSSCreator10 extends FeedCreator { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); if ($this->cssStyleSheet=="") { - $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css"; + $this->cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css"; } $feed.= $this->_createStylesheetReferences(); $feed.= "encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createStylesheetReferences(); $feed.= "\n"; $feed.= " ".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."\n"; - $this->truncSize = 500; + $this->descriptionTruncSize = 500; $feed.= " ".$this->getDescription()."\n"; $feed.= " ".$this->link."\n"; $icnt = count($this->items); @@ -1091,6 +1118,10 @@ class AtomCreator10 extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1174,6 +1205,10 @@ class AtomCreator03 extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1281,6 +1316,7 @@ class MBOXCreator extends FeedCreator { */ function createFeed() { $icnt = count($this->items); + $feed = ""; for ($i=0; $i<$icnt; $i++) { if ($this->items[$i]->author!="") { $from = $this->items[$i]->author; @@ -1331,6 +1367,10 @@ class OPMLCreator extends FeedCreator { $this->encoding = "utf-8"; } + /** + * Build content + * @return string + */ function createFeed() { $feed = "encoding."\"?>\n"; $feed.= $this->_createGeneratorComment(); @@ -1441,6 +1481,7 @@ class HTMLCreator extends FeedCreator { } //set an openInNewWindow_token_to be inserted or not + $targetInsert = ""; if ($this->openInNewWindow) { $targetInsert = " target='_blank'"; } @@ -1568,6 +1609,14 @@ class JSCreator extends HTMLCreator { * @author Andreas Gohr */ class DokuWikiFeedCreator extends UniversalFeedCreator{ + + /** + * Build content + * + * @param string $format + * @param string $encoding + * @return string + */ function createFeed($format = "RSS0.91",$encoding='iso-8859-15') { $this->_setFormat($format); $this->_feed->encoding = $encoding; -- cgit v1.2.3 From 901248028bc3b7497093ab3853f2f6e347fbc397 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 17 Feb 2014 19:22:57 +0100 Subject: fix httputils PHPDocs --- inc/httputils.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/httputils.php b/inc/httputils.php index ca60ed509..003733ede 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -64,7 +64,8 @@ function http_conditionalRequest($timestamp){ * Let the webserver send the given file via x-sendfile method * * @author Chris Smith - * @returns void or exits with previously header() commands executed + * @param $file + * @returns bool or exits with previously header() commands executed */ function http_sendfile($file) { global $conf; @@ -92,7 +93,7 @@ function http_sendfile($file) { * * This function exits the running script * - * @param ressource $fh - file handle for an already open file + * @param resource $fh - file handle for an already open file * @param int $size - size of the whole file * @param int $mime - MIME type of the file * @@ -204,7 +205,7 @@ function http_gzip_valid($uncompressed_file) { * * This function handles output of cacheable resource files. It ses the needed * HTTP headers. If a useable cache is present, it is passed to the web server - * and the scrpt is terminated. + * and the script is terminated. */ function http_cached($cache, $cache_ok) { global $conf; -- cgit v1.2.3 From b63529ad89f66ca4de0b4b6003892ac7fd71653c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 17 Feb 2014 20:02:35 +0000 Subject: remove '' from list, its not part of the hook array --- inc/events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/events.php b/inc/events.php index 888b968b5..58ba4d5e4 100644 --- a/inc/events.php +++ b/inc/events.php @@ -171,7 +171,7 @@ class Doku_Event_Handler { if (!empty($this->_hooks[$evt_name])) { foreach ($this->_hooks[$evt_name] as $sequenced_hooks) { foreach ($sequenced_hooks as $hook) { - list($obj, $method, $param, $seq) = $hook; + list($obj, $method, $param) = $hook; if (is_null($obj)) { $method($event, $param); -- cgit v1.2.3 From 04d68ae4edcddca8a3c30ed4ce6c72d28440a084 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:08:02 +0100 Subject: PHPDocs auth.php --- inc/auth.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 6000ea6d7..8fde129aa 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -845,6 +845,12 @@ function auth_nameencode($name, $skip_group = false) { return $cache[$name][$skip_group]; } +/** + * callback encodes the matches + * + * @param array $matches first complete match, next matching subpatterms + * @return string + */ function auth_nameencode_callback($matches) { return '%'.dechex(ord(substr($matches[1],-1))); } @@ -1075,6 +1081,11 @@ function updateprofile() { return false; } +/** + * Delete the current logged-in user + * + * @return bool true on success, false on any error + */ function auth_deleteprofile(){ global $conf; global $lang; -- cgit v1.2.3 From 6d606653fa148cf19dc5e996822212a144b51ada Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 14:09:09 +0100 Subject: Improve PHPDocs Doku_Cli_Opts (cliopts.php) --- inc/cliopts.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'inc') diff --git a/inc/cliopts.php b/inc/cliopts.php index 9cea686a2..3eac72e5b 100644 --- a/inc/cliopts.php +++ b/inc/cliopts.php @@ -74,9 +74,9 @@ class Doku_Cli_Opts { /** * * @see http://www.sitepoint.com/article/php-command-line-1/3 - * @param string executing file name - this MUST be passed the __FILE__ constant - * @param string short options - * @param array (optional) long options + * @param string $bin_file executing file name - this MUST be passed the __FILE__ constant + * @param string $short_options short options + * @param array $long_options (optional) long options * @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error */ function & getOptions($bin_file, $short_options, $long_options = null) { @@ -233,12 +233,12 @@ class Doku_Cli_Opts { * Parse short option * * @param string $arg Argument - * @param string[] $short_options Available short options + * @param string $short_options Available short options * @param string[][] &$opts * @param string[] &$args * * @access private - * @return void + * @return void|Doku_Cli_Opts_Error */ function _parseShortOption($arg, $short_options, &$opts, &$args) { $len = strlen($arg); @@ -324,7 +324,7 @@ class Doku_Cli_Opts { * @param string[] &$args * * @access private - * @return void|PEAR_Error + * @return void|Doku_Cli_Opts_Error */ function _parseLongOption($arg, $long_options, &$opts, &$args) { @list($opt, $opt_arg) = explode('=', $arg, 2); @@ -402,7 +402,7 @@ class Doku_Cli_Opts { * Will take care on register_globals and register_argc_argv ini directives * * @access public - * @return mixed the $argv PHP array or PEAR error if not registered + * @return array|Doku_Cli_Opts_Error the $argv PHP array or PEAR error if not registered */ function readPHPArgv() { global $argv; @@ -421,10 +421,19 @@ class Doku_Cli_Opts { return $argv; } + /** + * @param $code + * @param $msg + * @return Doku_Cli_Opts_Error + */ function raiseError($code, $msg) { return new Doku_Cli_Opts_Error($code, $msg); } + /** + * @param $obj + * @return bool + */ function isError($obj) { return is_a($obj, 'Doku_Cli_Opts_Error'); } -- cgit v1.2.3 From 8d443db51f9acca81484bec96d8bcd49c00e6414 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 17:19:45 +0100 Subject: remove 'fix dateformat config for upgraders' FS#2073 --- inc/init.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'inc') diff --git a/inc/init.php b/inc/init.php index a937b934d..3e422453d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -183,11 +183,6 @@ if($conf['compression'] == 'gz' && !function_exists('gzopen')){ $conf['compression'] = 0; } -// fix dateformat for upgraders -if(strpos($conf['dformat'],'%') === false){ - $conf['dformat'] = '%Y/%m/%d %H:%M'; -} - // precalculate file creation modes init_creationmodes(); -- cgit v1.2.3 From 900a9e9e56d360fa7d347304e9b0d4b691d4becc Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 19:25:13 +0100 Subject: replace dir_delete by io_rmdir --- inc/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/media.php b/inc/media.php index fe155f0f3..a6109f785 100644 --- a/inc/media.php +++ b/inc/media.php @@ -284,7 +284,7 @@ function media_upload_xhr($ns,$auth){ 'copy' ); unlink($path); - if ($tmp) dir_delete($tmp); + if ($tmp) io_rmdir($tmp, true); if (is_array($res)) { msg($res[0], $res[1]); return false; -- cgit v1.2.3 From 2472a8f6cbd2abffe712ddd42fe2ad296d03d8f2 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 21:42:31 +0100 Subject: Removed unused vars, define undefined ones --- inc/io.php | 2 -- inc/media.php | 1 - 2 files changed, 3 deletions(-) (limited to 'inc') diff --git a/inc/io.php b/inc/io.php index c5225a2e0..27a34b045 100644 --- a/inc/io.php +++ b/inc/io.php @@ -367,8 +367,6 @@ function io_createNamespace($id, $ns_type='pages') { * @author Andreas Gohr */ function io_makeFileDir($file){ - global $conf; - $dir = dirname($file); if(!@is_dir($dir)){ io_mkdir_p($dir) || msg("Creating directory $dir failed",-1); diff --git a/inc/media.php b/inc/media.php index fe155f0f3..132738942 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1039,7 +1039,6 @@ function media_details($image, $auth, $rev=false, $meta=false) { * @author Kate Arzamastseva */ function media_diff($image, $ns, $auth, $fromajax = false) { - global $lang; global $conf; global $INPUT; -- cgit v1.2.3 From 6ffaeda954351208754898acc6e2ff228f3ae472 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 20 Feb 2014 21:43:25 +0100 Subject: added some PHPDocs media.php --- inc/media.php | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/media.php b/inc/media.php index 132738942..6d5bf461b 100644 --- a/inc/media.php +++ b/inc/media.php @@ -728,10 +728,23 @@ function _media_get_sort_type() { return _media_get_display_param('sort', array('default' => 'name', 'date')); } +/** + * Returns type of listing for the list of files in media manager + * + * @author Kate Arzamastseva + * @return string - list type + */ function _media_get_list_type() { return _media_get_display_param('list', array('default' => 'thumbs', 'rows')); } +/** + * Get display parameters + * + * @param string $param name of parameter + * @param array $values allowed values, where default value has index key 'default' + * @return string the parameter value + */ function _media_get_display_param($param, $values) { global $INPUT; if (in_array($INPUT->str($param), $values)) { @@ -859,6 +872,10 @@ function media_tab_history($image, $ns, $auth=null) { /** * Prints mediafile details * + * @param string $image media id + * @param $auth + * @param int|bool $rev + * @param JpegMeta|bool $meta * @author Kate Arzamastseva */ function media_preview($image, $auth, $rev=false, $meta=false) { @@ -1097,9 +1114,15 @@ function media_diff($image, $ns, $auth, $fromajax = false) { } +/** + * Callback for media file diff + * + * @param $data + * @return bool|void + */ function _media_file_diff($data) { if(is_array($data) && count($data)===6) { - return media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]); + media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]); } else { return false; } @@ -1558,7 +1581,7 @@ function media_printimgdetail($item, $fullscreen=false){ * @param string $amp - separator * @param bool $abs * @param bool $params_array - * @return string - link + * @return string|array - link */ function media_managerURL($params=false, $amp='&', $abs=false, $params_array=false) { global $ID; -- cgit v1.2.3 From 948d482d02c7bfd8a6b00e1339e7e2300acde137 Mon Sep 17 00:00:00 2001 From: Marina Vladi Date: Sat, 22 Feb 2014 12:51:41 +0100 Subject: translation update --- inc/lang/hu/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index 5113e1cc8..a0aef9447 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -337,4 +337,4 @@ $lang['media_restore'] = 'Ezen verzió visszaállítása'; $lang['currentns'] = 'Aktuális névtér'; $lang['searchresult'] = 'Keresés eredménye'; $lang['plainhtml'] = 'Sima HTML'; -$lang['wikimarkup'] = 'Wiki-jelölő nyelv'; +$lang['wikimarkup'] = 'Wiki-jelölőnyelv'; -- cgit v1.2.3 From 46b189b552d813ab47a67d597ee4ef621f34b8a5 Mon Sep 17 00:00:00 2001 From: Robert Bogenschneider Date: Sun, 23 Feb 2014 08:21:01 +0100 Subject: translation update --- inc/lang/eo/admin.txt | 2 +- inc/lang/eo/adminplugins.txt | 2 +- inc/lang/eo/diff.txt | 2 +- inc/lang/eo/draft.txt | 2 +- inc/lang/eo/edit.txt | 2 +- inc/lang/eo/editrev.txt | 2 +- inc/lang/eo/lang.php | 11 ++++++----- 7 files changed, 12 insertions(+), 11 deletions(-) (limited to 'inc') diff --git a/inc/lang/eo/admin.txt b/inc/lang/eo/admin.txt index 4b0cf7909..4b3cf0c2a 100644 --- a/inc/lang/eo/admin.txt +++ b/inc/lang/eo/admin.txt @@ -1,3 +1,3 @@ ====== Administrado ====== -Sube vi povas trovi liston de administraj taskoj disponeblaj en DokuWiki. +Sube vi trovas liston de administraj taskoj haveblaj en DokuWiki. diff --git a/inc/lang/eo/adminplugins.txt b/inc/lang/eo/adminplugins.txt index 769a8c538..bb7e7829b 100644 --- a/inc/lang/eo/adminplugins.txt +++ b/inc/lang/eo/adminplugins.txt @@ -1 +1 @@ -===== Eksteraj kromaĵoj ===== \ No newline at end of file +===== Aldonaj kromaĵoj ===== \ No newline at end of file diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt index 5829a7db1..3c9db61c8 100644 --- a/inc/lang/eo/diff.txt +++ b/inc/lang/eo/diff.txt @@ -1,4 +1,4 @@ ====== Diferencoj ====== -Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo. +Tio montras diferencojn inter du versioj de la paĝo. diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt index 32ddc83f6..57526f3b5 100644 --- a/inc/lang/eo/draft.txt +++ b/inc/lang/eo/draft.txt @@ -1,5 +1,5 @@ ====== Skiza dosiero troviĝis ====== -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. +Via lasta redaktosesio en tiu ĉi paĝo ne ĝuste 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 sesio. 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 29b3382c5..ccc8a613d 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 [[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]]. +Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] pri la formatigo. Bonvolu redakti **nur**, se vi povas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[playground:playground|sablokesto]]. diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt index 1640baa91..2e1406b0f 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, 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 tiu enhavo. ---- diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index a543b2571..97231bdce 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -37,13 +37,13 @@ $lang['btn_secedit'] = 'Redakti'; $lang['btn_login'] = 'Ensaluti'; $lang['btn_logout'] = 'Elsaluti'; $lang['btn_admin'] = 'Administri'; -$lang['btn_update'] = 'Ĝisdatigi'; +$lang['btn_update'] = 'Aktualigi'; $lang['btn_delete'] = 'Forigi'; $lang['btn_back'] = 'Retroiri'; $lang['btn_backlink'] = 'Retroligoj'; $lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero'; $lang['btn_subscribe'] = 'Aliĝi al paĝaj modifoj'; -$lang['btn_profile'] = 'Ĝisdatigi profilon'; +$lang['btn_profile'] = 'Aktualigi profilon'; $lang['btn_reset'] = 'Rekomenci'; $lang['btn_resendpwd'] = 'Sendi novan pasvorton'; $lang['btn_draft'] = 'Redakti skizon'; @@ -53,7 +53,7 @@ $lang['btn_revert'] = 'Restarigi'; $lang['btn_register'] = 'Registriĝi'; $lang['btn_apply'] = 'Apliki'; $lang['btn_media'] = 'Medio-administrilo'; -$lang['btn_deleteuser'] = 'Forigi mian aliĝon'; +$lang['btn_deleteuser'] = 'Forigi mian konton'; $lang['loggedinas'] = 'Ensalutinta kiel'; $lang['user'] = 'Uzant-nomo'; $lang['pass'] = 'Pasvorto'; @@ -81,7 +81,7 @@ $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 permesata.'; -$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.'; +$lang['profchanged'] = 'La profilo de la uzanto sukcese aktualiĝis.'; $lang['profnodelete'] = 'Tiu ĉi vikio ne subtenas forigo de uzantoj'; $lang['profdeleteuser'] = 'Forigi aliĝon'; $lang['profdeleted'] = 'Via uzant-aliĝo estis forigata de tiu ĉi vikio'; @@ -104,7 +104,7 @@ $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)'; $lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron'; $lang['maxuploadsize'] = 'Alŝuto maks. %s po dosiero.'; $lang['lockedby'] = 'Nune ŝlosita de'; -$lang['lockexpire'] = 'Ŝlosado ĉesos en'; +$lang['lockexpire'] = 'Ŝlosado ĉesos je'; $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?'; @@ -293,6 +293,7 @@ $lang['i_policy'] = 'Komenca ACL-a agordo'; $lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)'; $lang['i_pol1'] = 'Publika Vikio (legi povas ĉiuj, skribi kaj alŝuti povas registritaj uzantoj)'; $lang['i_pol2'] = 'Ferma Vikio (legi, skribi, alŝuti nur povas registritaj uzantoj)'; +$lang['i_allowreg'] = 'Permesi al uzantoj registri sin mem'; $lang['i_retry'] = 'Reprovi'; $lang['i_license'] = 'Bonvolu elekti la permesilon, sub kiun vi volas meti vian enhavon:'; $lang['i_license_none'] = 'Ne montri licencinformojn'; -- cgit v1.2.3 From adfe6dafd15d9bf52ed6212b44b02a6a32c8bf49 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 09:38:03 +0100 Subject: fixed proxy authentication in SSL tunneling --- 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 de3a16830..53f3c9a78 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -552,7 +552,7 @@ class HTTPClient { $request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL; $request .= "Host: {$requestinfo['host']}".HTTP_NL; if($this->proxy_user) { - 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL; + $request .= 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL; } $request .= HTTP_NL; -- cgit v1.2.3 From 01c9a118dacc1e2c07f2b0ddee84c514022e5927 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Feb 2014 09:54:47 +0100 Subject: have most current revision always available in $INFO fixes fix for FS#2853 --- inc/common.php | 9 +++++---- inc/html.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'inc') diff --git a/inc/common.php b/inc/common.php index 32771285b..bbc0a6e68 100644 --- a/inc/common.php +++ b/inc/common.php @@ -155,12 +155,13 @@ function pageinfo() { $info['subscribed'] = false; } - $info['locked'] = checklock($ID); - $info['filepath'] = fullpath(wikiFN($ID)); - $info['exists'] = @file_exists($info['filepath']); + $info['locked'] = checklock($ID); + $info['filepath'] = fullpath(wikiFN($ID)); + $info['exists'] = @file_exists($info['filepath']); + $info['currentrev'] = @filemtime($info['filepath']); if($REV) { //check if current revision was meant - if($info['exists'] && (@filemtime($info['filepath']) == $REV)) { + if($info['exists'] && ($info['currentrev'] == $REV)) { $REV = ''; } elseif($RANGE) { //section editing does not work with old revisions! diff --git a/inc/html.php b/inc/html.php index 0434f3b45..fcec29670 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){ $diffurl = wl($ID, array( 'do' => 'diff', 'rev2[0]' => $l_rev, - 'rev2[1]' => $r_rev ? $r_rev : $INFO['lastmod'], // link to exactly this view FS#2835 + 'rev2[1]' => $r_rev ? $r_rev : $INFO['currentrev'], // link to exactly this view FS#2835 'difftype' => $type, )); ptln('

'.$lang['difflink'].'

'); -- cgit v1.2.3