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: <ru...@us...> - 2010-06-23 19:43:52
|
Revision: 7566 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7566&view=rev Author: rurban Date: 2010-06-23 19:43:46 +0000 (Wed, 23 Jun 2010) Log Message: ----------- undo deletions r7561 and r7563. we need that Modified Paths: -------------- trunk/lib/MailNotify.php trunk/lib/WikiTheme.php Property Changed: ---------------- trunk/g trunk/pgsrc/Help%2FGoogleLink trunk/pgsrc/Help%2FIncludeTreePlugin trunk/pgsrc/Help%2FInterWiki trunk/pgsrc/Help%2FPhpWiki trunk/pgsrc/Help%2FWikiWikiWeb trunk/themes/default/flowplayer-3.1.4.swf trunk/themes/default/flowplayer.controls-3.1.4.swf Property changes on: trunk/g ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2010-06-23 15:43:24 UTC (rev 7565) +++ trunk/lib/MailNotify.php 2010-06-23 19:43:46 UTC (rev 7566) @@ -364,6 +364,79 @@ } } + /** + * Send mail to user and store the cookie in the db + * wikiurl?action=ConfirmEmail&id=bla + */ + function sendEmailConfirmation ($email, $userid) { + $id = rand_ascii_readable(16); + $wikidb = $GLOBALS['request']->getDbh(); + $data = $wikidb->get('ConfirmEmail'); + while(!empty($data[$id])) { // id collision + $id = rand_ascii_readable(16); + } + $subject = _("E-Mail address confirmation"); + $ip = $request->get('REMOTE_HOST'); + $expire_date = time() + 7*86400; + $content = fmt("Someone, probably you from IP address %s, has registered an +account \"%s\" with this e-mail address on %s. + +To confirm that this account really does belong to you and activate +e-mail features on %s, open this link in your browser: + +%s + +If this is *not* you, don't follow the link. This confirmation code +will expire at %s.", + $ip, $userid, WIKI_NAME, WIKI_NAME, + WikiURL(HOME_PAGE, array('action' => 'ConfirmEmail', + 'id' => $id), + true), + CTime($expire_date)); + $this->sendMail($subject, $content, "", true); + $data[$id] = array('email' => $email, + 'userid' => $userid, + 'expire' => $expire_date); + $wikidb->set('ConfirmEmail', $data); + return ''; + } + + function checkEmailConfirmation () { + global $request; + $wikidb = $request->getDbh(); + $data = $wikidb->get('ConfirmEmail'); + $id = $request->getArg('id'); + if (empty($data[$id])) { // id not found + return HTML(HTML::h1("Confirm E-mail address"), + HTML::h1("Sorry! Wrong URL")); + } + // upgrade the user + $userid = $data['userid']; + $email = $data['email']; + $u = $request->getUser(); + if ($u->UserName() == $userid) { // lucky: current user (session) + $prefs = $u->getPreferences(); + $request->_user->_level = WIKIAUTH_USER; + $request->_prefs->set('emailVerified', true); + } else { // not current user + if (ENABLE_USER_NEW) { + $u = WikiUser($userid); + $u->getPreferences(); + $prefs = &$u->_prefs; + } else { + $u = new WikiUser($request, $userid); + $prefs = $u->getPreferences(); + } + $u->_level = WIKIAUTH_USER; + $request->setUser($u); + $request->_prefs->set('emailVerified', true); + } + unset($data[$id]); + $wikidb->set('ConfirmEmail', $data); + return HTML(HTML::h1("Confirm E-mail address"), + HTML::p("Your e-mail address has now been confirmed.")); + } + function subject_encode ($subject) { // We need to encode the subject if it contains non-ASCII characters // The page name may contain non-ASCII characters, as well as Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2010-06-23 15:43:24 UTC (rev 7565) +++ trunk/lib/WikiTheme.php 2010-06-23 19:43:46 UTC (rev 7566) @@ -696,6 +696,7 @@ // //////////////////////////////////////////////////////////////// var $_imageAliases = array(); + var $_imageAlt = array(); /** * @@ -709,6 +710,13 @@ $this->_imageAliases[$alias] = $image_name; } + function addImageAlt ($alias, $alt_text) { + $this->_imageAlt[$alias] = $alt_text; + } + function getImageAlt ($alias) { + return $this->_imageAlt[$alias]; + } + function getImageURL ($image) { $aliases = &$this->_imageAliases; @@ -1515,6 +1523,11 @@ } } + function calendarLink($date = false) { + return $this->calendarBase() . SUBPAGE_SEPARATOR . + strftime("%Y-%m-%d", $date ? $date : time()); + } + function calendarBase() { static $UserCalPageTitle = false; global $request; Property changes on: trunk/pgsrc/Help%2FGoogleLink ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/pgsrc/Help%2FIncludeTreePlugin ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/pgsrc/Help%2FInterWiki ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/pgsrc/Help%2FPhpWiki ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/pgsrc/Help%2FWikiWikiWeb ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/themes/default/flowplayer-3.1.4.swf ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: trunk/themes/default/flowplayer.controls-3.1.4.swf ___________________________________________________________________ Deleted: svn:mergeinfo - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:43:30
|
Revision: 7565 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7565&view=rev Author: vargenau Date: 2010-06-23 15:43:24 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused function fixThemeTemplate Modified Paths: -------------- trunk/lib/upgrade.php Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2010-06-23 15:42:31 UTC (rev 7564) +++ trunk/lib/upgrade.php 2010-06-23 15:43:24 UTC (rev 7565) @@ -1204,29 +1204,6 @@ $replace = $args[1]; $template = $args[2]; } - - function fixThemeTemplate($match, $new, $template) { - // for all custom themes - $ourthemes = explode(":","blog:Crao:default:Hawaiian:MacOSX:MonoBook:Portland:shamino_com:SpaceWiki:wikilens:Wordpress"); - $themedir = NormalizeLocalFileName("themes"); - $dh = opendir($themedir); - while ($r = readdir($dh)) { - if (filetype($r) == 'dir' and $r[0] != '.' and !is_array($r, $ourthemes)) - $customthemes[] = $r; - } - $success = true; - $errors = ''; - foreach ($customthemes as $customtheme) { - $template = FindFile("themes/$customtheme/templates/$template"); - $do = $this->parent->fixLocalFile($match, $new, template); - if (!$do[0]) { - $success = false; - $errors .= $do[1]." "; - echo $do[1]; - } - } - return array($success, $errors); - } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:42:37
|
Revision: 7564 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7564&view=rev Author: vargenau Date: 2010-06-23 15:42:31 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused function can Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2010-06-23 15:37:35 UTC (rev 7563) +++ trunk/lib/stdlib.php 2010-06-23 15:42:31 UTC (rev 7564) @@ -1746,16 +1746,6 @@ || is_subclass_of($object, $lclass) ); } -/** Determine whether (possible) object has method. - * - * @param $object mixed Object - * @param $method string Method name - * @return bool True iff $object is an object with has method $method. - */ -function can ($object, $method) { - return is_object($object) && method_exists($object, strtolower($method)); -} - /** Determine whether a function is okay to use. * * Some providers (e.g. Lycos) disable some of PHP functions for This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:37:41
|
Revision: 7563 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7563&view=rev Author: vargenau Date: 2010-06-23 15:37:35 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused functions addImageAlt, getImageAlt, calendarLink Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2010-06-23 15:31:48 UTC (rev 7562) +++ trunk/lib/WikiTheme.php 2010-06-23 15:37:35 UTC (rev 7563) @@ -696,7 +696,6 @@ // //////////////////////////////////////////////////////////////// var $_imageAliases = array(); - var $_imageAlt = array(); /** * @@ -710,13 +709,6 @@ $this->_imageAliases[$alias] = $image_name; } - function addImageAlt ($alias, $alt_text) { - $this->_imageAlt[$alias] = $alt_text; - } - function getImageAlt ($alias) { - return $this->_imageAlt[$alias]; - } - function getImageURL ($image) { $aliases = &$this->_imageAliases; @@ -1523,11 +1515,6 @@ } } - function calendarLink($date = false) { - return $this->calendarBase() . SUBPAGE_SEPARATOR . - strftime("%Y-%m-%d", $date ? $date : time()); - } - function calendarBase() { static $UserCalPageTitle = false; global $request; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:31:55
|
Revision: 7562 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7562&view=rev Author: vargenau Date: 2010-06-23 15:31:48 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused function gensym Modified Paths: -------------- trunk/lib/plugin/SystemInfo.php Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2010-06-23 15:09:13 UTC (rev 7561) +++ trunk/lib/plugin/SystemInfo.php 2010-06-23 15:31:48 UTC (rev 7562) @@ -549,12 +549,6 @@ $total = array_reduce($hits, 'rsum'); return (float) $total / ($n * 1.0); } -function gensym($prefix = "_gensym") { - $i = 0; - while (isset($GLOBALS[$prefix . $i])) - $i++; - return $prefix . $i; -} function stddev(&$hits, $total = false) { $n = count($hits); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 15:09:19
|
Revision: 7561 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7561&view=rev Author: vargenau Date: 2010-06-23 15:09:13 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Remove unused functions sendEmailConfirmation checkEmailConfirmation Modified Paths: -------------- trunk/lib/MailNotify.php Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2010-06-23 14:43:29 UTC (rev 7560) +++ trunk/lib/MailNotify.php 2010-06-23 15:09:13 UTC (rev 7561) @@ -364,79 +364,6 @@ } } - /** - * Send mail to user and store the cookie in the db - * wikiurl?action=ConfirmEmail&id=bla - */ - function sendEmailConfirmation ($email, $userid) { - $id = rand_ascii_readable(16); - $wikidb = $GLOBALS['request']->getDbh(); - $data = $wikidb->get('ConfirmEmail'); - while(!empty($data[$id])) { // id collision - $id = rand_ascii_readable(16); - } - $subject = _("E-Mail address confirmation"); - $ip = $request->get('REMOTE_HOST'); - $expire_date = time() + 7*86400; - $content = fmt("Someone, probably you from IP address %s, has registered an -account \"%s\" with this e-mail address on %s. - -To confirm that this account really does belong to you and activate -e-mail features on %s, open this link in your browser: - -%s - -If this is *not* you, don't follow the link. This confirmation code -will expire at %s.", - $ip, $userid, WIKI_NAME, WIKI_NAME, - WikiURL(HOME_PAGE, array('action' => 'ConfirmEmail', - 'id' => $id), - true), - CTime($expire_date)); - $this->sendMail($subject, $content, "", true); - $data[$id] = array('email' => $email, - 'userid' => $userid, - 'expire' => $expire_date); - $wikidb->set('ConfirmEmail', $data); - return ''; - } - - function checkEmailConfirmation () { - global $request; - $wikidb = $request->getDbh(); - $data = $wikidb->get('ConfirmEmail'); - $id = $request->getArg('id'); - if (empty($data[$id])) { // id not found - return HTML(HTML::h1("Confirm E-mail address"), - HTML::h1("Sorry! Wrong URL")); - } - // upgrade the user - $userid = $data['userid']; - $email = $data['email']; - $u = $request->getUser(); - if ($u->UserName() == $userid) { // lucky: current user (session) - $prefs = $u->getPreferences(); - $request->_user->_level = WIKIAUTH_USER; - $request->_prefs->set('emailVerified', true); - } else { // not current user - if (ENABLE_USER_NEW) { - $u = WikiUser($userid); - $u->getPreferences(); - $prefs = &$u->_prefs; - } else { - $u = new WikiUser($request, $userid); - $prefs = $u->getPreferences(); - } - $u->_level = WIKIAUTH_USER; - $request->setUser($u); - $request->_prefs->set('emailVerified', true); - } - unset($data[$id]); - $wikidb->set('ConfirmEmail', $data); - return HTML(HTML::h1("Confirm E-mail address"), - HTML::p("Your e-mail address has now been confirmed.")); - } - function subject_encode ($subject) { // We need to encode the subject if it contains non-ASCII characters // The page name may contain non-ASCII characters, as well as This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 14:43:35
|
Revision: 7560 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7560&view=rev Author: vargenau Date: 2010-06-23 14:43:29 +0000 (Wed, 23 Jun 2010) Log Message: ----------- Better header Modified Paths: -------------- trunk/wikiadmin.php Modified: trunk/wikiadmin.php =================================================================== --- trunk/wikiadmin.php 2010-06-23 14:26:54 UTC (rev 7559) +++ trunk/wikiadmin.php 2010-06-23 14:43:29 UTC (rev 7560) @@ -1,7 +1,7 @@ <?php // -*-php-*- $Id$ /* * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent - * Copyright (C) 2009 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -122,7 +122,7 @@ } //only project admin can access here if ( $userperm->isAdmin() ) { - wiki_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id)))); + wiki_Project_Header(array('title'=>"Configuration for your project's Wiki",'pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id)))); $wc = new WikiConfig($id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-23 14:27:00
|
Revision: 7559 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7559&view=rev Author: vargenau Date: 2010-06-23 14:26:54 +0000 (Wed, 23 Jun 2010) Log Message: ----------- In Gforge, anon users can see ratings but cannot rate Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-06-23 13:39:18 UTC (rev 7558) +++ trunk/lib/PageList.php 2010-06-23 14:26:54 UTC (rev 7559) @@ -1,7 +1,7 @@ <?php //rcs_id('$Id$'); /* Copyright (C) 2004-2010 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -1302,10 +1302,13 @@ trigger_error(sprintf("%s: Bad column", $column), E_USER_NOTICE); return false; } - // FIXME: anon users might rate and see ratings also. - // Defer this logic to the plugin. - if ($column == 'rating' and !$GLOBALS['request']->_user->isSignedIn()) - return false; + if (!GFORGE) { + // FIXME: anon users might rate and see ratings also. + // Defer this logic to the plugin. + if ($column == 'rating' and !$GLOBALS['request']->_user->isSignedIn()) { + return false; + } + } $this->addColumnObject($this->_types[$column]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-23 13:39:27
|
Revision: 7558 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7558&view=rev Author: rurban Date: 2010-06-23 13:39:18 +0000 (Wed, 23 Jun 2010) Log Message: ----------- protect from slice warnings Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-06-23 13:13:40 UTC (rev 7557) +++ trunk/lib/PageList.php 2010-06-23 13:39:18 UTC (rev 7558) @@ -1605,9 +1605,9 @@ } } - if (!empty($this->_options['limit']) and $this->_options['slice']) + if (!empty($this->_options['limit']) and !empty($this->_options['slice'])) { list($offset, $count) = $this->limit($this->_options['limit']); - else { + } else { $offset = 0; $count = count($this->_pages); } // need a recursive switch here for the azhead and cols grouping. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-23 13:13:45
|
Revision: 7557 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7557&view=rev Author: rurban Date: 2010-06-23 13:13:40 +0000 (Wed, 23 Jun 2010) Log Message: ----------- activate FacebookLike Modified Paths: -------------- trunk/lib/IniConfig.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2010-06-23 13:13:12 UTC (rev 7556) +++ trunk/lib/IniConfig.php 2010-06-23 13:13:40 UTC (rev 7557) @@ -657,6 +657,7 @@ $AllAllowedPlugins[] = 'Diff'; $AllAllowedPlugins[] = 'DynamicIncludePage'; $AllAllowedPlugins[] = 'ExternalSearch'; + $AllAllowedPlugins[] = 'FacebookLike'; $AllAllowedPlugins[] = 'FileInfo'; $AllAllowedPlugins[] = 'GoogleMaps'; $AllAllowedPlugins[] = 'GooglePlugin'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-23 13:13:20
|
Revision: 7556 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7556&view=rev Author: rurban Date: 2010-06-23 13:13:12 +0000 (Wed, 23 Jun 2010) Log Message: ----------- update current developers Modified Paths: -------------- trunk/doc/CREDITS Modified: trunk/doc/CREDITS =================================================================== --- trunk/doc/CREDITS 2010-06-23 13:12:23 UTC (rev 7555) +++ trunk/doc/CREDITS 2010-06-23 13:13:12 UTC (rev 7556) @@ -2,31 +2,42 @@ Please report bugs to mailto:php...@li... -! Core team +! Administrators ;[ Steve Wainstead | mailto:sw...@pa... ] : ;: Original author -;: Chief in charge +;: Inactive chief in charge ;[ Jeff Dairiki | mailto:da...@da... ] : -;: Did a complete rewrite of PhpWiki using PHP classes. +;: Did a complete rewrite of phpwiki-1.3 using PHP classes. +;: Inactive ;[ Reini Urban | mailto:ru...@x-... ] : ;: Maintainance for the 1.2.x series since 1.2.4 and 1.3.x since 1.3.8 -;: External auth, ACL, DbSession, ... +;: Current chief in charge. External auth, ACL, DbSession, ... ;[ CarstenKlapp | PhpWiki:CarstenKlapp ] : ;: Maintainance for 1.3.4 - 1.3.7 and the MacOSX theme. +;: Inactive ! Developers +;[ Marc-Etienne Vargenau | mailto:var...@us... ] : +;: Chief of gforge integration, WikiCreole integration, +;: html conformity, documentation, ... + +;Sabri Labbenes +;: Wikiwyg + ;[ Arno Hollosi | mailto:aho...@ma... ] : ;: Wrote the MySQL library, the templates, and the database schema ;: plus many other things too numerous to mention, up to 1.2.x +;: Inactive ;[Joel Uckelman | mailto:uck...@no... ] : ;: Ported the dbmlib.php to the new dba_* interface, which is the default ;: in PHP 4.0.4 and later. +;: Inactive ;[ Dan Frankowski | http://wikilens.org ] : ;: Initiated and maintains the wikilens lib and project ("rating system"), @@ -37,6 +48,7 @@ ; Lawrence Akka : ;: Added ADODB support, OrphanedPages, XmlRpc Interface, RSS, ... +;: Inactive (=> wakkawiki) ; Pierrick Meignen ;: French localization, several patches, TeX2png plugin @@ -121,6 +133,8 @@ ! Contributors since 1.3.x: +; Sébastien Le Callonnec (AtomFeed, and more) +; Jean-Nicolas Gereone (Wikiwyg) ; Philippe Vanhaesendonck (oracle backend, several patches) ; Matt Palmer (debian package maintainer, sqlite, IniConfig) ; Renat Lumpau (gentoo package maintainer) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-23 13:12:30
|
Revision: 7555 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7555&view=rev Author: rurban Date: 2010-06-23 13:12:23 +0000 (Wed, 23 Jun 2010) Log Message: ----------- add wikilens to theme search path, and not double Modified Paths: -------------- trunk/lib/plugin/RateIt.php trunk/themes/Sidebar/templates/top.tmpl trunk/themes/Sidebar/themeinfo.php Modified: trunk/lib/plugin/RateIt.php =================================================================== --- trunk/lib/plugin/RateIt.php 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/lib/plugin/RateIt.php 2010-06-23 13:12:23 UTC (rev 7555) @@ -138,6 +138,9 @@ function head() { // early side-effects (before body) global $WikiTheme; + static $_already; + if (!empty($_already)) return; + $_already = 1; $WikiTheme->addMoreHeaders(JavaScript( "var prediction = new Array; var rating = new Array; var avg = new Array; var numusers = new Array; Modified: trunk/themes/Sidebar/templates/top.tmpl =================================================================== --- trunk/themes/Sidebar/templates/top.tmpl 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/themes/Sidebar/templates/top.tmpl 2010-06-23 13:12:23 UTC (rev 7555) @@ -1,6 +1,13 @@ <?php // -*-php-*- // rcs_id('$Id$'); -if (ENABLE_RATEIT && !empty($user) && $user->isAuthenticated() && $page->exists()) +$pagename = $page->getName(); +$isActionPage = isActionPage($pagename); +if (ENABLE_PAGE_PUBLIC) + $public = $page->get('public'); +else + $public = false; +if (ENABLE_RATEIT && !empty($user) && $user->isAuthenticated() + && $page->exists() && !$isActionPage && !$WikiTheme->DUMP_MODE) $rating = 1; else $rating = 0; @@ -8,7 +15,7 @@ <!-- Page title --> <a name="top" id="contentTop"></a> <?php if ($page->_pagename != "HomePage") { ?> -<h1 class="firstHeading<?= $rating ? '-rating' : '' ?>"><?= $HEADER ?></h1> +<h1 class="firstHeading<?= $rating ? '-rating' : '' ?><?= $public ? '-public' : '' ?>"><?= $HEADER ?></h1> <?php } ?> <?php if ($rating && $request->getArg('action') == 'browse') { ?> <?= Template('ratings') ?> Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2010-06-21 08:56:10 UTC (rev 7554) +++ trunk/themes/Sidebar/themeinfo.php 2010-06-23 13:12:23 UTC (rev 7555) @@ -154,7 +154,7 @@ * WikiWords can automatically be split by inserting spaces between * the words. The default is to leave WordsSmashedTogetherLikeSo. */ - $this->setAutosplitWikiWords(true); + //$this->setAutosplitWikiWords(true); /** * If true (default) show create '?' buttons on not existing pages, even if the @@ -203,6 +203,9 @@ require_once("lib/wikilens/PageListColumns.php"); //require_once("lib/plugin/RateIt.php"); $plugin = new WikiPlugin_RateIt; + // add parent to current theme to find the RateIt images + // $WikiTheme->addParent('wikilens', 'noinit'); + $WikiTheme->_parents[] = new WikiTheme('wikilens', 'noinit'); $plugin->head(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-21 08:56:16
|
Revision: 7554 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7554&view=rev Author: rurban Date: 2010-06-21 08:56:10 +0000 (Mon, 21 Jun 2010) Log Message: ----------- fix doc. Thanks Marc-Etienne Modified Paths: -------------- trunk/lib/plugin/TitleSearch.php Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2010-06-20 18:10:16 UTC (rev 7553) +++ trunk/lib/plugin/TitleSearch.php 2010-06-21 08:56:10 UTC (rev 7554) @@ -26,8 +26,8 @@ /** * Display results of pagename search. - * Provides no own input box, just <<TitleSearch>> is enough. - * Fancier Inputforms can be made using <<WikiFormRich>> to support regex and case_exact args. + * Provides no own input box, just <?plugin-form TitleSearch?> is enough. + * Fancier Inputforms can be made using <<WikiFormRich ...>> to support regex and case_exact args. * * If only one pages is found and auto_redirect is true, this page is displayed immediatly, * otherwise the found pagelist is displayed. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-20 18:10:22
|
Revision: 7553 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7553&view=rev Author: vargenau Date: 2010-06-20 18:10:16 +0000 (Sun, 20 Jun 2010) Log Message: ----------- Add Phpwiki 1.4.0 Modified Paths: -------------- trunk/pgsrc/PhpWikiPoll Modified: trunk/pgsrc/PhpWikiPoll =================================================================== --- trunk/pgsrc/PhpWikiPoll 2010-06-19 22:08:10 UTC (rev 7552) +++ trunk/pgsrc/PhpWikiPoll 2010-06-20 18:10:16 UTC (rev 7553) @@ -1,4 +1,4 @@ -Date: Thu, 15 Apr 2010 16:32:58 +0000 +Date: Sun, 20 Jun 2010 20:05:08 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC-20100415) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -23,7 +23,7 @@ answer[4][6]="Mediawiki" answer[4][7]="Other" question[5]="Which PhpWiki version do you use?" answer[5][1]="1.2.x" answer[5][2]="1.3.1-12" answer[5][3]="1.3.13" - answer[5][4]="1.3.14" + answer[5][4]="1.3.14" answer[5][5]="1.4.0" >> ---- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-19 22:08:16
|
Revision: 7552 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7552&view=rev Author: rurban Date: 2010-06-19 22:08:10 +0000 (Sat, 19 Jun 2010) Log Message: ----------- fix Bug #3018484 deprecated session_register since php-5.3 Modified Paths: -------------- trunk/lib/Request.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2010-06-19 20:16:19 UTC (rev 7551) +++ trunk/lib/Request.php 2010-06-19 22:08:10 UTC (rev 7552) @@ -579,7 +579,8 @@ $vars[$key] = $val; if (isset($_SESSION)) // php-5.2 $_SESSION[$key] = $val; - session_register($key); + if (!check_php_version(5,3)) + session_register($key); } function delete($key) { @@ -588,7 +589,10 @@ unset($GLOBALS[$key]); if (DEBUG) trigger_error("delete session $key", E_USER_WARNING); unset($vars[$key]); - session_unregister($key); + if (isset($_SESSION)) // php-5.2 + unset($_SESSION[$key]); + if (!check_php_version(5,3)) + session_unregister($key); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-19 20:16:25
|
Revision: 7551 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7551&view=rev Author: rurban Date: 2010-06-19 20:16:19 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Exact Title Search fails with blank page patch 3018192 by Sebastien Le Callonnec plus some more fixes to enable the redirect. whitespace fixes Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/plugin/TitleSearch.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-06-17 15:48:19 UTC (rev 7550) +++ trunk/lib/PageList.php 2010-06-19 20:16:19 UTC (rev 7551) @@ -904,6 +904,13 @@ return false; } + function first() { + if (count($this->_pages) > 0) { + return $this->_pages[0]; + } + return false; + } + function getContent() { // Note that the <caption> element wants inline content. $caption = $this->getCaption(); Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2010-06-17 15:48:19 UTC (rev 7550) +++ trunk/lib/plugin/TitleSearch.php 2010-06-19 20:16:19 UTC (rev 7551) @@ -1,7 +1,7 @@ <?php // -*-php-*- // rcs_id('$Id$'); /** - * Copyright 1999,2000,2001,2002,2004,2005 $ThePhpWikiProgrammingTeam + * Copyright 1999,2000,2001,2002,2004,2005,2010 $ThePhpWikiProgrammingTeam * Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. @@ -26,8 +26,8 @@ /** * Display results of pagename search. - * Provides no own input box, just <?plugin-form TitleSearch ?> is enough. - * Fancier Inputforms can be made using WikiForm Rich, to support regex and case_exact args. + * Provides no own input box, just <<TitleSearch>> is enough. + * Fancier Inputforms can be made using <<WikiFormRich>> to support regex and case_exact args. * * If only one pages is found and auto_redirect is true, this page is displayed immediatly, * otherwise the found pagelist is displayed. @@ -58,8 +58,8 @@ 'exclude' => false, 'info' => false, 'case_exact' => false, - 'regex' => 'auto', - 'format' => false, + 'regex' => 'auto', + 'format' => false, )); } // info arg allows multiple columns @@ -79,18 +79,7 @@ $pagelist = new PageList($args['info'], $args['exclude'], $args); $pagelist->addPages($pages); - // this hack will go away - if ($args['format'] == 'livesearch') { - $request->discardOutput(); - $request->buffer_output(false); - echo '<div class="LSRes">'; - echo $pagelist->asXml(); - echo '</div>'; - if (empty($WikiTheme->DUMP_MODE)) { - unset($GLOBALS['ErrorManager']->_postponed_errors); - $request->finish(); - } - } + // Provide an unknown WikiWord link to allow for page creation // when a search returns no results if (!$args['noheader']) { @@ -100,16 +89,15 @@ $s = WikiLink($args['s'], 'auto'); } if ($total) { - $pagelist->setCaption(fmt("Title search results for '%s' (%d total)", $s, $total)); + $pagelist->setCaption(fmt("Title search results for '%s' (%d total)", $s, $total)); } else { $pagelist->setCaption(fmt("Title search results for '%s'", $s)); } } if ($args['auto_redirect'] && ($pagelist->getTotal() == 1)) { - $page = $pages->next(); - return HTML($request->redirect(WikiURL($page->getName(), false, 'absurl'), false), - $pagelist); + $page = $pagelist->first(); + $request->redirect(WikiURL($page->getName(), false, 'absurl'), false); } return $pagelist; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 15:48:26
|
Revision: 7550 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7550&view=rev Author: vargenau Date: 2010-06-17 15:48:19 +0000 (Thu, 17 Jun 2010) Log Message: ----------- array_diff_assoc_recursive is not used Modified Paths: -------------- trunk/lib/PagePerm.php Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2010-06-17 15:43:18 UTC (rev 7549) +++ trunk/lib/PagePerm.php 2010-06-17 15:48:19 UTC (rev 7550) @@ -334,25 +334,6 @@ return $access; } -// from php.net docs -function array_diff_assoc_recursive($array1, $array2) { - foreach ($array1 as $key => $value) { - if (is_array($value)) { - if (!is_array($array2[$key])) { - $difference[$key] = $value; - } else { - $new_diff = array_diff_assoc_recursive($value, $array2[$key]); - if ($new_diff != false) { - $difference[$key] = $new_diff; - } - } - } elseif(!isset($array2[$key]) || $array2[$key] != $value) { - $difference[$key] = $value; - } - } - return !isset($difference) ? 0 : $difference; -} - /** * The ACL object per page. It is stored in a page, but can also * be merged with ACL's from other pages or taken from the master (pseudo) dot-file. @@ -522,9 +503,6 @@ // The equal function seems to be unable to detect removed perm. // Use case is when a rule is removed. return (print_r($this->perm, true) === print_r($otherperm, true)); - -// $diff = array_diff_assoc_recursive($this->perm, $otherperm); -// return empty($diff); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 15:43:24
|
Revision: 7549 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7549&view=rev Author: vargenau Date: 2010-06-17 15:43:18 +0000 (Thu, 17 Jun 2010) Log Message: ----------- We assume PHP >= 4.3.10 Modified Paths: -------------- trunk/lib/config.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2010-06-17 15:38:19 UTC (rev 7548) +++ trunk/lib/config.php 2010-06-17 15:43:18 UTC (rev 7549) @@ -349,26 +349,6 @@ '); } -/** - * array_diff_assoc() returns an array containing all the values from array1 that are not - * present in any of the other arguments. Note that the keys are used in the comparison - * unlike array_diff(). In core since php-4.3.0 - * Our fallback here supports only hashes and two args. - * $array1 = array("a" => "green", "b" => "brown", "c" => "blue"); - * $array2 = array("a" => "green", "y" => "yellow", "r" => "red"); - * => b => brown, c => blue - */ -if (!function_exists('array_diff_assoc')) { - function array_diff_assoc($a1, $a2) { - $result = array(); - foreach ($a1 as $k => $v) { - if (!isset($a2[$k]) or !$a2[$k]) - $result[$k] = $v; - } - return $result; - } -} - function getUploadFilePath() { if (defined('UPLOAD_FILE_PATH')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 15:38:25
|
Revision: 7548 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7548&view=rev Author: vargenau Date: 2010-06-17 15:38:19 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove obsolete comments Modified Paths: -------------- trunk/themes/MonoBook/themeinfo.php Modified: trunk/themes/MonoBook/themeinfo.php =================================================================== --- trunk/themes/MonoBook/themeinfo.php 2010-06-17 15:05:18 UTC (rev 7547) +++ trunk/themes/MonoBook/themeinfo.php 2010-06-17 15:38:19 UTC (rev 7548) @@ -105,19 +105,6 @@ $this->addMoreHeaders("\n"); $this->addMoreHeaders(HTML::Raw('<meta http-equiv="imagetoolbar" content="no" />')); } - // better done in wikibits.js - /*elseif (isBrowserSafari()) { - $this->addMoreHeaders($this->_CSSlink(0,$this->_findFile('IEMacFixes.css'),'all')); - } elseif (isBrowserKonqueror()) { - $this->addMoreHeaders($this->_CSSlink(0,$this->_findFile('KHTMLFixes.css'),'all')); - } elseif (isBrowserOpera()) { - $this->addMoreHeaders($this->_CSSlink - (0, - isBrowserOpera(7) ? $this->_findFile('Opera7Fixes.css') - : $this->_findFile('Opera6Fixes.css'),'all')); - } - */ - // TODO: IEMAC, KHTML, Opera6, Opera7 $this->addMoreAttr('body', "class-ns-0", HTML::Raw('class="ns-0"')); // CSS file defines fonts, colors and background images for this This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 15:05:25
|
Revision: 7547 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7547&view=rev Author: vargenau Date: 2010-06-17 15:05:18 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Update copyright year; whitespace Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2010-06-17 14:09:32 UTC (rev 7546) +++ trunk/lib/main.php 2010-06-17 15:05:18 UTC (rev 7547) @@ -2,7 +2,7 @@ // rcs_id('$Id$'); /* * Copyright 1999-2008 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * Copyright (C) 2009 Roger Guignard, Alcatel-Lucent * * This file is part of PhpWiki. @@ -53,7 +53,7 @@ function WikiRequest () { $this->_dbi = WikiDB::open($GLOBALS['DBParams']); // first mysql request costs [958ms]! [670ms] is mysql_connect() - + if (in_array('File', $this->_dbi->getAuthParam('USER_AUTH_ORDER'))) { // force our local copy, until the pear version is fixed. include_once(dirname(__FILE__)."/pear/File_Passwd.php"); @@ -80,7 +80,7 @@ include_once('lib/DbSession.php'); $dbi =& $this->_dbi; if (defined('READONLY') and !READONLY) // READONLY might be set later - $this->_dbsession = new DbSession($dbi, $dbi->getParam('prefix') + $this->_dbsession = new DbSession($dbi, $dbi->getParam('prefix') . $dbi->getParam('db_session_table')); } @@ -95,24 +95,24 @@ $this->setArg('action', $this->_deduceAction()); if ((DEBUG & _DEBUG_SQL) - or (DATABASE_OPTIMISE_FREQUENCY > 0 and + or (DATABASE_OPTIMISE_FREQUENCY > 0 and (time() % DATABASE_OPTIMISE_FREQUENCY == 0))) { if ($this->_dbi->_backend->optimize()) trigger_error(_("Optimizing database"), E_USER_NOTICE); } // Restore auth state. This doesn't check for proper authorization! - $userid = $this->_deduceUsername(); + $userid = $this->_deduceUsername(); if (ENABLE_USER_NEW) { - if (isset($this->_user) and - !empty($this->_user->_authhow) and + if (isset($this->_user) and + !empty($this->_user->_authhow) and $this->_user->_authhow == 'session') { // users might switch in a session between the two objects. // restore old auth level here or in updateAuthAndPrefs? //$user = $this->getSessionVar('wiki_user'); // revive db handle, because these don't survive sessions - if (isset($this->_user) and + if (isset($this->_user) and ( ! isa($this->_user, WikiUserClassname()) or (strtolower(get_class($this->_user)) == '_passuser') or (strtolower(get_class($this->_user)) == '_gforgepassuser'))) @@ -121,21 +121,21 @@ } // revive other db handle if (isset($this->_user->_prefs->_method) - and ($this->_user->_prefs->_method == 'SQL' - or $this->_user->_prefs->_method == 'ADODB' - or $this->_user->_prefs->_method == 'PDO' + and ($this->_user->_prefs->_method == 'SQL' + or $this->_user->_prefs->_method == 'ADODB' + or $this->_user->_prefs->_method == 'PDO' or $this->_user->_prefs->_method == 'HomePage')) { $this->_user->_HomePagehandle = $this->getPage($userid); } // need to update the lockfile filehandle - if ( isa($this->_user, '_FilePassUser') - and $this->_user->_file->lockfile + if ( isa($this->_user, '_FilePassUser') + and $this->_user->_file->lockfile and !$this->_user->_file->fplock ) { //$level = $this->_user->_level; - $this->_user = UpgradeUser($this->_user, - new _FilePassUser($userid, - $this->_user->_prefs, + $this->_user = UpgradeUser($this->_user, + new _FilePassUser($userid, + $this->_user->_prefs, $this->_user->_file->filename)); //$this->_user->_level = $level; } @@ -158,7 +158,7 @@ $_lang = $this->_prefs->_prefs['lang']; if (isset($_lang->lang) and $_lang->lang != $GLOBALS['LANG']) { $user_lang = $_lang->lang; - //check changed LANG and THEME inside a session. + //check changed LANG and THEME inside a session. // (e.g. by using another baseurl) if (isset($this->_user->_authhow) and $this->_user->_authhow == 'session') $user_lang = $GLOBALS['LANG']; @@ -186,15 +186,15 @@ else $user_theme = ''; } - else + else $user_theme = $this->getPref('theme'); - //check changed LANG and THEME inside a session. + //check changed LANG and THEME inside a session. // (e.g. by using another baseurl) - if (isset($this->_user->_authhow) - and $this->_user->_authhow == 'session' - and !isset($_theme->theme) - and defined('THEME') + if (isset($this->_user->_authhow) + and $this->_user->_authhow == 'session' + and !isset($_theme->theme) + and defined('THEME') and $user_theme != THEME) { include_once("themes/" . THEME . "/themeinfo.php"); @@ -202,7 +202,7 @@ if (empty($WikiTheme) and $user_theme) { if (strcspn($user_theme,"./\x00]") != strlen($user_theme)) { trigger_error(sprintf("invalid theme '%s': Invalid characters detected", - $user_theme), + $user_theme), E_USER_WARNING); $user_theme = "default"; } @@ -245,22 +245,22 @@ function updateAuthAndPrefs () { if (isset($this->_user) and (!isa($this->_user, WikiUserClassname()))) { - $this->_user = false; + $this->_user = false; } // Handle authentication request, if any. if ($auth_args = $this->getArg('auth')) { $this->setArg('auth', false); $this->_handleAuthRequest($auth_args); // possible NORETURN } - elseif ( ! $this->_user - or (isa($this->_user, WikiUserClassname()) + elseif ( ! $this->_user + or (isa($this->_user, WikiUserClassname()) and ! $this->_user->isSignedIn())) { // If not auth request, try to sign in as saved user. if (($saved_user = $this->getPref('userid')) != false) { $this->_signIn($saved_user); } } - + $action = $this->getArg('action'); // Save preferences in session and cookie @@ -276,7 +276,7 @@ } // Ensure user has permissions for action - // HACK ALERT: We may not set the request arg to create, + // HACK ALERT: We may not set the request arg to create, // since the pageeditor has an ugly logic for action == create. if ($action == 'edit' or $action == 'create') { $page = $this->getPage(); @@ -291,7 +291,7 @@ $this->_notAuthorized($require_level); // NORETURN } else { // novatrope patch to let only _AUTHENTICATED view pages. - // If there's not enough authority or forbidden, ask for a password, + // If there's not enough authority or forbidden, ask for a password, // unless it's explicitly unobtainable. Some bad magic though. if ($this->requiredAuthorityForAction($action) == WIKIAUTH_UNOBTAINABLE) { $require_level = $this->requiredAuthority($action); @@ -306,7 +306,7 @@ else return $GLOBALS['ForbiddenUser']; } - + function & getGroup () { if (isset($this->_user) and isset($this->_user->_group)) return $this->_user->_group; @@ -342,7 +342,7 @@ */ function getPage ($pagename = false) { //if (!isset($this->_dbi)) $this->getDbh(); - if (!$pagename) + if (!$pagename) $pagename = $this->getArg('pagename'); return $this->_dbi->getPage($pagename); } @@ -373,7 +373,7 @@ else return WikiURL($pagename, array('action' => $action)); } - + function _handleAuthRequest ($auth_args) { if (!is_array($auth_args)) return; @@ -393,9 +393,9 @@ $fail_message = ''; // If no password was submitted, it's not really // a failure --- just need to prompt for password... - if (!ALLOW_USER_PASSWORDS - and ALLOW_BOGO_LOGIN - and !isset($auth_args['passwd'])) + if (!ALLOW_USER_PASSWORDS + and ALLOW_BOGO_LOGIN + and !isset($auth_args['passwd'])) { $fail_message = false; } @@ -424,7 +424,7 @@ if (! $this->_user ) $this->_user = new _BogoUser($userid); // FIXME: is this always false? shouldn't we try passuser first? - if (! $this->_user ) + if (! $this->_user ) $this->_user = new _PassUser($userid); } else { if (! $this->_user ) @@ -483,7 +483,7 @@ else return _("ANON"); } - + function _notAuthorized ($require_level) { // Display the authority message in the Wiki's default // language, in case it is not english. @@ -536,7 +536,7 @@ $msg = ""; /*if (!ALLOW_ANON_USER) $msg = fmt("You must log in first to %s", $what); - else + else $msg = fmt("You must log in to %s.", $what); */ } elseif ($require_level == WIKIAUTH_ANON) @@ -544,13 +544,13 @@ else $msg = fmt("You must be an administrator to %s.", $what); - $this->_user->PrintLoginForm($this, compact('require_level','pass_required'), + $this->_user->PrintLoginForm($this, compact('require_level','pass_required'), $msg); if (!$GLOBALS['WikiTheme']->DUMP_MODE) $this->finish(); // NORETURN } - // Fixme: for PagePermissions we'll need other strings, + // Fixme: for PagePermissions we'll need other strings, // relevant to the requested page, not just for the action on the whole wiki. function getActionDescription($action) { static $actionDescriptions; @@ -583,7 +583,7 @@ else return _("use")." ".$action; } - + /** TODO: check against these cases: if ($DisabledActions and in_array($action, $DisabledActions)) @@ -591,12 +591,12 @@ if (ENABLE_PAGEPERM and class_exists("PagePermission")) { return requiredAuthorityForPage($action); - + => Browsing pages is disallowed on this wiki for authenticated user 'rurban' (level: BOGO). */ function getDisallowedActionDescription($action) { static $disallowedActionDescriptions; - + if (! $disallowedActionDescriptions) { $disallowedActionDescriptions = array('browse' => _("Browsing pages"), @@ -629,7 +629,7 @@ function requiredAuthority ($action) { $auth = $this->requiredAuthorityForAction($action); if (!ALLOW_ANON_USER) return WIKIAUTH_USER; - + /* * This is a hook for plugins to require authority * for posting to them. @@ -646,17 +646,17 @@ } return $auth; } - + function requiredAuthorityForAction ($action) { global $DisabledActions; - + if ($DisabledActions and in_array($action, $DisabledActions)) return WIKIAUTH_UNOBTAINABLE; - + if (ENABLE_PAGEPERM and class_exists("PagePermission")) { return requiredAuthorityForPage($action); } else { - // FIXME: clean up. + // FIXME: clean up. switch ($action) { case 'browse': case 'viewsource': @@ -755,7 +755,7 @@ SetupWiki($this); $this->finish(); // NORETURN } - + // [574ms] mainly template:printexpansion: 393ms and template::expandsubtemplate [100+70+60ms] function handleAction () { // Check illegal characters in page names: <>[]{}|" @@ -770,10 +770,10 @@ $this->finish(); } $action = $this->getArg('action'); - if ($this->isPost() + if ($this->isPost() and !$this->_user->isAdmin() - and $action != 'browse' - and $action != 'wikitohtml' + and $action != 'browse' + and $action != 'wikitohtml' ) { if ( $page->get('moderation') ) { @@ -784,8 +784,8 @@ $CONTENT = HTML::div ( array('class' => 'wiki-edithelp'), - fmt("%s: action forwarded to a moderator.", - $action), + fmt("%s: action forwarded to a moderator.", + $action), HTML::br(), _("This action requires moderator approval. Please be patient.")); if (!empty($plugin->_tokens['CONTENT'])) @@ -797,7 +797,7 @@ $plugin->_tokens['CONTENT'] = $CONTENT; $title = WikiLink($page->getName()); $title->pushContent(' : ', WikiLink(_("ModeratedPage"))); - GeneratePage(Template('browse', $plugin->_tokens), + GeneratePage(Template('browse', $plugin->_tokens), $title, $page->getCurrentRevision()); $this->finish(); @@ -815,7 +815,7 @@ $this->finish(fmt("%s: Bad action", $action)); } } - + function finish ($errormsg = false) { static $in_exit = 0; @@ -848,7 +848,7 @@ /** * Generally pagename is rawurlencoded for older browsers or mozilla. - * Typing a pagename into the IE bar will utf-8 encode it, so we have to + * Typing a pagename into the IE bar will utf-8 encode it, so we have to * fix that with fixTitleEncoding(). * If USE_PATH_INFO = true, the pagename is stripped from the "/DATA_PATH/PageName&arg=value" line. * If false, we support either "/index.php?pagename=PageName&arg=value", @@ -886,7 +886,7 @@ * QUERY_ARGS (HTTP_GET_VARS). */ global $HTTP_GET_VARS; - if (isset($HTTP_GET_VARS['pagename']) and trim($HTTP_GET_VARS['pagename'])) { + if (isset($HTTP_GET_VARS['pagename']) and trim($HTTP_GET_VARS['pagename'])) { return fixTitleEncoding(rawurldecode($HTTP_GET_VARS['pagename'])); } } @@ -905,14 +905,14 @@ function _deduceAction () { if (!($action = $this->getArg('action'))) { - // TODO: improve this SOAP.php hack by letting SOAP use index.php + // TODO: improve this SOAP.php hack by letting SOAP use index.php // or any other virtual url as with xmlrpc if (defined('WIKI_SOAP') and WIKI_SOAP) return 'soap'; // Detect XML-RPC requests. if ($this->isPost() && ((defined("WIKI_XMLRPC") and WIKI_XMLRPC) - or ($this->get('CONTENT_TYPE') == 'text/xml' + or ($this->get('CONTENT_TYPE') == 'text/xml' or $this->get('CONTENT_TYPE') == 'application/xml') && strstr($GLOBALS['HTTP_RAW_POST_DATA'], '<methodCall>')) ) @@ -950,8 +950,8 @@ return $this->args['auth']['userid']; if ($user = $this->getSessionVar('wiki_user')) { - // Switched auth between sessions. - // Note: There's no way to demandload a missing class-definition + // Switched auth between sessions. + // Note: There's no way to demandload a missing class-definition // afterwards! Stupid php. if (defined('GFORGE') and GFORGE) { if (empty($HTTP_SERVER_VARS['PHP_AUTH_USER'])) { @@ -998,7 +998,7 @@ return false; } - + function findActionPage ($action) { static $cache; if (!$action) return false; @@ -1031,7 +1031,7 @@ } else { $default = $translation; } - + // check for english version if ($action != $translation and $action != $default) { if (isActionPage($action)) @@ -1041,7 +1041,7 @@ trigger_error("$action: Cannot find action page", E_USER_NOTICE); return $cache[$action] = false; } - + function action_browse () { $this->buffer_output(); include_once("lib/display.php"); @@ -1111,8 +1111,8 @@ // Decide between title or fulltextsearch (e.g. both buttons available). // Reformulate URL and redirect. $searchtype = $this->getArg('searchtype'); - $args = array('s' => $this->getArg('searchterm') - ? $this->getArg('searchterm') + $args = array('s' => $this->getArg('searchterm') + ? $this->getArg('searchterm') : $this->getArg('s')); if ($searchtype == 'full' or $searchtype == 'fulltext') { $search_page = _("FullTextSearch"); @@ -1139,7 +1139,7 @@ function action_create () { $this->action_edit(); } - + function action_viewsource () { $this->buffer_output(); include "lib/editpage.php"; @@ -1157,7 +1157,7 @@ $plugin = WikiPluginLoader::getPlugin("ModeratedPage"); if ($retval = $plugin->lock_check($this, $page, $moderated)) $this->setArg('errormsg', $retval); - } + } // check if a link to ModeratedPage exists elseif ($action_page = $page->existLink(_("ModeratedPage"))) { require_once("lib/WikiPlugin.php"); @@ -1202,7 +1202,7 @@ $xmlrpc = new XmlRpcServer($this); $xmlrpc->service(); } - + function action_soap () { if (defined("WIKI_SOAP") and WIKI_SOAP) // already loaded return; @@ -1264,9 +1264,9 @@ function action_captcha () { include_once "lib/Captcha.php"; $captcha = new Captcha(); - $captcha->image ( $captcha->captchaword() ); + $captcha->image ( $captcha->captchaword() ); } - + function action_wikitohtml () { include_once("lib/WysiwygEdit/Wikiwyg.php"); $wikitohtml = new WikiToHtml( $this->getArg("content") , $this); @@ -1330,7 +1330,7 @@ validateSessionPath(); global $request; - if ((DEBUG & _DEBUG_APD) and extension_loaded("apd")) { + if ((DEBUG & _DEBUG_APD) and extension_loaded("apd")) { //apd_set_session_trace(9); apd_set_pprof_trace(); } @@ -1363,13 +1363,13 @@ else define('WIKIDB_NOCACHE_MARKUP', false); // redundant, but explicit } - + // Initialize with system defaults in case user not logged in. // Should this go into the constructor? $request->initializeTheme('default'); $request->updateAuthAndPrefs(); $request->initializeLang(); - + //FIXME: //if ($user->is_authenticated()) // $LogEntry->user = $user->getId(); @@ -1380,7 +1380,7 @@ if (!empty($_PEAR_destructor_object_list)) $_PEAR_destructor_object_list = array(); $request->possiblyDeflowerVirginWiki(); - + $validators = array('wikiname' => WIKI_NAME, 'args' => wikihash($request->getArgs()), 'prefs' => wikihash($request->getPrefs())); @@ -1396,12 +1396,12 @@ // // (If DEBUG if off, this may be a strong validator, but I'm going // to go the paranoid route here pending further study and testing.) - // access hits and edit stats in the footer violate strong ETags also. + // access hits and edit stats in the footer violate strong ETags also. if (1 or DEBUG) { $validators['%weak'] = true; } $request->setValidators($validators); - + $request->handleAction(); if (DEBUG and DEBUG & _DEBUG_INFO) phpinfo(INFO_VARIABLES | INFO_MODULES); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 14:09:39
|
Revision: 7546 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7546&view=rev Author: vargenau Date: 2010-06-17 14:09:32 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove unused TableUnifiedDiffFormatter Modified Paths: -------------- trunk/lib/diff.php trunk/lib/editpage.php Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2010-06-17 13:50:31 UTC (rev 7545) +++ trunk/lib/diff.php 2010-06-17 14:09:32 UTC (rev 7546) @@ -176,63 +176,6 @@ } } -/** - * HTML table-based unified diff formatter. - * - * This class formats a diff into a table-based - * unified diff format. (Similar to what was produced - * by previous versions of PhpWiki.) - * - * Within groups of changed lines, diffs are highlit - * at the character-diff level. - */ -class TableUnifiedDiffFormatter extends HtmlUnifiedDiffFormatter -{ - function TableUnifiedDiffFormatter($context_lines = 4) { - $this->HtmlUnifiedDiffFormatter($context_lines); - } - - function _start_diff() { - $this->_top = HTML::table(array('width' => '100%', - 'class' => 'diff', - 'cellspacing' => 1, - 'cellpadding' => 1, - 'border' => 1)); - } - - function _start_block($header) { - $this->_block = HTML::table(array('width' => '100%', - 'class' => 'block', - 'cellspacing' => 0, - 'cellpadding' => 1, - 'border' => 0), - HTML::tr(HTML::td(array('colspan' => 2), - HTML::tt($header)))); - } - - function _end_block() { - $this->_top->pushContent(HTML::tr(HTML::td($this->_block))); - unset($this->_block); - } - - function _lines($lines, $class, $prefix = false, $elem = false) { - if (!$prefix) - $prefix = HTML::raw(' '); - $prefix = HTML::td(array('class' => 'prefix', - 'width' => "1%"), $prefix); - foreach ($lines as $line) { - if (! trim($line)) - $line = HTML::raw(' '); - elseif ($elem) - $line = new HtmlElement($elem, $line); - $this->_block->pushContent(HTML::tr(array('valign' => 'top'), - $prefix, - HTML::td(array('class' => $class), - $line))); - } - } -} - ///////////////////////////////////////////////////////////////// function PageInfoRow ($label, $rev, &$request, $is_current = false) Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2010-06-17 13:50:31 UTC (rev 7545) +++ trunk/lib/editpage.php 2010-06-17 14:09:32 UTC (rev 7546) @@ -527,10 +527,8 @@ ']')); } else { - // New CSS formatted unified diffs (ugly in NS4). + // New CSS formatted unified diffs $fmt = new HtmlUnifiedDiffFormatter; - // Use this for old table-formatted diffs. - //$fmt = new TableUnifiedDiffFormatter; $html->pushContent($fmt->format($diff)); } return $html; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 13:50:38
|
Revision: 7545 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7545&view=rev Author: vargenau Date: 2010-06-17 13:50:31 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove obsolete comments Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2010-06-17 13:35:18 UTC (rev 7544) +++ trunk/lib/stdlib.php 2010-06-17 13:50:31 UTC (rev 7545) @@ -102,14 +102,8 @@ is_video ($filename) compute_tablecell ($table, $i, $j, $imax, $jmax) - function: LinkInterWikiLink($link, $linktext) - moved to: lib/interwiki.php function: linkExistingWikiWord($wikiword, $linktext, $version) moved to: lib/WikiTheme.php - function: LinkUnknownWikiWord($wikiword, $linktext) - moved to: lib/WikiTheme.php - function: UpdateRecentChanges($dbi, $pagename, $isnewpage) - gone see: lib/plugin/RecentChanges.php */ if (defined('_PHPWIKI_STDLIB_LOADED')) return; else define('_PHPWIKI_STDLIB_LOADED', true); @@ -521,10 +515,6 @@ $size = 0; // Prepare for getimagesize($url) // $url only valid for external urls, otherwise local path - // Older php versions crash here with certain png's: - // confirmed for 4.1.2, 4.1.3, 4.2.3; 4.3.2 and 4.3.7 are ok - // http://phpwiki.sourceforge.net/demo/themes/default/images/http.png - // See http://bugs.php.net/search.php?cmd=display&search_for=getimagesize if (DISABLE_GETIMAGESIZE) ; elseif (! preg_match("/\.$force_img$/i", $url)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 13:35:24
|
Revision: 7544 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7544&view=rev Author: vargenau Date: 2010-06-17 13:35:18 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove unused function OldFilterThroughCmd Modified Paths: -------------- trunk/lib/plugin/SyntaxHighlighter.php Modified: trunk/lib/plugin/SyntaxHighlighter.php =================================================================== --- trunk/lib/plugin/SyntaxHighlighter.php 2010-06-17 13:22:59 UTC (rev 7543) +++ trunk/lib/plugin/SyntaxHighlighter.php 2010-06-17 13:35:18 UTC (rev 7544) @@ -119,30 +119,6 @@ } } - /* PHP versions < 4.3 - * TODO: via temp file looks more promising - */ - function OldFilterThroughCmd($input, $commandLine) { - $input = str_replace ("\\", "\\\\", $input); - $input = str_replace ("\"", "\\\"", $input); - $input = str_replace ("\$", "\\\$", $input); - $input = str_replace ("`", "\`", $input); - $input = str_replace ("'", "\'", $input); - //$input = str_replace (";", "\;", $input); - - $pipe = popen("echo \"$input\"|$commandLine", 'r'); - if (!$pipe) { - print "pipe failed."; - return ""; - } - $output = ''; - while (!feof($pipe)) { - $output .= fread($pipe, 1024); - } - pclose($pipe); - return $output; - } - function run($dbi, $argstr, &$request, $basepage) { extract($this->getArgs($argstr, $request)); $source =& $this->source; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-06-17 13:23:06
|
Revision: 7543 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7543&view=rev Author: vargenau Date: 2010-06-17 13:22:59 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Mac OS 9 is dead Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-17 11:37:30 UTC (rev 7542) +++ trunk/lib/FileFinder.php 2010-06-17 13:22:59 UTC (rev 7543) @@ -63,8 +63,7 @@ return $result; } else { if (isWindows() or $this->_isOtherPathsep()) { - if (isMac()) $from = ":"; - elseif (isWindows()) $from = "\\"; + if (isWindows()) $from = "\\"; else $from = "\\"; // PHP is stupid enough to use \\ instead of \ if (isWindows()) { @@ -119,7 +118,6 @@ if (!empty($this->_pathsep)) return $this->_pathsep; elseif (isWindowsNT()) return "/"; // we can safely use '/' elseif (isWindows()) return "\\"; // FAT might use '\' - elseif (isMac()) return ':'; // MacOsX is / // VMS or LispM is really weird, we ignore it. else return '/'; } @@ -140,9 +138,6 @@ if (isWindows95()) { if (empty($path)) return "\\"; else return (strchr($path,"\\")) ? "\\" : '/'; - } elseif (isMac()) { - if (empty($path)) return ":"; - else return (strchr($path,":")) ? ":" : '/'; } else { return $this->_get_syspath_separator(); } @@ -175,13 +170,8 @@ * @return bool New path (destructive) */ function _strip_last_pathchar(&$path) { - if (isMac()) { - if (substr($path,-1) == ':' or substr($path,-1) == "/") - $path = substr($path,0,-1); - } else { - if (substr($path,-1) == '/' or substr($path,-1) == "\\") - $path = substr($path,0,-1); - } + if (substr($path,-1) == '/' or substr($path,-1) == "\\") + $path = substr($path,0,-1); return $path; } @@ -579,21 +569,6 @@ return $winnt; } -/** - * This is for the OLD Macintosh OS, NOT MacOSX or Darwin! - * This has really ugly pathname semantics. - * ":path" is relative, "Desktop:path" (I think) is absolute. - * FIXME: Please fix this someone. So far not supported. - */ -function isMac() { - return (substr(PHP_OS,0,9) == 'Macintosh'); // not tested! -} - -// probably not needed, same behaviour as on unix. -function isCygwin() { - return (substr(PHP_OS,0,6) == 'CYGWIN'); -} - // 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...> - 2010-06-17 11:37:36
|
Revision: 7542 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7542&view=rev Author: vargenau Date: 2010-06-17 11:37:30 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove unused functions: oldFilterThroughCmd_File and oldFilterThroughCmd Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2010-06-17 11:34:55 UTC (rev 7541) +++ trunk/lib/WikiPluginCached.php 2010-06-17 11:37:30 UTC (rev 7542) @@ -1072,51 +1072,6 @@ } } - function oldFilterThroughCmd_File($input, $commandLine) { - $ext = ".txt"; - $tmpfile = tempnam(getUploadFilePath(), $ext); - $fp = fopen($tmpfile,'wb'); - fwrite($fp, $input); - fclose($fp); - $cat = isWindows() ? 'cat' : 'type'; - $pipe = popen("$cat \"$tmpfile\" | $commandLine", 'r'); - if (!$pipe) { - print "pipe failed."; - return ""; - } - $output = ''; - while (!feof($pipe)) { - $output .= fread($pipe, 1024); - } - pclose($pipe); - unlink($tmpfile); - return $output; - } - - /* PHP versions < 4.3 - * TODO: via temp file looks more promising - */ - function oldFilterThroughCmd($input, $commandLine) { - $input = str_replace ("\\", "\\\\", $input); - $input = str_replace ("\"", "\\\"", $input); - $input = str_replace ("\$", "\\\$", $input); - $input = str_replace ("`", "\`", $input); - $input = str_replace ("'", "\'", $input); - //$input = str_replace (";", "\;", $input); - - $pipe = popen("echo \"$input\" | $commandLine", 'r'); - if (!$pipe) { - print "pipe failed."; - return ""; - } - $output = ''; - while (!feof($pipe)) { - $output .= fread($pipe, 1024); - } - pclose($pipe); - return $output; - } - // run "echo $source | $commandLine" and return result function filterThroughCmd($source, $commandLine) { return $this->newFilterThroughCmd($source, $commandLine); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |