You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <var...@us...> - 2014-11-08 16:15:17
|
Revision: 9287 http://sourceforge.net/p/phpwiki/code/9287 Author: vargenau Date: 2014-11-08 16:15:14 +0000 (Sat, 08 Nov 2014) Log Message: ----------- function _error is void Modified Paths: -------------- trunk/lib/DbaDatabase.php Modified: trunk/lib/DbaDatabase.php =================================================================== --- trunk/lib/DbaDatabase.php 2014-11-08 15:54:20 UTC (rev 9286) +++ trunk/lib/DbaDatabase.php 2014-11-08 16:15:14 UTC (rev 9287) @@ -9,7 +9,22 @@ class DbaDatabase { - function DbaDatabase($filename, $mode = false, $handler = 'gdbm') + public $_file; + public $_handler; + public $_timeout; + /** + * @var resource + */ + public $_dbh; + public $readonly; + public $_dba_open_error; + + /** + * @param string $filename + * @param bool $mode + * @param string $handler + */ + function __construct($filename, $mode = false, $handler = 'gdbm') { $this->_file = $filename; $this->_handler = $handler; @@ -34,7 +49,7 @@ function open($mode = 'w') { if ($this->_dbh) - return; // already open. + return true; // already open. $watchdog = $this->_timeout; @@ -122,21 +137,22 @@ function fetch($key) { $val = dba_fetch($key, $this->_dbh); - if ($val === false) - return $this->_error("fetch($key)"); + if ($val === false) { + $this->_error("fetch($key)"); + } return $val; } function insert($key, $val) { if (!dba_insert($key, $val, $this->_dbh)) - return $this->_error("insert($key)"); + $this->_error("insert($key)"); } function replace($key, $val) { if (!dba_replace($key, $val, $this->_dbh)) - return $this->_error("replace($key)"); + $this->_error("replace($key)"); } function firstkey() @@ -151,9 +167,10 @@ function delete($key) { - if ($this->readonly) return; + if ($this->readonly) + return; if (!dba_delete($key, $this->_dbh)) - return $this->_error("delete($key)"); + $this->_error("delete($key)"); } function get($key) @@ -164,38 +181,37 @@ function set($key, $val) { $dbh = &$this->_dbh; - if ($this->readonly) return; + if ($this->readonly) + return; if (dba_exists($key, $dbh)) { if ($val !== false) { if (!dba_replace($key, $val, $dbh)) - return $this->_error("store[replace]($key)"); + $this->_error("store[replace]($key)"); } else { if (!dba_delete($key, $dbh)) - return $this->_error("store[delete]($key)"); + $this->_error("store[delete]($key)"); } } else { if (!dba_insert($key, $val, $dbh)) - return $this->_error("store[insert]($key)"); + $this->_error("store[insert]($key)"); } } function sync() { if (!dba_sync($this->_dbh)) - return $this->_error("sync()"); + $this->_error("sync()"); } function optimize() { if (!dba_optimize($this->_dbh)) - return $this->_error("optimize()"); + $this->_error("optimize()"); return 1; } - function _error($mes) + private function _error($mes) { - //trigger_error("DbaDatabase: $mes", E_USER_WARNING); - //return false; trigger_error("$this->_file: dba error: $mes", E_USER_ERROR); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-08 15:54:23
|
Revision: 9286 http://sourceforge.net/p/phpwiki/code/9286 Author: vargenau Date: 2014-11-08 15:54:20 +0000 (Sat, 08 Nov 2014) Log Message: ----------- Add static; PHP Doc Modified Paths: -------------- trunk/lib/CachedMarkup.php Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2014-11-08 15:34:07 UTC (rev 9285) +++ trunk/lib/CachedMarkup.php 2014-11-08 15:54:20 UTC (rev 9286) @@ -52,12 +52,12 @@ return gzcompress(serialize($this), 9); } - function unpack($packed) + static function unpack($packed) { if (!$packed) return false; - // ZLIB format has a five bit checksum in it's header. + // ZLIB format has a five bit checksum in its header. // Lets check for sanity. if (((ord($packed[0]) * 256 + ord($packed[1])) % 31 == 0) and (substr($packed, 0, 2) == "\037\213") @@ -109,6 +109,7 @@ */ function getLinkInfo() { + $links = array(); foreach ($this->_content as $link) { if (!is_a($link, 'Cached_Link')) continue; @@ -245,7 +246,6 @@ */ abstract class Cached_DynamicContent { - function cache(&$cache) { $cache[] = $this; @@ -273,6 +273,8 @@ abstract class Cached_Link extends Cached_DynamicContent { + public $_url; + public $_relation; function isInlineElement() { @@ -309,6 +311,9 @@ */ class Cached_InlinedImage extends Cached_DynamicContent { + public $_url; + public $_basepage; + function isInlineElement() { return true; @@ -338,7 +343,12 @@ class Cached_WikiLink extends Cached_Link { - function __construct($page, $label = false, $anchor = false) + /** + * @param string $page + * @param string $label + * @param string $anchor + */ + function __construct($page, $label = '', $anchor = '') { $this->_page = $page; /* ":DontStoreLink" */ @@ -361,14 +371,18 @@ function getPagename($basepage) { $page = new WikiPageName($this->_page, $basepage); - if ($page->isValid()) return $page->name; - else return false; + if ($page->isValid()) + return $page->name; + else + return false; } function getWikiPageLinks($basepage) { - if ($basepage == '') return false; - if (isset($this->_nolink)) return false; + if ($basepage == '') + return false; + if (isset($this->_nolink)) + return false; if ($link = $this->getPagename($basepage)) return array(array('linkto' => $link)); else @@ -462,6 +476,8 @@ class Cached_PhpwikiURL extends Cached_DynamicContent { + public $_page; + function __construct($url, $label) { $this->_url = $url; @@ -512,6 +528,9 @@ */ class Cached_SemanticLink extends Cached_WikiLink { + public $_attribute; + public $_attribute_base; + public $_unit; function __construct($url, $label = false) { @@ -581,7 +600,6 @@ { global $WikiTheme; $m = $this->_expandurl($url); - $class = 'wiki'; // do not link to the attribute value, but to the attribute $is_attribute = ($m[2] == ':='); if ($WikiTheme->DUMP_MODE and $WikiTheme->VALID_LINKS) { @@ -723,8 +741,11 @@ { list ($moniker, $page) = explode(":", $this->_link, 2); $page = new WikiPageName($page, $basepage); - if ($page->isValid()) return $page->name; - else return false; + if ($page->isValid()) { + return $page->name; + } else { + return false; + } } function getWikiPageLinks($basepage) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-08 15:34:15
|
Revision: 9285 http://sourceforge.net/p/phpwiki/code/9285 Author: vargenau Date: 2014-11-08 15:34:07 +0000 (Sat, 08 Nov 2014) Log Message: ----------- Type compatibility Modified Paths: -------------- trunk/lib/BlockParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-11-05 16:37:16 UTC (rev 9284) +++ trunk/lib/BlockParser.php 2014-11-08 15:34:07 UTC (rev 9285) @@ -359,7 +359,7 @@ class ParsedBlock extends Block_HtmlElement { - function ParsedBlock(&$input, $tag = 'div', $attr = false) + function ParsedBlock(&$input, $tag = 'div', $attr = array()) { $this->Block_HtmlElement($tag, $attr); $this->_initBlockTypes(); @@ -467,7 +467,7 @@ class SubBlock extends ParsedBlock { function SubBlock(&$input, $indent_re, $initial_indent = false, - $tag = 'div', $attr = false) + $tag = 'div', $attr = array()) { $subinput = new BlockParser_InputSubBlock($input, $indent_re, $initial_indent); $this->ParsedBlock($subinput, $tag, $attr); @@ -487,7 +487,7 @@ class TightSubBlock extends SubBlock { function __construct(&$input, $indent_re, $initial_indent = false, - $tag = 'div', $attr = false) + $tag = 'div', $attr = array()) { $this->SubBlock($input, $indent_re, $initial_indent, $tag, $attr); @@ -1224,8 +1224,7 @@ { //$indent = str_replace(' ', '\\ ', $m->match) . '|>$'; $indent = $this->_re; - $this->_element = new SubBlock($input, $indent, $m->match, - 'blockquote', $this->_attr); + $this->_element = new SubBlock($input, $indent, $m->match, 'blockquote', $this->_attr); return true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-05 16:37:23
|
Revision: 9284 http://sourceforge.net/p/phpwiki/code/9284 Author: vargenau Date: 2014-11-05 16:37:16 +0000 (Wed, 05 Nov 2014) Log Message: ----------- Add labels Modified Paths: -------------- trunk/themes/default/templates/userprefs.tmpl Modified: trunk/themes/default/templates/userprefs.tmpl =================================================================== --- trunk/themes/default/templates/userprefs.tmpl 2014-11-05 15:37:36 UTC (rev 9283) +++ trunk/themes/default/templates/userprefs.tmpl 2014-11-05 16:37:16 UTC (rev 9284) @@ -161,9 +161,13 @@ <tr><td> <p> + <?php if ($isForm) { ?> + <label for="email"> + <?php } ?> <?php echo _("Your e-mail"). _(": ")?> <?php if ($isForm) { ?> - <input type="text" name="pref[email]" size="30" maxlength="60" + </label> + <input id="email" type="text" name="pref[email]" size="30" maxlength="60" value="<?php echo $pref->get('email')?>" /> <?php } else { ?> '<?php echo $pref->get('email') ?>' @@ -229,13 +233,25 @@ <tr><td colspan="2"><?php echo _("Here you can override site-specific default values.") ?></td></tr> <tr> <td> - <?php echo $SelectThemesDesc?> + <?php if ($isForm) { ?> + <label for="theme"> + <?php } ?> + <?php echo $SelectThemesDesc ?> + <?php if ($isForm) { ?> + </label> + <?php } ?> <?php echo $SelectThemes ?> </td> <td><p class="hint"><?php echo _("System default:") ?> <?php echo THEME ?></p></td></tr> <tr> <td> - <?php echo $SelectLanguagesDesc?> + <?php if ($isForm) { ?> + <label for="lang"> + <?php } ?> + <?php echo $SelectLanguagesDesc ?> + <?php if ($isForm) { ?> + </label> + <?php } ?> <?php echo $SelectLanguages ?> </td> <td><p class="hint"><?php echo _("System default:") ?> <?php echo DEFAULT_LANGUAGE ?></p></td></tr> @@ -263,7 +279,9 @@ <tr> <td> <?php echo $DoubleClickCB?> + <label for="doubleClickEdit"> <?php echo fmt("Enable DoubleClick Edit") ?> + </label> </td> <td><p class="hint"><?php echo fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?></p> </td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-05 15:37:44
|
Revision: 9283 http://sourceforge.net/p/phpwiki/code/9283 Author: vargenau Date: 2014-11-05 15:37:36 +0000 (Wed, 05 Nov 2014) Log Message: ----------- No title identical to link Modified Paths: -------------- trunk/themes/Sidebar/templates/navbar.tmpl Modified: trunk/themes/Sidebar/templates/navbar.tmpl =================================================================== --- trunk/themes/Sidebar/templates/navbar.tmpl 2014-11-05 15:30:15 UTC (rev 9282) +++ trunk/themes/Sidebar/templates/navbar.tmpl 2014-11-05 15:37:36 UTC (rev 9283) @@ -40,7 +40,7 @@ <div class="pBody" id="p-tb-body"> <ul> <li><?php $link = WikiLink(_("RecentChanges"), "",_("RecentChanges")); $link->setAttr("accesskey","r"); $link->addTooltip(_("The list of recent changes in the wiki.")." [$p-r]"); ?><?php echo $link ?> </li> - <li><?php echo WikiLink(_("RecentNewPages"), "",_("RecentNewPages")) ?></li> + <li><?php echo WikiLink(_("RecentNewPages")) ?></li> <?php if (!empty($revision)) { ?> <li id="t-whatlinkshere"><?php echo Button(array('action'=>_("BackLinks")), _("What links here"), $page->getName()) ?></li> <?php } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-05 15:30:19
|
Revision: 9282 http://sourceforge.net/p/phpwiki/code/9282 Author: vargenau Date: 2014-11-05 15:30:15 +0000 (Wed, 05 Nov 2014) Log Message: ----------- Add labels Modified Paths: -------------- trunk/themes/default/templates/userprefs.tmpl trunk/themes/fusionforge/templates/userprefs.tmpl Modified: trunk/themes/default/templates/userprefs.tmpl =================================================================== --- trunk/themes/default/templates/userprefs.tmpl 2014-11-03 14:33:29 UTC (rev 9281) +++ trunk/themes/default/templates/userprefs.tmpl 2014-11-05 15:30:15 UTC (rev 9282) @@ -17,8 +17,9 @@ if (!$pref) return; $offset = $pref->get('timeOffset'); $serverTime = $time - $offset * 3600; -if ( $isForm ) +if ($isForm) $timeOffsetInput = HTML::input(array('type' => "text", + 'id' => 'timeOffsetInput', 'size' => 6, 'maxlength' => 6, 'name' => "pref[timeOffset]", @@ -28,29 +29,35 @@ $timeOffsetInput = $pref->get('timeOffset'); $OwnModificationsCB = HTML::input(array('type' => 'checkbox', + 'id' => 'ownModifications', 'name' => 'pref[ownModifications]', 'value' => '1', 'checked' => (bool) $pref->get('ownModifications'))); $MajorModificationsOnlyCB = HTML::input(array('type' => 'checkbox', + 'id' => 'majorModificationsOnly', 'name' => 'pref[majorModificationsOnly]', 'value' => '1', 'checked' => (bool) $pref->get('majorModificationsOnly'))); $RelativeDatesCB = HTML::input(array('type' => 'checkbox', + 'id' => 'relativeDates', 'name' => 'pref[relativeDates]', 'value' => '1', 'checked' => (bool) $pref->get('relativeDates'))); $NoLinkIconsCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[noLinkIcons]', - 'value' => '1', - 'checked' => (bool) $pref->get('noLinkIcons'))); + 'id' => 'noLinkIcons', + 'name' => 'pref[noLinkIcons]', + 'value' => '1', + 'checked' => (bool) $pref->get('noLinkIcons'))); $GoogleLinkCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[googleLink]', - 'value' => '1', - 'checked' => (bool) $pref->get('googleLink'))); + 'id' => 'googleLink', + 'name' => 'pref[googleLink]', + 'value' => '1', + 'checked' => (bool) $pref->get('googleLink'))); $DoubleClickCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[doubleClickEdit]', - 'value' => '1', - 'checked' => (bool) $pref->get('doubleClickEdit'))); + 'id' => 'doubleClickEdit', + 'name' => 'pref[doubleClickEdit]', + 'value' => '1', + 'checked' => (bool) $pref->get('doubleClickEdit'))); if (!function_exists('selectedOption')) { function selectedOption ($value, $label = false) { return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n"); @@ -119,7 +126,7 @@ <?php echo fmt("User preferences for user %s", WikiLink($user->UserName())) ?> <?php if ($isForm) { ?> -<form action="<?php echo $request->getPostURL()?>" method="post"> +<form action="<?php echo $request->getPostURL() ?>" method="post"> <?php } else { $fill = " "; // See also plugin DebugAuthInfo @@ -173,15 +180,19 @@ </td><td><p class="hint"><?php echo _("Note, that user accounts with bouncing e-mails will be disabled.")?></p></td></tr> <tr><td colspan="2"> - <?php echo _("Get an e-mail notification at changes of the following pages:")?> + <?php echo _("Get an e-mail notification at changes of the following pages:") ?> </td></tr> <tr> <?php if ($isForm) { ?> - <td><textarea name="pref[notifyPages]" cols="40" rows="6"><?php echo $pref->get('notifyPages')?></textarea></td> - <td><p class="hint"><?php echo _("Enter pages separated by space or comma. Wildcards (fileglobbing) allowed.")?></p></td> + <td> + <label for="notifyPages"> + <textarea id="notifyPages" name="pref[notifyPages]" cols="40" rows="6"><?php echo $pref->get('notifyPages') ?></textarea> + </label> + </td> + <td><p class="hint"><?php echo _("Enter pages separated by space or comma. Wildcards (fileglobbing) allowed.") ?></p></td> <?php } else { ?> - <td><?php echo $pref->get('notifyPages')?></td> + <td colspan="2"><?php echo $pref->get('notifyPages') ?></td> <?php } ?> </tr> @@ -189,11 +200,13 @@ <td> <p class="nowrap"> <?php echo $OwnModificationsCB ?> - <?php echo _("Do not send my own modifications")?> + <label for="ownModifications"> + <?php echo _("Do not send my own modifications") ?> + </label> </p> </td> <td> - <p class="hint"><?php echo _("Check if you do not want to be notified of your own modifications.")?></p> + <p class="hint"><?php echo _("Check if you do not want to be notified of your own modifications.") ?></p> </td> </tr> @@ -201,86 +214,119 @@ <td> <p class="nowrap"> <?php echo $MajorModificationsOnlyCB ?> - <?php echo _("Do not send minor modifications")?> + <label for="majorModificationsOnly"> + <?php echo _("Do not send minor modifications") ?> + </label> </p> </td> <td> - <p class="hint"><?php echo _("Check if you do not want to be notified of minor modifications.")?></p> + <p class="hint"><?php echo _("Check if you do not want to be notified of minor modifications.") ?></p> </td> </tr> - <tr><td colspan="2"><h2><?php echo _("Appearance")?></h2></td></tr> + <tr><td colspan="2"><h2><?php echo _("Appearance") ?></h2></td></tr> <tr><td colspan="2"><?php echo _("Here you can override site-specific default values.") ?></td></tr> - <?php /* Alternatively this could be done with <fieldset> and <legend>. */ ?> - <tr><td> + <tr> + <td> <?php echo $SelectThemesDesc?> <?php echo $SelectThemes ?> </td> - <td><p class="hint"><?php echo _("System default:")?> <?php echo THEME ?></p></td></tr> - <tr><td> + <td><p class="hint"><?php echo _("System default:") ?> <?php echo THEME ?></p></td></tr> + <tr> + <td> <?php echo $SelectLanguagesDesc?> <?php echo $SelectLanguages ?> </td> - <td><p class="hint"><?php echo _("System default:")?> <?php echo DEFAULT_LANGUAGE ?></p></td></tr> - <tr><td> - <?php echo $NoLinkIconsCB?> - <?php echo fmt("Hide %s", WikiLink("Help:LinkIcons"))?> + <td><p class="hint"><?php echo _("System default:") ?> <?php echo DEFAULT_LANGUAGE ?></p></td></tr> + <tr> + <td> + <p class="nowrap"> + <?php echo $NoLinkIconsCB ?> + <label for="noLinkIcons"> + <?php echo fmt("Hide %s", WikiLink("Help:LinkIcons")) ?> + </label> + </p> </td> <td><p class="hint"><?php echo _("Hide or show LinkIcons (if supported by the current theme). Useful for text-only browsers or slow connections.")?></p></td></tr> - <tr><td> - <?php echo $GoogleLinkCB?> - <?php echo fmt("Add %s", WikiLink("Help:GoogleLink"))?> + <tr> + <td> + <p class="nowrap"> + <?php echo $GoogleLinkCB ?> + <label for="googleLink"> + <?php echo fmt("Add %s", WikiLink("Help:GoogleLink")) ?> + </label> + </p> </td> - <td><p class="hint"><?php echo fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt"))?></p></td></tr> - <tr><td> + <td><p class="hint"><?php echo fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt")) ?></p></td> + </tr> + <tr> + <td> <?php echo $DoubleClickCB?> - <?php echo fmt("Enable DoubleClick Edit")?> + <?php echo fmt("Enable DoubleClick Edit") ?> </td> - <td><p class="hint"><?php echo fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?></p></td></tr> + <td><p class="hint"><?php echo fmt("Enabled makes it hard to double-click words and sentences for cut and paste. See %s.", WikiLink("PhpWiki:DoubleClickToEditPage"))?></p> + </td> + </tr> - <tr><td colspan="2"><h2><?php echo _("Edit Area Size")?></h2></td></tr> + <tr><td colspan="2"><h2><?php echo _("Edit Area Size") ?></h2></td></tr> <tr><td> - <?php echo _("Height") . _(":")?> <?php if ($isForm) { ?> - <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" - value="<?php echo $pref->get('editHeight')?>" /> + <label for="height"> + <?php } ?> + <?php echo _("Height") . _(":") ?> + <?php if ($isForm) { ?> + </label> + <input id="height" type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" + value="<?php echo $pref->get('editHeight') ?>" /> <?php } else { ?> - <?php echo $pref->get('editHeight')?> + <?php echo $pref->get('editHeight') ?> <?php } ?> - <?php echo _("Width") . _(":")?> <?php if ($isForm) { ?> - <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" - value="<?php echo $pref->get('editWidth')?>" /> + <label for="width"> + <?php } ?> + <?php echo _("Width") . _(":") ?> + <?php if ($isForm) { ?> + </label> + <input id="width" type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" + value="<?php echo $pref->get('editWidth') ?>" /> <?php } else { ?> - <?php echo $pref->get('editWidth')?> + <?php echo $pref->get('editWidth') ?> <?php } ?> </td> <td><p class="hint"> - <?php echo _("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.")?></p> + <?php echo _("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.") ?></p> </td></tr> <tr><td colspan="2"><h2><?php echo _("Time Zone")?></h2></td></tr> - <tr><td><p> - <?php echo fmt("Add %s hours to the server's local time when reporting times.", - $timeOffsetInput)?> - </p></td><td> - <p class="hint"> - <?php echo fmt("The current time at the server is %s.", - HTML::strong($WikiTheme->formatDateTime($serverTime)))?> - <?php echo fmt("With the current offset, this would be reported as %s.", - HTML::strong($WikiTheme->formatDateTime($time)))?> - </p> - </td></tr> + <tr> + <td> + <p> + <label for="timeOffsetInput"> + <?php echo fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput) ?> + </label> + </p> + </td> + <td> + <p class="hint"> + <?php echo fmt("The current time at the server is %s.", + HTML::strong($WikiTheme->formatDateTime($serverTime))) ?> + <?php echo fmt("With the current offset, this would be reported as %s.", + HTML::strong($WikiTheme->formatDateTime($time))) ?> + </p> + </td> + </tr> - <tr><td colspan="2"><h2><?php echo _("Date Format")?></h2></td></tr> + <tr><td colspan="2"><h2><?php echo _("Date Format") ?></h2></td></tr> <tr><td colspan="2"> <p> <?php echo $RelativeDatesCB ?> - <?php echo _("Show relative dates using 'Today' and 'Yesterday'")?> + <label for="relativeDates"> + <?php echo _("Show relative dates using 'Today' and 'Yesterday'") ?> + </label> </p> </td></tr> </table> @@ -288,9 +334,9 @@ <?php if ($isForm) { ?> <hr /> <p> - <?php echo Button("submit:", _("Update Preferences"), 'wikiadmin')?> - <?php echo Button("submit:delete", _("Reset Preferences"), 'wikiadmin')?> - <?php echo Button("submit:cancel", _("Cancel"), 'button')?> + <?php echo Button("submit:", _("Update Preferences"), 'wikiadmin') ?> + <?php echo Button("submit:delete", _("Reset Preferences"), 'wikiadmin') ?> + <?php echo Button("submit:cancel", _("Cancel"), 'button') ?> <?php echo HiddenInputs($request->getArgs(), false, array('pref')) ?> </p> </form> Modified: trunk/themes/fusionforge/templates/userprefs.tmpl =================================================================== --- trunk/themes/fusionforge/templates/userprefs.tmpl 2014-11-03 14:33:29 UTC (rev 9281) +++ trunk/themes/fusionforge/templates/userprefs.tmpl 2014-11-05 15:30:15 UTC (rev 9282) @@ -17,8 +17,9 @@ if (!$pref) return; $offset = $pref->get('timeOffset'); $serverTime = $time - $offset * 3600; -if ( $isForm ) +if ($isForm) $timeOffsetInput = HTML::input(array('type' => "text", + 'id' => 'timeOffsetInput', 'size' => 6, 'maxlength' => 6, 'name' => "pref[timeOffset]", @@ -28,93 +29,115 @@ $timeOffsetInput = $pref->get('timeOffset'); $OwnModificationsCB = HTML::input(array('type' => 'checkbox', + 'id' => 'ownModifications', 'name' => 'pref[ownModifications]', 'value' => '1', 'checked' => (bool) $pref->get('ownModifications'))); $MajorModificationsOnlyCB = HTML::input(array('type' => 'checkbox', + 'id' => 'majorModificationsOnly', 'name' => 'pref[majorModificationsOnly]', 'value' => '1', 'checked' => (bool) $pref->get('majorModificationsOnly'))); $DiffMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'diffMenuItem', 'name' => 'pref[diffMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('diffMenuItem'))); $PageInfoMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'pageInfoMenuItem', 'name' => 'pref[pageInfoMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('pageInfoMenuItem'))); $PDFMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'pdfMenuItem', 'name' => 'pref[pdfMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('pdfMenuItem'))); $ChownMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'chownMenuItem', 'name' => 'pref[chownMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('chownMenuItem'))); $SetaclMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'setaclMenuItem', 'name' => 'pref[setaclMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('setaclMenuItem'))); $RemoveMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'removeMenuItem', 'name' => 'pref[removeMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('removeMenuItem'))); $RenameMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'renameMenuItem', 'name' => 'pref[renameMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('renameMenuItem'))); $RevertMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'revertMenuItem', 'name' => 'pref[revertMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('revertMenuItem'))); $LockMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'lockMenuItem', 'name' => 'pref[lockMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('lockMenuItem'))); $BackLinksMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'backLinksMenuItem', 'name' => 'pref[backLinksMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('backLinksMenuItem'))); $WatchPageMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'watchPageMenuItem', 'name' => 'pref[watchPageMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('watchPageMenuItem'))); $RecentChangesMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'recentChangesMenuItem', 'name' => 'pref[recentChangesMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('recentChangesMenuItem'))); $RandomPageMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'randomPageMenuItem', 'name' => 'pref[randomPageMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('randomPageMenuItem'))); $LikePagesPageMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'likePagesMenuItem', 'name' => 'pref[likePagesMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('likePagesMenuItem'))); $SpecialPagesMenuItem = HTML::input(array('type' => 'checkbox', + 'id' => 'specialPagesMenuItem', 'name' => 'pref[specialPagesMenuItem]', 'value' => '1', 'checked' => (bool) $pref->get('specialPagesMenuItem'))); $RelativeDatesCB = HTML::input(array('type' => 'checkbox', + 'id' => 'relativeDates', 'name' => 'pref[relativeDates]', 'value' => '1', 'checked' => (bool) $pref->get('relativeDates'))); $PageTrailCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[pageTrail]', - 'value' => '1', - 'checked' => (bool) $pref->get('pageTrail'))); + 'id' => 'pageTrail', + 'name' => 'pref[pageTrail]', + 'value' => '1', + 'checked' => (bool) $pref->get('pageTrail'))); $NoLinkIconsCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[noLinkIcons]', - 'value' => '1', - 'checked' => (bool) $pref->get('noLinkIcons'))); + 'id' => 'noLinkIcons', + 'name' => 'pref[noLinkIcons]', + 'value' => '1', + 'checked' => (bool) $pref->get('noLinkIcons'))); $GoogleLinkCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[googleLink]', - 'value' => '1', - 'checked' => (bool) $pref->get('googleLink'))); + 'id' => 'googleLink', + 'name' => 'pref[googleLink]', + 'value' => '1', + 'checked' => (bool) $pref->get('googleLink'))); $DoubleClickCB = HTML::input(array('type' => 'checkbox', - 'name' => 'pref[doubleClickEdit]', - 'value' => '1', - 'checked' => (bool) $pref->get('doubleClickEdit'))); + 'id' => 'doubleClickEdit', + 'name' => 'pref[doubleClickEdit]', + 'value' => '1', + 'checked' => (bool) $pref->get('doubleClickEdit'))); ?> <?php echo $errmsg ?> @@ -123,25 +146,29 @@ </h2> <?php if ($isForm) { ?> -<form action="<?php echo $request->getPostURL()?>" method="post"> +<form action="<?php echo $request->getPostURL() ?>" method="post"> <?php } ?> <fieldset style="margin-bottom: 1em;"> -<legend><strong><?php echo _("User preferences for this project")?></strong></legend> +<legend><strong><?php echo _("User preferences for this project") ?></strong></legend> <table class="fullwidth"> - <tr><td colspan="2"><h3><?php echo _("E-mail Notification")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("E-mail Notification") ?></h3></td></tr> <tr><td colspan="2"> - <?php echo _("Get an e-mail notification at changes of the following pages:")?> + <?php echo _("Get an e-mail notification at changes of the following pages:") ?> </td></tr> <tr> <?php if ($isForm) { ?> - <td><textarea name="pref[notifyPages]" cols="40" rows="6"><?php echo $pref->get('notifyPages')?></textarea></td> - <td><p class="hint"><?php echo _("Enter pages separated by space or comma. Wildcards (fileglobbing) allowed.")?></p></td> + <td> + <label for="notifyPages"> + <textarea id="notifyPages" name="pref[notifyPages]" cols="40" rows="6"><?php echo $pref->get('notifyPages') ?></textarea> + </label> + </td> + <td><p class="hint"><?php echo _("Enter pages separated by space or comma. Wildcards (fileglobbing) allowed.") ?></p></td> <?php } else { ?> - <td colspan="2"><?php echo $pref->get('notifyPages')?></td> + <td colspan="2"><?php echo $pref->get('notifyPages') ?></td> <?php } ?> </tr> @@ -149,23 +176,25 @@ </fieldset> <fieldset style="margin-bottom: 1em;"> -<legend><strong><?php echo _("Global user preferences (for all projects)")?></strong></legend> +<legend><strong><?php echo _("Global user preferences (for all projects)") ?></strong></legend> <table class="fullwidth"> <tr> - <td colspan="2"><h3><?php echo _("E-mail Notification")?></h3></td> + <td colspan="2"><h3><?php echo _("E-mail Notification") ?></h3></td> </tr> <tr> <td> <p class="nowrap"> <?php echo $OwnModificationsCB ?> - <?php echo _("Do not send my own modifications")?> + <label for="ownModifications"> + <?php echo _("Do not send my own modifications") ?> + </label> </p> </td> <td> - <p class="hint"><?php echo _("Check if you do not want to be notified of your own modifications.")?></p> + <p class="hint"><?php echo _("Check if you do not want to be notified of your own modifications.") ?></p> </td> </tr> @@ -173,73 +202,115 @@ <td> <p class="nowrap"> <?php echo $MajorModificationsOnlyCB ?> - <?php echo _("Do not send minor modifications")?> + <label for="majorModificationsOnly"> + <?php echo _("Do not send minor modifications") ?> + </label> </p> </td> <td> - <p class="hint"><?php echo _("Check if you do not want to be notified of minor modifications.")?></p> + <p class="hint"><?php echo _("Check if you do not want to be notified of minor modifications.") ?></p> </td> </tr> - <tr><td colspan="2"><h3><?php echo _("Menus")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("Menus") ?></h3></td></tr> <tr> <td> <fieldset> - <legend><?php echo _("Top Menu")?></legend> + <legend><?php echo _("Top Menu") ?></legend> <table> <tr> <td> - <p class="nowrap"><?php echo $DiffMenuItem ?> <?php echo _("Last Difference")?></p> + <p class="nowrap"> + <?php echo $DiffMenuItem ?> + <label for="diffMenuItem"> + <?php echo _("Last Difference") ?> + </label> + </p> </td> </tr> <tr> <td> - <p class="nowrap"><?php echo $RevertMenuItem ?> <?php echo _("Revert")?></p> + <p class="nowrap"> + <?php echo $RevertMenuItem ?> + <label for="revertMenuItem"> + <?php echo _("Revert") ?> + </label> + </p> </td> </tr> <?php if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) { ?> <tr> <td> - <p class="nowrap"><?php echo $PDFMenuItem ?> <?php echo _("PDF")?></p> + <p class="nowrap"> + <?php echo $PDFMenuItem ?> + <label for="pdfMenuItem"> + <?php echo _("PDF") ?> + </label> + </p> </td> </tr> <?php } ?> <tr> <td> - <p class="nowrap"><?php echo $LockMenuItem ?> <?php echo _("Lock")?></p> + <p class="nowrap"> + <?php echo $LockMenuItem ?> + <label for="lockMenuItem"> + <?php echo _("Lock") ?> + </label> + </p> </td> </tr> <tr> <td> - <p class="nowrap"><?php echo $ChownMenuItem ?> <?php echo _("Change Owner")?></p> + <p class="nowrap"> + <?php echo $ChownMenuItem ?> + <label for="chownMenuItem"> + <?php echo _("Change Owner") ?> + </label> + </p> </td> </tr> <tr> <td> - <p class="nowrap"><?php echo $SetaclMenuItem ?> <?php echo _("Access Rights")?></p> + <p class="nowrap"> + <?php echo $SetaclMenuItem ?> + <label for="setaclMenuItem"> + <?php echo _("Access Rights") ?> + </label> + </p> </td> </tr> </table> </fieldset> </td> <td class="top"> - <p class="hint"><?php echo _("Check menu items to display.")?></p> + <p class="hint"><?php echo _("Check menu items to display.") ?></p> </td> </tr> <tr> <td class="top"> <fieldset> - <legend><?php echo _("Left Menu")?></legend> + <legend><?php echo _("Left Menu") ?></legend> <table> <tr> <td> - <p class="nowrap"><?php echo $RandomPageMenuItem ?> <?php echo _("Random Page")?></p> + <p class="nowrap"> + <?php echo $RandomPageMenuItem ?> + <label for="randomPageMenuItem"> + <?php echo _("Random Page") ?> + </label> + </p> </td> </tr> <tr> <td> - <p class="nowrap"><?php echo $LikePagesPageMenuItem ?> <?php echo _("Like Pages")?></p> + <p class="nowrap"> + <?php echo $LikePagesPageMenuItem ?> + <label for="likePagesMenuItem"> + <?php echo _("Like Pages") ?> + </label> + </p> </td> </tr> </table> @@ -249,79 +320,101 @@ </td> </tr> - <tr><td colspan="2"><h3><?php echo _("Appearance")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("Appearance") ?></h3></td></tr> <tr><td colspan="2"><?php echo _("Here you can override site-specific default values.") ?></td></tr> <tr> <td> <p class="nowrap"> - <?php echo $PageTrailCB?> - <?php echo _("Show Page Trail")?> + <?php echo $PageTrailCB ?> + <label for="pageTrail"> + <?php echo _("Show Page Trail") ?> + </label> </p> </td> - <td><p class="hint"><?php echo _("Show Page Trail at top of page.")?></p></td> + <td><p class="hint"><?php echo _("Show Page Trail at top of page.") ?></p></td> </tr> <tr> <td> <p class="nowrap"> - <?php echo $NoLinkIconsCB?> - <?php echo fmt("Hide %s", WikiLink("Help:LinkIcons"))?> + <?php echo $NoLinkIconsCB ?> + <label for="noLinkIcons"> + <?php echo fmt("Hide %s", WikiLink("Help:LinkIcons")) ?> + </label> </p> </td> - <td><p class="hint"><?php echo _("Hide or show LinkIcons.")?></p></td> + <td><p class="hint"><?php echo _("Hide or show LinkIcons.") ?></p></td> </tr> <tr> <td> <p class="nowrap"> - <?php echo $GoogleLinkCB?> - <?php echo fmt("Add %s", WikiLink("Help:GoogleLink"))?> + <?php echo $GoogleLinkCB ?> + <label for="googleLink"> + <?php echo fmt("Add %s", WikiLink("Help:GoogleLink")) ?> + </label> </p> </td> - <td><p class="hint"><?php echo fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt"))?></p></td> + <td><p class="hint"><?php echo fmt("Add Google links to unknown pages behind the '?', and the create action behind the pagename instead. See %s.", WikiLink("MeatBall:GooglePrompt")) ?></p></td> </tr> - <tr><td colspan="2"><h3><?php echo _("Edit Area Size")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("Edit Area Size") ?></h3></td></tr> <tr><td> - <?php echo _("Height") . _(":")?> <?php if ($isForm) { ?> - <input type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" - value="<?php echo $pref->get('editHeight')?>" /> + <label for="height"> + <?php } ?> + <?php echo _("Height") . _(":") ?> + <?php if ($isForm) { ?> + </label> + <input id="height" type="text" name="pref[editHeight]" size="4" maxlength="4" class="numeric" + value="<?php echo $pref->get('editHeight') ?>" /> <?php } else { ?> - <?php echo $pref->get('editHeight')?> + <?php echo $pref->get('editHeight') ?> <?php } ?> - <?php echo _("Width") . _(":")?> <?php if ($isForm) { ?> - <input type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" - value="<?php echo $pref->get('editWidth')?>" /> + <label for="width"> + <?php } ?> + <?php echo _("Width") . _(":") ?> + <?php if ($isForm) { ?> + </label> + <input id="width" type="text" name="pref[editWidth]" size="4" maxlength="4" class="numeric" + value="<?php echo $pref->get('editWidth') ?>" /> <?php } else { ?> - <?php echo $pref->get('editWidth')?> + <?php echo $pref->get('editWidth') ?> <?php } ?> </td> <td><p class="hint"> - <?php echo _("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.")?></p> + <?php echo _("Note that many browsers will automatically adjust the width of the editing area so that it fills the browser window. In this case, the width preference will be ignored.") ?></p> </td></tr> - <tr><td colspan="2"><h3><?php echo _("Time Zone")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("Time Zone") ?></h3></td></tr> - <tr><td><p> - <?php echo fmt("Add %s hours to the server's local time when reporting times.", - $timeOffsetInput)?> - </p></td><td> - <p class="hint"> - <?php echo fmt("The current time at the server is %s.", - HTML::strong($WikiTheme->formatDateTime($serverTime)))?> - <?php echo fmt("With the current offset, this would be reported as %s.", - HTML::strong($WikiTheme->formatDateTime($time)))?> - </p> - </td></tr> + <tr> + <td> + <p> + <label for="timeOffsetInput"> + <?php echo fmt("Add %s hours to the server's local time when reporting times.", $timeOffsetInput) ?> + </label> + </p> + </td> + <td> + <p class="hint"> + <?php echo fmt("The current time at the server is %s.", + HTML::strong($WikiTheme->formatDateTime($serverTime))) ?> + <?php echo fmt("With the current offset, this would be reported as %s.", + HTML::strong($WikiTheme->formatDateTime($time))) ?> + </p> + </td> + </tr> - <tr><td colspan="2"><h3><?php echo _("Date Format")?></h3></td></tr> + <tr><td colspan="2"><h3><?php echo _("Date Format") ?></h3></td></tr> <tr><td colspan="2"> <p> <?php echo $RelativeDatesCB ?> - <?php echo _("Show relative dates using 'Today' and 'Yesterday'")?> + <label for="relativeDates"> + <?php echo _("Show relative dates using 'Today' and 'Yesterday'") ?> + </label> </p> </td></tr> </table> @@ -329,9 +422,9 @@ <?php if ($isForm) { ?> <p> - <?php echo Button("submit:", _("Update Preferences"), 'wikiadmin')?> - <?php echo Button("submit:delete", _("Reset Preferences"), 'wikiadmin')?> - <?php echo Button("submit:cancel", _("Cancel"), 'button')?> + <?php echo Button("submit:", _("Update Preferences"), 'wikiadmin') ?> + <?php echo Button("submit:delete", _("Reset Preferences"), 'wikiadmin') ?> + <?php echo Button("submit:cancel", _("Cancel"), 'button') ?> <?php echo HiddenInputs($request->getArgs(), false, array('pref')) ?> </p> </form> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-03 14:33:34
|
Revision: 9281 http://sourceforge.net/p/phpwiki/code/9281 Author: vargenau Date: 2014-11-03 14:33:29 +0000 (Mon, 03 Nov 2014) Log Message: ----------- Spelling Modified Paths: -------------- trunk/pgsrc/Help%2FAddingPages trunk/pgsrc/Help%2FCreatePagePlugin trunk/pgsrc/Help%2FIncludeTreePlugin trunk/pgsrc/Help%2FOldStyleTablePlugin trunk/pgsrc/Help%2FRichTablePlugin trunk/pgsrc/Help%2FSpreadsheet trunk/pgsrc/Help%2FUpLoadPlugin trunk/pgsrc/Help%2FWikiAdminSearchReplacePlugin trunk/pgsrc/ReleaseNotes Modified: trunk/pgsrc/Help%2FAddingPages =================================================================== --- trunk/pgsrc/Help%2FAddingPages 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FAddingPages 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FAddingPages; @@ -28,7 +28,7 @@ }}} [[http://phpwiki.sourceforge.net/|PhpWiki project homepage]] -The Wiki does not support most HTML tags, only the simpliest. See [[Help:TextFormattingRules|TextFormattingRules]]. +The Wiki does not support most HTML tags, only the simplest. See [[Help:TextFormattingRules|TextFormattingRules]]. <tags>They will just render like text.</tags> Wiki is meant to be as simple as possible to encourage use. Modified: trunk/pgsrc/Help%2FCreatePagePlugin =================================================================== --- trunk/pgsrc/Help%2FCreatePagePlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FCreatePagePlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FCreatePagePlugin; @@ -8,7 +8,7 @@ The **~CreatePage** [[Help:WikiPlugin|plugin]] allows to easily create new pages, optionally with default content. -This allows you to create a page geting the new pagename from a +This allows you to create a page getting the new pagename from a forms-based interface, and optionally with the initial content from some template. Modified: trunk/pgsrc/Help%2FIncludeTreePlugin =================================================================== --- trunk/pgsrc/Help%2FIncludeTreePlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FIncludeTreePlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FIncludeTreePlugin; @@ -56,7 +56,7 @@ |- | **firstreversed** | If true, get BackLinks for the first page and forward links for the rest. Only applicable when direction = 'forward'. -| flase +| false |- | **excludeunknown** | If true (default) then exclude any mentioned pages which don't exist yet. Only applicable when direction = 'forward'. Modified: trunk/pgsrc/Help%2FOldStyleTablePlugin =================================================================== --- trunk/pgsrc/Help%2FOldStyleTablePlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FOldStyleTablePlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FOldStyleTablePlugin; @@ -9,7 +9,7 @@ The **~OldStyleTable** [[Help:WikiPlugin|plugin]] can be used to include tables within a wiki page using the old-style markup syntax for tables. -This plugin is included for legacy only. We recommand to +This plugin is included for legacy only. We recommend to use [[Help:Wikicreole#Tables|Wikicreole tables]] or [[Help:MediawikiTablePlugin|Mediawiki tables]] instead. Modified: trunk/pgsrc/Help%2FRichTablePlugin =================================================================== --- trunk/pgsrc/Help%2FRichTablePlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FRichTablePlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FRichTablePlugin; @@ -8,7 +8,7 @@ The **~RichTable** [[Help:WikiPlugin|plugin]] is a plugin that takes off from the [[Help:OldStyleTablePlugin|OldStyleTable]] plugin. It allows a user to specify arbitrary properties of ##<table>##, ##<tr>## and ##<td>## with a very simple markup. -This plugin is included for legacy only. We recommand to +This plugin is included for legacy only. We recommend to use [[Help:MediawikiTablePlugin|Mediawiki tables]] instead. == Syntax == @@ -43,7 +43,7 @@ === Special characters === -The two special characters ##"~~"## and ##"?>"## should be escaped as ##"\~~"## and ##"?\>"##. I havn't discovered any other characters yet that might need to be escaped. This is required for the block parser to work. +The two special characters ##"~~"## and ##"?>"## should be escaped as ##"\~~"## and ##"?\>"##. I haven't discovered any other characters yet that might need to be escaped. This is required for the block parser to work. === Attributes === Modified: trunk/pgsrc/Help%2FSpreadsheet =================================================================== --- trunk/pgsrc/Help%2FSpreadsheet 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FSpreadsheet 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FSpreadsheet; @@ -6,7 +6,7 @@ charset=UTF-8 Content-Transfer-Encoding: binary -Phpwiki has extented the [[Help:Wikicreole|Wikicreole]] syntax of tables so that some simple +Phpwiki has extended the [[Help:Wikicreole|Wikicreole]] syntax of tables so that some simple spreadsheet-like calculations can be performed in tables. == Syntax == Modified: trunk/pgsrc/Help%2FUpLoadPlugin =================================================================== --- trunk/pgsrc/Help%2FUpLoadPlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FUpLoadPlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 14 Oct 2014 18:26:49 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FUpLoadPlugin; @@ -7,7 +7,7 @@ Content-Transfer-Encoding: binary The **~UpLoad** [[Help:WikiPlugin|plugin]] displays an editbox and two buttons. -* The first button lets you choose the file to be uploaded at your local filesystem. The textvalue of this button is localised from your browser. +* The first button lets you choose the file to be uploaded at your local filesystem. The text value of this button is localised from your browser. * The second "Upload" button actually uploads the given filename to the upload directory. This directory is not browsable, any file there may be accessed by using the "Upload~:" [[InterWikiMap]] prefix to the given filename. This way you can easily inline uploaded images. Modified: trunk/pgsrc/Help%2FWikiAdminSearchReplacePlugin =================================================================== --- trunk/pgsrc/Help%2FWikiAdminSearchReplacePlugin 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/Help%2FWikiAdminSearchReplacePlugin 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FWikiAdminSearchReplacePlugin; @@ -6,7 +6,7 @@ charset=UTF-8 Content-Transfer-Encoding: binary -The **~WikiAdminSearchReplace** [[Help:WikiPlugin|plugin]] allows to search and replace texte in pages. +The **~WikiAdminSearchReplace** [[Help:WikiPlugin|plugin]] allows to search and replace text in pages. == Usage == {{{ Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-11-03 12:49:39 UTC (rev 9280) +++ trunk/pgsrc/ReleaseNotes 2014-11-03 14:33:29 UTC (rev 9281) @@ -1,4 +1,4 @@ -Date: Mon, 3 Nov 2014 13:29:55 +0000 +Date: Mon, 3 Nov 2014 15:32:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -89,7 +89,7 @@ * link only to existing pages on multi-page dumps (pagesets) * fix Bug#1795420 by Sven Ginka: Use /U in preg_match * ensure ending uploads slash even on user provided UPLOAD constants. Fixes plugin/~UpLoad -* stablize Comment. substring search for basepages, do not tokenize. +* stabilize Comment. substring search for basepages, do not tokenize. * fix Bug#1792170 Handle " ( " or "(test" without closing ")" as plain word. Allow single string token "0" * fix Bug#1752172 undefined method ~TextSearchQuery_node_or::_sql_quote() * dba: fix sorting for empty mtime field This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-03 12:49:44
|
Revision: 9280 http://sourceforge.net/p/phpwiki/code/9280 Author: vargenau Date: 2014-11-03 12:49:39 +0000 (Mon, 03 Nov 2014) Log Message: ----------- Use "&&" instead of "and" to get right priority Modified Paths: -------------- trunk/lib/plugin/GraphViz.php Modified: trunk/lib/plugin/GraphViz.php =================================================================== --- trunk/lib/plugin/GraphViz.php 2014-11-03 12:30:59 UTC (rev 9279) +++ trunk/lib/plugin/GraphViz.php 2014-11-03 12:49:39 UTC (rev 9280) @@ -383,20 +383,20 @@ $args = "-T$gif $tempfiles.dot -o $outfile"; $cmdline1 = "$dotbin $args"; if ($debug) $cmdline1 .= " > $tempout"; - $ok = $ok and $this->filterThroughCmd($source, $cmdline1); + $ok = $ok && $this->filterThroughCmd($source, $cmdline1); //$ok = $this->execute("$dotbin -T$gif $tempfiles.dot -o $outfile" . // ($debug ? " > $tempout 2>&1" : " 2>&1"), $outfile) $args = "-Timap $tempfiles.dot -o $tempfiles.map"; $cmdline2 = "$dotbin $args"; if ($debug) $cmdline2 .= " > $tempout"; - $ok = $ok and $this->filterThroughCmd($source, $cmdline2); + $ok = $ok && $this->filterThroughCmd($source, $cmdline2); // $this->execute("$dotbin -Timap $tempfiles.dot -o ".$tempfiles.".map" . // ($debug ? " > $tempout 2>&1" : " 2>&1"), $tempfiles.".map") - $ok = $ok and file_exists($outfile); - $ok = $ok and file_exists($tempfiles . '.map'); - $ok = $ok and ($img = $ImageCreateFromFunc($outfile)); - $ok = $ok and ($fp = fopen($tempfiles . '.map', 'r')); + $ok = $ok && file_exists($outfile); + $ok = $ok && file_exists($tempfiles . '.map'); + $ok = $ok && ($img = $ImageCreateFromFunc($outfile)); + $ok = $ok && ($fp = fopen($tempfiles . '.map', 'r')); $map = HTML(); if ($debug == 'static') { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-03 12:31:03
|
Revision: 9279 http://sourceforge.net/p/phpwiki/code/9279 Author: vargenau Date: 2014-11-03 12:30:59 +0000 (Mon, 03 Nov 2014) Log Message: ----------- Update ReleaseNotes for 1.5.3 Modified Paths: -------------- trunk/pgsrc/ReleaseNotes Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-10-29 20:43:42 UTC (rev 9278) +++ trunk/pgsrc/ReleaseNotes 2014-11-03 12:30:59 UTC (rev 9279) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Mon, 3 Nov 2014 13:29:55 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -8,6 +8,13 @@ <<CreateToc with_toclink||=1 headers||=1,2,3 width=300px position=right>> +== 1.5.3 2014-11-XX Marc-Etienne Vargenau == + +* easiest file upload: forbidden characters in filename are replaced by dashes (instead of rejecting upload) +* improve handling of image insertion icon in edit toolbar (icon did not always appear after image uploading) +* bigger wikipaging font +* remove FPDF, lib/gif.php, lib/font (was not used) + == 1.5.2 2014-10-10 Marc-Etienne Vargenau == This is a security fix release. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-29 20:43:52
|
Revision: 9278 http://sourceforge.net/p/phpwiki/code/9278 Author: vargenau Date: 2014-10-29 20:43:42 +0000 (Wed, 29 Oct 2014) Log Message: ----------- Remove duplcates Modified Paths: -------------- trunk/lib/plugin/PhotoAlbum.php Modified: trunk/lib/plugin/PhotoAlbum.php =================================================================== --- trunk/lib/plugin/PhotoAlbum.php 2014-10-25 15:25:42 UTC (rev 9277) +++ trunk/lib/plugin/PhotoAlbum.php 2014-10-29 20:43:42 UTC (rev 9278) @@ -618,7 +618,6 @@ $photos[] = array("src" => $src, "name" => $src, "name_tile" => $src, - "src" => $src, "desc" => ""); return ''; } @@ -627,7 +626,6 @@ $photos[] = array("src" => $src, "name" => "../" . $src, "name_tile" => $src, - "src" => $src, "desc" => ""); return ''; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-25 15:25:45
|
Revision: 9277 http://sourceforge.net/p/phpwiki/code/9277 Author: vargenau Date: 2014-10-25 15:25:42 +0000 (Sat, 25 Oct 2014) Log Message: ----------- wikipaging is too small Modified Paths: -------------- trunk/themes/MonoBook/monobook.css trunk/themes/Sidebar/sidebar.css trunk/themes/Wordpress/Wordpress.css Modified: trunk/themes/MonoBook/monobook.css =================================================================== --- trunk/themes/MonoBook/monobook.css 2014-10-25 15:24:36 UTC (rev 9276) +++ trunk/themes/MonoBook/monobook.css 2014-10-25 15:25:42 UTC (rev 9277) @@ -1891,10 +1891,6 @@ color: black; } -.wikipaging { - font-size: 80% -} - .wikipaging-disabled { color: #999 } Modified: trunk/themes/Sidebar/sidebar.css =================================================================== --- trunk/themes/Sidebar/sidebar.css 2014-10-25 15:24:36 UTC (rev 9276) +++ trunk/themes/Sidebar/sidebar.css 2014-10-25 15:25:42 UTC (rev 9277) @@ -1918,10 +1918,6 @@ color: black; } -.wikipaging { - font-size: 80% -} - .wikipaging-disabled { color: #999 } Modified: trunk/themes/Wordpress/Wordpress.css =================================================================== --- trunk/themes/Wordpress/Wordpress.css 2014-10-25 15:24:36 UTC (rev 9276) +++ trunk/themes/Wordpress/Wordpress.css 2014-10-25 15:25:42 UTC (rev 9277) @@ -323,10 +323,6 @@ color: black; } -.wikipaging { - font-size: x-small; -} - .toolbar { padding: 0; margin: 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-25 15:24:47
|
Revision: 9276 http://sourceforge.net/p/phpwiki/code/9276 Author: vargenau Date: 2014-10-25 15:24:36 +0000 (Sat, 25 Oct 2014) Log Message: ----------- gif.php unused Removed Paths: ------------- trunk/lib/gif.php Deleted: trunk/lib/gif.php =================================================================== --- trunk/lib/gif.php 2014-10-25 15:23:21 UTC (rev 9275) +++ trunk/lib/gif.php 2014-10-25 15:24:36 UTC (rev 9276) @@ -1,987 +0,0 @@ -<?php - -// GIF Util - (C) 2003 Yamasoft (S/C) -// http://www.yamasoft.com -// All Rights Reserved -// This file can be freely copied, distributed, modified, updated by anyone under the only -// condition to leave the original address (Yamasoft, http://www.yamasoft.com) and this header. - -// <gif> = gif_loadFile(filename, [index]) -// <bool> = gif_getSize(<gif> or filename, &width, &height) -// <bool> = gif_outputAsPng(<gif>, filename, [bgColor]) -// <bool> = gif_outputAsBmp(<gif>, filename, [bgcolor]) -// <bool> = gif_outputAsJpeg(<gif>, filename, [bgcolor]) - Requires cjpeg - -function gif_loadFile($lpszFileName, $iIndex = 0) -{ - $gif = new CGIF(); - - if (!$gif->loadFile($lpszFileName, $iIndex)) { - return false; - } - - return $gif; -} - -function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1) -{ - if (!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) { - return false; - } - - $fd = $gif->getBmp($bgColor); - if (strlen($fd) <= 0) { - return false; - } - - if (!($fh = @fOpen($lpszFileName, "wb"))) { - return false; - } - @fWrite($fh, $fd, strlen($fd)); - @fFlush($fh); - @fClose($fh); - return true; -} - -function gif_outputAsPng($gif, $lpszFileName, $bgColor = -1) -{ - if (!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) { - return false; - } - - $fd = $gif->getPng($bgColor); - if (strlen($fd) <= 0) { - return false; - } - - if (!($fh = @fOpen($lpszFileName, "wb"))) { - return false; - } - @fWrite($fh, $fd, strlen($fd)); - @fFlush($fh); - @fClose($fh); - return true; -} - -function gif_outputAsJpeg($gif, $lpszFileName, $bgColor = -1) -{ - if (gif_outputAsBmp($gif, "$lpszFileName.bmp", $gbColor)) { - exec("cjpeg $lpszFileName.bmp >$lpszFileName 2>/dev/null"); - @unLink("$lpszFileName.bmp"); - - if (@file_exists($lpszFileName)) { - if (@fileSize($lpszFileName) > 0) { - return true; - } - - @unLink($lpszFileName); - } - } - - return false; -} - -function gif_getSize($gif, &$width, &$height) -{ - if (isSet($gif) && (@get_class($gif) == "cgif") && $gif->loaded()) { - $width = $gif->width(); - $height = $gif->height(); - } elseif (@file_exists($gif)) { - $myGIF = new CGIF(); - if (!$myGIF->getSize($gif, $width, $height)) { - return false; - } - } else { - return false; - } - - return true; -} - -class CGIFLZW -{ - var $MAX_LZW_BITS; - var $Fresh, $CodeSize, $SetCodeSize, $MaxCode, $MaxCodeSize, $FirstCode, $OldCode; - var $ClearCode, $EndCode, $Next, $Vals, $Stack, $sp, $Buf, $CurBit, $LastBit, $Done, $LastByte; - - // CONSTRUCTOR - function CGIFLZW() - { - $this->MAX_LZW_BITS = 12; - unSet($this->Next); - unSet($this->Vals); - unSet($this->Stack); - unSet($this->Buf); - - $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1); - $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1); - $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1); - $this->Buf = range(0, 279); - } - - function deCompress($data, &$datLen) - { - $stLen = strlen($data); - $datLen = 0; - $ret = ""; - - // INITIALIZATION - $this->LZWCommand($data, true); - - while (($iIndex = $this->LZWCommand($data, false)) >= 0) { - $ret .= chr($iIndex); - } - - $datLen = $stLen - strlen($data); - - if ($iIndex != -2) { - return false; - } - - return $ret; - } - - function LZWCommand(&$data, $bInit) - { - if ($bInit) { - $this->SetCodeSize = ord($data{0}); - $data = substr($data, 1); - - $this->CodeSize = $this->SetCodeSize + 1; - $this->ClearCode = 1 << $this->SetCodeSize; - $this->EndCode = $this->ClearCode + 1; - $this->MaxCode = $this->ClearCode + 2; - $this->MaxCodeSize = $this->ClearCode << 1; - - $this->GetCode($data, $bInit); - - $this->Fresh = 1; - for ($i = 0; $i < $this->ClearCode; $i++) { - $this->Next[$i] = 0; - $this->Vals[$i] = $i; - } - - for (; $i < (1 << $this->MAX_LZW_BITS); $i++) { - $this->Next[$i] = 0; - $this->Vals[$i] = 0; - } - - $this->sp = 0; - return 1; - } - - if ($this->Fresh) { - $this->Fresh = 0; - do { - $this->FirstCode = $this->GetCode($data, $bInit); - $this->OldCode = $this->FirstCode; - } while ($this->FirstCode == $this->ClearCode); - - return $this->FirstCode; - } - - if ($this->sp > 0) { - $this->sp--; - return $this->Stack[$this->sp]; - } - - while (($Code = $this->GetCode($data, $bInit)) >= 0) { - if ($Code == $this->ClearCode) { - for ($i = 0; $i < $this->ClearCode; $i++) { - $this->Next[$i] = 0; - $this->Vals[$i] = $i; - } - - for (; $i < (1 << $this->MAX_LZW_BITS); $i++) { - $this->Next[$i] = 0; - $this->Vals[$i] = 0; - } - - $this->CodeSize = $this->SetCodeSize + 1; - $this->MaxCodeSize = $this->ClearCode << 1; - $this->MaxCode = $this->ClearCode + 2; - $this->sp = 0; - $this->FirstCode = $this->GetCode($data, $bInit); - $this->OldCode = $this->FirstCode; - - return $this->FirstCode; - } - - if ($Code == $this->EndCode) { - return -2; - } - - $InCode = $Code; - if ($Code >= $this->MaxCode) { - $this->Stack[$this->sp] = $this->FirstCode; - $this->sp++; - $Code = $this->OldCode; - } - - while ($Code >= $this->ClearCode) { - $this->Stack[$this->sp] = $this->Vals[$Code]; - $this->sp++; - - if ($Code == $this->Next[$Code]) // Circular table entry, big GIF Error! - return -1; - - $Code = $this->Next[$Code]; - } - - $this->FirstCode = $this->Vals[$Code]; - $this->Stack[$this->sp] = $this->FirstCode; - $this->sp++; - - if (($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) { - $this->Next[$Code] = $this->OldCode; - $this->Vals[$Code] = $this->FirstCode; - $this->MaxCode++; - - if (($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) { - $this->MaxCodeSize *= 2; - $this->CodeSize++; - } - } - - $this->OldCode = $InCode; - if ($this->sp > 0) { - $this->sp--; - return $this->Stack[$this->sp]; - } - } - - return $Code; - } - - function GetCode(&$data, $bInit) - { - if ($bInit) { - $this->CurBit = 0; - $this->LastBit = 0; - $this->Done = 0; - $this->LastByte = 2; - return 1; - } - - if (($this->CurBit + $this->CodeSize) >= $this->LastBit) { - if ($this->Done) { - if ($this->CurBit >= $this->LastBit) { - // Ran off the end of my bits - return 0; - } - return -1; - } - - $this->Buf[0] = $this->Buf[$this->LastByte - 2]; - $this->Buf[1] = $this->Buf[$this->LastByte - 1]; - - $Count = ord($data{0}); - $data = substr($data, 1); - - if ($Count) { - for ($i = 0; $i < $Count; $i++) { - $this->Buf[2 + $i] = ord($data{$i}); - } - $data = substr($data, $Count); - } else { - $this->Done = 1; - } - - $this->LastByte = 2 + $Count; - $this->CurBit = ($this->CurBit - $this->LastBit) + 16; - $this->LastBit = (2 + $Count) << 3; - } - - $iRet = 0; - for ($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) { - $iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j; - } - - $this->CurBit += $this->CodeSize; - return $iRet; - } -} - -class CGIFCOLORTABLE -{ - var $m_nColors; - var $m_arColors; - - // CONSTRUCTOR - function CGIFCOLORTABLE() - { - unSet($this->m_nColors); - unSet($this->m_arColors); - } - - function load($lpData, $num) - { - $this->m_nColors = 0; - $this->m_arColors = array(); - - for ($i = 0; $i < $num; $i++) { - $rgb = substr($lpData, $i * 3, 3); - if (strlen($rgb) < 3) { - return false; - } - - $this->m_arColors[] = (ord($rgb{2}) << 16) + (ord($rgb{1}) << 8) + ord($rgb{0}); - $this->m_nColors++; - } - - return true; - } - - function toString() - { - $ret = ""; - - for ($i = 0; $i < $this->m_nColors; $i++) { - $ret .= - chr(($this->m_arColors[$i] & 0x000000FF)) . // R - chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G - chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B - } - - return $ret; - } - - function toRGBQuad() - { - $ret = ""; - - for ($i = 0; $i < $this->m_nColors; $i++) { - $ret .= - chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B - chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G - chr(($this->m_arColors[$i] & 0x000000FF)) . // R - "\x00"; - } - - return $ret; - } - - function colorIndex($rgb) - { - $rgb = intval($rgb) & 0xFFFFFF; - $r1 = ($rgb & 0x0000FF); - $g1 = ($rgb & 0x00FF00) >> 8; - $b1 = ($rgb & 0xFF0000) >> 16; - $idx = -1; - - for ($i = 0; $i < $this->m_nColors; $i++) { - $r2 = ($this->m_arColors[$i] & 0x000000FF); - $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8; - $b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16; - $d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1); - - if (($idx == -1) || ($d < $dif)) { - $idx = $i; - $dif = $d; - } - } - - return $idx; - } -} - -class CGIFFILEHEADER -{ - var $m_lpVer; - var $m_nWidth; - var $m_nHeight; - var $m_bGlobalClr; - var $m_nColorRes; - var $m_bSorted; - var $m_nTableSize; - var $m_nBgColor; - var $m_nPixelRatio; - var $m_colorTable; - - // CONSTRUCTOR - function CGIFFILEHEADER() - { - unSet($this->m_lpVer); - unSet($this->m_nWidth); - unSet($this->m_nHeight); - unSet($this->m_bGlobalClr); - unSet($this->m_nColorRes); - unSet($this->m_bSorted); - unSet($this->m_nTableSize); - unSet($this->m_nBgColor); - unSet($this->m_nPixelRatio); - unSet($this->m_colorTable); - } - - function load($lpData, &$hdrLen) - { - $hdrLen = 0; - - $this->m_lpVer = substr($lpData, 0, 6); - if (($this->m_lpVer <> "GIF87a") && ($this->m_lpVer <> "GIF89a")) { - return false; - } - - $this->m_nWidth = $this->w2i(substr($lpData, 6, 2)); - $this->m_nHeight = $this->w2i(substr($lpData, 8, 2)); - if (!$this->m_nWidth || !$this->m_nHeight) { - return false; - } - - $b = ord(substr($lpData, 10, 1)); - $this->m_bGlobalClr = ($b & 0x80) ? true : false; - $this->m_nColorRes = ($b & 0x70) >> 4; - $this->m_bSorted = ($b & 0x08) ? true : false; - $this->m_nTableSize = 2 << ($b & 0x07); - $this->m_nBgColor = ord(substr($lpData, 11, 1)); - $this->m_nPixelRatio = ord(substr($lpData, 12, 1)); - $hdrLen = 13; - - if ($this->m_bGlobalClr) { - $this->m_colorTable = new CGIFCOLORTABLE(); - if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) { - return false; - } - $hdrLen += 3 * $this->m_nTableSize; - } - - return true; - } - - function w2i($str) - { - return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); - } -} - -class CGIFIMAGEHEADER -{ - var $m_nLeft; - var $m_nTop; - var $m_nWidth; - var $m_nHeight; - var $m_bLocalClr; - var $m_bInterlace; - var $m_bSorted; - var $m_nTableSize; - var $m_colorTable; - - // CONSTRUCTOR - function CGIFIMAGEHEADER() - { - unSet($this->m_nLeft); - unSet($this->m_nTop); - unSet($this->m_nWidth); - unSet($this->m_nHeight); - unSet($this->m_bLocalClr); - unSet($this->m_bInterlace); - unSet($this->m_bSorted); - unSet($this->m_nTableSize); - unSet($this->m_colorTable); - } - - function load($lpData, &$hdrLen) - { - $hdrLen = 0; - - $this->m_nLeft = $this->w2i(substr($lpData, 0, 2)); - $this->m_nTop = $this->w2i(substr($lpData, 2, 2)); - $this->m_nWidth = $this->w2i(substr($lpData, 4, 2)); - $this->m_nHeight = $this->w2i(substr($lpData, 6, 2)); - - if (!$this->m_nWidth || !$this->m_nHeight) { - return false; - } - - $b = ord($lpData{8}); - $this->m_bLocalClr = ($b & 0x80) ? true : false; - $this->m_bInterlace = ($b & 0x40) ? true : false; - $this->m_bSorted = ($b & 0x20) ? true : false; - $this->m_nTableSize = 2 << ($b & 0x07); - $hdrLen = 9; - - if ($this->m_bLocalClr) { - $this->m_colorTable = new CGIFCOLORTABLE(); - if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) { - return false; - } - $hdrLen += 3 * $this->m_nTableSize; - } - - return true; - } - - function w2i($str) - { - return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); - } -} - -class CGIFIMAGE -{ - var $m_disp; - var $m_bUser; - var $m_bTrans; - var $m_nDelay; - var $m_nTrans; - var $m_lpComm; - var $m_gih; - var $m_data; - var $m_lzw; - - function CGIFIMAGE() - { - unSet($this->m_disp); - unSet($this->m_bUser); - unSet($this->m_bTrans); - unSet($this->m_nDelay); - unSet($this->m_nTrans); - unSet($this->m_lpComm); - unSet($this->m_data); - $this->m_gih = new CGIFIMAGEHEADER(); - $this->m_lzw = new CGIFLZW(); - } - - function load($data, &$datLen) - { - $datLen = 0; - - while (true) { - $b = ord($data{0}); - $data = substr($data, 1); - $datLen++; - - switch ($b) { - case 0x21: // Extension - if (!$this->skipExt($data, $len = 0)) { - return false; - } - $datLen += $len; - break; - - case 0x2C: // Image - // LOAD HEADER & COLOR TABLE - if (!$this->m_gih->load($data, $len = 0)) { - return false; - } - $data = substr($data, $len); - $datLen += $len; - - // ALLOC BUFFER - if (!($this->m_data = $this->m_lzw->deCompress($data, $len = 0))) { - return false; - } - $data = substr($data, $len); - $datLen += $len; - - if ($this->m_gih->m_bInterlace) { - $this->deInterlace(); - } - return true; - - case 0x3B: // EOF - default: - return false; - } - } - return false; - } - - function skipExt(&$data, &$extLen) - { - $extLen = 0; - - $b = ord($data{0}); - $data = substr($data, 1); - $extLen++; - - switch ($b) { - case 0xF9: // Graphic Control - $b = ord($data{1}); - $this->m_disp = ($b & 0x1C) >> 2; - $this->m_bUser = ($b & 0x02) ? true : false; - $this->m_bTrans = ($b & 0x01) ? true : false; - $this->m_nDelay = $this->w2i(substr($data, 2, 2)); - $this->m_nTrans = ord($data{4}); - break; - - case 0xFE: // Comment - $this->m_lpComm = substr($data, 1, ord($data{0})); - break; - - case 0x01: // Plain text - break; - - case 0xFF: // Application - break; - } - - // SKIP DEFAULT AS DEFS MAY CHANGE - $b = ord($data{0}); - $data = substr($data, 1); - $extLen++; - while ($b > 0) { - $data = substr($data, $b); - $extLen += $b; - $b = ord($data{0}); - $data = substr($data, 1); - $extLen++; - } - return true; - } - - function w2i($str) - { - return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); - } - - function deInterlace() - { - $data = $this->m_data; - - for ($i = 0; $i < 4; $i++) { - switch ($i) { - case 0: - $s = 8; - $y = 0; - break; - - case 1: - $s = 8; - $y = 4; - break; - - case 2: - $s = 4; - $y = 2; - break; - - case 3: - $s = 2; - $y = 1; - break; - } - - for (; $y < $this->m_gih->m_nHeight; $y += $s) { - $lne = substr($this->m_data, 0, $this->m_gih->m_nWidth); - $this->m_data = substr($this->m_data, $this->m_gih->m_nWidth); - - $data = - substr($data, 0, $y * $this->m_gih->m_nWidth) . - $lne . - substr($data, ($y + 1) * $this->m_gih->m_nWidth); - } - } - - $this->m_data = $data; - } -} - -class CGIF -{ - var $m_gfh; - var $m_lpData; - var $m_img; - var $m_bLoaded; - - // CONSTRUCTOR - function CGIF() - { - $this->m_gfh = new CGIFFILEHEADER(); - $this->m_img = new CGIFIMAGE(); - $this->m_lpData = ""; - $this->m_bLoaded = false; - } - - function loadFile($lpszFileName, $iIndex) - { - if ($iIndex < 0) { - return false; - } - - // READ FILE - if (!($fh = @fOpen($lpszFileName, "rb"))) { - return false; - } - $data = @fRead($fh, @fileSize($lpszFileName)); - // @fClose($fh); - // $data=fread($fh,filesize($lpszFileName)); - while (!feof($fh)) { - $data = $data . @fread($fh, 1024); - @fClose($fh); - $this->m_lpData = @fRead($fh, @fileSize($lpszFileName)); - fClose($fh); - - // GET FILE HEADER - if (!$this->m_gfh->load($this->m_lpData, $len = 0)) { - return false; - } - $this->m_lpData = substr($this->m_lpData, $len); - - do { - if (!$this->m_img->load($this->m_lpData, $imgLen = 0)) { - return false; - } - $this->m_lpData = substr($this->m_lpData, $imgLen); - } while ($iIndex-- > 0); - - $this->m_bLoaded = true; - return true; - } - - function getSize($lpszFileName, &$width, &$height) - { - if (!($fh = @fOpen($lpszFileName, "rb"))) { - return false; - } - $data = @fRead($fh, @fileSize($lpszFileName)); - @fClose($fh); - } - - $gfh = new CGIFFILEHEADER(); - if (!$gfh->load($data, $len = 0)) { - return false; - } - - $width = $gfh->m_nWidth; - $height = $gfh->m_nHeight; - return true; - } - - function getBmp($bgColor) - { - $out = ""; - - if (!$this->m_bLoaded) { - return false; - } - - // PREPARE COLOR TABLE (RGBQUADs) - if ($this->m_img->m_gih->m_bLocalClr) { - $nColors = $this->m_img->m_gih->m_nTableSize; - $rgbq = $this->m_img->m_gih->m_colorTable->toRGBQuad(); - if ($bgColor != -1) { - $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); - } - } elseif ($this->m_gfh->m_bGlobalClr) { - $nColors = $this->m_gfh->m_nTableSize; - $rgbq = $this->m_gfh->m_colorTable->toRGBQuad(); - if ($bgColor != -1) { - $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor); - } - } else { - $nColors = 0; - $bgColor = -1; - } - - // PREPARE BITMAP BITS - $data = $this->m_img->m_data; - $nPxl = ($this->m_gfh->m_nHeight - 1) * $this->m_gfh->m_nWidth; - $bmp = ""; - - $nPad = ($this->m_gfh->m_nWidth % 4) ? 4 - ($this->m_gfh->m_nWidth % 4) : 0; - for ($y = 0; $y < $this->m_gfh->m_nHeight; $y++) { - for ($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) { - if ( - ($x >= $this->m_img->m_gih->m_nLeft) && - ($y >= $this->m_img->m_gih->m_nTop) && - ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) && - ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight)) - ) { - // PART OF IMAGE - if ($this->m_img->m_bTrans && (ord($data{$nPxl}) == $this->m_img->m_nTrans)) { - // TRANSPARENT -> BACKGROUND - if ($bgColor == -1) { - $bmp .= chr($this->m_gfh->m_nBgColor); - } else { - $bmp .= chr($bgColor); - } - } else { - $bmp .= $data{$nPxl}; - } - } else { - // BACKGROUND - if ($bgColor == -1) { - $bmp .= chr($this->m_gfh->m_nBgColor); - } else { - $bmp .= chr($bgColor); - } - } - } - $nPxl -= $this->m_gfh->m_nWidth << 1; - - // ADD PADDING - for ($x = 0; $x < $nPad; $x++) { - $bmp .= "\x00"; - } - } - - // BITMAPFILEHEADER - $out .= "BM"; - $out .= $this->dword(14 + 40 + ($nColors << 2) + strlen($bmp)); - $out .= "\x00\x00"; - $out .= "\x00\x00"; - $out .= $this->dword(14 + 40 + ($nColors << 2)); - - // BITMAPINFOHEADER - $out .= $this->dword(40); - $out .= $this->dword($this->m_gfh->m_nWidth); - $out .= $this->dword($this->m_gfh->m_nHeight); - $out .= "\x01\x00"; - $out .= "\x08\x00"; - $out .= "\x00\x00\x00\x00"; - $out .= "\x00\x00\x00\x00"; - $out .= "\x12\x0B\x00\x00"; - $out .= "\x12\x0B\x00\x00"; - $out .= $this->dword($nColors % 256); - $out .= "\x00\x00\x00\x00"; - - // COLOR TABLE - if ($nColors > 0) { - $out .= $rgbq; - } - - // DATA - $out .= $bmp; - - return $out; - } - - function getPng($bgColor) - { - $out = ""; - - if (!$this->m_bLoaded) { - return false; - } - - // PREPARE COLOR TABLE (RGBQUADs) - if ($this->m_img->m_gih->m_bLocalClr) { - $nColors = $this->m_img->m_gih->m_nTableSize; - $pal = $this->m_img->m_gih->m_colorTable->toString(); - if ($bgColor != -1) { - $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor); - } - } elseif ($this->m_gfh->m_bGlobalClr) { - $nColors = $this->m_gfh->m_nTableSize; - $pal = $this->m_gfh->m_colorTable->toString(); - if ($bgColor != -1) { - $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor); - } - } else { - $nColors = 0; - $bgColor = -1; - } - - // PREPARE BITMAP BITS - $data = $this->m_img->m_data; - $nPxl = 0; - $bmp = ""; - for ($y = 0; $y < $this->m_gfh->m_nHeight; $y++) { - $bmp .= "\x00"; - for ($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) { - if ( - ($x >= $this->m_img->m_gih->m_nLeft) && - ($y >= $this->m_img->m_gih->m_nTop) && - ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) && - ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight)) - ) { - // PART OF IMAGE - $bmp .= $data{$nPxl}; - } else { - // BACKGROUND - if ($bgColor == -1) { - $bmp .= chr($this->m_gfh->m_nBgColor); - } else { - $bmp .= chr($bgColor); - } - } - } - } - $bmp = gzcompress($bmp, 9); - - // SIGNATURE - $out .= "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"; - - // HEADER - $out .= "\x00\x00\x00\x0D"; - $tmp = "IHDR"; - $tmp .= $this->ndword($this->m_gfh->m_nWidth); - $tmp .= $this->ndword($this->m_gfh->m_nHeight); - $tmp .= "\x08\x03\x00\x00\x00"; - $out .= $tmp; - $out .= $this->ndword(crc32($tmp)); - - // PALETTE - if ($nColors > 0) { - $out .= $this->ndword($nColors * 3); - $tmp = "PLTE"; - $tmp .= $pal; - $out .= $tmp; - $out .= $this->ndword(crc32($tmp)); - } - - // TRANSPARENCY - if ($this->m_img->m_bTrans && ($nColors > 0)) { - $out .= $this->ndword($nColors); - $tmp = "tRNS"; - for ($i = 0; $i < $nColors; $i++) { - $tmp .= ($i == $this->m_img->m_nTrans) ? "\x00" : "\xFF"; - } - $out .= $tmp; - $out .= $this->ndword(crc32($tmp)); - } - - // DATA BITS - $out .= $this->ndword(strlen($bmp)); - $tmp = "IDAT"; - $tmp .= $bmp; - $out .= $tmp; - $out .= $this->ndword(crc32($tmp)); - - // END OF FILE - $out .= "\x00\x00\x00\x00IEND\xAE\x42\x60\x82"; - - return $out; - } - - function dword($val) - { - $val = intval($val); - return chr($val & 0xFF) . chr(($val & 0xFF00) >> 8) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF000000) >> 24); - } - - function ndword($val) - { - $val = intval($val); - return chr(($val & 0xFF000000) >> 24) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF00) >> 8) . chr($val & 0xFF); - } - - function width() - { - return $this->m_gfh->m_nWidth; - } - - function height() - { - return $this->m_gfh->m_nHeight; - } - - function comment() - { - return $this->m_img->m_lpComm; - } - - function loaded() - { - return $this->m_bLoaded; - } -} - -// Local Variables: -// mode: php -// tab-width: 8 -// c-basic-offset: 4 -// c-hanging-comment-ender-p: nil -// indent-tabs-mode: nil -// End: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-25 15:23:30
|
Revision: 9275 http://sourceforge.net/p/phpwiki/code/9275 Author: vargenau Date: 2014-10-25 15:23:21 +0000 (Sat, 25 Oct 2014) Log Message: ----------- font: unused Removed Paths: ------------- trunk/lib/font/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-16 10:34:33
|
Revision: 9274 http://sourceforge.net/p/phpwiki/code/9274 Author: vargenau Date: 2014-10-16 10:34:31 +0000 (Thu, 16 Oct 2014) Log Message: ----------- Use imageOrVideoSet Modified Paths: -------------- trunk/lib/EditToolbar.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2014-10-16 10:18:36 UTC (rev 9273) +++ trunk/lib/EditToolbar.php 2014-10-16 10:34:31 UTC (rev 9274) @@ -424,12 +424,12 @@ global $WikiTheme, $request; $image_dir = getUploadFilePath(); - $pd = new fileSet($image_dir, '*'); + $pd = new imageOrVideoSet($image_dir, '*'); $images = $pd->getFiles(); unset($pd); if (UPLOAD_USERDIR) { $image_dir .= "/" . $request->_user->_userid; - $pd = new fileSet($image_dir, '*'); + $pd = new imageOrVideoSet($image_dir, '*'); $images = array_merge($images, $pd->getFiles()); unset($pd); } @@ -437,10 +437,7 @@ if (!empty($images)) { $image_js = ''; foreach ($images as $image) { - // Select only image and video files - if (is_image($image) or is_video($image)) { - $image_js .= ",['$image','{{" . $image . "}}']"; - } + $image_js .= ",['$image','{{" . $image . "}}']"; } $image_js = substr($image_js, 1); $more_buttons = HTML::img(array('class' => "toolbar", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-16 10:18:43
|
Revision: 9273 http://sourceforge.net/p/phpwiki/code/9273 Author: vargenau Date: 2014-10-16 10:18:36 +0000 (Thu, 16 Oct 2014) Log Message: ----------- Add class imageOrVideoSet Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-16 09:56:27 UTC (rev 9272) +++ trunk/lib/stdlib.php 2014-10-16 10:18:36 UTC (rev 9273) @@ -57,6 +57,7 @@ class fileSet {fileSet($directory, $filepattern = false), getFiles($exclude='', $sortby='', $limit='') } class imageSet extends fileSet + class imageOrVideoSet extends fileSet glob_to_pcre ($glob) glob_match ($glob, $against, $case_sensitive = true) @@ -1422,10 +1423,18 @@ */ function _filenameSelector($filename) { - return preg_match("/(" . INLINE_IMAGES . ")$/i", $filename); + return is_image($filename); } } +class imageOrVideoSet extends fileSet +{ + function _filenameSelector($filename) + { + return is_image($filename) or is_video($filename); + } +} + // Convert fileglob to regex style: // Convert some wildcards to pcre style, escape the rest // Escape . \\ + * ? [ ^ ] $ ( ) { } = ! < > | : / This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-16 09:56:29
|
Revision: 9272 http://sourceforge.net/p/phpwiki/code/9272 Author: vargenau Date: 2014-10-16 09:56:27 +0000 (Thu, 16 Oct 2014) Log Message: ----------- Move class imageSet from themes/Hawaiian/lib/random.php to lib/stdlib.php Modified Paths: -------------- trunk/lib/stdlib.php trunk/themes/Hawaiian/lib/random.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-16 09:42:51 UTC (rev 9271) +++ trunk/lib/stdlib.php 2014-10-16 09:56:27 UTC (rev 9272) @@ -56,6 +56,7 @@ sort_file_mtime ($a, $b) class fileSet {fileSet($directory, $filepattern = false), getFiles($exclude='', $sortby='', $limit='') } + class imageSet extends fileSet glob_to_pcre ($glob) glob_match ($glob, $against, $case_sensitive = true) @@ -1413,6 +1414,18 @@ } } +class imageSet extends fileSet +{ + /** + * A file is considered an image when the suffix matches one from + * INLINE_IMAGES. + */ + function _filenameSelector($filename) + { + return preg_match("/(" . INLINE_IMAGES . ")$/i", $filename); + } +} + // Convert fileglob to regex style: // Convert some wildcards to pcre style, escape the rest // Escape . \\ + * ? [ ^ ] $ ( ) { } = ! < > | : / Modified: trunk/themes/Hawaiian/lib/random.php =================================================================== --- trunk/themes/Hawaiian/lib/random.php 2014-10-16 09:42:51 UTC (rev 9271) +++ trunk/themes/Hawaiian/lib/random.php 2014-10-16 09:56:27 UTC (rev 9272) @@ -31,18 +31,6 @@ } } -class imageSet extends fileSet -{ - /** - * A file is considered an image when the suffix matches one from - * $InlineImages. - */ - function _filenameSelector($filename) - { - return preg_match("/(" . INLINE_IMAGES . ")$/i", $filename); - } -} - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-16 09:43:00
|
Revision: 9271 http://sourceforge.net/p/phpwiki/code/9271 Author: vargenau Date: 2014-10-16 09:42:51 +0000 (Thu, 16 Oct 2014) Log Message: ----------- Remove unused function DataURL Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-15 17:11:30 UTC (rev 9270) +++ trunk/lib/stdlib.php 2014-10-16 09:42:51 UTC (rev 9271) @@ -251,16 +251,6 @@ return SERVER_URL . $url; } -function DataURL($url) -{ - if (preg_match('/^https?:/', $url)) - return $url; - $url = NormalizeWebFileName($url); - if (DEBUG and $GLOBALS['request']->getArg('start_debug') and substr($url, -4, 4) == '.php') - $url .= "?start_debug=1"; // XMLRPC and SOAP debugging helper. - return AbsoluteURL($url); -} - /** * Generates icon in front of links. * @@ -804,6 +794,9 @@ */ public $anchor; + public $_errors; + public $_warnings; + /** * @param mixed $name Page name. * WikiDB_Page, WikiDB_PageRevision, or string. @@ -833,8 +826,6 @@ if (strstr($url, '//')) { if ($moniker == 'Talk') $name = $name . SUBPAGE_SEPARATOR . _("Discussion"); - elseif ($moniker == 'User') - $name = $name; } else { $name = $url; } @@ -1768,6 +1759,7 @@ //$content = join("\n", $content); //$return_array = true; $wordcount = 0; + $new = array(); foreach ($content as $line) { $words = explode(' ', $line); if ($wordcount + count($words) > $n) { @@ -1919,7 +1911,7 @@ } /** - * @param var $needle + * @param mixed $needle * @param array $haystack one-dimensional numeric array only, no hash * @return integer * @desc Feed a sorted array to $haystack and a value to search for to $needle. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 17:11:40
|
Revision: 9270 http://sourceforge.net/p/phpwiki/code/9270 Author: vargenau Date: 2014-10-15 17:11:30 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Update translations Modified Paths: -------------- trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/de.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -4617,10 +4617,6 @@ msgstr "%s: Ungültiger Index in Array" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "Konnte Verzeichnis »%s« nicht zum Lesen öffnen" - -#, php-format msgid "... (first %s words)" msgstr "... (erste %s Wörter)" @@ -6045,6 +6041,9 @@ msgid "Edit this page" msgstr "Diese Seite bearbeiten" +#~ msgid "Unable to open directory “%s” for reading" +#~ msgstr "Konnte Verzeichnis »%s« nicht zum Lesen öffnen" + #~ msgid "Can't inflate data: zlib support not enabled in this PHP" #~ msgstr "" #~ "Kann Daten nicht dekomprimieren: Die zlib-Bibliothek wurde in PHP nicht " Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/es.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -4492,10 +4492,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/fr.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -4558,10 +4558,6 @@ msgstr "%s : index d'argument hors intervalle" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "Impossible d'ouvrir le répertoire « %s » en lecture" - -#, php-format msgid "... (first %s words)" msgstr "... (%s premiers mots)" @@ -5959,6 +5955,9 @@ msgid "Edit this page" msgstr "Modifier cette page" +#~ msgid "Unable to open directory “%s” for reading" +#~ msgstr "Impossible d'ouvrir le répertoire « %s » en lecture" + #~ msgid "No file selected. Please select one." #~ msgstr "Pas de fichier sélectionné. Merci d'en sélectionner un." Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/it.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -4457,10 +4457,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/ja.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -4595,10 +4595,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/nl.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -4449,10 +4449,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/phpwiki.pot 2014-10-15 17:11:30 UTC (rev 9270) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -4441,10 +4441,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/sv.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -4442,10 +4442,6 @@ msgstr "" #, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "" - -#, php-format msgid "... (first %s words)" msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-10-15 17:08:55 UTC (rev 9269) +++ trunk/locale/po/zh.po 2014-10-15 17:11:30 UTC (rev 9270) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-15 15:12+0200\n" +"POT-Creation-Date: 2014-10-15 19:10+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -4674,10 +4674,6 @@ msgid "%s: argument index out of range" msgstr "%s: 引數索引超出範圍" -#, php-format -msgid "Unable to open directory “%s” for reading" -msgstr "無法開啟目錄 “%s” 進行讀取" - #, fuzzy, php-format msgid "... (first %s words)" msgstr "... 頭 %d 個字" @@ -6116,6 +6112,9 @@ msgid "Edit this page" msgstr "編輯此頁面" +#~ msgid "Unable to open directory “%s” for reading" +#~ msgstr "無法開啟目錄 “%s” 進行讀取" + #~ msgid "Can't inflate data: zlib support not enabled in this PHP" #~ msgstr "無法壓縮資料: 此 PHP 的 zlib 支援未被啟動" Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 17:08:58
|
Revision: 9269 http://sourceforge.net/p/phpwiki/code/9269 Author: vargenau Date: 2014-10-15 17:08:55 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Revert __construct Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/themes/Sidebar/themeinfo.php trunk/themes/blog/themeinfo.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-10-15 16:14:43 UTC (rev 9268) +++ trunk/lib/WikiTheme.php 2014-10-15 17:08:55 UTC (rev 9269) @@ -189,7 +189,7 @@ /** * noinit: Do not initialize unnecessary items in default_theme fallback twice. */ - function __construct($theme_name = 'default', $noinit = false) + function WikiTheme($theme_name = 'default', $noinit = false) { $this->_name = $theme_name; $this->_themes_dir = NormalizeLocalFileName("themes"); @@ -1690,7 +1690,7 @@ * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. */ - function __construct($text, $url, $class = '', $options = array()) + function Button($text, $url, $class = '', $options = array()) { global $request; $this->_init('a', array('href' => $url)); @@ -1723,9 +1723,9 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function __construct($text, $url, $class, $img_url, $img_attr = array()) + function ImageButton($text, $url, $class, $img_url, $img_attr = array()) { - parent::__construct('a', array('href' => $url)); + $this->__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this @@ -1755,9 +1755,9 @@ * @param $class string The CSS class for the button. * @param $options array Additional attributes for the <input> tag. */ - function __construct($text, $name = '', $class = '', $options = array()) + function SubmitButton($text, $name = '', $class = '', $options = array()) { - parent::__construct('input', array('type' => 'submit', 'value' => $text)); + $this->__construct('input', array('type' => 'submit', 'value' => $text)); if ($name) $this->setAttr('name', $name); if ($class) @@ -1783,9 +1783,9 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) + function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) { - parent::__construct('input', array('type' => 'image', + $this->__construct('input', array('type' => 'image', 'src' => $img_url, 'alt' => $text)); if ($name) @@ -1816,7 +1816,7 @@ class SidebarBox { - function __construct($title, $body) + function SidebarBox($title, $body) { require_once 'lib/WikiPlugin.php'; $this->title = $title; @@ -1839,7 +1839,7 @@ public $_plugin, $_args = false, $_basepage = false; - function __construct($name, $args = false, $basepage = false) + function PluginSidebarBox($name, $args = false, $basepage = false) { require_once 'lib/WikiPlugin.php'; @@ -1865,7 +1865,7 @@ // Various boxes which are no plugins class RelatedLinksBox extends SidebarBox { - function __construct($title = false, $body = '', $limit = 20) + function RelatedLinksBox($title = false, $body = '', $limit = 20) { global $request; $this->title = $title ? $title : _("Related Links"); @@ -1888,7 +1888,7 @@ class RelatedExternalLinksBox extends SidebarBox { - function __construct($title = false, $body = '', $limit = 20) + function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) { global $request; $this->title = $title ? $title : _("External Links"); Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2014-10-15 16:14:43 UTC (rev 9268) +++ trunk/themes/Sidebar/themeinfo.php 2014-10-15 17:08:55 UTC (rev 9269) @@ -36,7 +36,7 @@ function __construct($theme_name = 'Sidebar') { - parent::__construct($theme_name); + $this->WikiTheme($theme_name); //$this->calendarInit(true); } Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2014-10-15 16:14:43 UTC (rev 9268) +++ trunk/themes/blog/themeinfo.php 2014-10-15 17:08:55 UTC (rev 9269) @@ -48,7 +48,7 @@ function __construct($theme_name = 'blog') { - parent::__construct($theme_name); + $this->WikiTheme($theme_name); $this->calendarInit(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 16:14:51
|
Revision: 9268 http://sourceforge.net/p/phpwiki/code/9268 Author: vargenau Date: 2014-10-15 16:14:43 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Revert __construct; remove unused class ListRegexExpand Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-15 16:14:03 UTC (rev 9267) +++ trunk/lib/stdlib.php 2014-10-15 16:14:43 UTC (rev 9268) @@ -56,8 +56,6 @@ sort_file_mtime ($a, $b) class fileSet {fileSet($directory, $filepattern = false), getFiles($exclude='', $sortby='', $limit='') } - class ListRegexExpand { listMatchCallback($item, $key), - expandRegex ($index, &$pages) } glob_to_pcre ($glob) glob_match ($glob, $against, $case_sensitive = true) @@ -668,7 +666,7 @@ class Stack { - function __construct() + function Stack() { $this->items = array(); $this->size = 0; @@ -1349,7 +1347,7 @@ class fileSet { - function __construct($directory, $filepattern = false) + function fileSet($directory, $filepattern = false) { $this->_fileList = array(); $this->_pattern = $filepattern; @@ -1359,11 +1357,11 @@ $this->_case = !isWindows(); $this->_pathsep = '/'; - if (empty($directory)) { + if (empty($directory) or !file_exists($directory) or !is_dir($directory)) { return; // early return } - @$dir_handle = opendir($dir = $directory); + $dir_handle = opendir($dir = $directory); if (empty($dir_handle)) { return; // early return } @@ -1424,40 +1422,6 @@ } } -// File globbing - -// expands a list containing regex's to its matching entries -class ListRegexExpand -{ - public $match, $list, $index, $case_sensitive; - - function __construct(&$list, $match, $case_sensitive = true) - { - $this->match = $match; - $this->list = &$list; - $this->case_sensitive = $case_sensitive; - //$this->index = false; - } - - function listMatchCallback($item, $key) - { - $quoted = str_replace('/', '\/', $item); - if (preg_match('/' . $this->match . ($this->case_sensitive ? '/' : '/i'), - $quoted) - ) { - unset($this->list[$this->index]); - $this->list[] = $item; - } - } - - function expandRegex($index, &$pages) - { - $this->index = $index; - array_walk($pages, array($this, 'listMatchCallback')); - return $this->list; - } -} - // Convert fileglob to regex style: // Convert some wildcards to pcre style, escape the rest // Escape . \\ + * ? [ ^ ] $ ( ) { } = ! < > | : / This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 16:14:06
|
Revision: 9267 http://sourceforge.net/p/phpwiki/code/9267 Author: vargenau Date: 2014-10-15 16:14:03 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Check getUploadFilePath exists to avoid warning Modified Paths: -------------- trunk/lib/EditToolbar.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2014-10-15 14:48:34 UTC (rev 9266) +++ trunk/lib/EditToolbar.php 2014-10-15 16:14:03 UTC (rev 9267) @@ -94,7 +94,9 @@ $key .= "+templates_" . $dbi->getTimestamp(); } if (TOOLBAR_IMAGE_PULLDOWN) { - $key .= "+images_" . filemtime(getUploadFilePath()); + if (file_exists(getUploadFilePath())) { + $key .= "+images_" . filemtime(getUploadFilePath()); + } } $id = $cache->generateId($key); $content = $cache->get($id, 'toolbarcache'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 14:48:37
|
Revision: 9266 http://sourceforge.net/p/phpwiki/code/9266 Author: vargenau Date: 2014-10-15 14:48:34 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Use __construct; avoid trigger_error Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-15 13:14:10 UTC (rev 9265) +++ trunk/lib/stdlib.php 2014-10-15 14:48:34 UTC (rev 9266) @@ -668,7 +668,7 @@ class Stack { - function Stack() + function __construct() { $this->items = array(); $this->size = 0; @@ -1349,6 +1349,35 @@ class fileSet { + function __construct($directory, $filepattern = false) + { + $this->_fileList = array(); + $this->_pattern = $filepattern; + if ($filepattern) { + $this->_pcre_pattern = glob_to_pcre($this->_pattern); + } + $this->_case = !isWindows(); + $this->_pathsep = '/'; + + if (empty($directory)) { + return; // early return + } + + @$dir_handle = opendir($dir = $directory); + if (empty($dir_handle)) { + return; // early return + } + + while ($filename = readdir($dir_handle)) { + if ($filename[0] == '.' || filetype($dir . $this->_pathsep . $filename) != 'file') + continue; + if ($this->_filenameSelector($filename)) { + array_push($this->_fileList, "$filename"); + } + } + closedir($dir_handle); + } + /** * Build an array in $this->_fileList of files from $dirname. * Subdirectories are not traversed. @@ -1393,41 +1422,6 @@ $filename); } } - - function fileSet($directory, $filepattern = false) - { - $this->_fileList = array(); - $this->_pattern = $filepattern; - if ($filepattern) { - $this->_pcre_pattern = glob_to_pcre($this->_pattern); - } - $this->_case = !isWindows(); - $this->_pathsep = '/'; - - if (empty($directory)) { - trigger_error(sprintf(_("%s is empty."), 'directoryname'), - E_USER_NOTICE); - return; // early return - } - - @ $dir_handle = opendir($dir = $directory); - if (empty($dir_handle)) { - trigger_error(sprintf(_("Unable to open directory “%s” for reading"), - $dir), E_USER_NOTICE); - return; // early return - } - - while ($filename = readdir($dir_handle)) { - if ($filename[0] == '.' || filetype($dir . $this->_pathsep . $filename) != 'file') - continue; - if ($this->_filenameSelector($filename)) { - array_push($this->_fileList, "$filename"); - //trigger_error(sprintf(_("found file %s"), $filename), - // E_USER_NOTICE); //debugging - } - } - closedir($dir_handle); - } } // File globbing @@ -1436,7 +1430,8 @@ class ListRegexExpand { public $match, $list, $index, $case_sensitive; - function ListRegexExpand(&$list, $match, $case_sensitive = true) + + function __construct(&$list, $match, $case_sensitive = true) { $this->match = $match; $this->list = &$list; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 13:14:18
|
Revision: 9265 http://sourceforge.net/p/phpwiki/code/9265 Author: vargenau Date: 2014-10-15 13:14:10 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Update translations Modified Paths: -------------- trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/de.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -3228,6 +3228,18 @@ "ZUGRIFF VERWEIGERT: Bitte melden Sie sich erst an, um Dateien hochzuladen." #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, fuzzy, php-format +msgid "Cannot create upload directory “%s”." +msgstr "Das Verzeichnis »%s« kann nicht erzeugt werden" + +#, fuzzy, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "%s is nicht änderbar." + +#, php-format msgid "Error uploading “%s”" msgstr "FEHLER beim Hochladen von »%s«" @@ -3263,9 +3275,6 @@ msgid "Uploading failed." msgstr "Hochladen fehlgeschlagen." -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "Die Upload Logdatei ist nicht schreibbar." Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/es.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -3136,6 +3136,18 @@ msgstr "" #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, fuzzy, php-format +msgid "Cannot create upload directory “%s”." +msgstr "No puede crear el directorio “%s”" + +#, fuzzy, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "%s no es escribible." + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3169,9 +3181,6 @@ msgid "Uploading failed." msgstr "" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/fr.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -3175,6 +3175,18 @@ msgstr "ACCÈS REFUSÉ : Vous devez être connecté pour télécharger." #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "Impossible de télécharger, « %s » n'est pas un répertoire." + +#, php-format +msgid "Cannot create upload directory “%s”." +msgstr "Impossible de créer le répertoire de téléchargement « %s »." + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "Impossible de télécharger, « %s » n'est pas modifiable." + +#, php-format msgid "Error uploading “%s”" msgstr "Erreur en déposant « %s »" @@ -3184,12 +3196,14 @@ #, php-format msgid "Only files with the extension %s are allowed." -msgstr "" +msgstr "Seuls les fichiers avec les extensions %s sont autorisés." msgid "" "Invalid filename. File names may only contain alphanumeric characters and " "dot, underscore, space or dash." msgstr "" +"Nom de fichier incorrect. Les noms de fichiers sont formés de lettres, " +"chiffres, points, blancs soulignés, espaces ou tirets." #, php-format msgid "There is already a file with name “%s” uploaded." @@ -3208,9 +3222,6 @@ msgid "Uploading failed." msgstr "Le téléchargement a échoué." -msgid "No file selected. Please select one." -msgstr "Pas de fichier sélectionné. Merci d'en sélectionner un." - msgid "The upload logfile exists but is not writable." msgstr "Le journal des dépôts existe mais ne peut être modifié." @@ -3225,6 +3236,8 @@ msgid "Error: You are not logged in, cannot display UserPreferences." msgstr "" +"Erreur : vous n'êtes pas identifié, il n'est pas possible d'afficher les " +"préférences." msgid "" "Error: The user HomePage must be a valid WikiWord. Sorry, UserPreferences " @@ -5946,6 +5959,9 @@ msgid "Edit this page" msgstr "Modifier cette page" +#~ msgid "No file selected. Please select one." +#~ msgstr "Pas de fichier sélectionné. Merci d'en sélectionner un." + #~ msgid "This plugin has no description." #~ msgstr "Ce greffon n'a pas de description." Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/it.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -3109,6 +3109,18 @@ msgstr "" #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, php-format +msgid "Cannot create upload directory “%s”." +msgstr "" + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "" + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3142,9 +3154,6 @@ msgid "Uploading failed." msgstr "" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/ja.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -3149,7 +3149,19 @@ msgid "ACCESS DENIED: You must log in to upload files." msgstr "" +#, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + #, fuzzy, php-format +msgid "Cannot create upload directory “%s”." +msgstr "ディレクトリ “%s” を作成出来ません。" + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "" + +#, fuzzy, php-format msgid "Error uploading “%s”" msgstr "“%s” を読込み中です。" @@ -3184,9 +3196,6 @@ msgid "Uploading failed." msgstr "ファイルを読込み中です。" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/nl.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -3101,6 +3101,18 @@ msgstr "" #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, php-format +msgid "Cannot create upload directory “%s”." +msgstr "" + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "" + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3134,9 +3146,6 @@ msgid "Uploading failed." msgstr "" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/phpwiki.pot 2014-10-15 13:14:10 UTC (rev 9265) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -3093,6 +3093,18 @@ msgstr "" #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, php-format +msgid "Cannot create upload directory “%s”." +msgstr "" + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "" + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3126,9 +3138,6 @@ msgid "Uploading failed." msgstr "" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/sv.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -3094,6 +3094,18 @@ msgstr "" #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, php-format +msgid "Cannot create upload directory “%s”." +msgstr "" + +#, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "" + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3127,9 +3139,6 @@ msgid "Uploading failed." msgstr "" -msgid "No file selected. Please select one." -msgstr "" - msgid "The upload logfile exists but is not writable." msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-10-15 12:36:30 UTC (rev 9264) +++ trunk/locale/po/zh.po 2014-10-15 13:14:10 UTC (rev 9265) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-10 10:22+0200\n" +"POT-Creation-Date: 2014-10-15 15:12+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -3226,6 +3226,18 @@ msgstr "拒絕存取: 請先登入才能上傳檔案." #, php-format +msgid "Cannot upload, “%s” is not a directory." +msgstr "" + +#, fuzzy, php-format +msgid "Cannot create upload directory “%s”." +msgstr "無法建立目錄 “%s”" + +#, fuzzy, php-format +msgid "Cannot upload, “%s” is not writable." +msgstr "%s 無法寫入." + +#, php-format msgid "Error uploading “%s”" msgstr "" @@ -3260,9 +3272,6 @@ msgid "Uploading failed." msgstr "上傳失敗." -msgid "No file selected. Please select one." -msgstr "" - #, fuzzy msgid "The upload logfile exists but is not writable." msgstr "錯誤: 上傳日誌無法寫入." Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 12:36:34
|
Revision: 9264 http://sourceforge.net/p/phpwiki/code/9264 Author: vargenau Date: 2014-10-15 12:36:30 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Update comment Modified Paths: -------------- trunk/lib/EditToolbar.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2014-10-15 12:19:31 UTC (rev 9263) +++ trunk/lib/EditToolbar.php 2014-10-15 12:36:30 UTC (rev 9264) @@ -84,7 +84,7 @@ require_once 'lib/WikiPluginCached.php'; $cache = WikiPluginCached::newCache(); $dbi = $GLOBALS['request']->getDbh(); - // regenerate if number of pages changes (categories, pages, templates) + // regenerate if number of pages changes (categories, pages, templates, images uploaded) $key = $dbi->numPages(); $key .= '+categories+plugin' . (isBrowserSafari() ? '+safari' : ''); if (TOOLBAR_PAGELINK_PULLDOWN) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-15 12:19:34
|
Revision: 9263 http://sourceforge.net/p/phpwiki/code/9263 Author: vargenau Date: 2014-10-15 12:19:31 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Regenerate toolbar cache when a new image was uploaded Modified Paths: -------------- trunk/lib/EditToolbar.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2014-10-15 09:10:49 UTC (rev 9262) +++ trunk/lib/EditToolbar.php 2014-10-15 12:19:31 UTC (rev 9263) @@ -93,6 +93,9 @@ if (TOOLBAR_TEMPLATE_PULLDOWN) { $key .= "+templates_" . $dbi->getTimestamp(); } + if (TOOLBAR_IMAGE_PULLDOWN) { + $key .= "+images_" . filemtime(getUploadFilePath()); + } $id = $cache->generateId($key); $content = $cache->get($id, 'toolbarcache'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |