From: <var...@us...> - 2008-08-26 15:30:34
|
Revision: 6209 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6209&view=rev Author: vargenau Date: 2008-08-26 15:30:39 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Activated Id substitution for Subversion Modified Paths: -------------- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php trunk/lib/WikiDB/backend/dumb/BackLinkIter.php trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php trunk/lib/WikiDB/backend/dumb/MostPopularIter.php trunk/lib/WikiDB/backend/dumb/MostRecentIter.php trunk/lib/WikiDB/backend/dumb/TextSearchIter.php trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php trunk/lib/XMLRPC/xmlrpc.inc trunk/lib/XMLRPC/xmlrpc_emu.inc trunk/lib/XMLRPC/xmlrpcs.inc trunk/lib/XMLRPC/xmlrpcs_emu.inc trunk/lib/pear/Cache/Container/db.php trunk/lib/pear/Cache/Container/file.php trunk/lib/pear/Cache/Container/imgfile.php trunk/lib/pear/Cache/Container/trifile.php Property Changed: ---------------- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php trunk/lib/WikiDB/backend/dumb/BackLinkIter.php trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php trunk/lib/WikiDB/backend/dumb/MostPopularIter.php trunk/lib/WikiDB/backend/dumb/MostRecentIter.php trunk/lib/WikiDB/backend/dumb/TextSearchIter.php trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php trunk/lib/XMLRPC/xmlrpc.inc trunk/lib/XMLRPC/xmlrpc_emu.inc trunk/lib/XMLRPC/xmlrpcs.inc trunk/lib/XMLRPC/xmlrpcs_emu.inc trunk/lib/pear/Cache/Container/db.php trunk/lib/pear/Cache/Container/file.php trunk/lib/pear/Cache/Container/imgfile.php trunk/lib/pear/Cache/Container/trifile.php Modified: trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: AllRevisionsIter.php,v 1.3 2008-07-27 21:47:46 rurban Exp $'); +rcs_id('$Id$'); /** * An iterator which returns all revisions of page. Property changes on: trunk/lib/WikiDB/backend/dumb/AllRevisionsIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/BackLinkIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/BackLinkIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/BackLinkIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: BackLinkIter.php,v 1.2 2001-09-19 03:24:36 wainstead Exp $'); +rcs_id('$Id$'); require_once('lib/WikiDB/backend.php'); Property changes on: trunk/lib/WikiDB/backend/dumb/BackLinkIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: LinkSearchIter.php,v 1.2 2007-01-04 16:41:25 rurban Exp $'); +rcs_id('$Id$'); /* Copyright 2007 Reini Urban Property changes on: trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/MostPopularIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/MostPopularIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/MostPopularIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: MostPopularIter.php,v 1.9 2006-12-22 00:27:37 rurban Exp $'); +rcs_id('$Id$'); require_once('lib/WikiDB/backend.php'); Property changes on: trunk/lib/WikiDB/backend/dumb/MostPopularIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/MostRecentIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: MostRecentIter.php,v 1.9 2007-09-01 13:37:36 rurban Exp $'); +rcs_id('$Id$'); require_once('lib/WikiDB/backend.php'); Property changes on: trunk/lib/WikiDB/backend/dumb/MostRecentIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/TextSearchIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/TextSearchIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/TextSearchIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: TextSearchIter.php,v 1.9 2007-08-25 18:51:02 rurban Exp $'); +rcs_id('$Id$'); class WikiDB_backend_dumb_TextSearchIter extends WikiDB_backend_iterator Property changes on: trunk/lib/WikiDB/backend/dumb/TextSearchIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,5 +1,5 @@ <?php // -*-php-*- -rcs_id('$Id: WantedPagesIter.php,v 1.3 2007-05-24 18:39:17 rurban Exp $'); +rcs_id('$Id$'); //require_once('lib/WikiDB/backend.php'); Property changes on: trunk/lib/WikiDB/backend/dumb/WantedPagesIter.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/XMLRPC/xmlrpc.inc =================================================================== --- trunk/lib/XMLRPC/xmlrpc.inc 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/XMLRPC/xmlrpc.inc 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,7 +1,7 @@ <?php // -*-c++-*- // by Edd Dumbill (C) 1999-2002 // <ed...@us...> -// $Id: xmlrpc.inc,v 1.6 2005-08-14 12:57:49 rurban Exp $ +// $Id$ // Copyright (c) 1999,2000,2002 Edd Dumbill. Property changes on: trunk/lib/XMLRPC/xmlrpc.inc ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/XMLRPC/xmlrpc_emu.inc =================================================================== --- trunk/lib/XMLRPC/xmlrpc_emu.inc 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/XMLRPC/xmlrpc_emu.inc 2008-08-26 15:30:39 UTC (rev 6209) @@ -36,7 +36,7 @@ // <ed...@us...> // -// $Id: xmlrpc_emu.inc,v 1.2 2007-01-21 23:28:51 rurban Exp $ +// $Id$ // Copyright (c) 1999,2000,2001 Edd Dumbill. Property changes on: trunk/lib/XMLRPC/xmlrpc_emu.inc ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/XMLRPC/xmlrpcs.inc =================================================================== --- trunk/lib/XMLRPC/xmlrpcs.inc 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/XMLRPC/xmlrpcs.inc 2008-08-26 15:30:39 UTC (rev 6209) @@ -1,7 +1,7 @@ <?php // by Edd Dumbill (C) 1999-2002 // <ed...@us...> -// $Id: xmlrpcs.inc,v 1.5 2005-08-14 12:57:50 rurban Exp $ +// $Id$ // Copyright (c) 1999,2000,2002 Edd Dumbill. // All rights reserved. Property changes on: trunk/lib/XMLRPC/xmlrpcs.inc ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/XMLRPC/xmlrpcs_emu.inc =================================================================== --- trunk/lib/XMLRPC/xmlrpcs_emu.inc 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/XMLRPC/xmlrpcs_emu.inc 2008-08-26 15:30:39 UTC (rev 6209) @@ -41,7 +41,7 @@ // by Edd Dumbill (C) 1999,2000 // <ed...@us...> -// $Id: xmlrpcs_emu.inc,v 1.4 2007-01-04 16:46:11 rurban Exp $ +// $Id$ // License is granted to use or modify this software ("XML-RPC for PHP") // for commercial or non-commercial use provided the copyright of the author Property changes on: trunk/lib/XMLRPC/xmlrpcs_emu.inc ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/pear/Cache/Container/db.php =================================================================== --- trunk/lib/pear/Cache/Container/db.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/pear/Cache/Container/db.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -17,7 +17,7 @@ // | Chuck Hagenbuch <ch...@ho...> | // +----------------------------------------------------------------------+ // -// $Id: db.php,v 1.1 2004-06-21 08:39:38 rurban Exp $ +// $Id$ require_once 'DB.php'; require_once 'Cache/Container.php'; @@ -52,7 +52,7 @@ * ) * * @author Sebastian Bergmann <sb...@se...> -* @version $Id: db.php,v 1.1 2004-06-21 08:39:38 rurban Exp $ +* @version $Id$ * @package Cache */ class Cache_Container_db extends Cache_Container { Property changes on: trunk/lib/pear/Cache/Container/db.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/pear/Cache/Container/file.php =================================================================== --- trunk/lib/pear/Cache/Container/file.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/pear/Cache/Container/file.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -16,7 +16,7 @@ // | Sebastian Bergmann <sb...@se...> | // +----------------------------------------------------------------------+ // -// $Id: file.php,v 1.4 2004-06-21 08:39:38 rurban Exp $ +// $Id$ require_once 'Cache/Container.php'; @@ -24,7 +24,7 @@ * Stores cache contents in a file. * * @author Ulf Wendel <ulf...@ph...> -* @version $Id: file.php,v 1.4 2004-06-21 08:39:38 rurban Exp $ +* @version $Id$ */ class Cache_Container_file extends Cache_Container { Property changes on: trunk/lib/pear/Cache/Container/file.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/pear/Cache/Container/imgfile.php =================================================================== --- trunk/lib/pear/Cache/Container/imgfile.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/pear/Cache/Container/imgfile.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -16,7 +16,7 @@ // | Sebastian Bergmann <sb...@se...> | // +----------------------------------------------------------------------+ // -// $Id: imgfile.php,v 1.3 2004-04-26 20:44:36 rurban Exp $ +// $Id$ require_once('Cache/Container.php'); @@ -24,7 +24,7 @@ * Stores cache contents in a file. * * @author Ulf Wendel <ulf...@ph...> -* @version $Id: imgfile.php,v 1.3 2004-04-26 20:44:36 rurban Exp $ +* @version $Id$ */ class Cache_Container_file extends Cache_Container { Property changes on: trunk/lib/pear/Cache/Container/imgfile.php ___________________________________________________________________ Added: svn:keywords + Id Modified: trunk/lib/pear/Cache/Container/trifile.php =================================================================== --- trunk/lib/pear/Cache/Container/trifile.php 2008-08-26 15:25:38 UTC (rev 6208) +++ trunk/lib/pear/Cache/Container/trifile.php 2008-08-26 15:30:39 UTC (rev 6209) @@ -17,7 +17,7 @@ // | Ian Eure <ie...@ph...> | // +----------------------------------------------------------------------+ // -// $Id: trifile.php,v 1.1 2004-06-21 08:39:38 rurban Exp $ +// $Id$ require_once 'Cache/Container/file.php'; Property changes on: trunk/lib/pear/Cache/Container/trifile.php ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2008-10-07 16:03:22
|
Revision: 6293 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6293&view=rev Author: vargenau Date: 2008-10-07 16:02:56 +0000 (Tue, 07 Oct 2008) Log Message: ----------- Modified PhpWikiCvs to point to Subversion; added PhpWikiSvn Modified Paths: -------------- trunk/lib/interwiki.map trunk/lib/plugin/WikiAdminSetAcl.php Modified: trunk/lib/interwiki.map =================================================================== --- trunk/lib/interwiki.map 2008-10-04 13:34:18 UTC (rev 6292) +++ trunk/lib/interwiki.map 2008-10-07 16:02:56 UTC (rev 6293) @@ -84,7 +84,8 @@ php-function http://www.php.net/%s php-lookup http://www.php.net/manual-lookup.php?pattern= PhpWiki http://phpwiki.sourceforge.net/phpwiki/ -PhpWikiCvs http://phpwiki.cvs.sourceforge.net/phpwiki/phpwiki/ +PhpWikiCvs http://phpwiki.svn.sourceforge.net/viewvc/phpwiki/trunk/pgsrc/%s?view=log +PhpWikiSvn http://phpwiki.svn.sourceforge.net/viewvc/phpwiki/trunk/pgsrc/%s?view=log PhpWikiDemo http://phpwiki.sourceforge.net/demo/ PhpWikiTest http://phpwiki.sourceforge.net/test/ Pikie http://pikie.darktech.org/cgi/pikie? Modified: trunk/lib/plugin/WikiAdminSetAcl.php =================================================================== --- trunk/lib/plugin/WikiAdminSetAcl.php 2008-10-04 13:34:18 UTC (rev 6292) +++ trunk/lib/plugin/WikiAdminSetAcl.php 2008-10-07 16:02:56 UTC (rev 6293) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright 2004 $ThePhpWikiProgrammingTeam + Copyright 2008 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -189,21 +190,28 @@ $header->pushContent(HTML::p(_("Select the pages to change:"))); } + if ($next_action == 'verify') { + $req = $request->getArgs(); + } else { + $req = $request->getArgs(); + unset($req['acl']); + } + $buttons = HTML::p(Button('submit:admin_setacl[acl]', $button_label, 'wikiadmin'), Button('submit:admin_setacl[cancel]', _("Cancel"), 'button')); return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), $header, + $buttons, $pagelist->getContent(), - HiddenInputs($request->getArgs(), + HiddenInputs( $req, false, array('admin_setacl')), HiddenInputs(array('admin_setacl[action]' => $next_action)), ENABLE_PAGEPERM ? '' - : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN)), - $buttons); + : HiddenInputs(array('require_authority_for_post' => WIKIAUTH_ADMIN))); } function setaclForm(&$header, $post_args, $pagehash) { @@ -281,114 +289,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.23 2005/02/12 17:24:24 rurban -// locale update: missing . : fixed. unified strings -// proper linebreaks -// -// Revision 1.22 2005/01/25 08:05:17 rurban -// protect against !ENABLE_PAGEPERM -// -// Revision 1.21 2004/11/23 15:17:20 rurban -// better support for case_exact search (not caseexact for consistency), -// plugin args simplification: -// handle and explode exclude and pages argument in WikiPlugin::getArgs -// and exclude in advance (at the sql level if possible) -// handle sortby and limit from request override in WikiPlugin::getArgs -// ListSubpages: renamed pages to maxpages -// -// Revision 1.20 2004/11/01 10:43:59 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.19 2004/06/16 10:38:59 rurban -// Disallow refernces in calls if the declaration is a reference -// ("allow_call_time_pass_reference clean"). -// PhpWiki is now allow_call_time_pass_reference = Off clean, -// but several external libraries may not. -// In detail these libs look to be affected (not tested): -// * Pear_DB odbc -// * adodb oracle -// -// Revision 1.18 2004/06/14 11:31:39 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.17 2004/06/13 15:33:20 rurban -// new support for arguments owner, author, creator in most relevant -// PageList plugins. in WikiAdmin* via preSelectS() -// -// Revision 1.16 2004/06/08 13:50:43 rurban -// show getfacl and acl line -// -// Revision 1.15 2004/06/08 10:05:12 rurban -// simplified admin action shortcuts -// -// Revision 1.14 2004/06/07 22:28:06 rurban -// add acl field to mimified dump -// -// Revision 1.13 2004/06/04 20:32:54 rurban -// Several locale related improvements suggested by Pierrick Meignen -// LDAP fix by John Cole -// reanable admin check without ENABLE_PAGEPERM in the admin plugins -// -// Revision 1.12 2004/06/03 22:24:48 rurban -// reenable admin check on !ENABLE_PAGEPERM, honor s=Wildcard arg, fix warning after Remove -// -// Revision 1.11 2004/06/01 15:28:02 rurban -// AdminUser only ADMIN_USER not member of Administrators -// some RateIt improvements by dfrankow -// edit_toolbar buttons -// -// Revision 1.10 2004/05/27 17:49:06 rurban -// renamed DB_Session to DbSession (in CVS also) -// added WikiDB->getParam and WikiDB->getAuthParam method to get rid of globals -// remove leading slash in error message -// added force_unlock parameter to File_Passwd (no return on stale locks) -// fixed adodb session AffectedRows -// added FileFinder helpers to unify local filenames and DATA_PATH names -// editpage.php: new edit toolbar javascript on ENABLE_EDIT_TOOLBAR -// -// Revision 1.9 2004/05/24 17:34:53 rurban -// use ACLs -// -// Revision 1.8 2004/05/16 22:32:54 rurban -// setacl icons -// -// Revision 1.7 2004/05/16 22:07:35 rurban -// check more config-default and predefined constants -// various PagePerm fixes: -// fix default PagePerms, esp. edit and view for Bogo and Password users -// implemented Creator and Owner -// BOGOUSERS renamed to BOGOUSER -// fixed syntax errors in signin.tmpl -// -// Revision 1.5 2004/04/07 23:13:19 rurban -// fixed pear/File_Passwd for Windows -// fixed FilePassUser sessions (filehandle revive) and password update -// -// Revision 1.4 2004/03/17 20:23:44 rurban -// fixed p[] pagehash passing from WikiAdminSelect, fixed problem removing pages with [] in the pagename -// -// Revision 1.3 2004/03/12 13:31:43 rurban -// enforce PagePermissions, errormsg if not Admin -// -// Revision 1.2 2004/02/24 04:02:07 rurban -// Better warning messages -// -// Revision 1.1 2004/02/23 21:30:25 rurban -// more PagePerm stuff: (working against 1.4.0) -// ACL editing and simplification of ACL's to simple rwx------ string -// not yet working. -// -// - // 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...> - 2009-01-08 09:46:28
|
Revision: 6379 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6379&view=rev Author: vargenau Date: 2009-01-08 09:46:18 +0000 (Thu, 08 Jan 2009) Log Message: ----------- New function is_image Modified Paths: -------------- trunk/lib/EditToolbar.php trunk/lib/stdlib.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2009-01-08 09:40:18 UTC (rev 6378) +++ trunk/lib/EditToolbar.php 2009-01-08 09:46:18 UTC (rev 6379) @@ -391,11 +391,8 @@ $image_js = ''; foreach ($images as $image) { // Select only files ending in ".png", ".gif", ".jpg", ".jpeg" - if ((string_ends_with($image, ".jpg")) - or (string_ends_with($image, ".jpeg")) - or (string_ends_with($image, ".gif")) - or (string_ends_with($image, ".png"))) { - $image_js .= ",['$image','{{".$image."}}']"; + if (is_image($image)) { + $image_js .= ",['$image','{{".$image."}}']"; } } $image_js = substr($image_js, 1); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-01-08 09:40:18 UTC (rev 6378) +++ trunk/lib/stdlib.php 2009-01-08 09:46:18 UTC (rev 6379) @@ -2327,6 +2327,26 @@ return $options; } +/** + * Returns true if the filename ends with an image suffix. + * Uses INLINE_IMAGES if defined, else "png|jpg|jpeg|gif" + */ +function is_image ($filename) { + + if (defined('INLINE_IMAGES')) { + $inline_images = INLINE_IMAGES; + } else { + $inline_images = "png|jpg|jpeg|gif"; + } + + foreach (explode("|", $inline_images) as $suffix) { + if (string_ends_with($filename, "." . $suffix)) { + return true; + } + } + return false; +} + // (c-file-style: "gnu") // Local Variables: // mode: php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-08 10:26:46
|
Revision: 6382 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6382&view=rev Author: vargenau Date: 2009-01-08 10:26:40 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Empty alternative if none provided Modified Paths: -------------- trunk/lib/InlineParser.php trunk/lib/stdlib.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-01-08 09:56:52 UTC (rev 6381) +++ trunk/lib/InlineParser.php 2009-01-08 10:26:40 UTC (rev 6382) @@ -930,7 +930,7 @@ $page = substr($match,2,-2); if (strpos($page, "|") === false) { $imagename = $page; - $alt = $page; + $alt = ""; } else { $imagename = substr($page, 0, strpos($page, "|")); $alt = ltrim(strstr($page, "|"), "|"); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-01-08 09:56:52 UTC (rev 6381) +++ trunk/lib/stdlib.php 2009-01-08 10:26:40 UTC (rev 6382) @@ -401,7 +401,7 @@ * * Handle embeddable objects, like svg, class, vrml, swf, svgz, pdf, avi, wmv especially. */ -function LinkImage($url, $alt = false) { +function LinkImage($url, $alt = "") { $force_img = "png|jpg|gif|jpeg|bmp|pl|cgi"; // Disallow tags in img src urls. Typical CSS attacks. // FIXME: Is this needed (or sufficient?) @@ -414,9 +414,14 @@ } else { // support new syntax: [prefix/image.jpg size=50% border=n] //if (!preg_match("/\.(".$force_img.")/i", $url)) - if (empty($alt)) $alt = basename($url); + if (empty($alt)) $alt = ""; $arr = split(' ',$url); - $link = HTML::img(array('src' => $url, 'alt' => $alt, 'title' => $alt)); + if ($alt == "") { + $link = HTML::img(array('src' => $url, 'alt' => $alt)); + } else { + $link = HTML::img(array('src' => $url, + 'alt' => $alt, 'title' => $alt)); + } if (count($arr) > 1) { $url = $arr[0]; array_shift($arr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-09 13:42:17
|
Revision: 6389 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6389&view=rev Author: vargenau Date: 2009-01-09 13:42:12 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Add function compute_tablecell in stdlib Modified Paths: -------------- trunk/lib/plugin/WikicreoleTable.php trunk/lib/stdlib.php Modified: trunk/lib/plugin/WikicreoleTable.php =================================================================== --- trunk/lib/plugin/WikicreoleTable.php 2009-01-09 13:04:37 UTC (rev 6388) +++ trunk/lib/plugin/WikicreoleTable.php 2009-01-09 13:42:12 UTC (rev 6389) @@ -101,7 +101,7 @@ for ($i=0; $i<$nbrows; $i++) { for ($j=0; $j<$nbcols; $j++) { if ($table[$i][$j][0] == '@') { - $table[$i][$j] = $this->_compute($table, $i, $j, $nbrows, $nbcols); + $table[$i][$j] = compute_tablecell($table, $i, $j, $nbrows, $nbcols); } } } @@ -142,25 +142,6 @@ return $row; } - function _compute ($mytable, $i, $j, $imax, $jmax) { - - // What is implemented: - // @@SUM(R)@@ : sum of cells in current row - // @@SUM(C)@@ : sum of cells in current column - - $result=0; - if (trim($mytable[$i][$j]) == "@@SUM(C)@@") { - for ($index=0; $index<$imax; $index++) { - $result += $mytable[$index][$j]; - } - } - if (trim($mytable[$i][$j]) == "@@SUM(R)@@") { - for ($index=0; $index<$jmax; $index++) { - $result += $mytable[$i][$index]; - } - } - return $result; - } } // For emacs users Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-01-09 13:04:37 UTC (rev 6388) +++ trunk/lib/stdlib.php 2009-01-09 13:42:12 UTC (rev 6389) @@ -2352,6 +2352,32 @@ return false; } +/** + * Compute cell in spreadsheet table + * $table: two-dimensional table + * $i and $j: indexes of cell to compute + * $imax and $jmax: table dimensions + */ +function compute_tablecell ($table, $i, $j, $imax, $jmax) { + + // What is implemented: + // @@SUM(R)@@ : sum of cells in current row + // @@SUM(C)@@ : sum of cells in current column + + $result=0; + if (trim($table[$i][$j]) == "@@SUM(C)@@") { + for ($index=0; $index<$imax; $index++) { + $result += $table[$index][$j]; + } + } + if (trim($table[$i][$j]) == "@@SUM(R)@@") { + for ($index=0; $index<$jmax; $index++) { + $result += $table[$i][$index]; + } + } + return $result; +} + // (c-file-style: "gnu") // Local Variables: // mode: php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-21 10:32:57
|
Revision: 6425 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6425&view=rev Author: vargenau Date: 2009-01-21 10:32:50 +0000 (Wed, 21 Jan 2009) Log Message: ----------- setTightness no longer needed Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/CachedMarkup.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-01-21 09:35:42 UTC (rev 6424) +++ trunk/lib/BlockParser.php 2009-01-21 10:32:50 UTC (rev 6425) @@ -1,6 +1,7 @@ <?php rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004,2005 Reini Urban + * Copyright (C) 2008 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -22,10 +23,6 @@ require_once('lib/CachedMarkup.php'); require_once('lib/InlineParser.php'); -//////////////////////////////////////////////////////////////// -// -// - /** * Deal with paragraphs and proper, recursive block indents * for the new style markup (version 2) @@ -332,9 +329,6 @@ function Block_HtmlElement($tag /*, ... */) { $this->_init(func_get_args()); } - - function setTightness($top, $bottom) { - } } class ParsedBlock extends Block_HtmlElement { @@ -402,7 +396,6 @@ if ($line === false or $line === '') { // allow $line === '0' return false; } - $tight_top = !$this->_atSpace; $re_set = &$this->_regexpset; //FIXME: php5 fails to advance here! for ($m = $re_set->match($line); $m; $m = $re_set->nextMatch($line, $m)) { @@ -414,8 +407,6 @@ //$block->_text = $line; if (DEBUG & _DEBUG_PARSER) $input->_debug('<', get_class($block)); - $tight_bottom = ! $input->skipSpace(); - $block->_setTightness($tight_top, $tight_bottom); return $block; } if (DEBUG & _DEBUG_PARSER) @@ -476,10 +467,6 @@ trigger_error('pure virtual', E_USER_ERROR); } - function _setTightness ($top, $bot) { - $this->_element->setTightness($top, $bot); - } - function merge ($followingBlock) { return false; } @@ -546,11 +533,6 @@ return true; } - function _setTightness($top, $bot) { - $li = &$this->_content[0]; - $li->setTightness($top, $bot); - } - function merge ($nextBlock) { if (isa($nextBlock, 'Block_list') and $this->_tag == $nextBlock->_tag) { if ($nextBlock->_content === $this->_content) { @@ -588,14 +570,6 @@ return true; } - function _setTightness($top, $bot) { - $dt = &$this->_content[0]; - $dd = &$this->_content[1]; - - $dt->setTightness($top, $this->_tight_defn); - $dd->setTightness($this->_tight_defn, $bot); - } - function _do_match (&$input, $m) { $pos = $input->getPos(); @@ -648,19 +622,6 @@ $this->_setTerm($th); } - function setTightness($tight_top, $tight_bot) { - $this->_tight_top = $tight_top; - $this->_tight_bot = $tight_bot; - $first = &$this->firstTR(); - $last = &$this->lastTR(); - $first->setInClass('top', $tight_top); - if (!empty($last)) { - $last->setInClass('bottom', $tight_bot); - } else { - trigger_error(sprintf("no lastTR: %s",AsXML($this->_content[0])), E_USER_WARNING); - } - } - function _addToRow ($item) { if (empty($this->_accum)) { $this->_accum = HTML::td(); @@ -674,7 +635,6 @@ if (!empty($this->_accum)) { $row = new Block_HtmlElement('tr', false, $this->_accum); - $row->setTightness($this->_next_tight_top, $tight_bottom); $this->_next_tight_top = $tight_bottom; $this->pushContent($row); @@ -784,10 +744,6 @@ return true; } - function _setTightness($top, $bot) { - $this->_content[0]->setTightness($top, $bot); - } - function finish () { $defs = &$this->_content; @@ -849,68 +805,6 @@ $this->_content[] = new TightSubBlock($input, $indent, $m->match, $itemtag); return true; } - - function _setTightness($top, $bot) { - if (count($this->_content) == 1) { - $li = &$this->_content[0]; - $li->setTightness($top, $bot); - } - else { - // This is where php5 usually brakes. - // wrong duplicated <li> contents - if (DEBUG and DEBUG & _DEBUG_PARSER and check_php_version(5)) { - if (count($this->_content) != 2) { - echo "<pre>"; - /* - $class = new Reflection_Class('XmlElement'); - // Print out basic information - printf( - "===> The %s%s%s %s '%s' [extends %s]\n". - " declared in %s\n". - " lines %d to %d\n". - " having the modifiers %d [%s]\n", - $class->isInternal() ? 'internal' : 'user-defined', - $class->isAbstract() ? ' abstract' : '', - $class->isFinal() ? ' final' : '', - $class->isInterface() ? 'interface' : 'class', - $class->getName(), - var_export($class->getParentClass(), 1), - $class->getFileName(), - $class->getStartLine(), - $class->getEndline(), - $class->getModifiers(), - implode(' ', Reflection::getModifierNames($class->getModifiers())) - ); - // Print class properties - printf("---> Properties: %s\n", var_export($class->getProperties(), 1)); - */ - echo 'count($this->_content): ', count($this->_content),"\n"; - echo "\$this->_content[0]: "; var_dump ($this->_content[0]); - - for ($i=1; $i < min(5, count($this->_content)); $i++) { - $c =& $this->_content[$i]; - echo '$this->_content[',$i,"]: \n"; - echo "_tag: "; var_dump ($c->_tag); - echo "_content: "; var_dump ($c->_content); - echo "_properties: "; var_dump ($c->_properties); - } - debug_print_backtrace(); - if (DEBUG & _DEBUG_APD) { - if (function_exists("xdebug_get_function_stack")) { - var_dump (xdebug_get_function_stack()); - } - } - echo "</pre>"; - } - } - if (!check_php_version(5)) - assert(count($this->_content) == 2); - $dt = &$this->_content[0]; - $dd = &$this->_content[1]; - $dt->setTightness($top, false); - $dd->setTightness(false, $bot); - } - } } class Block_pre extends BlockMarkup @@ -1031,10 +925,6 @@ $this->_element = new Block_HtmlElement('hr'); return true; } - - function _setTightness($top, $bot) { - // Don't tighten <hr/>s - } } class Block_heading extends BlockMarkup @@ -1050,10 +940,6 @@ return true; } - - function _setTightness($top, $bot) { - // Don't tighten headers. - } } class Block_heading_wikicreole extends BlockMarkup @@ -1073,10 +959,6 @@ return true; } - - function _setTightness($top, $bot) { - // Don't tighten headers. - } } class Block_p extends BlockMarkup @@ -1091,11 +973,6 @@ return true; } - function _setTightness ($top, $bot) { - $this->_tight_top = $top; - $this->_tight_bot = $bot; - } - function merge ($nextBlock) { $class = get_class($nextBlock); if (strtolower($class) == 'block_p' and $this->_tight_bot) { @@ -1109,7 +986,6 @@ function finish () { $content = TransformInline(trim($this->_text)); $p = new Block_HtmlElement('p', false, $content); - $p->setTightness($this->_tight_top, $this->_tight_bot); return $p; } } @@ -1163,15 +1039,10 @@ } } $this->_element = new Block_HtmlElement($tag, $args, $content); - //$this->_element->setTightness($tag == 'span', $tag == 'span'); return true; } - function _setTightness($top, $bot) { - // Don't tighten user <div|span> - } } - //////////////////////////////////////////////////////////////// // Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2009-01-21 09:35:42 UTC (rev 6424) +++ trunk/lib/CachedMarkup.php 2009-01-21 10:32:50 UTC (rev 6425) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004-2008 $ThePhpWikiProgrammingTeam + * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -755,9 +756,6 @@ } } - function setTightness($top, $bottom) { - } - function isInlineElement() { return false; } @@ -789,69 +787,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.64 2008/03/21 20:35:52 rurban -// Improve upon embedded ImgObject, such as [ *.mp3 ], objects. -// Object tags now render as label correctly and param tags are also added. -// -// Revision 1.63 2008/03/17 19:03:08 rurban -// protect $WikiTheme->VALID_LINKS -// -// Revision 1.62 2008/02/14 18:40:32 rurban -// fix DUMP_MODE with LINKS -// -// Revision 1.61 2008/01/30 19:08:59 vargenau -// Valid HTML code: we need a div, it might contain a table -// -// Revision 1.60 2007/09/15 12:28:46 rurban -// Improve multi-page format handling: abstract _DumpHtmlToDir. get rid of non-external pdf, non-global VALID_LINKS -// -// Revision 1.59 2007/09/12 19:32:29 rurban -// link only VALID_LINKS with pagelist HTML_DUMP -// -// Revision 1.58 2007/07/14 12:30:53 rurban -// include => require -// -// Revision 1.57 2007/05/28 20:13:46 rurban -// Overwrite all attributes at once at page->save to delete dangling meta -// -// Revision 1.56 2007/04/08 16:39:40 rurban -// fix when DISABLE_UNITS = true (thanks to Walter Rafelsberger) -// simplify title calculation -// -// Revision 1.55 2007/03/18 17:35:14 rurban -// Fix :DontStoreLink -// -// Revision 1.54 2007/01/25 07:41:41 rurban -// Print attribute in title. Use CSS formatting for ::= -// -// Revision 1.53 2007/01/21 23:26:52 rurban -// Translate Found by -// -// Revision 1.52 2007/01/20 15:53:51 rurban -// Rewrite of SearchHighlight: through ActionPage and InlineParser -// -// Revision 1.51 2007/01/20 11:24:53 rurban -// add SpellCheck support -// -// Revision 1.50 2007/01/07 18:41:51 rurban -// Fix fallback ZipReader syntax error. Use label=false. Add parsed plugin names to the stored tree. -// -// Revision 1.49 2007/01/04 16:40:35 rurban -// Remove units object from CachedMarkup links, Store parsed linkinfo only: basevalue, baseunit. -// -// Revision 1.48 2007/01/03 21:22:08 rurban -// Use Units for attributes. Store the unified base value as Cached_SemanticLink->_attribute_base in the wikimarkup and display it as title. -// -// Revision 1.47 2007/01/02 13:17:57 rurban -// fix semantic page links and attributes, esp. attributes. they get stored as link to empty page also. tighten semantic url expander regex, omit want_content if not necessary -// -// Revision 1.46 2006/12/22 00:11:38 rurban -// add seperate expandurl method, to simplify pagename parsing -// -// Revision 1.45 2006/10/12 06:33:50 rurban -// decide later with which class to render this link (fixes interwiki link layout) - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-01-21 09:35:42 UTC (rev 6424) +++ trunk/lib/InlineParser.php 2009-01-21 10:32:50 UTC (rev 6425) @@ -27,8 +27,6 @@ * @package Markup * @author Geoffrey T. Dairiki, Reini Urban */ -/** - */ /** * This is the character used in wiki markup to escape characters with @@ -1138,7 +1136,6 @@ and isa($markup,'Markup_plugin')) { $current =& $output->_content[count($output->_content)-1]; - $current->setTightness(true,true); } $output->pushContent($match->prematch); $text = $match->postmatch; @@ -1162,11 +1159,6 @@ else $current = $markup->markup($match->match, $body); $input = $match->postmatch; - if (isset($markup) and is_object($markup) - and isa($markup,'Markup_plugin')) - { - $current->setTightness(true,true); - } $output->pushContent($match->prematch, $current); $match = $regexps->match($input); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-21 15:35:27
|
Revision: 6428 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6428&view=rev Author: vargenau Date: 2009-01-21 15:35:18 +0000 (Wed, 21 Jan 2009) Log Message: ----------- Reverting to 6424 Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/CachedMarkup.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-01-21 13:26:11 UTC (rev 6427) +++ trunk/lib/BlockParser.php 2009-01-21 15:35:18 UTC (rev 6428) @@ -1,7 +1,6 @@ <?php rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004,2005 Reini Urban - * Copyright (C) 2008 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -23,6 +22,10 @@ require_once('lib/CachedMarkup.php'); require_once('lib/InlineParser.php'); +//////////////////////////////////////////////////////////////// +// +// + /** * Deal with paragraphs and proper, recursive block indents * for the new style markup (version 2) @@ -262,6 +265,7 @@ function skipSpace () { // In contrast to the case for top-level blocks, // for sub-blocks, there never appears to be any trailing space. + // (The last block in the sub-block should always be of class tight-bottom.) while ($this->_line === '') $this->advance(); @@ -328,6 +332,9 @@ function Block_HtmlElement($tag /*, ... */) { $this->_init(func_get_args()); } + + function setTightness($top, $bottom) { + } } class ParsedBlock extends Block_HtmlElement { @@ -395,6 +402,7 @@ if ($line === false or $line === '') { // allow $line === '0' return false; } + $tight_top = !$this->_atSpace; $re_set = &$this->_regexpset; //FIXME: php5 fails to advance here! for ($m = $re_set->match($line); $m; $m = $re_set->nextMatch($line, $m)) { @@ -406,7 +414,8 @@ //$block->_text = $line; if (DEBUG & _DEBUG_PARSER) $input->_debug('<', get_class($block)); - $input->skipSpace(); + $tight_bottom = ! $input->skipSpace(); + $block->_setTightness($tight_top, $tight_bottom); return $block; } if (DEBUG & _DEBUG_PARSER) @@ -467,6 +476,10 @@ trigger_error('pure virtual', E_USER_ERROR); } + function _setTightness ($top, $bot) { + $this->_element->setTightness($top, $bot); + } + function merge ($followingBlock) { return false; } @@ -493,6 +506,8 @@ if (get_class($nextBlock) == get_class($this)) { assert ($nextBlock->_depth < $this->_depth); $nextBlock->_element->unshiftContent($this->_element); + if (!empty($this->_tight_top)) + $nextBlock->_tight_top = $this->_tight_top; return $nextBlock; } return false; @@ -531,6 +546,11 @@ return true; } + function _setTightness($top, $bot) { + $li = &$this->_content[0]; + $li->setTightness($top, $bot); + } + function merge ($nextBlock) { if (isa($nextBlock, 'Block_list') and $this->_tag == $nextBlock->_tag) { if ($nextBlock->_content === $this->_content) { @@ -568,6 +588,14 @@ return true; } + function _setTightness($top, $bot) { + $dt = &$this->_content[0]; + $dd = &$this->_content[1]; + + $dt->setTightness($top, $this->_tight_defn); + $dd->setTightness($this->_tight_defn, $bot); + } + function _do_match (&$input, $m) { $pos = $input->getPos(); @@ -590,6 +618,8 @@ } } + + class Block_table_dl_defn extends XmlContent { var $nrows; @@ -600,6 +630,7 @@ if (!is_array($defn)) $defn = $defn->getContent(); + $this->_next_tight_top = false; // value irrelevant - gets fixed later $this->_ncols = $this->_ComputeNcols($defn); $this->_nrows = 0; @@ -617,6 +648,19 @@ $this->_setTerm($th); } + function setTightness($tight_top, $tight_bot) { + $this->_tight_top = $tight_top; + $this->_tight_bot = $tight_bot; + $first = &$this->firstTR(); + $last = &$this->lastTR(); + $first->setInClass('top', $tight_top); + if (!empty($last)) { + $last->setInClass('bottom', $tight_bot); + } else { + trigger_error(sprintf("no lastTR: %s",AsXML($this->_content[0])), E_USER_WARNING); + } + } + function _addToRow ($item) { if (empty($this->_accum)) { $this->_accum = HTML::td(); @@ -626,10 +670,13 @@ $this->_accum->pushContent($item); } - function _flushRow () { + function _flushRow ($tight_bottom=false) { if (!empty($this->_accum)) { $row = new Block_HtmlElement('tr', false, $this->_accum); + $row->setTightness($this->_next_tight_top, $tight_bottom); + $this->_next_tight_top = $tight_bottom; + $this->pushContent($row); $this->_accum = false; $this->_nrows++; @@ -640,11 +687,12 @@ if (!($table_rows = $table->getContent())) return; - $this->_flushRow(); - + $this->_flushRow($table_rows[0]->_tight_top); + foreach ($table_rows as $subdef) { $this->pushContent($subdef); $this->_nrows += $subdef->nrows(); + $this->_next_tight_top = $subdef->_tight_bot; } } @@ -736,6 +784,10 @@ return true; } + function _setTightness($top, $bot) { + $this->_content[0]->setTightness($top, $bot); + } + function finish () { $defs = &$this->_content; @@ -797,6 +849,68 @@ $this->_content[] = new TightSubBlock($input, $indent, $m->match, $itemtag); return true; } + + function _setTightness($top, $bot) { + if (count($this->_content) == 1) { + $li = &$this->_content[0]; + $li->setTightness($top, $bot); + } + else { + // This is where php5 usually brakes. + // wrong duplicated <li> contents + if (DEBUG and DEBUG & _DEBUG_PARSER and check_php_version(5)) { + if (count($this->_content) != 2) { + echo "<pre>"; + /* + $class = new Reflection_Class('XmlElement'); + // Print out basic information + printf( + "===> The %s%s%s %s '%s' [extends %s]\n". + " declared in %s\n". + " lines %d to %d\n". + " having the modifiers %d [%s]\n", + $class->isInternal() ? 'internal' : 'user-defined', + $class->isAbstract() ? ' abstract' : '', + $class->isFinal() ? ' final' : '', + $class->isInterface() ? 'interface' : 'class', + $class->getName(), + var_export($class->getParentClass(), 1), + $class->getFileName(), + $class->getStartLine(), + $class->getEndline(), + $class->getModifiers(), + implode(' ', Reflection::getModifierNames($class->getModifiers())) + ); + // Print class properties + printf("---> Properties: %s\n", var_export($class->getProperties(), 1)); + */ + echo 'count($this->_content): ', count($this->_content),"\n"; + echo "\$this->_content[0]: "; var_dump ($this->_content[0]); + + for ($i=1; $i < min(5, count($this->_content)); $i++) { + $c =& $this->_content[$i]; + echo '$this->_content[',$i,"]: \n"; + echo "_tag: "; var_dump ($c->_tag); + echo "_content: "; var_dump ($c->_content); + echo "_properties: "; var_dump ($c->_properties); + } + debug_print_backtrace(); + if (DEBUG & _DEBUG_APD) { + if (function_exists("xdebug_get_function_stack")) { + var_dump (xdebug_get_function_stack()); + } + } + echo "</pre>"; + } + } + if (!check_php_version(5)) + assert(count($this->_content) == 2); + $dt = &$this->_content[0]; + $dd = &$this->_content[1]; + $dt->setTightness($top, false); + $dd->setTightness(false, $bot); + } + } } class Block_pre extends BlockMarkup @@ -917,6 +1031,10 @@ $this->_element = new Block_HtmlElement('hr'); return true; } + + function _setTightness($top, $bot) { + // Don't tighten <hr/>s + } } class Block_heading extends BlockMarkup @@ -932,6 +1050,10 @@ return true; } + + function _setTightness($top, $bot) { + // Don't tighten headers. + } } class Block_heading_wikicreole extends BlockMarkup @@ -951,6 +1073,10 @@ return true; } + + function _setTightness($top, $bot) { + // Don't tighten headers. + } } class Block_p extends BlockMarkup @@ -965,10 +1091,16 @@ return true; } + function _setTightness ($top, $bot) { + $this->_tight_top = $top; + $this->_tight_bot = $bot; + } + function merge ($nextBlock) { $class = get_class($nextBlock); - if (strtolower($class) == 'block_p') { + if (strtolower($class) == 'block_p' and $this->_tight_bot) { $this->_text .= "\n" . $nextBlock->_text; + $this->_tight_bot = $nextBlock->_tight_bot; return $this; } return false; @@ -977,6 +1109,7 @@ function finish () { $content = TransformInline(trim($this->_text)); $p = new Block_HtmlElement('p', false, $content); + $p->setTightness($this->_tight_top, $this->_tight_bot); return $p; } } @@ -1030,10 +1163,15 @@ } } $this->_element = new Block_HtmlElement($tag, $args, $content); + //$this->_element->setTightness($tag == 'span', $tag == 'span'); return true; } + function _setTightness($top, $bot) { + // Don't tighten user <div|span> + } } + //////////////////////////////////////////////////////////////// // Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2009-01-21 13:26:11 UTC (rev 6427) +++ trunk/lib/CachedMarkup.php 2009-01-21 15:35:18 UTC (rev 6428) @@ -2,7 +2,6 @@ rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004-2008 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -36,12 +35,8 @@ } function pack() { - // This causes a strange bug when a comment containing - // a single quote is entered in the Summary box: - // - the history is wrong (user and comment missing) - // - the table of contents plugin no longer works - // if (function_exists('gzcompress')) - // return gzcompress(serialize($this), 9); + if (function_exists('gzcompress')) + return gzcompress(serialize($this), 9); return serialize($this); // FIXME: probably should implement some sort of "compression" @@ -760,6 +755,9 @@ } } + function setTightness($top, $bottom) { + } + function isInlineElement() { return false; } @@ -791,6 +789,69 @@ } } +// $Log: not supported by cvs2svn $ +// Revision 1.64 2008/03/21 20:35:52 rurban +// Improve upon embedded ImgObject, such as [ *.mp3 ], objects. +// Object tags now render as label correctly and param tags are also added. +// +// Revision 1.63 2008/03/17 19:03:08 rurban +// protect $WikiTheme->VALID_LINKS +// +// Revision 1.62 2008/02/14 18:40:32 rurban +// fix DUMP_MODE with LINKS +// +// Revision 1.61 2008/01/30 19:08:59 vargenau +// Valid HTML code: we need a div, it might contain a table +// +// Revision 1.60 2007/09/15 12:28:46 rurban +// Improve multi-page format handling: abstract _DumpHtmlToDir. get rid of non-external pdf, non-global VALID_LINKS +// +// Revision 1.59 2007/09/12 19:32:29 rurban +// link only VALID_LINKS with pagelist HTML_DUMP +// +// Revision 1.58 2007/07/14 12:30:53 rurban +// include => require +// +// Revision 1.57 2007/05/28 20:13:46 rurban +// Overwrite all attributes at once at page->save to delete dangling meta +// +// Revision 1.56 2007/04/08 16:39:40 rurban +// fix when DISABLE_UNITS = true (thanks to Walter Rafelsberger) +// simplify title calculation +// +// Revision 1.55 2007/03/18 17:35:14 rurban +// Fix :DontStoreLink +// +// Revision 1.54 2007/01/25 07:41:41 rurban +// Print attribute in title. Use CSS formatting for ::= +// +// Revision 1.53 2007/01/21 23:26:52 rurban +// Translate Found by +// +// Revision 1.52 2007/01/20 15:53:51 rurban +// Rewrite of SearchHighlight: through ActionPage and InlineParser +// +// Revision 1.51 2007/01/20 11:24:53 rurban +// add SpellCheck support +// +// Revision 1.50 2007/01/07 18:41:51 rurban +// Fix fallback ZipReader syntax error. Use label=false. Add parsed plugin names to the stored tree. +// +// Revision 1.49 2007/01/04 16:40:35 rurban +// Remove units object from CachedMarkup links, Store parsed linkinfo only: basevalue, baseunit. +// +// Revision 1.48 2007/01/03 21:22:08 rurban +// Use Units for attributes. Store the unified base value as Cached_SemanticLink->_attribute_base in the wikimarkup and display it as title. +// +// Revision 1.47 2007/01/02 13:17:57 rurban +// fix semantic page links and attributes, esp. attributes. they get stored as link to empty page also. tighten semantic url expander regex, omit want_content if not necessary +// +// Revision 1.46 2006/12/22 00:11:38 rurban +// add seperate expandurl method, to simplify pagename parsing +// +// Revision 1.45 2006/10/12 06:33:50 rurban +// decide later with which class to render this link (fixes interwiki link layout) + // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-01-21 13:26:11 UTC (rev 6427) +++ trunk/lib/InlineParser.php 2009-01-21 15:35:18 UTC (rev 6428) @@ -27,6 +27,8 @@ * @package Markup * @author Geoffrey T. Dairiki, Reini Urban */ +/** + */ /** * This is the character used in wiki markup to escape characters with @@ -1136,6 +1138,7 @@ and isa($markup,'Markup_plugin')) { $current =& $output->_content[count($output->_content)-1]; + $current->setTightness(true,true); } $output->pushContent($match->prematch); $text = $match->postmatch; @@ -1159,6 +1162,11 @@ else $current = $markup->markup($match->match, $body); $input = $match->postmatch; + if (isset($markup) and is_object($markup) + and isa($markup,'Markup_plugin')) + { + $current->setTightness(true,true); + } $output->pushContent($match->prematch, $current); $match = $regexps->match($input); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-23 13:07:16
|
Revision: 6431 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6431&view=rev Author: vargenau Date: 2009-01-23 13:07:05 +0000 (Fri, 23 Jan 2009) Log Message: ----------- Moving Wikicreole tables from InlineParser to BlockParser Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-01-23 12:33:28 UTC (rev 6430) +++ trunk/lib/BlockParser.php 2009-01-23 13:07:05 UTC (rev 6431) @@ -1,6 +1,7 @@ <?php rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004,2005 Reini Urban + * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -22,10 +23,6 @@ require_once('lib/CachedMarkup.php'); require_once('lib/InlineParser.php'); -//////////////////////////////////////////////////////////////// -// -// - /** * Deal with paragraphs and proper, recursive block indents * for the new style markup (version 2) @@ -370,7 +367,7 @@ if (!is_object($_regexpset)) { $Block_types = array - ('oldlists', 'list', 'dl', 'table_dl', + ('oldlists', 'list', 'dl', 'table_dl', 'table_wikicreole', 'blockquote', 'heading', 'heading_wikicreole', 'hr', 'pre', 'email_blockquote', 'plugin', 'plugin_wikicreole', 'p'); // insert it before p! @@ -1008,6 +1005,39 @@ } } +class Block_table_wikicreole extends Block_pre +{ + var $_re = '\s*\|'; + + function _match (&$input, $m) { + $pos = $input->getPos(); + $pi = "|" . $m->postmatch; + + $intable = true; + while ($intable) { + if (($line = $input->nextLine()) === false) { + $input->setPos($pos); + return false; + } + if (!$line) { + $intable = false; + $trimline = $line; + } else { + $trimline = trim($line); + if ($trimline[0] != "|") { + $intable = false; + } + } + $pi .= "\n$trimline"; + } + + $pi = '<'.'?plugin WikicreoleTable ' . $pi . '?'.'>'; + + $this->_element = new Cached_PluginInvocation($pi); + return true; + } +} + class Block_email_blockquote extends BlockMarkup { var $_attr = array('class' => 'mail-style-quote'); Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-01-23 12:33:28 UTC (rev 6430) +++ trunk/lib/InlineParser.php 2009-01-23 13:07:05 UTC (rev 6431) @@ -2,7 +2,7 @@ rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> * Copyright (C) 2004-2008 Reini Urban - * Copyright (C) 2008 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -992,16 +992,6 @@ } } -class Markup_wikicreoletable_plugin extends SimpleMarkup -{ - var $_match_regexp = '^\|=.*?\?>'; - - function markup ($match) { - $s = '<'.'?plugin WikicreoleTable ' . $match . '?'.'>'; - return new Cached_PluginInvocation($s); - } -} - // "..." => "…" browser specific display (not cached?) // Support some HTML::Entities: (C) for copy, --- for mdash, -- for ndash // TODO: "--" => "&emdash;" browser specific display (not cached?) @@ -1093,7 +1083,6 @@ $this->_addMarkup(new Markup_html_divspan); if (ENABLE_MARKUP_COLOR and !$non_default) $this->_addMarkup(new Markup_color); - $this->_addMarkup(new Markup_wikicreoletable_plugin); // Markup_wikicreole_preformatted must be before Markup_template_plugin $this->_addMarkup(new Markup_wikicreole_preformatted); if (ENABLE_MARKUP_TEMPLATE and !$non_default) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-23 13:22:56
|
Revision: 6432 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6432&view=rev Author: vargenau Date: 2009-01-23 13:22:51 +0000 (Fri, 23 Jan 2009) Log Message: ----------- Moving Mediawiki tables from InlineParser to BlockParser Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-01-23 13:07:05 UTC (rev 6431) +++ trunk/lib/BlockParser.php 2009-01-23 13:22:51 UTC (rev 6432) @@ -367,7 +367,7 @@ if (!is_object($_regexpset)) { $Block_types = array - ('oldlists', 'list', 'dl', 'table_dl', 'table_wikicreole', + ('oldlists', 'list', 'dl', 'table_dl', 'table_wikicreole', 'table_mediawiki', 'blockquote', 'heading', 'heading_wikicreole', 'hr', 'pre', 'email_blockquote', 'plugin', 'plugin_wikicreole', 'p'); // insert it before p! @@ -1038,6 +1038,36 @@ } } +/** ENABLE_MARKUP_MEDIAWIKI_TABLE + * Table syntax similar to Mediawiki + * {| + * => <?plugin MediawikiTable + * |} + * => ?> + */ +class Block_table_mediawiki extends Block_pre +{ + var $_re = '{\|'; + + function _match (&$input, $m) { + $pos = $input->getPos(); + $pi = $m->postmatch; + while (!preg_match('/(?<!'.ESCAPE_CHAR.')\|}\s*$/', $pi)) { + if (($line = $input->nextLine()) === false) { + $input->setPos($pos); + return false; + } + $pi .= "\n$line"; + } + $input->advance(); + + $pi = str_replace("\|}", "", $pi); + $pi = '<'.'?plugin MediawikiTable ' . $pi . '?'.'>'; + $this->_element = new Cached_PluginInvocation($pi); + return true; + } +} + class Block_email_blockquote extends BlockMarkup { var $_attr = array('class' => 'mail-style-quote'); Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-01-23 13:07:05 UTC (rev 6431) +++ trunk/lib/InlineParser.php 2009-01-23 13:22:51 UTC (rev 6432) @@ -975,23 +975,6 @@ } } -/** ENABLE_MARKUP_MEDIAWIKI_TABLE - * Table syntax similar to Mediawiki - * {| - * => <?plugin MediawikiTable - * |} - * => ?> - */ -class Markup_mediawikitable_plugin extends SimpleMarkup -{ - var $_match_regexp = '\{\|.*?\|\}'; - - function markup ($match) { - $s = '<'.'?plugin MediawikiTable ' . $match . '?'.'>'; - return new Cached_PluginInvocation($s); - } -} - // "..." => "…" browser specific display (not cached?) // Support some HTML::Entities: (C) for copy, --- for mdash, -- for ndash // TODO: "--" => "&emdash;" browser specific display (not cached?) @@ -1087,8 +1070,6 @@ $this->_addMarkup(new Markup_wikicreole_preformatted); if (ENABLE_MARKUP_TEMPLATE and !$non_default) $this->_addMarkup(new Markup_template_plugin); - if (ENABLE_MARKUP_MEDIAWIKI_TABLE) - $this->_addMarkup(new Markup_mediawikitable_plugin); // This does not work yet if (0 and PLUGIN_MARKUP_MAP and !$non_default) $this->_addMarkup(new Markup_xml_plugin); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-01-31 13:22:14
|
Revision: 6468 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6468&view=rev Author: vargenau Date: 2009-01-31 12:13:51 +0000 (Sat, 31 Jan 2009) Log Message: ----------- Netscape 3 and 4 are dead Modified Paths: -------------- trunk/lib/config.php trunk/lib/editpage.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2009-01-30 18:37:08 UTC (rev 6467) +++ trunk/lib/config.php 2009-01-31 12:13:51 UTC (rev 6468) @@ -99,14 +99,6 @@ if ($version) return $agent and browserVersion() >= $version; else return $agent; } -// NS3 or less -function isBrowserNS3() { - return (isBrowserNetscape() and browserVersion() < 4.0); -} -// NS4 or less -function isBrowserNS4() { - return (isBrowserNetscape() and browserVersion() < 5.0); -} // must omit display alternate stylesheets: konqueror 3.1.4 // http://sourceforge.net/tracker/index.php?func=detail&aid=945154&group_id=6121&atid=106121 function isBrowserKonqueror($version = false) { Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2009-01-30 18:37:08 UTC (rev 6467) +++ trunk/lib/editpage.php 2009-01-31 12:13:51 UTC (rev 6468) @@ -516,7 +516,7 @@ ']')); } 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; @@ -613,11 +613,6 @@ 'cols' => $request->getPref('editWidth'), 'readonly' => (bool) $readonly), $this->_content); - /** <textarea wrap="virtual"> is not valid XHTML but Netscape 4 requires it - * to wrap long lines. - */ - if (isBrowserNS4()) - $textarea->setAttr('wrap', 'virtual'); if (ENABLE_WYSIWYG) { return $this->WysiwygEdit->Textarea($textarea, $this->_wikicontent, $textarea->getAttr('name')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-02-17 14:47:11
|
Revision: 6509 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6509&view=rev Author: vargenau Date: 2009-02-17 14:47:05 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Wikicreole placeholder Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-02-17 11:26:21 UTC (rev 6508) +++ trunk/lib/BlockParser.php 2009-02-17 14:47:05 UTC (rev 6509) @@ -368,7 +368,7 @@ if (!is_object($_regexpset)) { // nowiki_wikicreole must be before template_plugin $Block_types = array - ('nowiki_wikicreole', 'template_plugin', 'oldlists', 'list', 'dl', 'table_dl', 'table_wikicreole', 'table_mediawiki', + ('nowiki_wikicreole', 'template_plugin', 'placeholder', 'oldlists', 'list', 'dl', 'table_dl', 'table_wikicreole', 'table_mediawiki', 'blockquote', 'heading', 'heading_wikicreole', 'hr', 'pre', 'email_blockquote', 'plugin', 'plugin_wikicreole', 'p'); // insert it before p! @@ -952,6 +952,35 @@ return true; } } + +// Wikicreole placeholder +// <<<placeholder>>> +class Block_placeholder extends BlockMarkup +{ + var $_re = '<<<'; + + function _match (&$input, $m) { + $endtag = '>>>'; + $text = array(); + $pos = $input->getPos(); + + $line = $m->postmatch; + while (ltrim($line) != $endtag) { + $text[] = $line; + if (($line = $input->nextLine()) === false) { + $input->setPos($pos); + return false; + } + } + $input->advance(); + + $text = join("\n", $text); + $text = '<<<' . $text . '>>>'; + $this->_element = new Block_HtmlElement('div', false, $text); + return true; + } +} + class Block_nowiki_wikicreole extends BlockMarkup { var $_re = '{{{'; Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-02-17 11:26:21 UTC (rev 6508) +++ trunk/lib/InlineParser.php 2009-02-17 14:47:05 UTC (rev 6509) @@ -858,6 +858,17 @@ } } +// Wikicreole placeholder +// <<<placeholder>>> +class Markup_placeholder extends SimpleMarkup +{ + var $_match_regexp = '<<<.*?>>>'; + + function markup ($match) { + return HTML::span($match); + } +} + // Single-line HTML comment // <!-- This is a comment --> class Markup_html_comment extends SimpleMarkup @@ -1056,7 +1067,7 @@ $non_default = false; $markup_types = array ('escape', 'wikicreolebracketlink', 'bracketlink', 'url', - 'html_comment', + 'html_comment', 'placeholder', 'interwiki', 'semanticlink', 'wikiword', 'linebreak', 'wikicreole_superscript', 'wikicreole_subscript', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-01 14:39:37
|
Revision: 6610 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6610&view=rev Author: vargenau Date: 2009-03-01 14:39:27 +0000 (Sun, 01 Mar 2009) Log Message: ----------- ASCIIMathPHP-2.0 for PHP 5 Modified Paths: -------------- trunk/lib/plugin/AsciiMath.php Added Paths: ----------- trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.cfg.php trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.class.php Added: trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.cfg.php =================================================================== --- trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.cfg.php (rev 0) +++ trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.cfg.php 2009-03-01 14:39:27 UTC (rev 6610) @@ -0,0 +1,218 @@ +<?php + +$symbol_arr = array( + +// Greek symbols +'alpha' => array( 'input'=>'alpha','tag'=>'mi', 'output'=>'&#' . hexdec('03B1') . ';'), +'beta' => array( 'input'=>'beta','tag'=>'mi', 'output'=>'&#' . hexdec('03B2') . ';'), +'chi' => array( 'input'=>'chi','tag'=>'mi', 'output'=>'&#' . hexdec('03C7') . ';'), +'delta' => array( 'input'=>'delta','tag'=>'mi', 'output'=>'&#' . hexdec('03B4') . ';'), +'Delta' => array( 'input'=>'Delta','tag'=>'mo', 'output'=>'&#' . hexdec('0394') . ';'), +'epsi' => array( 'input'=>'epsi','tag'=>'mi', 'output'=>'&#' . hexdec('03B5') . ';'), +'varepsilon' => array( 'input'=>'varepsilon','tag'=>'mi', 'output'=>'&#' . hexdec('025B') . ';'), +'eta' => array( 'input'=>'eta','tag'=>'mi', 'output'=>'&#' . hexdec('03B7') . ';'), +'gamma' => array( 'input'=>'gamma','tag'=>'mi', 'output'=>'&#' . hexdec('03B3') . ';'), +'Gamma' => array( 'input'=>'Gamma','tag'=>'mi', 'output'=>'&#' . hexdec('0393') . ';'), +'iota' => array( 'input'=>'iota','tag'=>'mi', 'output'=>'&#' . hexdec('03B9') . ';'), +'kappa' => array( 'input'=>'kappa','tag'=>'mi', 'output'=>'&#' . hexdec('03BA') . ';'), +'lambda' => array( 'input'=>'lambda','tag'=>'mi', 'output'=>'&#' . hexdec('03BB') . ';'), +'Lambda' => array( 'input'=>'Lambda','tag'=>'mo', 'output'=>'&#' . hexdec('039B') . ';'), +'mu' => array( 'input'=>'mu','tag'=>'mi', 'output'=>'&#' . hexdec('03BC') . ';'), +'nu' => array( 'input'=>'nu','tag'=>'mi', 'output'=>'&#' . hexdec('03BD') . ';'), +'omega' => array( 'input'=>'omega','tag'=>'mi', 'output'=>'&#' . hexdec('03C9') . ';'), +'Omega' => array( 'input'=>'Omega','tag'=>'mo', 'output'=>'&#' . hexdec('03A9') . ';'), +'phi' => array( 'input'=>'phi','tag'=>'mi', 'output'=>'&#' . hexdec('03C6') . ';'), +'varphi' => array( 'input'=>'varphi','tag'=>'mi', 'output'=>'&#' . hexdec('03D5') . ';'), +'Phi' => array( 'input'=>'Phi','tag'=>'mo', 'output'=>'&#' . hexdec('03A6') . ';'), +'pi' => array( 'input'=>'pi','tag'=>'mi', 'output'=>'&#' . hexdec('03C0') . ';'), +'Pi' => array( 'input'=>'Pi','tag'=>'mo', 'output'=>'&#' . hexdec('03A0') . ';'), +'psi' => array( 'input'=>'psi','tag'=>'mi', 'output'=>'&#' . hexdec('03C8') . ';'), +'rho' => array( 'input'=>'rho','tag'=>'mi', 'output'=>'&#' . hexdec('03C1') . ';'), +'sigma' => array( 'input'=>'sigma','tag'=>'mi', 'output'=>'&#' . hexdec('03C3') . ';'), +'Sigma' => array( 'input'=>'Sigma','tag'=>'mo', 'output'=>'&#' . hexdec('03A3') . ';'), +'tau' => array( 'input'=>'tau','tag'=>'mi', 'output'=>'&#' . hexdec('03C4') . ';'), +'theta' => array( 'input'=>'theta','tag'=>'mi', 'output'=>'&#' . hexdec('03B8') . ';'), +'vartheta' => array( 'input'=>'vartheta','tag'=>'mi', 'output'=>'&#' . hexdec('03D1') . ';'), +'Theta' => array( 'input'=>'Theta','tag'=>'mo', 'output'=>'&#' . hexdec('0398') . ';'), +'upsilon' => array( 'input'=>'upsilon','tag'=>'mi', 'output'=>'&#' . hexdec('03C5') . ';'), +'xi' => array( 'input'=>'xi','tag'=>'mi', 'output'=>'&#' . hexdec('03BE') . ';'), +'Xi' => array( 'input'=>'alpha','tag'=>'mo', 'output'=>'&#' . hexdec('039E') . ';'), +'zeta' => array( 'input'=>'zeta','tag'=>'mi', 'output'=>'&#' . hexdec('03B6') . ';'), + +// Binary operation symbols +'*' => array( 'input'=>'*','tag'=>'mo', 'output'=>'&#' . hexdec('22C5') . ';'), +'**' => array( 'input'=>'**','tag'=>'mo', 'output'=>'&#' . hexdec('22C6') . ';'), +'//' => array( 'input'=>'//','tag'=>'mo', 'output'=>'/'), +'\\\\' => array( 'input'=>'\\\\','tag'=>'mo', 'output'=>'\\'), +'xx' => array( 'input'=>'xx','tag'=>'mo', 'output'=>'&#' . hexdec('00D7') . ';'), +'-:' => array( 'input'=>'-:','tag'=>'mo', 'output'=>'&#' . hexdec('00F7') . ';'), +'@' => array( 'input'=>'@','tag'=>'mo', 'output'=>'&#' . hexdec('2218') . ';'), +'o+' => array( 'input'=>'o+','tag'=>'mo', 'output'=>'&#' . hexdec('2295') . ';'), +'ox' => array( 'input'=>'ox','tag'=>'mo', 'output'=>'&#' . hexdec('2297') . ';'), +'sum' => array( 'input'=>'sum','tag'=>'mo', 'output'=>'&#' . hexdec('2211') . ';', 'underover'=>TRUE), +'prod' => array( 'input'=>'prod','tag'=>'mo', 'output'=>'&#' . hexdec('220F') . ';', 'underover'=>TRUE), +'^^' => array( 'input'=>'^^','tag'=>'mo', 'output'=>'&#' . hexdec('2227') . ';'), +'^^^' => array( 'input'=>'^^^','tag'=>'mo', 'output'=>'&#' . hexdec('22C0') . ';', 'underover'=>TRUE), +'vv' => array( 'input'=>'vv','tag'=>'mo', 'output'=>'&#' . hexdec('2228') . ';'), +'vvv' => array( 'input'=>'vvv','tag'=>'mo', 'output'=>'&#' . hexdec('22C1') . ';', 'underover'=>TRUE), +'nn' => array( 'input'=>'nn','tag'=>'mo', 'output'=>'&#' . hexdec('2229') . ';'), +'nnn' => array( 'input'=>'nnn','tag'=>'mo', 'output'=>'&#' . hexdec('22C5') . ';', 'underover'=>TRUE), +'uu' => array( 'input'=>'uu','tag'=>'mo', 'output'=>'&#' . hexdec('222A') . ';'), +'uuu' => array( 'input'=>'uuu','tag'=>'mo', 'output'=>'&#' . hexdec('22C3') . ';', 'underover'=>TRUE), + +// Binary relation symbols +'!=' => array( 'input'=>'!=','tag'=>'mo', 'output'=>'&#' . hexdec('2260') . ';'), +':=' => array( 'input'=>':=','tag'=>'mo', 'output'=>':=' ), /* 2005-06-05 wes */ +'<' => array( 'input'=>'<','tag'=>'mo', 'output'=>'<'), +'lt' => array( 'input'=>'lt','tag'=>'mo', 'output'=>'<'), /* 2005-06-05 wes */ +'<=' => array( 'input'=>'<=','tag'=>'mo', 'output'=>'&#' . hexdec('2264') . ';'), +'lt=' => array( 'input'=>'lt=','tag'=>'mo', 'output'=>'&#' . hexdec('2264') . ';'), +'le' => array( 'input'=>'le','tag'=>'mo', 'output'=>'&#' . hexdec('2264') . ';'), /* 2005-06-05 wes */ +'>' => array( 'input'=>'>','tag'=>'mo', 'output'=>'>'), +'>=' => array( 'input'=>'>=','tag'=>'mo', 'output'=>'&#' . hexdec('2265') . ';'), +'qeq' => array( 'input'=>'geq','tag'=>'mo', 'output'=>'&#' . hexdec('2265') . ';'), +'-<' => array( 'input'=>'-<','tag'=>'mo', 'output'=>'&#' . hexdec('227A') . ';'), +'-lt' => array( 'input'=>'-lt','tag'=>'mo', 'output'=>'&#' . hexdec('227A') . ';'), +'>-' => array( 'input'=>'>-','tag'=>'mo', 'output'=>'&#' . hexdec('227B') . ';'), +'in' => array( 'input'=>'in','tag'=>'mo', 'output'=>'&#' . hexdec('2208') . ';'), +'!in' => array( 'input'=>'!in','tag'=>'mo', 'output'=>'&#' . hexdec('2209') . ';'), +'sub' => array( 'input'=>'sub','tag'=>'mo', 'output'=>'&#' . hexdec('2282') . ';'), +'sup' => array( 'input'=>'sup','tag'=>'mo', 'output'=>'&#' . hexdec('2283') . ';'), +'sube' => array( 'input'=>'sube','tag'=>'mo', 'output'=>'&#' . hexdec('2286') . ';'), +'supe' => array( 'input'=>'supe','tag'=>'mo', 'output'=>'&#' . hexdec('2287') . ';'), +'-=' => array( 'input'=>'-=','tag'=>'mo', 'output'=>'&#' . hexdec('2261') . ';'), +'~=' => array( 'input'=>'~=','tag'=>'mo', 'output'=>'&#' . hexdec('2245') . ';'), +'~~' => array( 'input'=>'~~','tag'=>'mo', 'output'=>'&#' . hexdec('2248') . ';'), +'prop' => array( 'input'=>'prop','tag'=>'mo', 'output'=>'&#' . hexdec('221D') . ';'), + +// Logical symbols +'and' => array( 'input'=>'and','tag'=>'mtext', 'output'=>'and', 'space'=>'1ex'), +'or' => array( 'input'=>'or','tag'=>'mtext', 'output'=>'or', 'space'=>'1ex'), +'not' => array( 'input'=>'not','tag'=>'mo', 'output'=>'&#' . hexdec('00AC') . ';'), +'=>' => array( 'input'=>'=>','tag'=>'mo', 'output'=>'&#' . hexdec('21D2') . ';'), +'if' => array( 'input'=>'if','tag'=>'mo', 'output'=>'if', 'space'=>'1ex'), +'iff' => array( 'input'=>'iff','tag'=>'mo', 'output'=>'&#' . hexdec('21D4') . ';'), +'<=>' => array( 'input'=>'iff','tag'=>'mo', 'output'=>'&#' . hexdec('21D4') . ';'), /* 2005-06-07 wes */ +'AA' => array( 'input'=>'AA','tag'=>'mo', 'output'=>'&#' . hexdec('2200') . ';'), +'EE' => array( 'input'=>'EE','tag'=>'mo', 'output'=>'&#' . hexdec('2203') . ';'), +'_|_' => array( 'input'=>'_|_','tag'=>'mo', 'output'=>'&#' . hexdec('22A5') . ';'), +'TT' => array( 'input'=>'TT','tag'=>'mo', 'output'=>'&#' . hexdec('22A4') . ';'), +'|-' => array( 'input'=>'|-','tag'=>'mo', 'output'=>'&#' . hexdec('22A2') . ';'), +'|=' => array( 'input'=>'|=','tag'=>'mo', 'output'=>'&#' . hexdec('22A8') . ';'), + +// Miscellaneous symbols +'ang' => array('input'=>'ang','tag'=>'mo','output'=>'&#' . hexdec('2220') . ';'), +'deg' => array('input'=>'deg','tag'=>'mo','output'=>'&#' . hexdec('00B0') . ';'), +'int' => array( 'input'=>'int','tag'=>'mo', 'output'=>'&#' . hexdec('222B') . ';'), +'dx' => array( 'input'=>'dx','tag'=>'mi', 'output'=>'{:d x:}', 'definition'=>TRUE), /* 2005-06-11 wes */ +'dy' => array( 'input'=>'dy','tag'=>'mi', 'output'=>'{:d y:}', 'definition'=>TRUE), /* 2005-06-11 wes */ +'dz' => array( 'input'=>'dz','tag'=>'mi', 'output'=>'{:d z:}', 'definition'=>TRUE), /* 2005-06-11 wes */ +'dt' => array( 'input'=>'dt','tag'=>'mi', 'output'=>'{:d t:}', 'definition'=>TRUE), /* 2005-06-11 wes */ +'oint' => array( 'input'=>'oint','tag'=>'mo', 'output'=>'&#' . hexdec('222E') . ';'), +'del' => array( 'input'=>'del','tag'=>'mo', 'output'=>'&#' . hexdec('2202') . ';'), +'grad' => array( 'input'=>'grad','tag'=>'mo', 'output'=>'&#' . hexdec('2207') . ';'), +'+-' => array( 'input'=>'+-','tag'=>'mo', 'output'=>'&#' . hexdec('00B1') . ';'), +'O/' => array( 'input'=>'0/','tag'=>'mo', 'output'=>'&#' . hexdec('2205') . ';'), +'oo' => array( 'input'=>'oo','tag'=>'mo', 'output'=>'&#' . hexdec('221E') . ';'), +'aleph' => array( 'input'=>'aleph','tag'=>'mo', 'output'=>'&#' . hexdec('2135') . ';'), +'...' => array( 'input'=>'int','tag'=>'mo', 'output'=>'...'), +'~' => array( 'input'=>'!~','tag'=>'mo', 'output'=>'&#' . hexdec('0020') . ';'), +'\\ ' => array( 'input'=>'~','tag'=>'mo', 'output'=>'&#' . hexdec('00A0') . ';'), +'quad' => array( 'input'=>'quad','tag'=>'mo', 'output'=>'&#' . hexdec('00A0') . ';&#' . hexdec('00A0') . ';'), +'qquad' => array( 'input'=>'qquad','tag'=>'mo', 'output'=> '&#' . hexdec('00A0') . ';&#' . hexdec('00A0') . ';&#' . hexdec('00A0') . ';'), +'cdots' => array( 'input'=>'cdots','tag'=>'mo', 'output'=>'&#' . hexdec('22EF') . ';'), +'vdots' => array( 'input'=>'vdots','tag'=>'mo', 'output'=>'&#' . hexdec('22EE') . ';'), /* 2005-06-11 wes */ +'ddots' => array( 'input'=>'ddots','tag'=>'mo', 'output'=>'&#' . hexdec('22F1') . ';'), /* 2005-06-11 wes */ +'diamond' => array( 'input'=>'diamond','tag'=>'mo', 'output'=>'&#' . hexdec('22C4') . ';'), +'square' => array( 'input'=>'square','tag'=>'mo', 'output'=>'&#' . hexdec('25A1') . ';'), +'|_' => array( 'input'=>'|_','tag'=>'mo', 'output'=>'&#' . hexdec('230A') . ';'), +'_|' => array( 'input'=>'_|','tag'=>'mo', 'output'=>'&#' . hexdec('230B') . ';'), +'|~' => array( 'input'=>'|~','tag'=>'mo', 'output'=>'&#' . hexdec('2308') . ';'), +'~|' => array( 'input'=>'~|','tag'=>'mo', 'output'=>'&#' . hexdec('2309') . ';'), +'CC' => array( 'input'=>'CC','tag'=>'mo', 'output'=>'&#' . hexdec('2102') . ';'), +'NN' => array( 'input'=>'NN','tag'=>'mo', 'output'=>'&#' . hexdec('2115') . ';'), +'QQ' => array( 'input'=>'QQ','tag'=>'mo', 'output'=>'&#' . hexdec('211A') . ';'), +'RR' => array( 'input'=>'RR','tag'=>'mo', 'output'=>'&#' . hexdec('211D') . ';'), +'ZZ' => array( 'input'=>'ZZ','tag'=>'mo', 'output'=>'&#' . hexdec('2124') . ';'), + +// Standard functions +'lim' => array( 'input'=>'lim','tag'=>'mo', 'output'=>'lim', 'underover'=>TRUE), +'Lim' => array( 'input'=>'Lim','tag'=>'mo', 'output'=>'Lim', 'underover'=>TRUE), /* 2005-06-11 wes */ +'sin' => array( 'input'=>'sin','tag'=>'mo', 'output'=>'sin', 'unary'=>TRUE, 'func'=>TRUE), +'cos' => array( 'input'=>'cos', 'tag'=>'mo', 'output'=>'cos', 'unary'=>TRUE, 'func'=>TRUE), +'tan' => array( 'input'=>'tan', 'tag'=>'mo', 'output'=>'tan', 'unary'=>TRUE, 'func'=>TRUE), +'arcsin' => array( 'input'=>'arcsin','tag'=>'mo', 'output'=>'arcsin', 'unary'=>TRUE, 'func'=>TRUE), //2006-9-7 DL +'arccos' => array( 'input'=>'arccos', 'tag'=>'mo', 'output'=>'arccos', 'unary'=>TRUE, 'func'=>TRUE), //2006-9-7 DL +'arctan' => array( 'input'=>'arctan', 'tag'=>'mo', 'output'=>'arctan', 'unary'=>TRUE, 'func'=>TRUE), //2006-9-7 DL +'sinh' => array( 'input'=>'sinh','tag'=>'mo', 'output'=>'sinh', 'unary'=>TRUE, 'func'=>TRUE), +'cosh' => array( 'input'=>'cosh', 'tag'=>'mo', 'output'=>'cosh', 'unary'=>TRUE, 'func'=>TRUE), +'tanh' => array( 'input'=>'tanh', 'tag'=>'mo', 'output'=>'tanh', 'unary'=>TRUE, 'func'=>TRUE), +'cot' => array( 'input'=>'cot','tag'=>'mo', 'output'=>'cot', 'unary'=>TRUE, 'func'=>TRUE), +'sec' => array( 'input'=>'sec', 'tag'=>'mo', 'output'=>'sec', 'unary'=>TRUE, 'func'=>TRUE), +'csc' => array( 'input'=>'csc', 'tag'=>'mo', 'output'=>'csc', 'unary'=>TRUE, 'func'=>TRUE), +'coth' => array( 'input'=>'coth','tag'=>'mo', 'output'=>'coth', 'unary'=>TRUE, 'func'=>TRUE), +'sech' => array( 'input'=>'sech', 'tag'=>'mo', 'output'=>'sech', 'unary'=>TRUE, 'func'=>TRUE), +'csch' => array( 'input'=>'csch', 'tag'=>'mo', 'output'=>'csch', 'unary'=>TRUE, 'func'=>TRUE), +'log' => array( 'input'=>'log', 'tag'=>'mo', 'output'=>'log', 'unary'=>TRUE, 'func'=>TRUE), +'ln' => array( 'input'=>'ln', 'tag'=>'mo', 'output'=>'ln', 'unary'=>TRUE, 'func'=>TRUE), +'det' => array( 'input'=>'det', 'tag'=>'mo', 'output'=>'det', 'unary'=>TRUE, 'func'=>TRUE), +'dim' => array( 'input'=>'dim', 'tag'=>'mo', 'output'=>'dim'), +'mod' => array( 'input'=>'mod', 'tag'=>'mo', 'output'=>'mod'), +'gcd' => array( 'input'=>'gcd', 'tag'=>'mo', 'output'=>'gcd', 'unary'=>TRUE, 'func'=>TRUE), +'lcm' => array( 'input'=>'lcm', 'tag'=>'mo', 'output'=>'lcm', 'unary'=>TRUE, 'func'=>TRUE), +'lub' => array( 'input'=>'lub', 'tag'=>'mo', 'output'=>'lub'), /* 2005-06-11 wes */ +'glb' => array( 'input'=>'glb', 'tag'=>'mo', 'output'=>'glb'), /* 2005-06-11 wes */ +'min' => array( 'input'=>'min', 'tag'=>'mo', 'output'=>'min', 'underover'=>TRUE), /* 2005-06-11 wes */ +'max' => array( 'input'=>'max', 'tag'=>'mo', 'output'=>'max', 'underover'=>TRUE), /* 2005-06-11 wes */ +'f' => array( 'input'=>'f','tag'=>'mi', 'output'=>'f', 'unary'=>TRUE, 'func'=>TRUE), //2006-9-7 DL +'g' => array( 'input'=>'g', 'tag'=>'mi', 'output'=>'g', 'unary'=>TRUE, 'func'=>TRUE), //2006-9-7 DL + +// Arrows +'uarr' => array( 'input'=>'uarr', 'tag'=>'mo', 'output'=>'&#' . hexdec('2191') . ';'), +'darr' => array( 'input'=>'darr', 'tag'=>'mo', 'output'=>'&#' . hexdec('2193') . ';'), +'rarr' => array( 'input'=>'rarr', 'tag'=>'mo', 'output'=>'&#' . hexdec('2192') . ';'), +'->' => array( 'input'=>'->', 'tag'=>'mo', 'output'=>'&#' . hexdec('2192') . ';'), +'|->' => array( 'input'=>'|->', 'tag'=>'mo', 'output'=>'&#' . hexdec('21A6') . ';'), /* 2005-06-11 wes */ +'larr' => array( 'input'=>'larr', 'tag'=>'mo', 'output'=>'&#' . hexdec('2190') . ';'), +'harr' => array( 'input'=>'harr', 'tag'=>'mo', 'output'=>'&#' . hexdec('2194') . ';'), +'rArr' => array( 'input'=>'rArr', 'tag'=>'mo', 'output'=>'&#' . hexdec('21D2') . ';'), +'lArr' => array( 'input'=>'lArr', 'tag'=>'mo', 'output'=>'&#' . hexdec('21D0') . ';'), +'hArr' => array( 'input'=>'hArr', 'tag'=>'mo', 'output'=>'&#' . hexdec('21D4') . ';'), + +// Commands with argument +'sqrt' => array( 'input'=>'sqrt', 'tag'=>'msqrt', 'output'=>'sqrt', 'unary'=>TRUE ), +'root' => array( 'input'=>'root', 'tag'=>'mroot', 'output'=>'root', 'binary'=>TRUE ), +'frac' => array( 'input'=>'frac', 'tag'=>'mfrac', 'output'=>'/', 'binary'=>TRUE), +'/' => array( 'input'=>'/', 'tag'=>'mfrac', 'output'=>'/', 'infix'=>TRUE), +'_' => array( 'input'=>'_', 'tag'=>'msub', 'output'=>'_', 'infix'=>TRUE), +'^' => array( 'input'=>'^', 'tag'=>'msup', 'output'=>'^', 'infix'=>TRUE), +'hat' => array( 'input'=>'hat', 'tag'=>'mover', 'output'=>'&#' . hexdec('005E') . ';', 'unary'=>TRUE, 'acc'=>TRUE), +'bar' => array( 'input'=>'bar', 'tag'=>'mover', 'output'=>'&#' . hexdec('00AF') . ';', 'unary'=>TRUE, 'acc'=>TRUE), +'vec' => array( 'input'=>'vec', 'tag'=>'mover', 'output'=>'&#' . hexdec('2192') . ';', 'unary'=>TRUE, 'acc'=>TRUE), +'dot' => array( 'input'=>'dot', 'tag'=>'mover', 'output'=>'.', 'unary'=>TRUE, 'acc'=>TRUE), +'ddot' => array( 'input'=>'ddot', 'tag'=>'mover', 'output'=>'..', 'unary'=>TRUE, 'acc'=>TRUE), +'ul' => array( 'input'=>'ul', 'tag'=>'munder', 'output'=>'&#' . hexdec('0332') . ';', 'unary'=>TRUE, 'acc'=>TRUE), +'avec' => array( 'input'=>'avec', 'tag'=>'munder', 'output'=>'~', 'unary'=>TRUE, 'acc'=>TRUE), +'text' => array( 'input'=>'text', 'tag'=>'mtext', 'output'=>'text', 'unary'=>TRUE), +'mbox' => array( 'input'=>'mbox', 'tag'=>'mtext', 'output'=>'mbox', 'unary'=>TRUE), +'"' => array( 'input'=>'"', 'tag'=>'mtext','output'=>'mbox', 'unary'=>TRUE), + +/* 2005-06-05 wes: added stackrel */ +'stackrel' => array( 'input'=>'stackrel', 'tag'=>'mover', 'output'=>'stackrel', 'binary'=>TRUE), + +// Grouping brackets +'(' => array( 'input'=>'(', 'tag'=>'mo', 'output'=>'(', 'left_bracket'=>TRUE), +')' => array( 'input'=>')', 'tag'=>'mo', 'output'=>')', 'right_bracket'=>TRUE), +'[' => array( 'input'=>'[', 'tag'=>'mo', 'output'=>'[', 'left_bracket'=>TRUE), +']' => array( 'input'=>']', 'tag'=>'mo', 'output'=>']', 'right_bracket'=>TRUE), +'{' => array( 'input'=>'{', 'tag'=>'mo', 'output'=>'{', 'left_bracket'=>TRUE), +'}' => array( 'input'=>'}', 'tag'=>'mo', 'output'=>'}', 'right_bracket'=>TRUE), +'(:' => array( 'input'=>'(:', 'tag'=>'mo', 'output'=>'&#' . hexdec('2329') . ';', 'left_bracket'=>TRUE), +':)' => array( 'input'=>':)', 'tag'=>'mo', 'output'=>'&#' . hexdec('232A') . ';', 'right_bracket'=>TRUE), +'{:' => array( 'input'=>'{:', 'tag'=>'mo', 'output'=>'{:', 'left_bracket'=>TRUE, 'invisible'=>TRUE), +':}' => array( 'input'=>':}', 'tag'=>'mo', 'output'=>':}', 'right_bracket'=>TRUE ,'invisible'=>TRUE), +'<<' => array( 'input'=>'<<', 'tag'=>'mo', 'output'=>'&#' . hexdec('2329') . ';', 'left_bracket'=>TRUE), // 2005-06-07 wes +'>>' => array( 'input'=>'>>', 'tag'=>'mo', 'output'=>'&#' . hexdec('232A') . ';', 'right_bracket'=>TRUE) // 2005-06-07 wes +); + +?> \ No newline at end of file Added: trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.class.php =================================================================== --- trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.class.php (rev 0) +++ trunk/lib/ASCIIMathPHP/ASCIIMathPHP-2.0.class.php 2009-03-01 14:39:27 UTC (rev 6610) @@ -0,0 +1,1119 @@ +<?php + +/**** + * ASCIIMathPHP and associated classes: + * -- XMLNode + * -- MathMLNode extends XMLNode + * + * These classes are a PHP port of ASCIIMath + * Version 1.3 Feb 19 2004, (c) Peter Jipsen http://www.chapman.edu/~jipsen + * + * ASCIIMathPHP Version 1.11, 26 April 2006, (c) Kee-Lin Steven Chan (kc...@co...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License (at http://www.gnu.org/copyleft/gpl.html) + * for more details. + * + * ChangeLog + * + * Ver 2.0 + * -- PHP5 only version of ASCIIMathPHP + * + * Ver 1.12.1 + * -- Included the missing setCurrExpr() method + * + * Ver 1.12 + * -- Added changes that David Lippman <DLi...@pi...> made to bring ASCIIMathPHP up to + * ASCIIMath 1.4.7 functionality. + * -- Added parseIntExpr, for intermediate expression parsing rule, allowing x^2/x^3 to render as (x^2)/(x^3) + * -- Added quotes as another way of designating text; "hello" is equivalent to text(hello) + * -- Added FUNC designator to allow sin, cos, etc to act as functions, so sin(x)/x renders as {sin(x)}/x + * + * Ver 1.11 + * -- Fixed bug that stopped script execution for incomplete expressions + * -- Changed the algorithm for parsing expressions so that it matches the longest string possible (greedy) + * + * Ver 1.10 + * -- Added definition support + * -- Added stackrel support + * -- Added a bunch of different symbols etc. >>, << and definitions like dx, dy, dz etc. + * + * Ver 1.02 + * -- Fixed bug with mbox and text + * -- Fixed spacing bug with mbox and text + * + * Ver 1.01 + * -- Fixed Bug that did not parse symbols greater than a single character + * correctly when appearing at end of expression. + * + ***/ + +class XMLNode +{ + // Private variables + var $_id; + var $_name; + var $_content; + var $_mt_elem_flg; + var $_attr_arr; + var $_child_arr; + var $_nmspc; + var $_nmspc_alias; + var $_parent_id; + var $_parent_node; + + function XMLNode($id = NULL) + { + $this->_id = isset($id) ? $id : md5(uniqid(rand(),1)); + $this->_name = ''; + $this->_content = ''; + $this->_mt_elem_flg = FALSE; + $this->_attr_arr = array(); + $this->_child_arr = array(); + $this->_nmspc = ''; + $this->_nmspc_alias = ''; + $this->_parent_id = FALSE; + $this->_parent_node = NULL; + } + + function addChild(&$node) + { + $this->_child_arr[$node->getId()] = $node; + $node->setParentId($this->_id); + $node->setParentNode($this); + } + + function addChildArr(&$node_arr) + { + $key_arr = array_keys($node_arr); + $num_key = count($key_arr); + + for ($i = 0; $i < $num_key; $i++) { + $node = $node_arr[$key_arr[$i]]; + $this->addChild($node); + } + } + + function insertChildBefore($idx,&$node) + { + $key_arr = array_keys($this->_child_arr); + $num_key = count($key_arr); + $tmp_arr = arry(); + + for ($i = 0;$i < $num_key;$i++) { + if ($i == $idx) { + $tmp_arr[$node->getId()] = $node; + } + $tmp_arr[$key_arr[$i]] = $this->_child_arr[$key_arr[$i]]; + } + $this->_child_arr = $tmp_arr; + } + + function insertChildAfter($idx,&$node) + { + $key_arr = array_keys($this->_child_arr); + $num_key = count($key_arr); + $tmp_arr = arry(); + + for ($i = 0;$i < $num_key;$i++) { + $tmp_arr[$key_arr[$i]] = $this->_child_arr[$key_arr[$i]]; + if ($i == $idx) { + $tmp_arr[$node->getId()] = $node; + } + } + $this->_child_arr = $tmp_arr; + } + + function setId($id) + { + $this->_id = $id; + } + + function setName($name) + { + $this->_name = $name; + } + + function setNamepace($nmspc) + { + $this->_nmspc = $nmspc; + } + + function setNamespaceAlias($nmspc_alias) + { + $this->_nmspc_alias = $nmspc_alias; + } + + function setContent($content) + { + $this->_content = $content; + } + + function setEmptyElem($mt_elem_flg) + { + $this->_mt_elem_flg = $mt_elem_flg; + } + + function setAttr($attr_nm,$attr_val) + { + $this->_attr_arr[$attr_nm] = $attr_val; + } + + function setAttrArr($attr_arr) + { + $this->_attr_arr = $attr_arr; + } + + function setParentId($id) + { + $this->_parent_id = $id; + } + + function setParentNode(&$node) + { + $this->_parent_node = $node; + } + + function getId() + { + return($this->_id); + } + + function getName() + { + return($this->_name); + } + + function getNamespace() + { + return($this->_nmspc); + } + + function getNamespaceAlias() + { + return($this->_nmspc_alias); + } + + function getContent() + { + return($this->_content); + } + + function getAttr($attr_nm) + { + if (isset($this->_attr_arr[$attr_nm])) { + return($this->_attr_arr[$attr_nm]); + } else { + return(NULL); + } + } + + function getAttrArr() + { + return($this->_attr_arr); + } + + function getParentId() + { + return($this->parent_id); + } + + function getParentNode() + { + return($this->_parent_node); + } + + function getChild($id) + { + if (isset($this->_child_arr[$id])) { + return($this->_child_arr[$id]); + } else { + return(FALSE); + } + } + + function getFirstChild() + { + $id_arr = array_keys($this->_child_arr); + $num_child = count($id_arr); + + if ($num_child > 0) { + return($this->_child_arr[$id_arr[0]]); + } else { + return(FALSE); + } + } + + function getLastChild() + { + $id_arr = array_keys($this->_child_arr); + $num_child = count($id_arr); + + if ($num_child > 0) { + return($this->_child_arr[$id_arr[$num_child - 1]]); + } else { + return(FALSE); + } + } + + function getChildByIdx($idx) + { + $id_arr = array_keys($this->_child_arr); + + if (isset($this->_child_arr[$id_arr[$idx]])) { + return($this->_child_arr[$id_arr[$idx]]); + } else { + return(FALSE); + } + } + + function getNumChild() + { + return(count($this->_child_arr)); + } + + function removeChild($id) + { + unset($this->_child_arr[$id]); + } + + function removeChildByIdx($idx) + { + $key_arr = array_keys($this->_child_arr); + unset($this->_child_arr[$key_arr[$idx]]); + } + + function removeFirstChild() + { + $key_arr = array_keys($this->_child_arr); + unset($this->_child_arr[$key_arr[0]]); + } + + function removeLastChild() + { + $key_arr = array_keys($this->_child_arr); + unset($this->_child_arr[$key_arr[count($key_arr)-1]]); + } + + function dumpXML($indent_str = "\t") + { + $attr_txt = $this->_dumpAttr(); + $name = $this->_dumpName(); + $xmlns = $this->_dumpXmlns(); + $lvl = $this->_getCurrentLevel(); + $indent = str_pad('',$lvl,$indent_str); + + if ($this->_mt_elem_flg) { + $tag = "$indent<$name$xmlns$attr_txt />"; + return($tag); + } else { + $key_arr = array_keys($this->_child_arr); + $num_child = count($key_arr); + + $tag = "$indent<$name$xmlns$attr_txt>$this->_content"; + + for ($i = 0;$i < $num_child;$i++) { + $node = $this->_child_arr[$key_arr[$i]]; + + $child_txt = $node->dumpXML($indent_str); + $tag .= "\n$child_txt"; + } + + $tag .= ($num_child > 0 ? "\n$indent</$name>" : "</$name>"); + return($tag); + } + } + + function _dumpAttr() + { + $id_arr = array_keys($this->_attr_arr); + $id_arr_cnt = count($id_arr); + $attr_txt = ''; + + for($i = 0;$i < $id_arr_cnt;$i++) { + $key = $id_arr[$i]; + $attr_txt .= " $key=\"{$this->_attr_arr[$key]}\""; + } + + return($attr_txt); + } + + function _dumpName() + { + $alias = $this->getNamespaceAlias(); + if ($alias == '') { + return($this->getName()); + } else { + return("$alias:" . $this->getName()); + } + } + + function _dumpXmlns() + { + $nmspc = $this->getNamespace(); + $alias = $this->getNamespaceAlias(); + + if ($nmspc != '') { + if ($alias == '') { + return(" xmlns=\"" . $nmspc . "\""); + } else { + return(" xmlns:$alias=\"" . $nmspc . "\""); + } + } else { + return(''); + } + } + + function _getCurrentLevel() + { + if ($this->_parent_id === FALSE) { + return(0); + } else { + $node = $this->getParentNode(); + $lvl = $node->_getCurrentLevel(); + $lvl++; + return($lvl); + } + } +} + +class MathMLNode extends XMLNode +{ + function MathMLNode($id = NULL) + { + parent::XMLNode($id); + } + + function removeBrackets() + { + if ($this->_name == 'mrow') { + if ($c_node_0 = $this->getFirstChild()) { + $c_node_0->isLeftBracket() ? $this->removeFirstChild() : 0; + } + + if ($c_node_0 = $this->getLastChild()) { + $c_node_0->isRightBracket() ? $this->removeLastChild() : 0; + } + } + } + + function isLeftBracket() + { + switch ($this->_content) { + case '{': + case '[': + case '(': + return(TRUE); + break; + } + return(FALSE); + } + + function isRightBracket() + { + switch ($this->_content) { + case '}': + case ']': + case ')': + return(TRUE); + break; + } + return(FALSE); + } +} + +class ASCIIMathPHP +{ + var $_expr; + var $_curr_expr; + var $_prev_expr; + var $_symbol_arr; + var $_node_arr; + var $_node_cntr; + + function ASCIIMathPHP($symbol_arr,$expr = NULL) + { + $this->_symbol_arr = $symbol_arr; + if (isset($expr)) { + $this->setExpr($expr); + } + } + + /** + * Returns an empty node (containing a non-breaking space) 26-Apr-2006 + * + * Used when an expression is incomplete + * + * @return object + * + * @access private + */ + function emptyNode() + { + $tmp_node = $this->createNode(); + $tmp_node->setName('mn'); + $tmp_node->setContent('&#' . hexdec('200B') . ';'); + return $tmp_node; + } + + function pushExpr($prefix) // 2005-06-11 wes + { + $this->_curr_expr = $prefix . $this->_curr_expr; + } + + function setExpr($expr) + { + $this->_expr = $expr; + $this->_curr_expr = $expr; + $this->_prev_expr = $expr; + + $this->_node_arr = array(); + $this->_node_cntr = 0; + } + + function genMathML($attr_arr = NULL) + { + // <math> node + $node_0 = $this->createNode(); + $node_0->setName('math'); + $node_0->setNamepace('http://www.w3.org/1998/Math/MathML'); + + // <mstyle> node + if (isset($attr_arr)) { + $node_1 = $this->createNode(); + $node_1->setName('mstyle'); + $node_1->setAttrArr($attr_arr); + + $node_arr = $this->parseExpr(); + + $node_1->addChildArr($node_arr); + $node_0->addChild($node_1); + } else { + $node_arr = $this->parseExpr(); + $node_0->addChildArr($node_arr); + } + + return TRUE; + } + + /* + function mergeNodeArr(&$node_arr_0,&$node_arr_1) + { + $key_arr_0 = array_keys($node_arr_0); + $key_arr_1 = array_keys($node_arr_1); + + $num_key_0 = count($key_arr_0); + $num_key_1 = count($key_arr_1); + + $merge_arr = array(); + + for ($i = 0;$i < $num_key_0;$i++) { + $merge_arr[$key_arr_0[$i]] = $node_arr_0[$key_arr_0[$i]]; + } + + for ($j = 0;$j < $num_key_1;$i++) { + $merge_arr[$key_arr_1[$i]] = $node_arr_1[$key_arr_1[$i]]; + } + + return($merge_arr); + } + */ + + //Broken out of parseExpr Sept 7, 2006 David Lippman for + //ASCIIMathML 1.4.7 compatibility + function parseIntExpr() + { + $sym_0 = $this->getSymbol(); + $node_0 = $this->parseSmplExpr(); + $sym = $this->getSymbol(); + + if (isset($sym['infix']) && $sym['input'] != '/') { + $this->chopExpr($sym['symlen']); + $node_1 = $this->parseSmplExpr(); + + if ($node_1 === FALSE) { //show box in place of missing argument + $node_1 = $this->emptyNode();//?? + } else { + $node_1->removeBrackets(); + } + + // If 'sub' -- subscript + if ($sym['input'] == '_') { + + $sym_1 = $this->getSymbol(); + + // If 'sup' -- superscript + if ($sym_1['input'] == '^') { + $this->chopExpr($sym_1['symlen']); + $node_2 = $this->parseSmplExpr(); + $node_2->removeBrackets(); + + $node_3 = $this->createNode(); + $node_3->setName(isset($sym_0['underover']) ? 'munderover' : 'msubsup'); + $node_3->addChild($node_0); + $node_3->addChild($node_1); + $node_3->addChild($node_2); + + $node_4 = $this->createNode(); + $node_4->setName('mrow'); + $node_4->addChild($node_3); + + return $node_4; + } else { + $node_2 = $this->createNode(); + $node_2->setName(isset($sym_0['underover']) ? 'munder' : 'msub'); + $node_2->addChild($node_0); + $node_2->addChild($node_1); + + return $node_2; + } + } else { + $node_2 = $this->createNode(); + $node_2->setName($sym['tag']); + $node_2->addChild($node_0); + $node_2->addChild($node_1); + + return($node_2); + } + } elseif ($node_0 !== FALSE) { + return($node_0); + } else { + return $this->emptyNode(); + } + + } + + function parseExpr() + { + // Child/Fragment array + $node_arr = array(); + + // Deal whole expressions like 'ax + by + c = 0' etc. + do { + $sym_0 = $this->getSymbol(); + $node_0 = $this->parseIntExpr(); + $sym = $this->getSymbol(); + // var_dump($sym); + + if (isset($sym['infix']) && $sym['input'] == '/') { + $this->chopExpr($sym['symlen']); + $node_1 = $this->parseIntExpr(); + + if ($node_1 === FALSE) { //should show box in place of missing argument + $node_1 = $this->emptyNode(); + continue; + } + + $node_1->removeBrackets(); + + // If 'div' -- divide + $node_0->removeBrackets(); + $node_2 = $this->createNode(); + $node_2->setName($sym['tag']); + $node_2->addChild($node_0); + $node_2->addChild($node_1); + $node_arr[$node_2->getId()] = $node_2; + + } elseif ($node_0 !== FALSE) { + $node_arr[$node_0->getId()] = $node_0; + } + } while (!isset($sym['right_bracket']) && $sym !== FALSE && $sym['output'] != ''); + + //var_dump($sym); + // Possibly to deal with matrices + if (isset($sym['right_bracket'])) { + $node_cnt = count($node_arr); + $key_node_arr = array_keys($node_arr); + + if ($node_cnt > 1) { + $node_5 = $node_arr[$key_node_arr[$node_cnt-1]]; + $node_6 = $node_arr[$key_node_arr[$node_cnt-2]]; + } else { + $node_5 = FALSE; + $node_6 = FALSE; + } + + // Dealing with matrices + if ($node_5 !== FALSE && $node_6 !== FALSE && + $node_cnt > 1 && + $node_5->getName() == 'mrow' && + $node_6->getName() == 'mo' && + $node_6->getContent() == ',') { + + // Checking if Node 5 has a LastChild + if ($node_7 = $node_5->getLastChild()) { + $node_7_cntnt = $node_7->getContent(); + } else { + $node_7_cntnt = FALSE; + } + + // If there is a right bracket + if ($node_7 !== FALSE && ($node_7_cntnt == ']' || $node_7_cntnt == ')')) { + + // Checking if Node 5 has a firstChild + if ($node_8 = $node_5->getFirstChild()) { + $node_8_cntnt = $node_8->getContent(); + } else { + $node_8_cntnt = FALSE; + } + + // If there is a matching left bracket + if ($node_8 !== FALSE && + (($node_8_cntnt == '(' && $node_7_cntnt == ')' && $sym['output'] != '}') || + ($node_8_cntnt == '[' && $node_7_cntnt == ']'))) { + + $is_mtrx_flg = TRUE; + $comma_pos_arr = array(); + + $i = 0; + + while ($i < $node_cnt && $is_mtrx_flg) { + $tmp_node = $node_arr[$key_node_arr[$i]]; + + if($tmp_node_first = $tmp_node->getFirstChild()) { + $tnfc = $tmp_node_first->getContent(); + } else { + $tnfc = FALSE; + } + + if($tmp_node_last = $tmp_node->getLastChild()) { + $tnlc = $tmp_node_last->getContent(); + } else { + $tnlc = FALSE; + } + + if (isset($key_node_arr[$i+1])) { + $next_tmp_node = $node_arr[$key_node_arr[$i+1]]; + $ntnn = $next_tmp_node->getName(); + $ntnc = $next_tmp_node->getContent(); + } else { + $ntnn = FALSE; + $ntnc = FALSE; + } + + // Checking each node in node array for matrix criteria + if ($is_mtrx_flg) { + $is_mtrx_flg = $tmp_node->getName() == 'mrow' && + ($i == $node_cnt-1 || $ntnn == 'mo' && $ntnc == ',') && + $tnfc == $node_8_cntnt && $tnlc == $node_7_cntnt; + } + + if ($is_mtrx_flg) { + for ($j = 0;$j < $tmp_node->getNumChild();$j++) { + $tmp_c_node = $tmp_node->getChildByIdx($j); + + if ($tmp_c_node->getContent() == ',') { + $comma_pos_arr[$i][] = $j; + } + } + } + + if ($is_mtrx_flg && $i > 1) { + + $cnt_cpan = isset($comma_pos_arr[$i]) ? count($comma_pos_arr[$i]) : NULL; + $cnt_cpap = isset($comma_pos_arr[$i-2]) ? count($comma_pos_arr[$i-2]) : NULL; + $is_mtrx_flg = $cnt_cpan == $cnt_cpap; + } + + $i += 2; + } + + // If the node passes the matrix tests + if ($is_mtrx_flg) { + $tab_node_arr = array(); + + for ($i = 0;$i < $node_cnt;$i += 2) { + $tmp_key_node_arr = array_keys($node_arr); + if (!($tmp_node = $node_arr[$tmp_key_node_arr[0]])) { + break; + } + $num_child = $tmp_node->getNumChild(); + $k = 0; + + $tmp_node->removeFirstChild(); + + $row_node_arr = array(); + $row_frag_node_arr = array(); + + for ($j = 1;$j < ($num_child-1);$j++) { + if (isset($comma_pos_arr[$i][$k]) && + $j == $comma_pos_arr[$i][$k]) { + + $tmp_node->removeFirstChild(); + + $tmp_c_node = $this->createNode(); + $tmp_c_node->setName('mtd'); + $tmp_c_node->addChildArr($row_frag_node_arr); + $row_frag_node_arr = array(); + + $row_node_arr[$tmp_c_node->getId()] = $tmp_c_node; + + $k++; + } else { + + if ($tmp_c_node = $tmp_node->getFirstChild()) { + $row_frag_node_arr[$tmp_c_node->getId()] = $tmp_c_node; + $tmp_node->removeFirstChild(); + } + } + } + + $tmp_c_node = $this->createNode(); + $tmp_c_node->setName('mtd'); + $tmp_c_node->addChildArr($row_frag_node_arr); + + $row_node_arr[$tmp_c_node->getId()] = $tmp_c_node; + + if (count($node_arr) > 2) { + $tmp_key_node_arr = array_keys($node_arr); + unset($node_arr[$tmp_key_node_arr[0]]); + unset($node_arr[$tmp_key_node_arr[1]]); + } + + $tmp_c_node = $this->createNode(); + $tmp_c_node->setName('mtr'); + $tmp_c_node->addChildArr($row_node_arr); + + $tab_node_arr[$tmp_c_node->getId()] = $tmp_c_node; + } + + $tmp_c_node = $this->createNode(); + $tmp_c_node->setName('mtable'); + $tmp_c_node->addChildArr($tab_node_arr); + + if (isset($sym['invisible'])) { + $tmp_c_node->setAttr('columnalign','left'); + } + + $key_node_arr = array_keys($node_arr); + $tmp_c_node->setId($key_node_arr[0]); + + $node_arr[$tmp_c_node->getId()] = $tmp_c_node; + } + } + } + } + + $this->chopExpr($sym['symlen']); + if (!isset($sym['invisible'])) { + $node_7 = $this->createNode(); + $node_7->setName('mo'); + $node_7->setContent($sym['output']); + $node_arr[$node_7->getId()] = $node_7; + } + } + + return($node_arr); + } + + function parseSmplExpr() + { + $sym = $this->getSymbol(); + + if (!$sym || isset($sym['right_bracket'])) //return FALSE; + return $this->emptyNode(); + + $this->chopExpr($sym['symlen']); + + // 2005-06-11 wes: add definition type support + if(isset($sym['definition'])) { + $this->pushExpr($sym['output']); + $sym = $this->getSymbol(); + $this->chopExpr($sym['symlen']); + } + + if (isset($sym['left_bracket'])) { + $node_arr = $this->parseExpr(); + + if (isset($sym['invisible'])) { + $node_0 = $this->createNode(); + $node_0->setName('mrow'); + $node_0->addChildArr($node_arr); + + return($node_0); + } else { + $node_0 = $this->createNode(); + $node_0->setName('mo'); + $node_0->setContent($sym['output']); + + $node_1 = $this->createNode(); + $node_1->setName('mrow'); + $node_1->addChild($node_0); + $node_1->addChildArr($node_arr); + + return($node_1); + } + } elseif (isset($sym['unary'])) { + + if ($sym['input'] == 'sqrt') { + $node_0 = $this->parseSmplExpr(); + $node_0->removeBrackets(); + + $node_1 = $this->createNode(); + $node_1->setName($sym['tag']); + $node_1->addChild($node_0); + + return($node_1); + } elseif (isset($sym['func'])) { //added 2006-9-7 David Lippman + $expr = ltrim($this->getCurrExpr()); + $st = $expr{0}; + $node_0 = $this->parseSmplExpr(); + //$node_0->removeBrackets(); + if ($st=='^' || $st == '_' || $st=='/' || $st=='|' || $st==',') { + $node_1 = $this->createNode(); + $node_1->setName($sym['tag']); + $node_1->setContent($sym['output']); + $this->setCurrExpr($expr); + return($node_1); + } else { + $node_1 = $this->createNode(); + $node_1->setName('mrow'); + $node_2 = $this->createNode(); + $node_2->setName($sym['tag']); + $node_2->setContent($sym['output']); + $node_1->addChild($node_2); + $node_1->addChild($node_0); + return($node_1); + } + } elseif ($sym['input'] == 'text' || $sym['input'] == 'mbox' || $sym['input'] == '"') { + $expr = ltrim($this->getCurrExpr()); + if ($sym['input']=='"') { + $end_brckt = '"'; + $txt = substr($expr,0,strpos($expr,$end_brckt)); + } else { + switch($expr{0}) { + case '(': + $end_brckt = ')'; + break; + case '[': + $end_brckt = ']'; + break; + case '{': + $end_brckt = '}'; + break; + default: + $end_brckt = chr(11); // A character that will never be matched. + break; + } + $txt = substr($expr,1,strpos($expr,$end_brckt)-1); + } + + //$txt = substr($expr,1,strpos($expr,$end_brckt)-1); + $len = strlen($txt); + + $node_0 = $this->createNode(); + $node_0->setName('mrow'); + + if ($len > 0) { + if ($txt{0} == " ") { + $node_1 = $this->createNode(); + $node_1->setName('mspace'); + $node_1->setAttr('width','1ex'); + + $node_0->addChild($node_1); + } + + $node_3 = $this->createNode(); + $node_3->setName($sym['tag']); + $node_3->setContent(trim($txt)); + + $node_0->addChild($node_3); + + if ($len > 1 && $txt{$len-1} == " ") { + $node_2 = $this->createNode(); + $node_2->setName('mspace'); + $node_2->setAttr('width','1ex'); + + $node_0->addChild($node_2); + } + + $this->chopExpr($len+2); + } + return($node_0); + + } elseif (isset($sym['acc'])) { + $node_0 = $this->parseSmplExpr(); + $node_0->removeBrackets(); + + $node_1 = $this->createNode(); + $node_1->setName($sym['tag']); + $node_1->addChild($node_0); + + $node_2 = $this->createNode(); + $node_2->setName('mo'); + $node_2->setContent($sym['output']); + + $node_1->addChild($node_2); + return($node_1); + } else { + // Font change commands -- to complete + } + } elseif (isset($sym['binary'])) { + $node_arr = array(); + + $node_0 = $this->parseSmplExpr(); + $node_0->removeBrackets(); + + $node_1 = $this->parseSmplExpr(); + $node_1->removeBrackets(); + + /* 2005-06-05 wes: added stackrel */ + if ($sym['input'] == 'root' || $sym['input'] == 'stackrel') { + $node_arr[$node_1->getId()] = $node_1; + $node_arr[$node_0->getId()] = $node_0; + } elseif ($sym['input'] == 'frac') { + $node_arr[$node_0->getId()] = $node_0; + $node_arr[$node_1->getId()] = $node_1; + } + + $node_2 = $this->createNode(); + $node_2->setName($sym['tag']); + $node_2->addChildArr($node_arr); + + return($node_2); + } elseif (isset($sym['infix'])) { + $node_0 = $this->createNode(); + $node_0->setName('mo'); + $node_0->setContent($sym['output']); + + return($node_0); + } elseif (isset($sym['space'])) { + $node_0 = $this->createNode(); + $node_0->setName('mrow'); + + $node_1 = $this->createNode(); + $node_1->setName('mspace'); + $node_1->setAttr('width',$sym['space']); + + $node_2 = $this->createNode(); + $node_2->setName($sym['tag']); + $node_2->setContent($sym['output']); + + $node_3 = $this->createNode(); + $node_3->setName('mspace'); + $node_3->setAttr('width',$sym['space']); + + $node_0->addChild($node_1); + $node_0->addChild($node_2); + $node_0->addChild($node_3); + + return($node_0); + } else { + + // A constant + $node_0 = $this->createNode(); + $node_0->setName($sym['tag']); + $node_0->setContent($sym['output']); + return($node_0); + } + + // Return an empty node + return $this->emptyNode(); + } + + function getMathML() + { + $root = $this->_node_arr[0]; + return($root->dumpXML()); + } + + function getCurrExpr() + { + return($this->_curr_expr); + } + + function setCurrExpr($str) + { + $this->_curr_expr = $str; + } + + function getExpr() + { + return($this->_expr); + } + + function getPrevExpr() + { + return($this->_prev_expr); + } + + function createNode() + { + $node = new MathMLNode($this->_node_cntr); + // $node->setNamespaceAlias('m'); + $this->_node_arr[$this->_node_cntr] = $node; + $this->_node_cntr++; + return($node); + } + + /** + * Gets the largest symbol in the expression (greedy). Changed from non-greedy 26-Apr-2006 + * + * @parameter boolean[optional] Chop original string? + * + * @return mixed + * + * @access private + */ + function getSymbol($chop_flg = FALSE) + { + // Implemented a reverse symbol matcher. + // Instead of going front to back, it goes back to front. Steven 26-Apr-2006 + $chr_cnt = strlen($this->_curr_expr); + + if ($chr_cnt == 0) return FALSE; + + for ($i = $chr_cnt; $i > 0; $i--) { + $sym_0 = substr($this->_curr_expr,0,$i); + + // Reading string for numeric values + if (is_numeric($sym_0)) { + + if ($chop_flg) $this->chopExpr($i); + return array('input'=>$sym_0, 'tag'=>'mn', 'output'=>$sym_0, 'symlen'=>$i); + + } elseif (isset($this->_symbol_arr[$sym_0])) { + + if ($chop_flg) $this->chopExpr($i); + $sym_arr = $this->_symbol_arr[$sym_0]; + $sym_arr['symlen'] = $i; + return $sym_arr; + } + } + + // Reading string for alphabetic constants and the minus sign + $char = $this->_curr_expr{0}; + $len_left = $chop_flg ? $this->chopExpr(1) : strlen($this->_curr_expr)-1; + + // Deals with expressions of length 1 + if ($len_left == 0 && isset($this->_symbol_arr[$char])) { + $sym_arr = $this->_symbol_arr[$char]; + $sym_arr['symlen'] = 1; + return $sym_arr; + } else { + $tag = preg_match('/[a-z]/i',$char) ? 'mi' : 'mo'; + return array('input'=>$char, 'tag'=>$tag, 'output'=>$char, 'symlen'=>1); + } + } + + function chopExpr($strlen) + { + $this->_prev_expr = $this->_curr_expr; + + if ($strlen == strlen($this->_curr_expr)) { + $this->_curr_expr = ''; + return(0); + } else { + $this->_curr_expr = ltrim(substr($this->_curr_expr,$strlen)); + return(strlen($this->_curr_expr)); + } + } +} +?> \ No newline at end of file Modified: trunk/lib/plugin/AsciiMath.php =================================================================== --- trunk/lib/plugin/AsciiMath.php 2009-03-01 14:27:40 UTC (rev 6609) +++ trunk/lib/plugin/AsciiMath.php 2009-03-01 14:39:27 UTC (rev 6610) @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright 2005 $ThePhpWikiProgrammingTeam +Copyright 2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -20,7 +21,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -require_once("lib/ASCIIMathPHP/ASCIIMathPHP.class.php"); +if (phpversion() >= '5') { + require_once("lib/ASCIIMathPHP/ASCIIMathPHP-2.0.class.php"); +} else { + require_once("lib/ASCIIMathPHP/ASCIIMathPHP.class.php"); +} /** * Render ASCII math as MathML @@ -62,21 +67,21 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); - if (empty($this->source)) - return ''; + if (empty($this->source)) { + return HTML::div(array('class' => "error"), "Please provide a formula to AsciiMath plugin"); + } - include("lib/ASCIIMathPHP/ASCIIMathPHP.cfg.php"); + if (phpversion() >= '5') { + include("lib/ASCIIMathPHP/ASCIIMathPHP-2.0.cfg.php"); + } else { + include("lib/ASCIIMathPHP/ASCIIMathPHP.cfg.php"); + } $ascii_math = new ASCIIMathPHP($symbol_arr, $this->source); $ascii_math->genMathML(); - return HTML::Raw($ascii_math->getMathML()); + return HTML::raw($ascii_math->getMathML()); } }; -// $Log: not supported by cvs2svn $ -// Revision 1.1 2005/01/29 21:50:38 rurban -// new MathML plugin and lib -// - // 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...> - 2009-03-04 13:02:22
|
Revision: 6628 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6628&view=rev Author: vargenau Date: 2009-03-04 13:02:18 +0000 (Wed, 04 Mar 2009) Log Message: ----------- Allow uploading files with accents in name Modified Paths: -------------- trunk/lib/plugin/UpLoad.php trunk/lib/stdlib.php Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2009-03-04 12:51:27 UTC (rev 6627) +++ trunk/lib/plugin/UpLoad.php 2009-03-04 13:02:18 UTC (rev 6628) @@ -225,7 +225,7 @@ $message->pushContent(HTML::p(fmt("Only files with the extension %s are allowed.", join(", ", $this->allowed_extensions)))); } - elseif (preg_match("/[^._a-zA-Z0-9- ]/", $userfile_name)) + elseif (preg_match("/[^._a-zA-Z0-9- ]/", strip_accents($userfile_name))) { $message->pushContent($err_header); $message->pushContent(HTML::p(_("Invalid filename. File names may only contain alphanumeric characters and dot, underscore, space or dash."))); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2009-03-04 12:51:27 UTC (rev 6627) +++ trunk/lib/stdlib.php 2009-03-04 13:02:18 UTC (rev 6628) @@ -1204,7 +1204,7 @@ $RE[] = "/(?<= |${sep}|^)([AI])([[:upper:]][[:lower:]])/"; break; case 'fr': - $RE[] = "/(?<= |${sep}|^)([\xC0])([[:upper:]][[:lower:]])/"; + $RE[] = "/(?<= |${sep}|^)([À])([[:upper:]][[:lower:]])/"; break; } // Split numerals from following letters. @@ -2561,6 +2561,16 @@ return $table[$i][$j]; } +/** + * Remove accents from given text. + */ +function strip_accents($text) { + $res = utf8_decode($text); + $res = strtr($res, + utf8_decode('àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ'), + 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); + return utf8_encode($res); +} // (c-file-style: "gnu") // Local Variables: // mode: php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-23 20:49:53
|
Revision: 6693 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6693&view=rev Author: vargenau Date: 2009-03-23 20:49:42 +0000 (Mon, 23 Mar 2009) Log Message: ----------- In case if null diff, give the reason: renaming or change of metadata Modified Paths: -------------- trunk/lib/diff.php trunk/lib/plugin/Diff.php Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2009-03-23 19:47:25 UTC (rev 6692) +++ trunk/lib/diff.php 2009-03-23 20:49:42 UTC (rev 6693) @@ -375,19 +375,21 @@ if ($diff->isEmpty()) { $html->pushContent(HTML::hr(), - HTML::p('[', _("Versions are identical"), - ']')); - } - else { - // New CSS formatted unified diffs (ugly in NS4). + HTML::p(_("Content of versions "), $old->getVersion(), + _(" and "), $new->getVersion(), _(" is identical."))); + // If two consecutive versions have the same content, it is because the page was + // renamed, or metadata changed: ACL, owner, markup. + // We give the reason by printing the summary. + if (($new->getVersion() - $old->getVersion()) == 1) { + $html->pushContent(HTML::p(_("Version "), $new->getVersion(), + _(" was created because: "), $new->get('summary'))); + } + } else { $fmt = new HtmlUnifiedDiffFormatter; - - // Use this for old table-formatted diffs. - //$fmt = new TableUnifiedDiffFormatter; $html->pushContent($fmt->format($diff)); } - $html->pushContent(HTML::hr(), HTML::h1($new_version)); + $html->pushContent(HTML::hr(), HTML::h2($new_version)); require_once("lib/BlockParser.php"); $html->pushContent(TransformText($new,$new->get('markup'),$pagename)); } @@ -396,59 +398,6 @@ GeneratePage($html, sprintf(_("Diff: %s"), $pagename), $new); } -// $Log: not supported by cvs2svn $ -// Revision 1.54 2007/01/02 13:18:16 rurban -// omit want_content if not necessary -// -// Revision 1.53 2006/12/02 13:58:27 rurban -// Fix MonoBook layout (id content forbidden here) -// Add new revision to the bottom of the diff as in mediawiki. -// -// Revision 1.52 2005/04/01 14:45:14 rurban -// fix dirty side-effect: dont printf too early bypassing ob_buffering. -// fixes MSIE. -// -// Revision 1.51 2005/02/04 15:26:57 rurban -// need div=content for blog -// -// Revision 1.50 2005/02/04 13:44:45 rurban -// prevent from php5 nameclash -// -// Revision 1.49 2004/11/21 11:59:19 rurban -// remove final \n to be ob_cache independent -// -// Revision 1.48 2004/06/14 11:31:36 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.47 2004/06/08 13:51:57 rurban -// some comments only -// -// Revision 1.46 2004/05/01 15:59:29 rurban -// nothing changed -// -// Revision 1.45 2004/01/25 03:57:15 rurban -// use isWikiWord() -// -// Revision 1.44 2003/02/17 02:17:31 dairiki -// Fix so that action=diff will work when the most recent version -// of a page has been "deleted". -// -// Revision 1.43 2003/01/29 19:17:37 carstenklapp -// Bugfix for   showing on diff page. -// -// Revision 1.42 2003/01/11 23:05:04 carstenklapp -// Tweaked diff formatting. -// -// Revision 1.41 2003/01/08 02:23:02 carstenklapp -// Don't perform a diff when the page doesn't exist (such as a -// nonexistant calendar day/sub-page) -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/plugin/Diff.php =================================================================== --- trunk/lib/plugin/Diff.php 2009-03-23 19:47:25 UTC (rev 6692) +++ trunk/lib/plugin/Diff.php 2009-03-23 20:49:42 UTC (rev 6693) @@ -179,10 +179,16 @@ if ($diff->isEmpty()) { $html->pushContent(HTML::hr(), - HTML::p('[', _("Versions are identical"), - ']')); + HTML::p(_("Content of versions "), $old->getVersion(), + _(" and "), $new->getVersion(), _(" is identical."))); + // If two consecutive versions have the same content, it is because the page was + // renamed, or metadata changed: ACL, owner, markup. + // We give the reason by printing the summary. + if (($new->getVersion() - $old->getVersion()) == 1) { + $html->pushContent(HTML::p(_("Version "), $new->getVersion(), + _(" was created because: "), $new->get('summary'))); + } } else { - // New CSS formatted unified diffs $fmt = new HtmlUnifiedDiffFormatter; $html->pushContent($fmt->format($diff)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-03-24 14:00:05
|
Revision: 6697 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6697&view=rev Author: rurban Date: 2009-03-24 13:59:59 +0000 (Tue, 24 Mar 2009) Log Message: ----------- Chrome does not display the addInfobox Modified Paths: -------------- trunk/lib/EditToolbar.php trunk/lib/config.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2009-03-24 13:27:56 UTC (rev 6696) +++ trunk/lib/EditToolbar.php 2009-03-24 13:59:59 UTC (rev 6697) @@ -63,7 +63,7 @@ $dbi = $GLOBALS['request']->getDbh(); // regenerate if number of pages changes (categories, pages, templates) $key = $dbi->numPages(); - $key .= '+categories+plugin'; + $key .= '+categories+plugin' . (isBrowserSafari() ? '+safari' : ''); if (TOOLBAR_PAGELINK_PULLDOWN) { $key .= "+pages"; } @@ -210,9 +210,12 @@ $title = addslashes( $tool["title"] ); $toolbar .= ("addTagButton('$image','$title','$open','$close','$sample');\n"); } - $toolbar .= ("addInfobox('" - . addslashes( _("Click a button to get an example text") ) - . "');\n"); + /* Fails with Chrome */ + if (!isBrowserSafari()) { + $toolbar .= ("addInfobox('" + . addslashes( _("Click a button to get an example text") ) + . "');\n"); + } } if (JS_SEARCHREPLACE) { @@ -281,7 +284,10 @@ $categories = array(); while ($p = $pages->next()) { $page = $p->getName(); - $categories[] = "['$page', '%5B%5B".$page."%5D%5D']"; + if (DISABLE_MARKUP_WIKIWORD or (!isWikiWord($page))) + $categories[] = "['$page', '%5B".$page."%5D']"; + else + $categories[] = "['$page', '$page']"; } if (!$categories) return ''; // Ensure this to be inserted at the very end. Hence we added the id to the function. Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2009-03-24 13:27:56 UTC (rev 6696) +++ trunk/lib/config.php 2009-03-24 13:59:59 UTC (rev 6697) @@ -70,7 +70,7 @@ return $HTTP_USER_AGENT; } function browserDetect($match) { - return strstr(strtolower(browserAgent()), strtolower($match)); + return (strpos(strtolower(browserAgent()), strtolower($match)) !== false); } // returns a similar number for Netscape/Mozilla (gecko=5.0)/IE/Opera features. function browserVersion() { @@ -108,7 +108,8 @@ // MacOSX Safari has certain limitations. Need detection and patches. // * no <object>, only <embed> function isBrowserSafari($version = false) { - $found = browserDetect('spoofer') or browserDetect('applewebkit'); + $found = browserDetect('Spoofer/'); + $found = browserDetect('AppleWebKit/') or $found; if ($version) return $found and browserVersion() >= $version; return $found; } @@ -324,6 +325,32 @@ return $loc; } +/** string pcre_fix_posix_classes (string $regexp) +* +* Older version (pre 3.x?) of the PCRE library do not support +* POSIX named character classes (e.g. [[:alnum:]]). +* +* This is a helper function which can be used to convert a regexp +* which contains POSIX named character classes to one that doesn't. +* +* All instances of strings like '[:<class>:]' are replaced by the equivalent +* enumerated character class. +* +* Implementation Notes: +* +* Currently we use hard-coded values which are valid only for +* ISO-8859-1. Also, currently on the classes [:alpha:], [:alnum:], +* [:upper:] and [:lower:] are implemented. (The missing classes: +* [:blank:], [:cntrl:], [:digit:], [:graph:], [:print:], [:punct:], +* [:space:], and [:xdigit:] could easily be added if needed.) +* +* This is a hack. I tried to generate these classes automatically +* using ereg(), but discovered that in my PHP, at least, ereg() is +* slightly broken w.r.t. POSIX character classes. (It includes +* "\xaa" and "\xba" in [:alpha:].) +* +* So for now, this will do. --Jeff <da...@da...> 14 Mar, 2001 +*/ function pcre_fix_posix_classes ($regexp) { return $regexp; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-03-25 09:56:29
|
Revision: 6700 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6700&view=rev Author: rurban Date: 2009-03-25 09:56:20 +0000 (Wed, 25 Mar 2009) Log Message: ----------- fix paging with dba (avoid double limit) add _jsFlipAll again as a bigger page is faster than a 2nd file request Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-03-25 09:14:26 UTC (rev 6699) +++ trunk/lib/PageList.php 2009-03-25 09:56:20 UTC (rev 6700) @@ -795,7 +795,10 @@ function addPages ($page_iter) { // TODO: if limit check max(strlen(pagename)) $i = 0; - if (isset($this->_options['limit'])) { // extract from,count from limit + if (isa($page_iter->_iter, "WikiDB_backend_dbaBase_pageiter")) { + $limit = 0; + } + elseif (isset($this->_options['limit'])) { // extract from,count from limit list($from, $limit) = WikiDB_backend::limit($this->_options['limit']); $limit += $from; } else { @@ -1393,7 +1396,8 @@ if (count($this->_sortby) > 0) $this->_sortPages(); // wikiadminutils hack. that's a way to pagelist non-pages - $rows = isset($this->_rows) ? $this->_rows : array(); $i = 0; + $rows = isset($this->_rows) ? $this->_rows : array(); + $i = 0; $count = $this->getTotal(); $do_paging = ( isset($this->_options['paging']) and !empty($this->_options['limit']) @@ -1419,6 +1423,12 @@ $table->pushContent(HTML::caption(array('align'=>'top'), $caption)); } + //Warning: This is quite fragile. It depends solely on a private variable + // in ->_addColumn() + if (!empty($this->_columns_seen['checkbox'])) { + $table->pushContent($this->_jsFlipAll()); + } + $row = HTML::tr(); $table_summary = array(); $i = 1; // start with 1! @@ -1460,6 +1470,21 @@ } } + function _jsFlipAll() { + return JavaScript(" +function flipAll(formObj) { + var isFirstSet = -1; + for (var i=0; i < formObj.length; i++) { + fldObj = formObj.elements[i]; + if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,2) == 'p[')) { + if (isFirstSet == -1) + isFirstSet = (fldObj.checked) ? true : false; + fldObj.checked = (isFirstSet) ? false : true; + } + } +}"); + } + /* recursive stack for private sublist options (azhead, cols) */ function _saveOptions($opts) { $stack = array('pages' => $this->_pages); Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2009-03-25 09:14:26 UTC (rev 6699) +++ trunk/lib/WikiDB.php 2009-03-25 09:56:20 UTC (rev 6700) @@ -280,6 +280,8 @@ } $result = $this->_backend->get_all_pages($include_empty, $sortby, $limit, $exclude); + if (isa($this->_backend, "WikiDB_backend_dba")) + $limit = false; return new WikiDB_PageIterator($this, $result, array('include_empty' => $include_empty, 'exclude' => $exclude, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Marc-Etienne V. <Mar...@al...> - 2009-03-26 17:57:37
|
ru...@us... a écrit : > Revision: 6700 > http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6700&view=rev > Author: rurban > Date: 2009-03-25 09:56:20 +0000 (Wed, 25 Mar 2009) > > Log Message: > ----------- > add _jsFlipAll again as a bigger page is faster than a 2nd file request > > Modified Paths: > -------------- > trunk/lib/PageList.php > > > + //Warning: This is quite fragile. It depends solely on a private variable > + // in ->_addColumn() > + if (!empty($this->_columns_seen['checkbox'])) { > + $table->pushContent($this->_jsFlipAll()); > + } > + > + function _jsFlipAll() { > + return JavaScript(" > +function flipAll(formObj) { > + var isFirstSet = -1; > + for (var i=0; i < formObj.length; i++) { > + fldObj = formObj.elements[i]; > + if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,2) == 'p[')) { > + if (isFirstSet == -1) > + isFirstSet = (fldObj.checked) ? true : false; > + fldObj.checked = (isFirstSet) ? false : true; > + } > + } > +}"); > + } > + Hello Reini, I see you have reverted some of my contributions. I will try to explain why I did them. In that case, you are creating invalid XHTML code, and this in not acceptable for us. You create a script *inside* a table which is invalid. Best regards, Marc-Etienne -- Marc-Etienne Vargenau Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE +33 (0)1 30 77 28 33, Mar...@al... |
From: Marc-Etienne V. <Mar...@al...> - 2009-03-26 18:57:40
|
ru...@us... a écrit : > Revision: 6700 > http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6700&view=rev > Author: rurban > Date: 2009-03-25 09:56:20 +0000 (Wed, 25 Mar 2009) > > Log Message: > ----------- > fix paging with dba (avoid double limit) Hello, I see you have made modifications about paging. But it still does not work for me. The first page is OK, but all others are empty. Does it work for you? Do you need more information about my config? Best regards, Marc-Etienne -- Marc-Etienne Vargenau Alcatel-Lucent France, Route de Villejust, 91620 NOZAY, FRANCE +33 (0)1 30 77 28 33, Mar...@al... |
From: <var...@us...> - 2009-03-26 12:32:23
|
Revision: 6716 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6716&view=rev Author: vargenau Date: 2009-03-26 12:32:01 +0000 (Thu, 26 Mar 2009) Log Message: ----------- Use UTF-8 so that display is correct on sf.net Modified Paths: -------------- trunk/lib/HttpClient.php trunk/lib/PageList.php trunk/lib/WikiDB/adodb/adodb-lib.inc.php trunk/lib/WikiDB/adodb/adodb.inc.php trunk/lib/WikiDB/adodb/drivers/adodb-oci8.inc.php trunk/lib/WikiPluginCached.php trunk/lib/XmlRpcServer.php trunk/lib/config.php trunk/lib/display.php trunk/lib/fpdf.php trunk/lib/imagecache.php trunk/lib/pdf.php trunk/lib/pear/DB/sybase.php trunk/lib/plugin/CacheTest.php trunk/lib/plugin/CalendarList.php trunk/lib/plugin/RecentChanges.php trunk/lib/plugin/RecentChangesCached.php trunk/lib/plugin/TexToPng.php trunk/lib/plugin/VisualWiki.php trunk/lib/wikilens/CustomPrefs.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/HttpClient.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -5,7 +5,7 @@ Version 0.9, 6th April 2003 - Simon Willison ( http://simon.incutio.com/ ) Manual: http://scripts.incutio.com/httpclient/ - Copyright \xA9 2003 Incutio Limited + Copyright © 2003 Incutio Limited License: http://www.opensource.org/licenses/artistic-license.php File upload and xmlrpc support by Reini Urban for PhpWiki, 2006-12-28 18:12:47 Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/PageList.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -371,7 +371,7 @@ $this->search = $HTTP_POST_VARS['admin_replace']['from']; } $this->_heading .= sprintf(_(" ... around %s"), - '\xBB'.$this->search.'\xAB'); + '»'.$this->search.'«'); } } @@ -409,7 +409,7 @@ if (strpos($c," ")) $c = ""; else - $c = sprintf(_("%s not found"), '\xBB'.$search.'\xAB'); + $c = sprintf(_("%s not found"), '»'.$search.'«'); return HTML::div(array('style' => 'font-size:x-small','align'=>'center'), $c." ".($score ? sprintf("[%0.1f]",$score):"")); } Modified: trunk/lib/WikiDB/adodb/adodb-lib.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/adodb-lib.inc.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/WikiDB/adodb/adodb-lib.inc.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -296,7 +296,7 @@ return $rsreturn; } -// Iv\xE1n Oliva version +// Iván Oliva version function &_adodb_pageexecute_no_last_page(&$zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0) { Modified: trunk/lib/WikiDB/adodb/adodb.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/adodb.inc.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/WikiDB/adodb/adodb.inc.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -2191,7 +2191,7 @@ /** * Will select the supplied $page number from a recordset, given that it is paginated in pages of * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Iv\xE1n Oliva to provide recordset pagination. + * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination. * * See readme.htm#ex8 for an example of usage. * @@ -2218,7 +2218,7 @@ /** * Will select the supplied $page number from a recordset, given that it is paginated in pages of * $nrows rows per page. It also saves two boolean values saying if the given page is the first - * and/or last one of the recordset. Added by Iv\xE1n Oliva to provide recordset pagination. + * and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination. * * @param secs2cache seconds to cache data, set to 0 to force query * @param sql @@ -2325,9 +2325,9 @@ var $_obj; /** Used by FetchObj */ var $_names; /** Used by FetchObj */ - var $_currentPage = -1; /** Added by Iv\xE1n Oliva to implement recordset pagination */ - var $_atFirstPage = false; /** Added by Iv\xE1n Oliva to implement recordset pagination */ - var $_atLastPage = false; /** Added by Iv\xE1n Oliva to implement recordset pagination */ + var $_currentPage = -1; /** Added by Iván Oliva to implement recordset pagination */ + var $_atFirstPage = false; /** Added by Iván Oliva to implement recordset pagination */ + var $_atLastPage = false; /** Added by Iván Oliva to implement recordset pagination */ var $_lastPageNo = -1; var $_maxRecordCount = 0; var $datetime = false; Modified: trunk/lib/WikiDB/adodb/drivers/adodb-oci8.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-oci8.inc.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/WikiDB/adodb/drivers/adodb-oci8.inc.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -27,8 +27,8 @@ yy-mm-dd or yyyy-mm-dd. Using 'RR' in the format forces two-digit years less than or equal to 49 to be -interpreted as years in the 21st century (2000\x962049), and years over 50 as years in -the 20th century (1950\x961999). Setting the RR format as the default for all two-digit +interpreted as years in the 21st century (2000-2049), and years over 50 as years in +the 20th century (1950-1999). Setting the RR format as the default for all two-digit year entries allows you to become year-2000 compliant. For example: NLS_DATE_FORMAT='RR-MM-DD' @@ -1183,4 +1183,4 @@ } } } -?> \ No newline at end of file +?> Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/WikiPluginCached.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -1,6 +1,6 @@ <?php rcs_id('$Id$'); /* - Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) + Copyright (C) 2002 Johannes Große Copyright (C) 2004,2007 Reini Urban This file is part of PhpWiki. @@ -54,7 +54,7 @@ * <li>plugin/Ploticus.php</li> * </ul> * - * @author Johannes Gro\xDFe, Reini Urban + * @author Johannes Große, Reini Urban */ class WikiPluginCached extends WikiPlugin { Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/XmlRpcServer.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -842,36 +842,36 @@ Faults If an error condition occurs, then the appropriate fault code from the following list should be used. Clients can quickly determine - the kind of error from bits 5-8. 0\xD7001x fault codes are used for - problems with the source URI, 0\xD7002x codes are for problems with - the target URI, and 0\xD7003x codes are used when the URIs are fine + the kind of error from bits 5-8. 0×001x fault codes are used for + problems with the source URI, 0×002x codes are for problems with + the target URI, and 0×003x codes are used when the URIs are fine but the pingback cannot be acknowledged for some other reaon. 0 A generic fault code. Servers MAY use this error code instead of any of the others if they do not have a way of determining the correct fault code. - 0\xD70010 (16) + 0×0010 (16) The source URI does not exist. - 0\xD70011 (17) + 0×0011 (17) The source URI does not contain a link to the target URI, and so cannot be used as a source. - 0\xD70020 (32) + 0×0020 (32) The specified target URI does not exist. This MUST only be used when the target definitely does not exist, rather than when the target may exist but is not recognised. See the next error. - 0\xD70021 (33) + 0×0021 (33) The specified target URI cannot be used as a target. It either doesn't exist, or it is not a pingback-enabled resource. For example, on a blog, typically only permalinks are pingback-enabled, and trying to pingback the home page, or a set of posts, will fail with this error. - 0\xD70030 (48) + 0×0030 (48) The pingback has already been registered. - 0\xD70031 (49) + 0×0031 (49) Access denied. - 0\xD70032 (50) + 0×0032 (50) The server could not communicate with an upstream server, or received an error from an upstream server, and therefore could not complete the request. This is similar to HTTP's 402 Bad Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/config.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -224,7 +224,7 @@ 'german', 'ge'), 'es' => array('es_ES', 'es_MX', 'es_AR', 'spanish'), 'nl' => array('nl_NL', 'dutch'), - 'fr' => array('fr_FR', 'fran\xE7ais', 'french'), + 'fr' => array('fr_FR', 'français', 'french'), 'it' => array('it_IT'), 'sv' => array('sv_SE'), 'ja.utf-8' => array('ja_JP','ja_JP.utf-8','japanese'), @@ -307,7 +307,7 @@ } // To get the POSIX character classes in the PCRE's (e.g. - // [[:upper:]]) to match extended characters (e.g. Gr\xFC\xDFGott), we have + // [[:upper:]]) to match extended characters (e.g. GrüßGott), we have // to set the locale, using setlocale(). // // The problem is which locale to set? We would like to recognize all @@ -387,7 +387,7 @@ // this replaces [[:upper:]] with utf-8 match (Latin only) $regexp = preg_replace('/\[\[\:upper\:\]\]/','(?:[A-Z]|\xc3[\x80-\x9e]|\xc4[\x80\x82\x84\x86])', $regexp); - } elseif (preg_match('/[[:upper:]]/', '\xC4')) { + } elseif (preg_match('/[[:upper:]]/', 'Ä')) { // First check to see if our PCRE lib supports POSIX character // classes. If it does, there's nothing to do. return $regexp; Modified: trunk/lib/display.php =================================================================== --- trunk/lib/display.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/display.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -137,7 +137,7 @@ $request->setArg('zipname', FilenameForPage($pagename).".zip"); $request->setArg('pages', $args['VALID_LINKS']); MakeWikiZipHtml($request); - } // time-sorted RDF \xE1 la RecentChanges + } // time-sorted RDF á la RecentChanges elseif (in_array($format, array("rss91","rss2","rss","atom"))) { $args = $request->getArgs(); if ($pagename == _("RecentChanges")) { Modified: trunk/lib/fpdf.php =================================================================== --- trunk/lib/fpdf.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/fpdf.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -1356,7 +1356,7 @@ function _parsegif ($file) { - //Function by J\xE9r\xF4me Fenal + //Function by Jérôme Fenal //GIF class in pure PHP from Yamasoft (http://www.yamasoft.com/php-gif.zip) require_once 'lib/gif.php'; Modified: trunk/lib/imagecache.php =================================================================== --- trunk/lib/imagecache.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/imagecache.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -1,6 +1,6 @@ <?php rcs_id('$Id$'); /* - Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) + Copyright (C) 2002 Johannes Große This file is part of PhpWiki. @@ -21,7 +21,7 @@ /** * Gets an image from the cache and prints it to the browser. * This file belongs to WikiPluginCached. - * @author Johannes Gro\xDFe + * @author Johannes Große * @version 0.8 */ @@ -166,4 +166,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/pdf.php =================================================================== --- trunk/lib/pdf.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/pdf.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -2,7 +2,7 @@ rcs_id('$Id$'); /* Copyright (C) 2003 Olivier PLATHEY - Copyright (C) 200? Don Seb\xE0 + Copyright (C) 200? Don Sebà Copyright (C) 2004,2006,2007 Reini Urban This file is part of PhpWiki. Modified: trunk/lib/pear/DB/sybase.php =================================================================== --- trunk/lib/pear/DB/sybase.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/pear/DB/sybase.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -14,7 +14,7 @@ // | li...@ph... so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Sterling Hughes <ste...@ph...> | -// | Ant\xF4nio Carlos Ven\xE2ncio J\xFAnior <fl...@ph...> | +// | Antônio Carlos Venâncio Júnior <fl...@ph...> | // | Maintainer: Daniel Convissor <da...@ph...> | // +----------------------------------------------------------------------+ // @@ -36,7 +36,7 @@ * @version $Id$ * @category Database * @author Sterling Hughes <ste...@ph...> - * @author Ant\xF4nio Carlos Ven\xE2ncio J\xFAnior <fl...@ph...> + * @author Antônio Carlos Venâncio Júnior <fl...@ph...> */ class DB_sybase extends DB_common { Modified: trunk/lib/plugin/CacheTest.php =================================================================== --- trunk/lib/plugin/CacheTest.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/CacheTest.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -7,7 +7,7 @@ // | text to image conversion. | // | This is a usage example of WikiPluginCached. | // | | -// | Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) | +// | Copyright (C) 2002 Johannes Große (Johannes Große) | // | You may copy this code freely under the conditions of the GPL | // +---------------------------------------------------------------------+ Modified: trunk/lib/plugin/CalendarList.php =================================================================== --- trunk/lib/plugin/CalendarList.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/CalendarList.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -37,7 +37,7 @@ * This is a list of calendar appointments. * Same arguments as Calendar, so no one is confused * Uses <dl><dd>DATE<dt>page contents... - * Derived from Calendar.php by Martin Norb\xE4ck <ma...@sa...> + * Derived from Calendar.php by Martin Norbäck <ma...@sa...> * * Insert this plugin into your Calendar page, for example in WikiUser/Calendar: * <?plugin Calendar ?> Modified: trunk/lib/plugin/RecentChanges.php =================================================================== --- trunk/lib/plugin/RecentChanges.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/RecentChanges.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -311,12 +311,12 @@ * overlapping ideal word cutting points. * * en: day/days "The %d most recent %s [during (the past] day) are listed below." - * de: 1 Tag "Die %d j\xFCngste %s [innerhalb (von des letzten] Tages) sind unten aufgelistet." - * de: %s days "Die %d j\xFCngste %s [innerhalb (von] %s Tagen) sind unten aufgelistet." + * de: 1 Tag "Die %d jüngste %s [innerhalb (von des letzten] Tages) sind unten aufgelistet." + * de: %s days "Die %d jüngste %s [innerhalb (von] %s Tagen) sind unten aufgelistet." * * en: day/days "The %d most recent %s during [the past] (day) are listed below." - * fr: 1 jour "Les %d %s les plus r\xE9centes pendant [le dernier (d'une] jour) sont \xE9num\xE9r\xE9es ci-dessous." - * fr: %s jours "Les %d %s les plus r\xE9centes pendant [les derniers (%s] jours) sont \xE9num\xE9r\xE9es ci-dessous." + * fr: 1 jour "Les %d %s les plus récentes pendant [le dernier (d'une] jour) sont énumérées ci-dessous." + * fr: %s jours "Les %d %s les plus récentes pendant [les derniers (%s] jours) sont énumérées ci-dessous." */ if ($limit > 0) { if ($timespan) { Modified: trunk/lib/plugin/RecentChangesCached.php =================================================================== --- trunk/lib/plugin/RecentChangesCached.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/RecentChangesCached.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -23,7 +23,7 @@ // +---------------------------------------------------------------------+ // | WikiPluginCached.php | // +---------------------------------------------------------------------+ -// | Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) | +// | Copyright (C) 2002 Johannes Große | // | You may copy this code freely under the conditions of the GPL | // +---------------------------------------------------------------------+ Modified: trunk/lib/plugin/TexToPng.php =================================================================== --- trunk/lib/plugin/TexToPng.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/TexToPng.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -28,7 +28,7 @@ // | engines into a gif, png or jpeg file. | // | TexToPng is usage example for WikiPluginCached. | // | | -// | Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) | +// | Copyright (C) 2002 Johannes Große (Johannes Große) | // | You may copy this code freely under the conditions of the GPL | // +---------------------------------------------------------------------+ Modified: trunk/lib/plugin/VisualWiki.php =================================================================== --- trunk/lib/plugin/VisualWiki.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/plugin/VisualWiki.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -1,7 +1,7 @@ <?php // -*-php-*- rcs_id('$Id$'); /* - Copyright (C) 2002 Johannes Gro\xDFe (Johannes Große) + Copyright (C) 2002 Johannes Große (Johannes Große) This file is part of PhpWiki. @@ -25,7 +25,7 @@ * Example for an image map creating plugin. It produces a graphical * sitemap of PhpWiki by calling the <code>dot</code> commandline tool * from graphviz (http://www.graphviz.org). - * @author Johannes Gro\xDFe + * @author Johannes Große * @version 0.9 */ /* define('VISUALWIKI_ALLOWOPTIONS', true); */ Modified: trunk/lib/wikilens/CustomPrefs.php =================================================================== --- trunk/lib/wikilens/CustomPrefs.php 2009-03-26 11:02:27 UTC (rev 6715) +++ trunk/lib/wikilens/CustomPrefs.php 2009-03-26 12:32:01 UTC (rev 6716) @@ -32,7 +32,7 @@ 'itemProb', // Item-based Top-N recommendation algorithm with probability-based similarity function. // This algorithms tends to outperform the rest. 'userCos', // User-based Top-N recommendation algorithm with cosine-based similarity function. - 'bayes'); // Na\xEFve Bayesian Classifier + 'bayes'); // Naïve Bayesian Classifier var $default_value = 'itemProb'; function sanify ($value) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-31 11:41:42
|
Revision: 6741 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6741&view=rev Author: vargenau Date: 2009-03-31 11:41:21 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Remove history Modified Paths: -------------- trunk/lib/PageType.php trunk/lib/Request.php trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/file.php trunk/lib/install.php trunk/lib/plugin/AllPages.php trunk/lib/plugin/BackLinks.php trunk/lib/plugin/LinkDatabase.php trunk/lib/plugin/UnfoldSubpages.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/PageType.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -546,67 +546,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.54 2007/09/12 19:35:29 rurban -// Windows fix for local path detection -// -// Revision 1.53 2007/07/14 17:55:29 rurban -// SemanticWeb.php -// -// Revision 1.52 2007/02/17 14:17:41 rurban -// localize Upload:links for WIKIDUMP: esp. for pdf images -// -// Revision 1.51 2007/01/07 18:43:17 rurban -// Disallow ":" as interwikmap and use it as proper LinkedBracket match. -// -// Revision 1.50 2007/01/04 16:44:57 rurban -// Force interwiki updates and page edits -// -// Revision 1.49 2006/10/12 06:25:09 rurban -// use the same class for $moniker == "" -// -// Revision 1.48 2006/10/08 12:38:11 rurban -// New special interwiki link markup [:LinkTo] without storing the backlink -// -// Revision 1.47 2005/08/07 09:14:38 rurban -// fix comments -// -// Revision 1.46 2005/08/06 13:09:33 rurban -// allow spaces in interwiki paths, even implicitly. fixes bug #1218733 -// -// Revision 1.45 2005/05/06 16:48:41 rurban -// support %u, %b, %d expansion for Upload: User: and Talk: interwiki monikers -// -// Revision 1.44 2005/04/23 11:07:34 rurban -// cache map -// -// Revision 1.43 2005/02/02 20:40:12 rurban -// fix Talk: and User: names and links -// -// Revision 1.42 2005/02/02 19:36:56 rurban -// more plans -// -// Revision 1.41 2005/02/02 19:34:09 rurban -// more maps: Talk, User -// -// Revision 1.40 2005/01/31 12:15:08 rurban -// avoid some cornercase intermap warning. Thanks to Stefan <son...@ba...> -// -// Revision 1.39 2005/01/25 06:59:35 rurban -// fix bogus InterWikiMap warning -// -// Revision 1.38 2004/12/26 17:10:44 rurban -// just docs or whitespace -// -// Revision 1.37 2004/12/06 19:49:55 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/Request.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -1360,351 +1360,6 @@ } } - -// $Log: not supported by cvs2svn $ -// Revision 1.118 2008/03/22 21:45:34 rurban -// Fixed a blocker for php-5.2. Somehow _SESSION is not copied from -// HTTP_SESSION_VARS in prepend, so check it explicitly. User logins persist now. -// -// Revision 1.117 2008/03/17 19:08:29 rurban -// get rid of @ error protection in unserialize -// -// Revision 1.116 2008/02/14 18:31:04 rurban -// nocache to omit compress cache headers (fix async calls for rating images) -// -// Revision 1.115 2007/09/01 13:28:34 rurban -// document pear DB problem -// -// Revision 1.114 2007/07/14 19:17:15 rurban -// fix bug#1749950 float with "," -// -// Revision 1.113 2007/03/18 10:25:21 rurban -// cast AccessLog types -// -// Revision 1.112 2007/01/28 22:49:55 rurban -// use backend specific SQL write_accesslog -// -// Revision 1.111 2007/01/07 18:43:26 rurban -// Explain failed UpLoad on Windows to the user. -// -// Revision 1.110 2007/01/04 16:45:10 rurban -// Be more verbose in serious php problem. -// -// Revision 1.109 2006/12/22 00:24:09 rurban -// silence empty obcache messages -// -// Revision 1.108 2006/11/29 19:49:48 rurban -// quote the date -// -// Revision 1.107 2006/11/19 11:10:11 rurban -// Patch from Bug# 1569424 by Bob Peele (bob...@or...) -// -// Revision 1.106 2006/08/15 13:37:59 rurban -// error on no long arrays -// -// Revision 1.105 2006/04/17 17:25:19 rurban -// make the flush error go away. die -// -// Revision 1.104 2006/04/16 11:42:16 rurban -// php url-rewriting miscalculates the ob length. fixes bug #1376007 -// -// do not flush a not existing buffer to avoid Pragma: no-cache on @ error. -// fixes bug #1438448 -// -// Revision 1.103 2006/04/15 12:23:32 rurban -// silence $this->_is_buffering_output warning -// -// Revision 1.102 2006/03/19 15:01:00 rurban -// sf.net patch #1333957 by Matt Brown: Authentication cookie identical across all wikis on a host -// -// Revision 1.101 2006/03/07 20:45:43 rurban -// wikihash for php-5.1 -// -// Revision 1.100 2006/01/17 18:57:09 uckelman -// _accesslog->logtable is not set when using non-SQL logging; check should -// be isset to avoid a PHP warning -// -// Revision 1.99 2005/09/18 16:01:09 rurban -// trick to send the correct gzipped Content-Length -// -// Revision 1.98 2005/09/18 15:15:53 rurban -// add a proper Content-Encoding: gzip if compressed, and omit Content-Length then. -// -// Revision 1.97 2005/09/14 05:58:17 rurban -// protect against Content-Length if headers_sent(), fixed writing unwanted accesslog sql entries -// -// Revision 1.96 2005/08/07 10:52:43 rurban -// stricter error handling: dba errors are fatal, display errors on Request->finish or session_close -// -// Revision 1.95 2005/08/07 10:09:33 rurban -// set _COOKIE also -// -// Revision 1.94 2005/08/07 09:14:39 rurban -// fix comments -// -// Revision 1.93 2005/08/06 14:31:10 rurban -// ensure absolute uploads path -// -// Revision 1.92 2005/05/14 07:22:47 rurban -// remove mysql specific INSERT DELAYED -// -// Revision 1.91 2005/04/11 19:40:14 rurban -// Simplify upload. See https://sourceforge.net/forum/message.php?msg_id=3093651 -// Improve UpLoad warnings. -// Move auth check before upload. -// -// Revision 1.90 2005/02/26 18:30:01 rurban -// update (C) -// -// Revision 1.89 2005/02/04 10:38:36 rurban -// do not log passwords! Thanks to Charles Corrigan -// -// Revision 1.88 2005/01/25 07:00:23 rurban -// fix redirect, -// -// Revision 1.87 2005/01/08 21:27:45 rurban -// Prevent from Overlarge session data crash -// -// Revision 1.86 2005/01/04 20:26:34 rurban -// honor DISABLE_HTTP_REDIRECT, do not gzip the redirect template, flush it -// -// Revision 1.85 2004/12/26 17:08:36 rurban -// php5 fixes: case-sensitivity, no & new -// -// Revision 1.84 2004/12/17 16:37:30 rurban -// avoid warning -// -// Revision 1.83 2004/12/10 02:36:43 rurban -// More help with the new native xmlrpc lib. no warnings, no user cookie on xmlrpc. -// -// Revision 1.82 2004/12/06 19:49:55 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.81 2004/11/27 14:39:04 rurban -// simpified regex search architecture: -// no db specific node methods anymore, -// new sql() method for each node -// parallel to regexp() (which returns pcre) -// regex types bitmasked (op's not yet) -// new regex=sql -// clarified WikiDB::quote() backend methods: -// ->quote() adds surrounsing quotes -// ->qstr() (new method) assumes strings and adds no quotes! (in contrast to ADODB) -// pear and adodb have now unified quote methods for all generic queries. -// -// Revision 1.80 2004/11/21 11:59:16 rurban -// remove final \n to be ob_cache independent -// -// Revision 1.79 2004/11/11 18:29:44 rurban -// (write_sql) isOpen really is useless in non-SQL, do more explicit check -// -// Revision 1.78 2004/11/10 15:29:20 rurban -// * requires newer Pear_DB (as the internal one): quote() uses now escapeSimple for strings -// * ACCESS_LOG_SQL: fix cause request not yet initialized -// * WikiDB: moved SQL specific methods upwards -// * new Pear_DB quoting: same as ADODB and as newer Pear_DB. -// fixes all around: WikiGroup, WikiUserNew SQL methods, SQL logging -// -// Revision 1.77 2004/11/09 17:11:04 rurban -// * revert to the wikidb ref passing. there's no memory abuse there. -// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively -// store page ids with getPageLinks (GleanDescription) of all existing pages, which -// are also needed at the rendering for linkExistingWikiWord(). -// pass options to pageiterator. -// use this cache also for _get_pageid() -// This saves about 8 SELECT count per page (num all pagelinks). -// * fix passing of all page fields to the pageiterator. -// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes -// -// Revision 1.76 2004/11/09 08:15:18 rurban -// fix ADODB quoting style -// -// Revision 1.75 2004/11/07 18:34:28 rurban -// more logging fixes -// -// Revision 1.74 2004/11/07 16:02:51 rurban -// new sql access log (for spam prevention), and restructured access log class -// dbh->quote (generic) -// pear_db: mysql specific parts seperated (using replace) -// -// Revision 1.73 2004/11/06 04:51:25 rurban -// readable ACCESS_LOG support: RecentReferrers, WikiAccessRestrictions -// -// Revision 1.72 2004/11/01 10:43:55 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.71 2004/10/22 09:20:36 rurban -// fix for USECACHE=false -// -// Revision 1.70 2004/10/21 19:59:18 rurban -// Patch #991494 (ppo): Avoid notice in PHP >= 4.3.3 if session already started -// -// Revision 1.69 2004/10/21 19:00:37 rurban -// upload errmsgs by Shilad Sen. -// chunkOutput support: flush the buffer piecewise (dumphtml, large pagelists) -// doesn't gain much because ob_end_clean() doesn't release its -// memory properly yet. -// -// Revision 1.68 2004/10/12 13:13:19 rurban -// php5 compatibility (5.0.1 ok) -// -// Revision 1.67 2004/09/25 18:56:54 rurban -// make start_debug logic work -// -// Revision 1.66 2004/09/25 16:24:52 rurban -// dont compress on debugging -// -// Revision 1.65 2004/09/17 14:13:49 rurban -// We check for the client Accept-Encoding: "gzip" presence also -// This should eliminate a lot or reported problems. -// -// Note that this doesn#t fix RSS ssues: -// Most RSS clients are NOT(!) application/xml gzip compatible yet. -// Even if they are sending the accept-encoding gzip header! -// wget is, Mozilla, and MSIE no. -// Of the RSS readers only MagpieRSS 0.5.2 is. http://www.rssgov.com/rssparsers.html -// -// Revision 1.64 2004/09/17 13:32:36 rurban -// Disable server-side gzip encoding for RSS (RDF encoding), even if the client says it -// supports it. Mozilla has this error, wget works fine. IE not checked. -// -// Revision 1.63 2004/07/01 09:29:40 rurban -// fixed another DbSession crash: wrong WikiGroup vars -// -// Revision 1.62 2004/06/27 10:26:02 rurban -// oci8 patch by Philippe Vanhaesendonck + some ADODB notes+fixes -// -// Revision 1.61 2004/06/25 14:29:17 rurban -// WikiGroup refactoring: -// global group attached to user, code for not_current user. -// improved helpers for special groups (avoid double invocations) -// new experimental config option ENABLE_XHTML_XML (fails with IE, and document.write()) -// fixed a XHTML validation error on userprefs.tmpl -// -// Revision 1.60 2004/06/19 11:51:13 rurban -// CACHE_CONTROL: NONE => NO_CACHE -// -// Revision 1.59 2004/06/13 11:34:22 rurban -// fixed bug #969532 (space in uploaded filenames) -// improved upload error messages -// -// Revision 1.58 2004/06/04 20:32:53 rurban -// Several locale related improvements suggested by Pierrick Meignen -// LDAP fix by John Cole -// reanable admin check without ENABLE_PAGEPERM in the admin plugins -// -// Revision 1.57 2004/06/03 18:54:25 rurban -// fixed "lost level in session" warning, now that signout sets level = 0 (before -1) -// -// Revision 1.56 2004/05/17 17:43:29 rurban -// CGI: no PATH_INFO fix -// -// Revision 1.55 2004/05/15 18:31:00 rurban -// some action=pdf Request fixes: With MSIE it works now. Now the work with the page formatting begins. -// -// Revision 1.54 2004/05/04 22:34:25 rurban -// more pdf support -// -// Revision 1.53 2004/05/03 21:57:47 rurban -// locale updates: we previously lost some words because of wrong strings in -// PhotoAlbum, german rewording. -// fixed $_SESSION registering (lost session vars, esp. prefs) -// fixed ending slash in listAvailableLanguages/Themes -// -// Revision 1.52 2004/05/03 13:16:47 rurban -// fixed UserPreferences update, esp for boolean and int -// -// Revision 1.51 2004/05/02 21:26:38 rurban -// limit user session data (HomePageHandle and auth_dbi have to invalidated anyway) -// because they will not survive db sessions, if too large. -// extended action=upgrade -// some WikiTranslation button work -// revert WIKIAUTH_UNOBTAINABLE (need it for main.php) -// some temp. session debug statements -// -// Revision 1.50 2004/04/29 19:39:44 rurban -// special support for formatted plugins (one-liners) -// like <small><plugin BlaBla ></small> -// iter->asArray() helper for PopularNearby -// db_session for older php's (no &func() allowed) -// -// Revision 1.49 2004/04/26 20:44:34 rurban -// locking table specific for better databases -// -// Revision 1.48 2004/04/13 09:13:50 rurban -// sf.net bug #933183 and http://bugs.php.net/17557 -// disable ob_gzhandler if apache_note cannot be used. -// (conservative until we find why) -// -// Revision 1.47 2004/04/02 15:06:55 rurban -// fixed a nasty ADODB_mysql session update bug -// improved UserPreferences layout (tabled hints) -// fixed UserPreferences auth handling -// improved auth stability -// improved old cookie handling: fixed deletion of old cookies with paths -// -// Revision 1.46 2004/03/30 02:14:03 rurban -// fixed yet another Prefs bug -// added generic PearDb_iter -// $request->appendValidators no so strict as before -// added some box plugin methods -// PageList commalist for condensed output -// -// Revision 1.45 2004/03/24 19:39:02 rurban -// php5 workaround code (plus some interim debugging code in XmlElement) -// php5 doesn't work yet with the current XmlElement class constructors, -// WikiUserNew does work better than php4. -// rewrote WikiUserNew user upgrading to ease php5 update -// fixed pref handling in WikiUserNew -// added Email Notification -// added simple Email verification -// removed emailVerify userpref subclass: just a email property -// changed pref binary storage layout: numarray => hash of non default values -// print optimize message only if really done. -// forced new cookie policy: delete pref cookies, use only WIKI_ID as plain string. -// prefs should be stored in db or homepage, besides the current session. -// -// Revision 1.44 2004/03/14 16:26:22 rurban -// copyright line -// -// Revision 1.43 2004/03/12 20:59:17 rurban -// important cookie fix by Konstantin Zadorozhny -// new editpage feature: JS_SEARCHREPLACE -// -// Revision 1.42 2004/03/10 15:38:48 rurban -// store current user->page and ->action in session for WhoIsOnline -// better WhoIsOnline icon -// fixed WhoIsOnline warnings -// -// Revision 1.41 2004/02/27 01:25:14 rurban -// Workarounds for upload handling -// -// Revision 1.40 2004/02/26 01:39:51 rurban -// safer code -// -// Revision 1.39 2004/02/24 15:14:57 rurban -// fixed action=upload problems on Win32, and remove Merge Edit buttons: file does not exist anymore -// -// Revision 1.38 2004/01/25 10:26:02 rurban -// fixed bug [ 541193 ] HTTP_SERVER_VARS are Apache specific -// http://sourceforge.net/tracker/index.php?func=detail&aid=541193&group_id=6121&atid=106121 -// CGI and other servers than apache populate _ENV and not _SERVER -// -// Revision 1.37 2003/12/26 06:41:16 carstenklapp -// Bugfix: Try to defer OS errors about session.save_path and ACCESS_LOG, -// so they don't prevent IE from partially (or not at all) rendering the -// page. This should help a little for the IE user who encounters trouble -// when setting up a new PhpWiki for the first time. -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/WikiDB/backend/ADODB.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -1559,322 +1559,6 @@ return $parsed; } -// $Log: not supported by cvs2svn $ -// Revision 1.99 2007/06/07 21:37:39 rurban -// add native asArray methods to generic iters (for DebugInfo) -// -// Revision 1.98 2007/05/28 20:13:46 rurban -// Overwrite all attributes at once at page->save to delete dangling meta -// -// Revision 1.97 2007/01/28 22:53:23 rurban -// protect against $oldlinks warning -// -// Revision 1.96 2007/01/21 23:28:32 rurban -// Disable hasGenID. requires CREATE perms -// -// Revision 1.95 2007/01/04 16:57:32 rurban -// Clarify API: sortby,limit and exclude are strings. fix upgrade test connection -// -// Revision 1.94 2006/12/23 11:44:56 rurban -// deal with strict references and the order of deletion -// -// Revision 1.93 2006/12/03 16:25:20 rurban -// remove closing Smart ROLLBACK, cannot be forced if never started. -// remove postgresql user VACUUM, autovacumm must do that. (can be easily -// enabled) -// -// Revision 1.92 2006/12/02 21:57:27 rurban -// fix WantedPages SQL: no JOIN -// clarify first condition in CASE WHEN -// -// Revision 1.91 2006/11/19 14:03:32 rurban -// Replace IF by CASE in exists_link() -// -// Revision 1.90 2006/09/06 05:50:19 rurban -// please XEmacs font-lock -// -// Revision 1.89 2006/06/10 11:59:46 rurban -// purge empty, non-references pages when link is deleted -// -// Revision 1.88 2006/05/14 12:28:03 rurban -// mysql 5.x fix for wantedpages join -// -// Revision 1.87 2006/04/17 17:28:21 rurban -// honor getWikiPageLinks change linkto=>relation -// -// Revision 1.86 2006/04/17 10:02:44 rurban -// fix syntax error missing } -// -// Revision 1.85 2006/04/15 12:48:04 rurban -// use genID, dont lock here -// -// Revision 1.84 2006/02/22 21:49:50 rurban -// Remove hits from links query -// force old set_links method. need to test IS NULL -// -// Revision 1.83 2005/11/14 22:24:33 rurban -// fix fulltext search, -// Eliminate stoplist words, -// don't extract %pagedate twice in ADODB, -// add SemanticWeb support: link(relation), -// major postgresql update: stored procedures, tsearch2 for fulltext -// -// Revision 1.82 2005/10/31 16:48:22 rurban -// move mysql-specifics into its special class -// -// Revision 1.81 2005/10/10 19:42:14 rurban -// fix wanted_pages SQL syntax -// -// Revision 1.80 2005/09/28 19:26:05 rurban -// working on improved postgresql support: better quoting, bytea support -// -// Revision 1.79 2005/09/28 19:08:41 rurban -// dont use LIMIT on modifying queries -// -// Revision 1.78 2005/09/14 06:04:43 rurban -// optimize searching for ALL (ie %), use the stoplist on PDO -// -// Revision 1.77 2005/09/11 14:55:05 rurban -// implement fulltext stoplist -// -// Revision 1.76 2005/09/11 13:25:12 rurban -// enhance LIMIT support -// -// Revision 1.75 2005/09/10 21:30:16 rurban -// enhance titleSearch -// -// Revision 1.74 2005/02/10 19:04:22 rurban -// move getRow up one level to our backend class -// -// Revision 1.73 2005/02/04 13:43:30 rurban -// fix purge cache error -// -// Revision 1.72 2005/01/29 19:51:03 rurban -// Bugs item #1077769 fixed by frugal. -// Deleted the wrong page. Fix all other tables also. -// -// Revision 1.71 2005/01/25 08:01:00 rurban -// fix listOfFields with different database -// -// Revision 1.70 2005/01/18 20:55:43 rurban -// reformatting and two bug fixes: adding missing parens -// -// Revision 1.69 2004/12/26 17:14:03 rurban -// fix ADODB MostPopular, avoid limit -1, pass hits on empty data -// -// Revision 1.68 2004/12/22 18:33:25 rurban -// fix page _id_cache logic for _get_pageid create_if_missing -// -// Revision 1.67 2004/12/22 15:47:41 rurban -// fix wrong _update_nonempty_table on empty content (i.e. the new deletePage) -// -// Revision 1.66 2004/12/13 14:39:16 rurban -// avoid warning -// -// Revision 1.65 2004/12/10 22:15:00 rurban -// fix $page->get('_cached_html) -// refactor upgrade db helper _convert_cached_html() to be able to call them from WikiAdminUtils also. -// support 2nd genericSqlQuery param (bind huge arg) -// -// Revision 1.64 2004/12/10 02:45:27 rurban -// SQL optimization: -// put _cached_html from pagedata into a new seperate blob, not huge serialized string. -// it is only rarelely needed: for current page only, if-not-modified -// but was extracted for every simple page iteration. -// -// Revision 1.63 2004/12/08 12:55:51 rurban -// support new non-destructive delete_page via generic backend method -// -// Revision 1.62 2004/12/06 19:50:04 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.61 2004/11/30 17:45:53 rurban -// exists_links backend implementation -// -// Revision 1.60 2004/11/28 20:42:18 rurban -// Optimize PearDB _extract_version_data and _extract_page_data. -// -// Revision 1.59 2004/11/27 14:39:05 rurban -// simpified regex search architecture: -// no db specific node methods anymore, -// new sql() method for each node -// parallel to regexp() (which returns pcre) -// regex types bitmasked (op's not yet) -// new regex=sql -// clarified WikiDB::quote() backend methods: -// ->quote() adds surrounsing quotes -// ->qstr() (new method) assumes strings and adds no quotes! (in contrast to ADODB) -// pear and adodb have now unified quote methods for all generic queries. -// -// Revision 1.58 2004/11/26 18:39:02 rurban -// new regex search parser and SQL backends (90% complete, glob and pcre backends missing) -// -// Revision 1.57 2004/11/25 17:20:51 rurban -// and again a couple of more native db args: backlinks -// -// Revision 1.56 2004/11/23 13:35:48 rurban -// add case_exact search -// -// Revision 1.55 2004/11/21 11:59:26 rurban -// remove final \n to be ob_cache independent -// -// Revision 1.54 2004/11/20 17:49:39 rurban -// add fast exclude support to SQL get_all_pages -// -// Revision 1.53 2004/11/20 17:35:58 rurban -// improved WantedPages SQL backends -// PageList::sortby new 3rd arg valid_fields (override db fields) -// WantedPages sql pager inexact for performance reasons: -// assume 3 wantedfrom per page, to be correct, no getTotal() -// support exclude argument for get_all_pages, new _sql_set() -// -// Revision 1.52 2004/11/17 20:07:17 rurban -// just whitespace -// -// Revision 1.51 2004/11/15 15:57:37 rurban -// silent cache warning -// -// Revision 1.50 2004/11/10 19:32:23 rurban -// * optimize increaseHitCount, esp. for mysql. -// * prepend dirs to the include_path (phpwiki_dir for faster searches) -// * Pear_DB version logic (awful but needed) -// * fix broken ADODB quote -// * _extract_page_data simplification -// -// Revision 1.49 2004/11/10 15:29:21 rurban -// * requires newer Pear_DB (as the internal one): quote() uses now escapeSimple for strings -// * ACCESS_LOG_SQL: fix cause request not yet initialized -// * WikiDB: moved SQL specific methods upwards -// * new Pear_DB quoting: same as ADODB and as newer Pear_DB. -// fixes all around: WikiGroup, WikiUserNew SQL methods, SQL logging -// -// Revision 1.48 2004/11/09 17:11:16 rurban -// * revert to the wikidb ref passing. there's no memory abuse there. -// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively -// store page ids with getPageLinks (GleanDescription) of all existing pages, which -// are also needed at the rendering for linkExistingWikiWord(). -// pass options to pageiterator. -// use this cache also for _get_pageid() -// This saves about 8 SELECT count per page (num all pagelinks). -// * fix passing of all page fields to the pageiterator. -// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes -// -// Revision 1.47 2004/11/06 17:11:42 rurban -// The optimized version doesn't query for pagedata anymore. -// -// Revision 1.46 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.45 2004/10/14 17:19:17 rurban -// allow most_popular sortby arguments -// -// Revision 1.44 2004/09/06 08:33:09 rurban -// force explicit mysql auto-incrementing, atomic version -// -// Revision 1.43 2004/07/10 08:50:24 rurban -// applied patch by Philippe Vanhaesendonck: -// pass column list to iterators so we can FETCH_NUM in all cases. -// bind UPDATE pramas for huge pagedata. -// portable oracle backend -// -// Revision 1.42 2004/07/09 10:06:50 rurban -// Use backend specific sortby and sortable_columns method, to be able to -// select between native (Db backend) and custom (PageList) sorting. -// Fixed PageList::AddPageList (missed the first) -// Added the author/creator.. name to AllPagesBy... -// display no pages if none matched. -// Improved dba and file sortby(). -// Use &$request reference -// -// Revision 1.41 2004/07/08 21:32:35 rurban -// Prevent from more warnings, minor db and sort optimizations -// -// Revision 1.40 2004/07/08 16:56:16 rurban -// use the backendType abstraction -// -// Revision 1.39 2004/07/05 13:56:22 rurban -// sqlite autoincrement fix -// -// Revision 1.38 2004/07/05 12:57:54 rurban -// add mysql timeout -// -// Revision 1.37 2004/07/04 10:24:43 rurban -// forgot the expressions -// -// Revision 1.36 2004/07/03 16:51:06 rurban -// optional DBADMIN_USER:DBADMIN_PASSWD for action=upgrade (if no ALTER permission) -// added atomic mysql REPLACE for PearDB as in ADODB -// fixed _lock_tables typo links => link -// fixes unserialize ADODB bug in line 180 -// -// Revision 1.35 2004/06/28 14:45:12 rurban -// fix adodb_sqlite to have the same dsn syntax as pear, use pconnect if requested -// -// Revision 1.34 2004/06/28 14:17:38 rurban -// updated DSN parser from Pear. esp. for sqlite -// -// Revision 1.33 2004/06/27 10:26:02 rurban -// oci8 patch by Philippe Vanhaesendonck + some ADODB notes+fixes -// -// Revision 1.32 2004/06/25 14:15:08 rurban -// reduce memory footprint by caching only requested pagedate content (improving most page iterators) -// -// Revision 1.31 2004/06/16 10:38:59 rurban -// Disallow refernces in calls if the declaration is a reference -// ("allow_call_time_pass_reference clean"). -// PhpWiki is now allow_call_time_pass_reference = Off clean, -// but several external libraries may not. -// In detail these libs look to be affected (not tested): -// * Pear_DB odbc -// * adodb oracle -// -// Revision 1.30 2004/06/07 19:31:31 rurban -// fixed ADOOB upgrade: listOfFields() -// -// Revision 1.29 2004/05/12 10:49:55 rurban -// require_once fix for those libs which are loaded before FileFinder and -// its automatic include_path fix, and where require_once doesn't grok -// dirname(__FILE__) != './lib' -// upgrade fix with PearDB -// navbar.tmpl: remove spaces for IE button alignment -// -// Revision 1.28 2004/05/06 19:26:16 rurban -// improve stability, trying to find the InlineParser endless loop on sf.net -// -// remove end-of-zip comments to fix sf.net bug #777278 and probably #859628 -// -// Revision 1.27 2004/05/06 17:30:38 rurban -// CategoryGroup: oops, dos2unix eol -// improved phpwiki_version: -// pre -= .0001 (1.3.10pre: 1030.099) -// -p1 += .001 (1.3.9-p1: 1030.091) -// improved InstallTable for mysql and generic SQL versions and all newer tables so far. -// abstracted more ADODB/PearDB methods for action=upgrade stuff: -// backend->backendType(), backend->database(), -// backend->listOfFields(), -// backend->listOfTables(), -// -// Revision 1.26 2004/04/26 20:44:35 rurban -// locking table specific for better databases -// -// Revision 1.25 2004/04/20 00:06:04 rurban -// themable paging support -// -// Revision 1.24 2004/04/18 01:34:20 rurban -// protect most_popular from sortby=mtime -// -// Revision 1.23 2004/04/16 14:19:39 rurban -// updated ADODB notes -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/WikiDB/backend/file.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -744,115 +744,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.24 2007/02/17 20:24:56 rurban -// fix getLinks for relation and linkto -// -// Revision 1.23 2007/01/04 16:45:49 rurban -// Clarify API: sortby,limit and exclude are strings. -// -// Revision 1.22 2004/12/06 19:50:04 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.21 2004/11/25 17:20:52 rurban -// and again a couple of more native db args: backlinks -// -// Revision 1.20 2004/11/23 13:35:49 rurban -// add case_exact search -// -// Revision 1.19 2004/11/21 11:59:26 rurban -// remove final \n to be ob_cache independent -// -// Revision 1.18 2004/11/09 17:11:17 rurban -// * revert to the wikidb ref passing. there's no memory abuse there. -// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively -// store page ids with getPageLinks (GleanDescription) of all existing pages, which -// are also needed at the rendering for linkExistingWikiWord(). -// pass options to pageiterator. -// use this cache also for _get_pageid() -// This saves about 8 SELECT count per page (num all pagelinks). -// * fix passing of all page fields to the pageiterator. -// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes -// -// Revision 1.17 2004/07/09 13:05:34 rurban -// just aesthetics -// -// Revision 1.16 2004/07/09 12:47:45 rurban -// dont cache _ cached_html and pagename in flatfile page iterators -// -// Revision 1.15 2004/07/09 10:06:50 rurban -// Use backend specific sortby and sortable_columns method, to be able to -// select between native (Db backend) and custom (PageList) sorting. -// Fixed PageList::AddPageList (missed the first) -// Added the author/creator.. name to AllPagesBy... -// display no pages if none matched. -// Improved dba and file sortby(). -// Use &$request reference -// -// Revision 1.14 2004/07/08 17:31:43 rurban -// improve numPages for file (fixing AllPagesTest) -// -// Revision 1.13 2004/07/08 15:23:59 rurban -// less verbose for tests -// -// Revision 1.12 2004/07/08 13:50:32 rurban -// various unit test fixes: print error backtrace on _DEBUG_TRACE; allusers fix; new PHPWIKI_NOMAIN constant for omitting the mainloop -// -// Revision 1.11 2004/07/08 11:12:49 rurban -// quiet the testruns -// -// Revision 1.10 2004/06/03 22:08:17 rurban -// fix bug #963268 (check existing previous version) -// -// Revision 1.9 2004/04/27 16:03:05 rurban -// missing pageiter::count methods -// -// Revision 1.8 2004/03/01 13:48:45 rurban -// rename fix -// p[] consistency fix -// -// Revision 1.7 2004/02/12 14:11:36 rurban -// more rename_page backend methods: only tested for PearDB! please help -// -// Revision 1.6 2004/01/26 09:17:51 rurban -// * changed stored pref representation as before. -// the array of objects is 1) bigger and 2) -// less portable. If we would import packed pref -// objects and the object definition was changed, PHP would fail. -// This doesn't happen with an simple array of non-default values. -// * use $prefs->retrieve and $prefs->store methods, where retrieve -// understands the interim format of array of objects also. -// * simplified $prefs->get() and fixed $prefs->set() -// * added $user->_userid and class '_WikiUser' portability functions -// * fixed $user object ->_level upgrading, mostly using sessions. -// this fixes yesterdays problems with loosing authorization level. -// * fixed WikiUserNew::checkPass to return the _level -// * fixed WikiUserNew::isSignedIn -// * added explodePageList to class PageList, support sortby arg -// * fixed UserPreferences for WikiUserNew -// * fixed WikiPlugin for empty defaults array -// * UnfoldSubpages: added pagename arg, renamed pages arg, -// removed sort arg, support sortby arg -// -// Revision 1.5 2004/01/25 08:17:29 rurban -// ORDER BY support for all other backends, -// all non-SQL simply ignoring it, using plain old dumb_iter instead -// -// Revision 1.4 2003/02/24 01:53:28 dairiki -// Bug fix. Don't need to urldecode pagenames in WikiDB_backend_file_iter. -// -// Revision 1.3 2003/01/04 03:41:51 wainstead -// Added copyleft flowerboxes -// -// Revision 1.2 2003/01/04 03:30:34 wainstead -// added log tag, converted file to unix format -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/install.php =================================================================== --- trunk/lib/install.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/install.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -57,28 +57,6 @@ init_install(); -/** - $Log: not supported by cvs2svn $ - Revision 1.3 2005/02/28 20:24:23 rurban - _GET is different from HTPP_GET_VARS. use the correct one - - Revision 1.2 2005/02/26 17:47:57 rurban - configurator: add (c), support show=_part1 initial expand, enable - ENABLE_FILE_OUTPUT, use part.id not name - install.php: fixed for multiple invocations (on various missing vars) - IniConfig: call install.php on more errors with expanded part. - - Revision 1.1 2004/12/06 19:49:58 rurban - enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. - renamed delete_page to purge_page. - enable action=edit&version=-1 to force creation of a new version. - added BABYCART_PATH config - fixed magiqc in adodb.inc.php - and some more docs - - - */ - // For emacs users // Local Variables: // mode: php @@ -87,4 +65,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/plugin/AllPages.php =================================================================== --- trunk/lib/plugin/AllPages.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/plugin/AllPages.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -149,114 +149,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.36 2005/01/28 12:08:42 rurban -// dont print [] as user -// -// Revision 1.35 2004/12/06 19:50:04 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.34 2004/11/23 15:17:19 rurban -// better support for case_exact search (not caseexact for consistency), -// plugin args simplification: -// handle and explode exclude and pages argument in WikiPlugin::getArgs -// and exclude in advance (at the sql level if possible) -// handle sortby and limit from request override in WikiPlugin::getArgs -// ListSubpages: renamed pages to maxpages -// -// Revision 1.33 2004/11/01 10:43:59 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.32 2004/10/05 17:00:04 rurban -// support paging for simple lists -// fix RatingDb sql backend. -// remove pages from AllPages (this is ListPages then) -// -// Revision 1.31 2004/09/17 14:25:45 rurban -// update comments -// -// Revision 1.30 2004/07/09 10:06:50 rurban -// Use backend specific sortby and sortable_columns method, to be able to -// select between native (Db backend) and custom (PageList) sorting. -// Fixed PageList::AddPageList (missed the first) -// Added the author/creator.. name to AllPagesBy... -// display no pages if none matched. -// Improved dba and file sortby(). -// Use &$request reference -// -// Revision 1.29 2004/07/08 21:32:36 rurban -// Prevent from more warnings, minor db and sort optimizations -// -// Revision 1.28 2004/07/08 20:30:07 rurban -// plugin->run consistency: request as reference, added basepage. -// encountered strange bug in AllPages (and the test) which destroys ->_dbi -// -// Revision 1.27 2004/07/08 17:31:43 rurban -// improve numPages for file (fixing AllPagesTest) -// -// Revision 1.26 2004/06/21 16:22:32 rurban -// add DEFAULT_DUMP_DIR and HTML_DUMP_DIR constants, for easier cmdline dumps, -// fixed dumping buttons locally (images/buttons/), -// support pages arg for dumphtml, -// optional directory arg for dumpserial + dumphtml, -// fix a AllPages warning, -// show dump warnings/errors on DEBUG, -// don't warn just ignore on wikilens pagelist columns, if not loaded. -// RateIt pagelist column is called "rating", not "ratingwidget" (Dan?) -// -// Revision 1.25 2004/06/14 11:31:38 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.24 2004/06/13 16:02:12 rurban -// empty list of pages if user=[] and not authenticated. -// -// Revision 1.23 2004/06/13 15:51:37 rurban -// Support pagelist filter for current author,owner,creator by [] -// -// Revision 1.22 2004/06/13 15:33:20 rurban -// new support for arguments owner, author, creator in most relevant -// PageList plugins. in WikiAdmin* via preSelectS() -// -// Revision 1.21 2004/04/20 00:06:53 rurban -// paging support -// -// Revision 1.20 2004/02/22 23:20:33 rurban -// fixed DumpHtmlToDir, -// enhanced sortby handling in PageList -// new button_heading th style (enabled), -// added sortby and limit support to the db backends and plugins -// for paging support (<<prev, next>> links on long lists) -// -// Revision 1.19 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.18 2004/01/25 07:58:30 rurban -// PageList sortby support in PearDB and ADODB backends -// -// Revision 1.17 2003/02/27 20:10:30 dairiki -// Disable profiling output when DEBUG is defined but false. -// -// Revision 1.16 2003/02/21 04:08:26 dairiki -// New class DebugTimer in prepend.php to help report timing. -// -// Revision 1.15 2003/01/18 21:19:25 carstenklapp -// Code cleanup: -// Reformatting; added copyleft, getVersion, getDescription -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/plugin/BackLinks.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -188,76 +188,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.34 2007/05/19 13:31:20 rurban -// Fix AND warnings: de-perlify array access -// -// Revision 1.33 2007/01/04 16:46:22 rurban -// Add linkmore. Support multiple pages logically AND them. -// -// Revision 1.32 2004/12/06 19:50:05 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.31 2004/11/26 18:39:02 rurban -// new regex search parser and SQL backends (90% complete, glob and pcre backends missing) -// -// Revision 1.30 2004/11/25 17:20:52 rurban -// and again a couple of more native db args: backlinks -// -// Revision 1.29 2004/11/23 15:17:19 rurban -// better support for case_exact search (not caseexact for consistency), -// plugin args simplification: -// handle and explode exclude and pages argument in WikiPlugin::getArgs -// and exclude in advance (at the sql level if possible) -// handle sortby and limit from request override in WikiPlugin::getArgs -// ListSubpages: renamed pages to maxpages -// -// Revision 1.28 2004/10/14 17:16:22 rurban -// override DB sort: not applicable -// -// Revision 1.27 2004/09/25 16:33:52 rurban -// add support for all PageList options -// -// Revision 1.26 2004/09/14 10:32:32 rurban -// support exclude = plugin-list -// -// Revision 1.25 2004/09/13 15:00:50 rurban -// info=count: number of links at this subpage -// -// Revision 1.24 2004/04/18 05:42:17 rurban -// more fixes for page="0" -// better WikiForum support -// -// Revision 1.23 2004/02/22 23:20:33 rurban -// fixed DumpHtmlToDir, -// enhanced sortby handling in PageList -// new button_heading th style (enabled), -// added sortby and limit support to the db backends and plugins -// for paging support (<<prev, next>> links on long lists) -// -// Revision 1.22 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.21 2003/12/22 07:31:57 carstenklapp -// Bugfix: commented out debugging code that snuck into the release. -// -// Revision 1.20 2003/12/14 05:36:31 carstenklapp -// Internal changes to prepare for an upcoming feature: Added some -// conditions and alternate phrases (alternate wording of text srings -// when referring to a non-existant page (i.e. WikiLink 'unknown')) when -// calling the BackLinks plugin *within* a non-existant page, such as -// from within an editpage or browse template while editing a new page. -// -// Revision 1.19 2003/01/18 21:19:25 carstenklapp -// Code cleanup: -// Reformatting; added copyleft, getVersion, getDescription -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/plugin/LinkDatabase.php =================================================================== --- trunk/lib/plugin/LinkDatabase.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/plugin/LinkDatabase.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -186,36 +186,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2004/12/26 17:17:25 rurban -// announce dumps - mult.requests to avoid request::finish, e.g. LinkDatabase, PdfOut, ... -// -// Revision 1.6 2004/12/22 18:48:10 rurban -// default format=html for unit-tests and DumpHtml/Zip breakage -// -// Revision 1.5 2004/12/17 16:39:03 rurban -// minor reformatting -// -// Revision 1.4 2004/12/06 19:50:05 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.3 2004/11/30 23:44:00 rurban -// some comments -// -// Revision 1.2 2004/11/30 23:02:45 rurban -// format=xml for hypergraph.sf.net applet -// -// Revision 1.1 2004/11/30 21:02:16 rurban -// A simple plugin for WikiBrowser at http://touchgraph.sourceforge.net/ -// List all pages with all links as text file (with some caching tricks). -// format=html currently unstable. -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/plugin/UnfoldSubpages.php =================================================================== --- trunk/lib/plugin/UnfoldSubpages.php 2009-03-31 10:01:27 UTC (rev 6740) +++ trunk/lib/plugin/UnfoldSubpages.php 2009-03-31 11:41:21 UTC (rev 6741) @@ -163,111 +163,6 @@ } }; -// $Log: not supported by cvs2svn $ -// Revision 1.21 2005/09/11 13:20:07 rurban -// use TitleSearch and iterators instead of get_all_pages -// -// Revision 1.20 2005/04/11 19:45:17 rurban -// proper linebreaks -// -// Revision 1.19 2005/01/21 14:12:48 rurban -// clarify $ct -// -// Revision 1.18 2004/12/06 19:50:05 rurban -// enable action=remove which is undoable and seeable in RecentChanges: ADODB ony for now. -// renamed delete_page to purge_page. -// enable action=edit&version=-1 to force creation of a new version. -// added BABYCART_PATH config -// fixed magiqc in adodb.inc.php -// and some more docs -// -// Revision 1.17 2004/11/23 15:17:19 rurban -// better support for case_exact search (not caseexact for consistency), -// plugin args simplification: -// handle and explode exclude and pages argument in WikiPlugin::getArgs -// and exclude in advance (at the sql level if possible) -// handle sortby and limit from request override in WikiPlugin::getArgs -// ListSubpages: renamed pages to maxpages -// -// Revision 1.16 2004/09/25 16:35:09 rurban -// use stdlib firstNWordsOfContent, extractSection -// -// Revision 1.15 2004/07/03 14:48:18 rurban -// Tested new mysql 4.1.3-beta: binary search bug as fixed. -// => fixed action=upgrade, -// => version check in PearDB also (as in ADODB) -// -// Revision 1.14 2004/07/03 08:19:40 rurban -// trap recursive redirects -// -// Revision 1.13 2004/03/12 15:48:08 rurban -// fixed explodePageList: wrong sortby argument order in UnfoldSubpages -// simplified lib/stdlib.php:explodePageList -// -// Revision 1.12 2004/02/22 23:20:33 rurban -// fixed DumpHtmlToDir, -// enhanced sortby handling in PageList -// new button_heading th style (enabled), -// added sortby and limit support to the db backends and plugins -// for paging support (<<prev, next>> links on long lists) -// -// Revision 1.11 2004/02/17 12:11:36 rurban -// added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...) -// -// Revision 1.10 2004/01/27 12:10:45 rurban -// fixed UnfoldSubpages and added docs. -// new arguments: pagename, maxpages -// some arguments are deprecated: sort (use sortby), pages (use maxpages) -// fixed sortby, added docs -// -// Revision 1.9 2004/01/26 09:18:00 rurban -// * changed stored pref representation as before. -// the array of objects is 1) bigger and 2) -// less portable. If we would import packed pref -// objects and the object definition was changed, PHP would fail. -// This doesn't happen with an simple array of non-default values. -// * use $prefs->retrieve and $prefs->store methods, where retrieve -// understands the interim format of array of objects also. -// * simplified $prefs->get() and fixed $prefs->set() -// * added $user->_userid and class '_WikiUser' portability functions -// * fixed $user object ->_level upgrading, mostly using sessions. -// this fixes yesterdays problems with loosing authorization level. -// * fixed WikiUserNew::checkPass to return the _level -// * fixed WikiUserNew::isSignedIn -// * added explodePageList to class PageList, support sortby arg -// * fixed UserPreferences for WikiUserNew -// * fixed WikiPlugin for empty defaults array -// * UnfoldSubpages: added pagename arg, renamed pages arg, -// removed sort arg, support sortby arg -// -// Revision 1.8 2004/01/25 10:52:16 rurban -// added sortby support to explodePageList() and UnfoldSubpages -// fixes [ 758044 ] Plugin UnfoldSubpages does not sort (includes fix) -// -// Revision 1.7 2003/02/21 04:12:06 dairiki -// Minor fixes for new cached markup. -// -// Revision 1.6 2003/02/11 09:34:34 rurban -// fix by Steven D. Brewer <sb...@bi...> to respect the $pages argument -// -// Revision 1.5 2003/01/18 22:11:44 carstenklapp -// Code cleanup: -// Reformatting & tabs to spaces; -// Added copyleft, getVersion, getDescription, rcs_id. -// -// Revision 1.4 2003/01/05 02:37:30 carstenklapp -// New: Implemented 'smalltitle' argument and date sorting fix from -// Cuthbert Cat's sf patch 655095. Added getVersion & getDescription; -// code rewrapping. -// -// Revision 1.3 2003/01/04 22:46:07 carstenklapp -// Workaround: when page has no subpages avoid include of nonexistant pages. -// - -// KNOWN ISSUES: -// - line & word limit doesn't work if the included page itself -// includes a plugin - // For emacs users // Local Variables: // mode: php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-03-31 11:50:26
|
Revision: 6742 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6742&view=rev Author: vargenau Date: 2009-03-31 11:50:16 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Remove history Modified Paths: -------------- trunk/lib/ArchiveCleaner.php trunk/lib/CachedMarkup.php trunk/lib/Captcha.php trunk/lib/DbSession.php trunk/lib/DbaDatabase.php trunk/lib/ErrorManager.php trunk/lib/ExternalReferrer.php trunk/lib/FileFinder.php trunk/lib/HtmlParser.php trunk/lib/HttpClient.php trunk/lib/RssParser.php trunk/lib/SemanticWeb.php trunk/lib/SpamBlocklist.php trunk/lib/Template.php trunk/lib/TextSearchQuery.php trunk/lib/WikiPluginCached.php trunk/lib/XmlParser.php trunk/lib/pdf.php trunk/lib/ziplib.php Modified: trunk/lib/ArchiveCleaner.php =================================================================== --- trunk/lib/ArchiveCleaner.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/ArchiveCleaner.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -164,11 +164,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2005/10/29 08:57:57 rurban -// added (c) -// - // Local Variables: // mode: php // tab-width: 8 @@ -176,4 +171,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/CachedMarkup.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -801,69 +801,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.64 2008/03/21 20:35:52 rurban -// Improve upon embedded ImgObject, such as [ *.mp3 ], objects. -// Object tags now render as label correctly and param tags are also added. -// -// Revision 1.63 2008/03/17 19:03:08 rurban -// protect $WikiTheme->VALID_LINKS -// -// Revision 1.62 2008/02/14 18:40:32 rurban -// fix DUMP_MODE with LINKS -// -// Revision 1.61 2008/01/30 19:08:59 vargenau -// Valid HTML code: we need a div, it might contain a table -// -// Revision 1.60 2007/09/15 12:28:46 rurban -// Improve multi-page format handling: abstract _DumpHtmlToDir. get rid of non-external pdf, non-global VALID_LINKS -// -// Revision 1.59 2007/09/12 19:32:29 rurban -// link only VALID_LINKS with pagelist HTML_DUMP -// -// Revision 1.58 2007/07/14 12:30:53 rurban -// include => require -// -// Revision 1.57 2007/05/28 20:13:46 rurban -// Overwrite all attributes at once at page->save to delete dangling meta -// -// Revision 1.56 2007/04/08 16:39:40 rurban -// fix when DISABLE_UNITS = true (thanks to Walter Rafelsberger) -// simplify title calculation -// -// Revision 1.55 2007/03/18 17:35:14 rurban -// Fix :DontStoreLink -// -// Revision 1.54 2007/01/25 07:41:41 rurban -// Print attribute in title. Use CSS formatting for ::= -// -// Revision 1.53 2007/01/21 23:26:52 rurban -// Translate Found by -// -// Revision 1.52 2007/01/20 15:53:51 rurban -// Rewrite of SearchHighlight: through ActionPage and InlineParser -// -// Revision 1.51 2007/01/20 11:24:53 rurban -// add SpellCheck support -// -// Revision 1.50 2007/01/07 18:41:51 rurban -// Fix fallback ZipReader syntax error. Use label=false. Add parsed plugin names to the stored tree. -// -// Revision 1.49 2007/01/04 16:40:35 rurban -// Remove units object from CachedMarkup links, Store parsed linkinfo only: basevalue, baseunit. -// -// Revision 1.48 2007/01/03 21:22:08 rurban -// Use Units for attributes. Store the unified base value as Cached_SemanticLink->_attribute_base in the wikimarkup and display it as title. -// -// Revision 1.47 2007/01/02 13:17:57 rurban -// fix semantic page links and attributes, esp. attributes. they get stored as link to empty page also. tighten semantic url expander regex, omit want_content if not necessary -// -// Revision 1.46 2006/12/22 00:11:38 rurban -// add seperate expandurl method, to simplify pagename parsing -// -// Revision 1.45 2006/10/12 06:33:50 rurban -// decide later with which class to render this link (fixes interwiki link layout) - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/Captcha.php =================================================================== --- trunk/lib/Captcha.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/Captcha.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -175,18 +175,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.5 2005/10/31 16:44:13 rurban -// fallback to PNG or GIF if JPEG support does not exist -// -// Revision 1.4 2005/10/30 14:20:42 rurban -// move Captcha specific vars and methods into a Captcha object -// randomize Captcha chars positions and angles (smoothly) -// -// Revision 1.3 2005/10/29 07:37:56 rurban -// USE_CAPTCHA_RANDOM_WORD by Dan Frankowski -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/DbSession.php =================================================================== --- trunk/lib/DbSession.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/DbSession.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -62,17 +62,6 @@ function quote($string) { return $string; } } -// $Log: not supported by cvs2svn $ -// Revision 1.34 2005/08/07 10:08:33 rurban -// dba simplification: no _backend in the subclass -// -// Revision 1.33 2005/02/27 19:40:36 rurban -// fix for php4 and case-sensitive filesystems -// -// Revision 1.32 2005/02/11 14:41:57 rurban -// seperate DbSession classes: less memory, a bit slower -// - // Local Variables: // mode: php // tab-width: 8 @@ -80,4 +69,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/DbaDatabase.php =================================================================== --- trunk/lib/DbaDatabase.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/DbaDatabase.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -174,17 +174,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.21 2006/09/06 05:42:54 rurban -// unify dbh arg -// -// Revision 1.20 2006/08/15 13:35:33 rurban -// just aesthetics -// -// Revision 1.19 2006/06/18 11:01:25 rurban -// add rcsid log -// - // (c-file-style: "gnu") // Local Variables: // mode: php @@ -193,4 +182,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/ErrorManager.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -643,114 +643,6 @@ $GLOBALS['ErrorManager'] = new ErrorManager; } -// $Log: not supported by cvs2svn $ -// Revision 1.53 2008/03/17 19:04:05 rurban -// added destroyPostponedErrors: Get rid of all pending error messages in case of all -// non-html - pdf or image - output. -// -// Revision 1.52 2007/09/19 17:59:26 rurban -// use duplicates to save memory with DEBUG -// -// Revision 1.51 2007/09/15 12:31:37 rurban -// dont fatal on multi-page dumps -// -// Revision 1.50 2007/01/09 12:35:28 rurban -// release ready: turn off assert -// -// Revision 1.49 2006/12/22 00:17:49 rurban -// improve and unify error messages -// -// Revision 1.48 2006/03/19 14:29:40 rurban -// sf.net patch #1438439 by Matt Brown: Only set no-cache headers when error output is generated -// -// Revision 1.47 2005/10/31 17:20:40 rurban -// fix ConvertBefore -// -// Revision 1.46 2005/10/30 16:38:13 rurban -// minor fixes -// -// Revision 1.45 2005/10/29 14:28:08 uckelman -// existence of isa should be checked, not built-in is_a() -// -// Revision 1.44 2005/08/07 10:52:43 rurban -// stricter error handling: dba errors are fatal, display errors on Request->finish or session_close -// -// Revision 1.43 2005/04/11 19:41:23 rurban -// Improve postponed errors+warnins list layout. -// -// Revision 1.42 2005/02/26 18:29:07 rurban -// re-enable colored boxed errors -// -// Revision 1.41 2004/12/26 17:08:36 rurban -// php5 fixes: case-sensitivity, no & new -// -// Revision 1.40 2004/12/13 14:39:46 rurban -// aesthetics -// -// Revision 1.39 2004/11/05 18:04:20 rurban -// print errno only if _DEBUG_VERBOSE -// -// Revision 1.38 2004/10/19 17:34:55 rurban -// <4.3 fix -// -// Revision 1.37 2004/10/14 19:23:58 rurban -// remove debugging prints -// -// Revision 1.36 2004/10/12 15:35:43 rurban -// avoid Php Notice header -// -// Revision 1.35 2004/10/12 13:13:19 rurban -// php5 compatibility (5.0.1 ok) -// -// Revision 1.34 2004/09/24 18:52:19 rurban -// in deferred html error messages use the worst header and class -// (notice => warning => errors) -// -// Revision 1.33 2004/09/14 10:28:21 rurban -// use assert, maybe we should only turn it off for releases -// -// Revision 1.32 2004/07/08 13:50:32 rurban -// various unit test fixes: print error backtrace on _DEBUG_TRACE; allusers fix; new PHPWIKI_NOMAIN constant for omitting the mainloop -// -// Revision 1.31 2004/07/02 09:55:58 rurban -// more stability fixes: new DISABLE_GETIMAGESIZE if your php crashes when loading LinkIcons: failing getimagesize in old phps; blockparser stabilized -// -// Revision 1.30 2004/06/25 14:29:12 rurban -// WikiGroup refactoring: -// global group attached to user, code for not_current user. -// improved helpers for special groups (avoid double invocations) -// new experimental config option ENABLE_XHTML_XML (fails with IE, and document.write()) -// fixed a XHTML validation error on userprefs.tmpl -// -// Revision 1.29 2004/06/20 15:30:04 rurban -// get_class case-sensitivity issues -// -// Revision 1.28 2004/06/16 11:51:04 rurban -// fixed typo: undefined object #235 -// -// Revision 1.27 2004/06/13 09:38:20 rurban -// isa() workaround, if stdlib.php is not loaded -// -// Revision 1.26 2004/06/02 18:01:45 rurban -// init global FileFinder to add proper include paths at startup -// adds PHPWIKI_DIR if started from another dir, lib/pear also -// fix slashify for Windows -// fix USER_AUTH_POLICY=old, use only USER_AUTH_ORDER methods (besides HttpAuth) -// -// Revision 1.25 2004/06/02 10:18:36 rurban -// assert only if DEBUG is non-false -// -// Revision 1.24 2004/05/27 17:49:05 rurban -// renamed DB_Session to DbSession (in CVS also) -// added WikiDB->getParam and WikiDB->getAuthParam method to get rid of globals -// remove leading slash in error message -// added force_unlock parameter to File_Passwd (no return on stale locks) -// fixed adodb session AffectedRows -// added FileFinder helpers to unify local filenames and DATA_PATH names -// editpage.php: new edit toolbar javascript on ENABLE_EDIT_TOOLBAR -// -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/ExternalReferrer.php =================================================================== --- trunk/lib/ExternalReferrer.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/ExternalReferrer.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -115,20 +115,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.4 2007/01/07 18:42:29 rurban -// Update comment only -// -// Revision 1.3 2004/10/12 14:22:14 rurban -// lib/ExternalReferrer.php:99: Notice[8]: Undefined index: query -// -// Revision 1.2 2004/09/26 14:55:55 rurban -// fixed warning -// -// Revision 1.1 2004/09/26 12:20:28 rurban -// Detect external referrers, handle search engines -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/FileFinder.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -588,75 +588,6 @@ return (substr(PHP_OS,0,6) == 'CYGWIN'); } -// $Log: not supported by cvs2svn $ -// Revision 1.32 2007/01/04 16:44:47 rurban -// Remove VMS from internal note. -// -// Revision 1.31 2005/02/28 21:24:32 rurban -// ignore forbidden ini_set warnings. Bug #1117254 by Xavier Roche -// -// Revision 1.30 2004/11/10 19:32:21 rurban -// * optimize increaseHitCount, esp. for mysql. -// * prepend dirs to the include_path (phpwiki_dir for faster searches) -// * Pear_DB version logic (awful but needed) -// * fix broken ADODB quote -// * _extract_page_data simplification -// -// Revision 1.29 2004/11/09 17:11:03 rurban -// * revert to the wikidb ref passing. there's no memory abuse there. -// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively -// store page ids with getPageLinks (GleanDescription) of all existing pages, which -// are also needed at the rendering for linkExistingWikiWord(). -// pass options to pageiterator. -// use this cache also for _get_pageid() -// This saves about 8 SELECT count per page (num all pagelinks). -// * fix passing of all page fields to the pageiterator. -// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes -// -// Revision 1.28 2004/11/06 17:02:33 rurban -// Workaround some php-win \\ duplication bug -// -// Revision 1.27 2004/10/14 19:23:58 rurban -// remove debugging prints -// -// Revision 1.26 2004/10/14 19:19:33 rurban -// loadsave: check if the dumped file will be accessible from outside. -// and some other minor fixes. (cvsclient native not yet ready) -// -// Revision 1.25 2004/10/12 13:13:19 rurban -// php5 compatibility (5.0.1 ok) -// -// Revision 1.24 2004/08/05 17:33:51 rurban -// strange problem with WikiTheme -// -// Revision 1.23 2004/06/19 12:33:25 rurban -// prevent some warnings in corner cases -// -// Revision 1.22 2004/06/14 11:31:20 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.21 2004/06/02 18:01:45 rurban -// init global FileFinder to add proper include paths at startup -// adds PHPWIKI_DIR if started from another dir, lib/pear also -// fix slashify for Windows -// fix USER_AUTH_POLICY=old, use only USER_AUTH_ORDER methods (besides HttpAuth) -// -// Revision 1.20 2004/05/27 17:49:05 rurban -// renamed DB_Session to DbSession (in CVS also) -// added WikiDB->getParam and WikiDB->getAuthParam method to get rid of globals -// remove leading slash in error message -// added force_unlock parameter to File_Passwd (no return on stale locks) -// fixed adodb session AffectedRows -// added FileFinder helpers to unify local filenames and DATA_PATH names -// editpage.php: new edit toolbar javascript on ENABLE_EDIT_TOOLBAR -// -// - // Local Variables: // mode: php // tab-width: 8 @@ -664,4 +595,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/HtmlParser.php =================================================================== --- trunk/lib/HtmlParser.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/HtmlParser.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -414,18 +414,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.3 2004/12/26 17:10:44 rurban -// just docs or whitespace -// -// Revision 1.2 2004/10/19 13:23:06 rurban -// fixed: Unknown modifier "g" -// -// Revision 1.1 2004/05/24 17:31:31 rurban -// new XmlParser and HtmlParser, RssParser based on that. -// -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/HttpClient.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -383,29 +383,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.9 2007/03/18 10:16:30 rurban -// Fix POST redirects -// -// Revision 1.8 2007/01/02 13:18:35 rurban -// added postfile and xmlrpc support. added ContentType arg to buildRequest -// -// Revision 1.7 2006/06/18 11:02:01 rurban -// assume https <>80 -// -// Revision 1.6 2004/11/01 10:43:55 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.5 2004/04/29 19:34:24 rurban -// omit "socket_set_timeout() is not supported in this PHP build" warning -// -// Revision 1.4 2004/04/12 18:15:28 rurban -// standard footer -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/RssParser.php =================================================================== --- trunk/lib/RssParser.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/RssParser.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -175,32 +175,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.10 2005/01/22 11:45:09 rurban -// docs -// -// Revision 1.9 2004/06/08 21:12:02 rurban -// is_final fix for incremental parsing -// -// Revision 1.8 2004/06/08 21:03:20 rurban -// updated RssParser for XmlParser quirks (store parser object params in globals) -// -// Revision 1.7 2004/05/24 17:31:31 rurban -// new XmlParser and HtmlParser, RssParser based on that. -// -// Revision 1.6 2004/05/18 16:18:36 rurban -// AutoSplit at subpage seperators -// RssFeed stability fix for empty feeds or broken connections -// -// Revision 1.5 2004/04/26 20:44:34 rurban -// locking table specific for better databases -// -// Revision 1.4 2004/04/18 01:11:51 rurban -// more numeric pagename fixes. -// fixed action=upload with merge conflict warnings. -// charset changed from constant to global (dynamic utf-8 switching) -// - // For emacs users // Local Variables: // mode: php @@ -209,4 +183,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/SemanticWeb.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -397,11 +397,6 @@ class ReasonerBackend_KM extends ReasonerBackend { }; -// $Log: not supported by cvs2svn $ -// Revision 1.10 2007/07/14 12:03:32 rurban -// add rcs Log -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/SpamBlocklist.php =================================================================== --- trunk/lib/SpamBlocklist.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/SpamBlocklist.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -119,13 +119,6 @@ } */ -// $Log: not supported by cvs2svn $ -// Revision 1.1 2005/10/29 08:21:58 rurban -// ENABLE_SPAMBLOCKLIST: -// Check for links to blocked external tld domains in new edits, against -// multi.surbl.org and bl.spamcop.net. -// - // Local Variables: // mode: php // tab-width: 8 @@ -133,4 +126,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/Template.php =================================================================== --- trunk/lib/Template.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/Template.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -288,125 +288,6 @@ return $html; } -// $Log: not supported by cvs2svn $ -// Revision 1.78 2007/09/12 19:32:29 rurban -// link only VALID_LINKS with pagelist HTML_DUMP -// -// Revision 1.77 2007/07/14 19:17:57 rurban -// fix template inclusion with a recursion cycle leading e.g. to crashes in blog PageInfo -// -// Revision 1.76 2007/05/13 18:13:04 rurban -// Protect against erronously closed template file -// -// Revision 1.75 2007/01/02 13:18:55 rurban -// speed up Template expansion. revision only necessary. fixed all affected templates -// -// Revision 1.73 2005/04/08 05:41:00 rurban -// fix Template("theme/name") inclusion -// -// Revision 1.72 2005/02/02 20:35:41 rurban -// add $SEP -// -// Revision 1.71 2005/02/02 19:29:30 rurban -// support theme overrides -// -// Revision 1.70 2005/01/25 07:01:26 rurban -// update comments about future plans -// -// Revision 1.69 2004/11/17 20:07:17 rurban -// just whitespace -// -// Revision 1.68 2004/11/09 17:11:04 rurban -// * revert to the wikidb ref passing. there's no memory abuse there. -// * use new wikidb->_cache->_id_cache[] instead of wikidb->_iwpcache, to effectively -// store page ids with getPageLinks (GleanDescription) of all existing pages, which -// are also needed at the rendering for linkExistingWikiWord(). -// pass options to pageiterator. -// use this cache also for _get_pageid() -// This saves about 8 SELECT count per page (num all pagelinks). -// * fix passing of all page fields to the pageiterator. -// * fix overlarge session data which got broken with the latest ACCESS_LOG_SQL changes -// -// Revision 1.67 2004/11/05 18:03:35 rurban -// shorten the template chain in errmsg -// -// Revision 1.66 2004/11/01 10:43:55 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.65 2004/10/07 16:08:58 rurban -// fixed broken FileUser session handling. -// thanks to Arnaud Fontaine for detecting this. -// enable file user Administrator membership. -// -// Revision 1.64 2004/10/04 23:40:35 rurban -// fix nested loops on htmldump errors -// -// Revision 1.63 2004/09/06 08:22:33 rurban -// prevent errorhandler to fail on empty templates -// -// Revision 1.62 2004/06/28 15:39:27 rurban -// fixed endless recursion in WikiGroup: isAdmin() -// -// Revision 1.61 2004/06/25 14:29:18 rurban -// WikiGroup refactoring: -// global group attached to user, code for not_current user. -// improved helpers for special groups (avoid double invocations) -// new experimental config option ENABLE_XHTML_XML (fails with IE, and document.write()) -// fixed a XHTML validation error on userprefs.tmpl -// -// Revision 1.60 2004/06/14 11:31:36 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.59 2004/05/18 16:23:39 rurban -// rename split_pagename to SplitPagename -// -// Revision 1.58 2004/05/15 19:48:33 rurban -// fix some too loose PagePerms for signed, but not authenticated users -// (admin, owner, creator) -// no double login page header, better login msg. -// moved action_pdf to lib/pdf.php -// -// Revision 1.57 2004/05/01 18:20:05 rurban -// Add $charset to template locals (instead of constant CHARSET) -// -// Revision 1.56 2004/04/12 13:04:50 rurban -// added auth_create: self-registering Db users -// fixed IMAP auth -// removed rating recommendations -// ziplib reformatting -// -// Revision 1.55 2004/04/02 15:06:55 rurban -// fixed a nasty ADODB_mysql session update bug -// improved UserPreferences layout (tabled hints) -// fixed UserPreferences auth handling -// improved auth stability -// improved old cookie handling: fixed deletion of old cookies with paths -// -// Revision 1.54 2004/03/02 18:11:39 rurban -// CreateToc support: Pass the preparsed markup to each plugin as $dbi->_markup -// to be able to know about its context, and even let the plugin change it. -// (see CreateToc) -// -// Revision 1.53 2004/02/22 23:20:31 rurban -// fixed DumpHtmlToDir, -// enhanced sortby handling in PageList -// new button_heading th style (enabled), -// added sortby and limit support to the db backends and plugins -// for paging support (<<prev, next>> links on long lists) -// -// Revision 1.52 2003/12/20 23:59:19 carstenklapp -// Internal change: Added rcs Log tag & emacs php mode tag (sorry, forgot -// this in the last commit). -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/TextSearchQuery.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -1186,41 +1186,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.33 2008/05/21 04:28:38 rurban -// for the previous pcre short-cut -// -// Revision 1.32 2008/05/06 19:25:55 rurban -// perfomance optimisation: do numeric checks. Change EXACT semantics: ignore case_exact, always do strcmp. Change WORD match to use \b word boundary checks -// -// Revision 1.31 2007/09/12 19:36:47 rurban -// Fix Bug#1792170: Handle " ( " or "(test" without closing ")" as plain word. Allow single string token "0" -// -// Revision 1.30 2007/07/14 12:31:00 rurban -// fix bug#1752172 undefined method TextSearchQuery_node_or::_sql_quote() -// -// Revision 1.29 2007/07/14 12:03:38 rurban -// support ranked search: simple score() function -// -// Revision 1.28 2007/03/18 17:35:26 rurban -// Improve comments -// -// Revision 1.27 2007/01/21 23:27:32 rurban -// Fix ->_backend->qstr() -// -// Revision 1.26 2007/01/04 16:41:52 rurban -// Improve error description. Fix the function parser for illegal functions, when the tokenizer cannot be used. -// -// Revision 1.25 2007/01/03 21:22:34 rurban -// add getType(). NumericSearchQuery::check Improve hacker detection using token_get_all(). Better support for multiple attributes. Add getVars(). -// -// Revision 1.24 2007/01/02 13:19:05 rurban -// add NumericSearchQuery. change on pcre: no parsing done, detect modifiers -// -// Revision 1.23 2006/04/13 19:30:44 rurban -// make TextSearchQuery->_stoplist localizable and overridable within config.ini -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/WikiPluginCached.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -1161,58 +1161,6 @@ } // WikiPluginCached - -// $Log: not supported by cvs2svn $ -// Revision 1.24 2007/09/22 12:38:57 rurban -// smaller cached args footprint -// -// Revision 1.23 2007/09/12 19:38:41 rurban -// improve tempnam on windows, cleanup zero-sized files -// -// Revision 1.22 2007/01/25 07:42:09 rurban -// Remove early Cache.php loader. Do it later and better. -// -// Revision 1.21 2007/01/20 11:24:23 rurban -// Use cat/type for text pipe commands if input > 255 chars -// -// Revision 1.20 2005/09/26 06:28:46 rurban -// beautify tempnam() on Windows. Move execute() from above here -// -// Revision 1.19 2004/12/16 18:30:59 rurban -// avoid ugly img border -// -// Revision 1.18 2004/11/01 10:43:57 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.17 2004/10/12 15:06:02 rurban -// fixes for older php, removed warnings -// -// Revision 1.16 2004/10/12 14:56:57 rurban -// lib/WikiPluginCached.php:731: Notice[8]: Undefined property: _static -// -// Revision 1.15 2004/09/26 17:09:23 rurban -// add SVG support for Ploticus (and hopefully all WikiPluginCached types) -// SWF not yet. -// -// Revision 1.14 2004/09/25 16:26:08 rurban -// some plugins use HTML -// -// Revision 1.13 2004/09/22 13:46:25 rurban -// centralize upload paths. -// major WikiPluginCached feature enhancement: -// support _STATIC pages in uploads/ instead of dynamic getimg.php? subrequests. -// mainly for debugging, cache problems and action=pdf -// -// Revision 1.12 2004/09/07 13:26:31 rurban -// new WikiPluginCached option debug=static and some more sf.net defaults for VisualWiki -// -// Revision 1.11 2004/09/06 09:12:46 rurban -// improve pear handling with silent fallback to ours -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/XmlParser.php =================================================================== --- trunk/lib/XmlParser.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/XmlParser.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -167,36 +167,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2007/05/27 19:47:31 rurban -// Disable chunkwise xml parsing because of php crashes -// -// Revision 1.6 2004/11/03 16:34:11 rurban -// proper msg if rss connection is broken or no items found -// -// Revision 1.5 2004/06/20 14:42:54 rurban -// various php5 fixes (still broken at blockparser) -// -// Revision 1.4 2004/06/08 21:03:20 rurban -// updated RssParser for XmlParser quirks (store parser object params in globals) -// -// Revision 1.3 2004/06/03 18:06:29 rurban -// fix file locking issues (only needed on write) -// fixed immediate LANG and THEME in-session updates if not stored in prefs -// advanced editpage toolbars (search & replace broken) -// -// Revision 1.2 2004/06/01 15:28:00 rurban -// AdminUser only ADMIN_USER not member of Administrators -// some RateIt improvements by dfrankow -// edit_toolbar buttons -// -// Revision 1.1 2004/05/24 17:31:31 rurban -// new XmlParser and HtmlParser, RssParser based on that. -// -// -// 2004-04-09 16:30:50 rurban: -// added fsockopen allow_url_fopen = Off workaround - // For emacs users // Local Variables: // mode: php @@ -205,4 +175,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/pdf.php =================================================================== --- trunk/lib/pdf.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/pdf.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -103,50 +103,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.13 2007/09/15 12:28:46 rurban -// Improve multi-page format handling: abstract _DumpHtmlToDir. get rid of non-external pdf, non-global VALID_LINKS -// -// Revision 1.12 2007/09/12 19:41:38 rurban -// Enable format=pdf for pagelists (not yet finished) -// -// Revision 1.11 2007/02/17 14:14:55 rurban -// fix pagename for lists -// -// Revision 1.10 2007/01/07 18:44:39 rurban -// Add ConvertAndDisplayPdfPageList -// -// Revision 1.9 2006/09/06 06:02:05 rurban -// omit actionbar from pdf -// -// Revision 1.8 2006/08/25 22:09:00 rurban -// print pdf header earlier -// -// Revision 1.7 2004/09/22 13:46:26 rurban -// centralize upload paths. -// major WikiPluginCached feature enhancement: -// support _STATIC pages in uploads/ instead of dynamic getimg.php? subrequests. -// mainly for debugging, cache problems and action=pdf -// -// Revision 1.6 2004/09/20 13:40:19 rurban -// define all config.ini settings, only the supported will be taken from -default. -// support USE_EXTERNAL_HTML2PDF renderer (htmldoc tested) -// -// Revision 1.5 2004/09/17 14:19:02 rurban -// default pdf dest: browser -// -// Revision 1.4 2004/06/14 11:31:37 rurban -// renamed global $Theme to $WikiTheme (gforge nameclash) -// inherit PageList default options from PageList -// default sortby=pagename -// use options in PageList_Selectable (limit, sortby, ...) -// added action revert, with button at action=diff -// added option regex to WikiAdminSearchReplace -// -// Revision 1.3 2004/05/15 19:49:09 rurban -// moved action_pdf to lib/pdf.php -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2009-03-31 11:41:21 UTC (rev 6741) +++ trunk/lib/ziplib.php 2009-03-31 11:50:16 UTC (rev 6742) @@ -892,84 +892,6 @@ return array($page); } -// $Log: not supported by cvs2svn $ -// Revision 1.53 2007/05/19 14:41:14 rurban -// add owner to header to set correct owner on input -// -// Revision 1.52 2007/05/15 16:36:36 rurban -// nowarn on nosummary -// -// Revision 1.51 2007/03/27 07:12:06 rurban -// Patch #1688929 by Erwann Penet: force $crc32 unsigned also -// -// Revision 1.50 2007/02/17 14:15:59 rurban -// also charset convert summary -// -// Revision 1.49 2007/01/03 21:25:10 rurban -// Use convert_charset() -// -// Revision 1.48 2006/12/22 17:44:15 rurban -// support importing foreign charsets. e.g latin1 => utf8 -// -// Revision 1.47 2006/10/08 12:32:26 rurban -// workaround signed-unsigned issue (not solved). patch by Bob Apthorpe -// -// Revision 1.46 2006/03/07 20:47:36 rurban -// MimeifyPageRevision refactoring. see loadsave -// -// Revision 1.45 2005/12/27 18:05:48 rurban -// start with GZIP reading within ZipReader (not yet ready) -// -// Revision 1.44 2005/01/31 00:28:48 rurban -// fix bug 1044945: pgsrc upgrade problem if mime wo/body -// -// Revision 1.43 2005/01/25 08:00:09 rurban -// use unix type to support subdirs with forward slash and long filenames -// -// Revision 1.42 2004/11/16 16:17:51 rurban -// support ENABLE_PAGEPERM=false mime load/save -// -// Revision 1.41 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.40 2004/06/19 12:32:37 rurban -// new TEMP_DIR for ziplib -// -// Revision 1.39 2004/06/08 10:54:47 rurban -// better acl dump representation, read back acl and owner -// -// Revision 1.38 2004/06/08 10:05:11 rurban -// simplified admin action shortcuts -// -// Revision 1.37 2004/06/07 22:28:04 rurban -// add acl field to mimified dump -// -// Revision 1.36 2004/06/07 19:50:40 rurban -// add owner field to mimified dump -// -// Revision 1.35 2004/05/02 21:26:38 rurban -// limit user session data (HomePageHandle and auth_dbi have to invalidated anyway) -// because they will not survive db sessions, if too large. -// extended action=upgrade -// some WikiTranslation button work -// revert WIKIAUTH_UNOBTAINABLE (need it for main.php) -// some temp. session debug statements -// -// Revision 1.34 2004/04/18 01:11:52 rurban -// more numeric pagename fixes. -// fixed action=upload with merge conflict warnings. -// charset changed from constant to global (dynamic utf-8 switching) -// -// Revision 1.33 2004/04/12 13:04:50 rurban -// added auth_create: self-registering Db users -// fixed IMAP auth -// removed rating recommendations -// ziplib reformatting -// - // 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...> - 2009-03-31 12:12:10
|
Revision: 6744 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6744&view=rev Author: vargenau Date: 2009-03-31 12:12:00 +0000 (Tue, 31 Mar 2009) Log Message: ----------- Remove history Modified Paths: -------------- trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/DbSession/dba.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PearDB_mysql.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiDB/backend/PearDB_pgsql.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/dumb/MostRecentIter.php trunk/lib/WikiDB/backend/flatfile.php trunk/lib/WikiDB/backend.php trunk/lib/WikiDB/file.php trunk/lib/WikiUser/AdoDb.php trunk/lib/WikiUser/BogoLogin.php trunk/lib/WikiUser/Db.php trunk/lib/WikiUser/File.php trunk/lib/WikiUser/Forbidden.php trunk/lib/WikiUser/HttpAuth.php trunk/lib/WikiUser/HttpAuthUpper.php trunk/lib/WikiUser/IMAP.php trunk/lib/WikiUser/LDAP.php trunk/lib/WikiUser/POP3.php trunk/lib/WikiUser/PdoDb.php trunk/lib/WikiUser/PearDb.php trunk/lib/WikiUser/PersonalPage.php trunk/lib/WikiUser/Session.php trunk/lib/wikilens/Buddy.php trunk/lib/wikilens/PageListColumns.php trunk/lib/wikilens/RatingsDb.php trunk/lib/wikilens/RatingsUser.php trunk/lib/wikilens/Utils.php Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/DbSession/ADODB.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -258,14 +258,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.2 2005/11/21 20:48:48 rurban -// fix ref warnings reported by schorni -// -// Revision 1.1 2005/02/11 14:41:40 rurban -// seperate DbSession classes: less memory, a bit slower -// - // Local Variables: // mode: php // tab-width: 8 @@ -273,4 +265,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/DbSession/PDO.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -244,14 +244,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.2 2006/02/22 20:56:24 rurban -// fix more refs -// -// Revision 1.1 2005/02/11 14:41:40 rurban -// seperate DbSession classes: less memory, a bit slower -// - // Local Variables: // mode: php // tab-width: 8 @@ -259,4 +251,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/DbSession/SQL.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -240,15 +240,6 @@ } } - -// $Log: not supported by cvs2svn $ -// Revision 1.2 2005/11/21 20:57:58 rurban -// fix ref warnings, analog to ADODB -// -// Revision 1.1 2005/02/11 14:41:40 rurban -// seperate DbSession classes: less memory, a bit slower -// - // Local Variables: // mode: php // tab-width: 8 @@ -256,4 +247,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/DbSession/dba.php =================================================================== --- trunk/lib/DbSession/dba.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/DbSession/dba.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -137,20 +137,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.4 2006/02/22 20:56:24 rurban -// fix more refs -// -// Revision 1.3 2005/08/07 10:49:57 rurban -// do not connect/disconnect each time. fix refs -// -// Revision 1.2 2005/08/07 10:07:55 rurban -// dba simplification: use default timeout -// -// Revision 1.1 2005/02/11 14:41:40 rurban -// seperate DbSession classes: less memory, a bit slower -// - // Local Variables: // mode: php // tab-width: 8 @@ -158,4 +144,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/PDO.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -1491,45 +1491,6 @@ return $parsed; } -// $Log: not supported by cvs2svn $ -// Revision 1.11 2007/01/04 16:57:32 rurban -// Clarify API: sortby,limit and exclude are strings. fix upgrade test connection -// -// Revision 1.10 2006/12/22 01:04:12 rurban -// fix syntax error -// -// Revision 1.9 2006/11/19 14:04:39 rurban -// Oops. Syntax error in prev commit -// -// Revision 1.8 2006/11/19 14:03:32 rurban -// Replace IF by CASE in exists_link() -// -// Revision 1.7 2006/05/14 12:28:03 rurban -// mysql 5.x fix for wantedpages join -// -// Revision 1.6 2005/11/14 22:24:33 rurban -// fix fulltext search, -// Eliminate stoplist words, -// don't extract %pagedate twice in ADODB, -// add SemanticWeb support: link(relation), -// major postgresql update: stored procedures, tsearch2 for fulltext -// -// Revision 1.5 2005/09/14 06:04:43 rurban -// optimize searching for ALL (ie %), use the stoplist on PDO -// -// Revision 1.4 2005/09/11 13:25:12 rurban -// enhance LIMIT support -// -// Revision 1.3 2005/09/10 21:30:16 rurban -// enhance titleSearch -// -// Revision 1.2 2005/02/11 14:45:45 rurban -// support ENABLE_LIVESEARCH, enable PDO sessions -// -// Revision 1.1 2005/02/10 19:01:22 rurban -// add PDO support -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -150,14 +150,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.2 2005/04/10 10:43:25 rurban -// more mysql-4.1 quirks: add utf8 to the charset aliases table. (Bug #1180108) -// -// Revision 1.1 2005/02/10 19:01:24 rurban -// add PDO support -// - // (c-file-style: "gnu") // Local Variables: // mode: php @@ -166,4 +158,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiDB/backend/PearDB_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_mysql.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/PearDB_mysql.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -225,11 +225,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.26 2006/12/22 17:49:05 rurban -// add Log -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -119,15 +119,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.13 2007/01/04 16:41:14 rurban -// Allow missing connection permissions on upgrade::_try_dbadmin_user. -// -// Revision 1.12 2006/12/22 00:27:37 rurban -// just add Log -// - - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -317,17 +317,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.26 2007/01/04 16:45:49 rurban -// Clarify API: sortby,limit and exclude are strings. -// -// Revision 1.25 2006/12/23 11:56:17 rurban -// note about vacuum permissions -// -// Revision 1.24 2006/12/22 00:27:37 rurban -// just add Log -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/dbaBase.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -825,28 +825,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.31 2007/08/25 18:16:23 rurban -// add args to check and rebuild -// fix sorting for empty mtime field -// improve docs -// -// Revision 1.30 2007/07/15 17:39:25 rurban -// update links at rename. optimize _has_link from O(n) to O(n/2) - binary search O(log n) in work -// -// Revision 1.29 2007/05/24 18:39:10 rurban -// limits for get_all_pages, improved WantedPages -// -// Revision 1.28 2007/01/03 21:26:01 rurban -// Fix dba searching for relations. Optimize link_search for strict attribute search. Add relation_search() -// -// Revision 1.27 2007/01/02 13:19:33 rurban -// faster list_relations method. new native link_search method. additions to rebuild() (still very slow), fix iterator options (for want_relations and exclude). Clarify API: sortby,limit and exclude are strings -// -// Revision 1.26 2006/12/22 00:27:37 rurban -// just add Log -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/dumb/MostRecentIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/dumb/MostRecentIter.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -79,11 +79,6 @@ return $acreated - $bcreated; } -// $Log: not supported by cvs2svn $ -// Revision 1.8 2006/12/22 00:27:37 rurban -// just add Log -// - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend/flatfile.php =================================================================== --- trunk/lib/WikiDB/backend/flatfile.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend/flatfile.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -196,12 +196,6 @@ //class WikiDB_backend_flatfile_iter extends WikiDB_backend_file_iter {}; -// $Log: not supported by cvs2svn $ -// Revision 1.1 2007/01/02 13:19:47 rurban -// new flatfile backend (readable page files) -// -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/backend.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -764,29 +764,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.36 2008/03/17 19:13:22 rurban -// define default $backend_type -// -// Revision 1.35 2007/08/25 18:17:46 rurban -// rearrange access_log columns into natural order: request_args -// -// Revision 1.34 2007/07/14 12:03:51 rurban -// just typo -// -// Revision 1.33 2007/06/07 21:35:04 rurban -// fixed backend asArray access to iterators (DebugInfo with SQL) -// -// Revision 1.32 2007/02/17 14:14:41 rurban -// enforce accesslog types -// -// Revision 1.31 2007/01/28 22:49:55 rurban -// use backend specific SQL write_accesslog -// -// Revision 1.30 2007/01/02 13:20:26 rurban -// added link_search. Clarify API: sortby,limit and exclude are strings. -// - // For emacs users // Local Variables: // mode: php Modified: trunk/lib/WikiDB/file.php =================================================================== --- trunk/lib/WikiDB/file.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiDB/file.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -49,26 +49,6 @@ } } - -// $Log: not supported by cvs2svn $ -// Revision 1.5 2005/02/18 20:41:28 uckelman -// Re-enabled /tmp warnings to save those who choose not to read the -// instructions. -// -// Revision 1.4 2003/01/04 03:41:46 wainstead -// Added copyleft flowerboxes -// -// Revision 1.3 2003/01/04 03:29:02 wainstead -// ok, this time log tag for sure. -// -// revision 1.2 -// Added credits, php emacs stuff, log tag for CVS. -// -// revision 1.1 -// date: 2003/01/04 03:21:00; author: wainstead; state: Exp; -// New flat file database for the 1.3 branch thanks to Jochen Kalmbach. - - // (c-file-style: "gnu") // Local Variables: // mode: php Modified: trunk/lib/WikiUser/AdoDb.php =================================================================== --- trunk/lib/WikiUser/AdoDb.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/AdoDb.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -276,47 +276,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.11 2007/08/25 18:51:25 rurban -// protect _HomePagehandle -// -// Revision 1.10 2007/05/30 21:53:52 rurban -// add userid to authcreate -// -// Revision 1.9 2006/12/22 17:25:23 rurban -// forgot why -// -// Revision 1.8 2006/03/19 16:26:40 rurban -// fix DBAUTH arguments to be position independent, fixes bug #1358973 -// -// Revision 1.7 2005/10/10 19:43:49 rurban -// add DBAUTH_PREF_INSERT: self-creating users. by John Stevens -// -// Revision 1.6 2005/08/06 13:21:09 rurban -// switch to natural order password, userid -// -// Revision 1.5 2005/02/14 12:28:26 rurban -// fix policy strict. Thanks to Mikhail Vladimirov -// -// Revision 1.4 2004/12/26 17:11:15 rurban -// just copyright -// -// Revision 1.3 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiUser/BogoLogin.php =================================================================== --- trunk/lib/WikiUser/BogoLogin.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/BogoLogin.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -61,30 +61,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.5 2005/02/14 12:28:27 rurban -// fix policy strict. Thanks to Mikhail Vladimirov -// -// Revision 1.4 2004/12/26 17:11:15 rurban -// just copyright -// -// Revision 1.3 2004/11/06 03:07:03 rurban -// make use of dumped static config state in config/config.php (if writable) -// -// Revision 1.2 2004/11/05 20:53:36 rurban -// login cleanup: better debug msg on failing login, -// checked password less immediate login (bogo or anon), -// checked olduser pref session error, -// better PersonalPage without password warning on minimal password length=0 -// (which is default now) -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -92,4 +68,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/Db.php =================================================================== --- trunk/lib/WikiUser/Db.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/Db.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -97,20 +97,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.3 2005/06/10 06:11:56 rurban -// special validname method -// -// Revision 1.2 2004/12/26 17:11:15 rurban -// just copyright -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -118,4 +104,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/File.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -90,35 +90,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2005/08/06 13:21:37 rurban -// only cosmetics -// -// Revision 1.6 2005/05/04 05:37:34 rurban -// fix #1191096 by Karel -// -// Revision 1.5 2005/02/14 12:28:27 rurban -// fix policy strict. Thanks to Mikhail Vladimirov -// -// Revision 1.4 2004/12/26 17:11:16 rurban -// just copyright -// -// Revision 1.3 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -126,4 +97,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/Forbidden.php =================================================================== --- trunk/lib/WikiUser/Forbidden.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/Forbidden.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -16,11 +16,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.1 2004/11/05 18:11:38 rurban -// required dummy file -// - // Local Variables: // mode: php // tab-width: 8 @@ -28,4 +23,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/HttpAuth.php =================================================================== --- trunk/lib/WikiUser/HttpAuth.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/HttpAuth.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -133,36 +133,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2006/09/03 10:10:00 rurban -// oops: reset this->_userid also -// -// Revision 1.6 2006/09/03 09:57:19 rurban -// Support AUTH_TYPE=NTLM (Windows domain\username) -// Workaround PHP _SERVER bug adding \\ => \\\\ -// -// Revision 1.5 2005/02/28 20:35:45 rurban -// linebreaks -// -// Revision 1.4 2004/12/26 17:11:16 rurban -// just copyright -// -// Revision 1.3 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.2 2004/12/17 12:31:57 rurban -// better logout, fake httpauth not yet -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiUser/HttpAuthUpper.php =================================================================== --- trunk/lib/WikiUser/HttpAuthUpper.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/HttpAuthUpper.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -143,9 +143,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.7 2006/09/03 10:10:00 rurban - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiUser/IMAP.php =================================================================== --- trunk/lib/WikiUser/IMAP.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/IMAP.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -60,32 +60,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.6 2006/08/25 22:35:50 rurban -// fix checkPass call in userExists -// -// Revision 1.5 2005/04/25 19:46:08 rurban -// trivial tuning by michael pruitt. Patch #1120185 -// -// Revision 1.4 2004/12/26 17:11:17 rurban -// just copyright -// -// Revision 1.3 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -93,4 +67,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/LDAP.php =================================================================== --- trunk/lib/WikiUser/LDAP.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/LDAP.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -233,43 +233,6 @@ } -// $Log: not supported by cvs2svn $ -// Revision 1.9 2007/06/13 12:48:14 rurban -// fix wrong fix from 1.3.13p1 -// -// Revision 1.8 2007/06/07 16:31:33 rurban -// Important! Fixes bug #1732882 ldap_bind with empty password -// Adds diagnostics on other ldap failures -// Fix password quoting -// -// Revision 1.7 2007/05/30 21:56:17 rurban -// Back to default uid for LDAP -// -// Revision 1.6 2007/05/29 16:56:15 rurban -// Allow more password und userid chars. uid => cn: default for certain testusers -// -// Revision 1.5 2005/10/10 19:43:49 rurban -// add DBAUTH_PREF_INSERT: self-creating users. by John Stevens -// -// Revision 1.4 2004/12/26 17:11:17 rurban -// just copyright -// -// Revision 1.3 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiUser/POP3.php =================================================================== --- trunk/lib/WikiUser/POP3.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/POP3.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -77,32 +77,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.6 2005/04/23 11:17:41 rurban -// bug #1186291 -// -// Revision 1.5 2005/03/19 07:30:52 rurban -// fixed missing IMAP dependency. Thanks to sun-man -// -// Revision 1.4 2004/12/26 17:11:17 rurban -// just copyright -// -// Revision 1.3 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -110,4 +84,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/PdoDb.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -277,14 +277,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.2 2005/06/10 06:12:36 rurban -// finish missing db calls -// -// Revision 1.1 2005/05/06 16:56:48 rurban -// add PdoDbPassUser -// - // Local Variables: // mode: php // tab-width: 8 @@ -292,4 +284,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/PearDb.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -237,51 +237,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.11 2007/05/30 21:53:52 rurban -// add userid to authcreate -// -// Revision 1.10 2006/03/19 16:26:40 rurban -// fix DBAUTH arguments to be position independent, fixes bug #1358973 -// -// Revision 1.9 2005/10/10 19:43:49 rurban -// add DBAUTH_PREF_INSERT: self-creating users. by John Stevens -// -// Revision 1.8 2005/08/06 13:21:09 rurban -// switch to natural order password, userid -// -// Revision 1.7 2005/02/14 12:28:27 rurban -// fix policy strict. Thanks to Mikhail Vladimirov -// -// Revision 1.6 2005/01/06 15:44:22 rurban -// move password length checker to correct method. thanks to Charles Corrigan -// -// Revision 1.5 2004/12/26 17:11:17 rurban -// just copyright -// -// Revision 1.4 2004/12/20 16:05:01 rurban -// gettext msg unification -// -// Revision 1.3 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.2 2004/11/10 15:29:21 rurban -// * requires newer Pear_DB (as the internal one): quote() uses now escapeSimple for strings -// * ACCESS_LOG_SQL: fix cause request not yet initialized -// * WikiDB: moved SQL specific methods upwards -// * new Pear_DB quoting: same as ADODB and as newer Pear_DB. -// fixes all around: WikiGroup, WikiUserNew SQL methods, SQL logging -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/WikiUser/PersonalPage.php =================================================================== --- trunk/lib/WikiUser/PersonalPage.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/PersonalPage.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -63,33 +63,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.6 2005/06/22 05:36:52 rurban -// looser isValidName method -// -// Revision 1.5 2005/02/14 12:28:27 rurban -// fix policy strict. Thanks to Mikhail Vladimirov -// -// Revision 1.4 2004/12/26 17:11:17 rurban -// just copyright -// -// Revision 1.3 2004/11/05 22:09:39 rurban -// empty passwd PersonalPage case -// -// Revision 1.2 2004/11/05 20:53:36 rurban -// login cleanup: better debug msg on failing login, -// checked password less immediate login (bogo or anon), -// checked olduser pref session error, -// better PersonalPage without password warning on minimal password length=0 -// (which is default now) -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -97,4 +70,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/WikiUser/Session.php =================================================================== --- trunk/lib/WikiUser/Session.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/WikiUser/Session.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -55,20 +55,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.2 2004/12/19 00:58:02 rurban -// Enforce PASSWORD_LENGTH_MINIMUM in almost all PassUser checks, -// Provide an errormessage if so. Just PersonalPage and BogoLogin not. -// Simplify httpauth logout handling and set sessions for all methods. -// fix main.php unknown index "x" getLevelDescription() warning. -// -// Revision 1.1 2004/11/01 10:43:58 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// - // Local Variables: // mode: php // tab-width: 8 @@ -76,4 +62,4 @@ // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil // End: -?> \ No newline at end of file +?> Modified: trunk/lib/wikilens/Buddy.php =================================================================== --- trunk/lib/wikilens/Buddy.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/wikilens/Buddy.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -168,19 +168,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.3 2004/11/21 11:59:26 rurban -// remove final \n to be ob_cache independent -// -// Revision 1.2 2004/11/15 16:00:02 rurban -// enable RateIt imgPrefix: '' or 'Star' or 'BStar', -// enable blue prediction icons, -// enable buddy predictions. -// -// Revision 1.1 2004/06/18 14:42:17 rurban -// added wikilens libs (not yet merged good enough, some work for DanFr) -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/wikilens/PageListColumns.php =================================================================== --- trunk/lib/wikilens/PageListColumns.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/wikilens/PageListColumns.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -393,54 +393,6 @@ _("Prediction"), false),*/ )); -// $Log: not supported by cvs2svn $ -// Revision 1.10 2005/09/30 18:41:39 uckelman -// Fixed more passes-by-reference. -// -// Revision 1.9 2004/12/26 17:08:36 rurban -// php5 fixes: case-sensitivity, no & new -// -// Revision 1.8 2004/11/06 17:13:17 rurban -// init is easier this way: no ->init(), pass params instead -// -// Revision 1.7 2004/11/01 10:43:59 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.6 2004/07/08 20:30:07 rurban -// plugin->run consistency: request as reference, added basepage. -// encountered strange bug in AllPages (and the test) which destroys ->_dbi -// -// Revision 1.5 2004/07/07 15:01:44 dfrankow -// Allow ratingvalue, ratingwidget, prediction, numbacklinks columns to be sortable -// -// Revision 1.4 2004/06/30 20:12:09 dfrankow -// + Change numbacklinks function to use existing core functions. -// It's slower, but it'll work. -// -// + Change ratingvalue column to get its specific user as column 5 (index 4). -// -// + ratingwidget column uses WikiPlugin_RateIt's RatingWidgetHtml -// -// Revision 1.3 2004/06/21 17:01:41 rurban -// fix typo and rating method call -// -// Revision 1.2 2004/06/21 16:22:32 rurban -// add DEFAULT_DUMP_DIR and HTML_DUMP_DIR constants, for easier cmdline dumps, -// fixed dumping buttons locally (images/buttons/), -// support pages arg for dumphtml, -// optional directory arg for dumpserial + dumphtml, -// fix a AllPages warning, -// show dump warnings/errors on DEBUG, -// don't warn just ignore on wikilens pagelist columns, if not loaded. -// RateIt pagelist column is called "rating", not "ratingwidget" (Dan?) -// -// Revision 1.1 2004/06/18 14:42:17 rurban -// added wikilens libs (not yet merged good enough, some work for DanFr) -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/wikilens/RatingsDb.php =================================================================== --- trunk/lib/wikilens/RatingsDb.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/wikilens/RatingsDb.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -738,72 +738,6 @@ } */ -// $Log: not supported by cvs2svn $ -// Revision 1.16 2007/12/21 17:00:02 rurban -// Do not overwrite other ratings with metadata DB -// -// Revision 1.15 2007/05/29 16:56:54 rurban -// Fix dba -// -// Revision 1.14 2007/01/21 23:16:29 rurban -// Fix dba with RATING_STORAGE=SQL -// -// Revision 1.13 2005/10/10 19:51:41 rurban -// fix aesthetic issues by John Stevens -// -// Revision 1.12 2004/11/15 16:00:02 rurban -// enable RateIt imgPrefix: '' or 'Star' or 'BStar', -// enable blue prediction icons, -// enable buddy predictions. -// -// Revision 1.11 2004/11/01 10:44:00 rurban -// seperate PassUser methods into seperate dir (memory usage) -// fix WikiUser (old) overlarge data session -// remove wikidb arg from various page class methods, use global ->_dbi instead -// ... -// -// Revision 1.10 2004/10/05 17:00:04 rurban -// support paging for simple lists -// fix RatingDb sql backend. -// remove pages from AllPages (this is ListPages then) -// -// Revision 1.9 2004/10/05 00:33:44 rurban -// intermediate fix for non-sql WikiDB and SQL rating -// -// Revision 1.8 2004/07/20 18:00:50 dfrankow -// Add EXPLICIT_RATINGS_DIMENSION constant. More dimensions on the way -// for lists. -// -// Fix delete_rating(). -// -// Revision 1.7 2004/07/08 19:14:57 rurban -// more metadata fixes -// -// Revision 1.6 2004/07/08 19:04:45 rurban -// more unittest fixes (file backend, metadata RatingsDb) -// -// Revision 1.5 2004/07/08 13:50:33 rurban -// various unit test fixes: print error backtrace on _DEBUG_TRACE; allusers fix; new PHPWIKI_NOMAIN constant for omitting the mainloop -// -// Revision 1.4 2004/07/07 19:47:36 dfrankow -// Fixes to get PreferencesApp to work-- thanks syilek -// -// Revision 1.3 2004/06/30 20:05:36 dfrankow -// + Add getTheRatingsDb() singleton. -// + Remove defaulting of dimension, userid, pagename in getRating-- -// it didn't work -// + Fix typo in get_rating. -// + Fix _sql_get_rating_result -// + Fix sql_rate(). It's now not transactionally safe yet, but at least it -// works. -// -// Revision 1.2 2004/06/19 10:22:41 rurban -// outcomment the pear specific methods to let all pages load -// -// Revision 1.1 2004/06/18 14:42:17 rurban -// added wikilens libs (not yet merged good enough, some work for DanFr) -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/wikilens/RatingsUser.php =================================================================== --- trunk/lib/wikilens/RatingsUser.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/wikilens/RatingsUser.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -427,25 +427,6 @@ } } -// $Log: not supported by cvs2svn $ -// Revision 1.5 2004/11/15 16:00:02 rurban -// enable RateIt imgPrefix: '' or 'Star' or 'BStar', -// enable blue prediction icons, -// enable buddy predictions. -// -// Revision 1.4 2004/07/08 19:04:49 rurban -// more unittest fixes (file backend, metadata RatingsDb) -// -// Revision 1.3 2004/06/30 20:06:44 dfrankow -// Use RatingsDb singleton. -// -// Revision 1.2 2004/06/21 17:01:41 rurban -// fix typo and rating method call -// -// Revision 1.1 2004/06/18 14:42:17 rurban -// added wikilens libs (not yet merged good enough, some work for DanFr) -// - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/wikilens/Utils.php =================================================================== --- trunk/lib/wikilens/Utils.php 2009-03-31 12:02:55 UTC (rev 6743) +++ trunk/lib/wikilens/Utils.php 2009-03-31 12:12:00 UTC (rev 6744) @@ -97,11 +97,6 @@ return $var != ""; } -// $Log: not supported by cvs2svn $ -// Revision 1.1 2004/06/18 14:42:17 rurban -// added wikilens libs (not yet merged good enough, some work for DanFr) -// - // 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...> - 2009-05-28 08:54:07
|
Revision: 6816 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6816&view=rev Author: vargenau Date: 2009-05-28 08:53:57 +0000 (Thu, 28 May 2009) Log Message: ----------- Use getUploadDataPath() instead of UPLOAD_DATA_PATH Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/InlineParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2009-05-27 16:29:55 UTC (rev 6815) +++ trunk/lib/BlockParser.php 2009-05-28 08:53:57 UTC (rev 6816) @@ -1159,7 +1159,7 @@ // It's not a Mediawiki template, it's a Wikicreole image if (is_image($imagename)) { - $this->_element = LinkImage(UPLOAD_DATA_PATH . $imagename, $alt); + $this->_element = LinkImage(getUploadDataPath() . $imagename, $alt); return true; } Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-05-27 16:29:55 UTC (rev 6815) +++ trunk/lib/InlineParser.php 2009-05-28 08:53:57 UTC (rev 6816) @@ -399,10 +399,10 @@ $imgurl = substr($label, 2, -2); // Remove "{{" and "}}" $pipe = strpos($imgurl, '|'); if ($pipe === false) { - $label = LinkImage(UPLOAD_DATA_PATH . $imgurl, $link); + $label = LinkImage(getUploadDataPath() . $imgurl, $link); } else { list($img, $alt) = explode("|", $imgurl); - $label = LinkImage(UPLOAD_DATA_PATH . $img, $alt); + $label = LinkImage(getUploadDataPath() . $img, $alt); } } else @@ -995,7 +995,7 @@ // We should not hardcode "/phpwiki" return LinkImage(SERVER_URL . "/phpwiki" . $imagename, $alt); } else { - return LinkImage(UPLOAD_DATA_PATH . $imagename, $alt); + return LinkImage(getUploadDataPath() . $imagename, $alt); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-06-04 08:13:08
|
Revision: 6853 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6853&view=rev Author: rurban Date: 2009-06-04 08:12:59 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Add phrase_starts_with ^S != S* ^x matches only beginning of phrase, not of word x* matches any word beginning with x Modified Paths: -------------- trunk/lib/TextSearchQuery.php trunk/lib/plugin/TitleSearch.php Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2009-06-03 14:48:58 UTC (rev 6852) +++ trunk/lib/TextSearchQuery.php 2009-06-04 08:12:59 UTC (rev 6853) @@ -13,8 +13,11 @@ * 'word' OR the substring 'page'. * <dt> auto-detect regex hints, glob-style or regex-style, and converts them * to PCRE and SQL matchers: - * <dd> "^word$" => EXACT(word) - * <dd> "^word" => STARTS_WITH(word) + * <dd> "^word$" => EXACT(phrase) + * <dd> "^word" => STARTS_WITH(phrase) + * <dd> "word$" => ENDS_WITH(phrase) + * <dd> "^word" ... => STARTS_WITH(word) + * <dd> "word$" ... => ENDS_WITH(word) * <dd> "word*" => STARTS_WITH(word) * <dd> "*word" => ENDS_WITH(word) * <dd> "/^word.* /" => REGEX(^word.*) @@ -651,7 +654,7 @@ } /** - * A word. exact or substring? + * A word. Exact or substring? */ class TextSearchQuery_node_word extends TextSearchQuery_node @@ -678,6 +681,7 @@ function regexp() { return '(?=.*)'; } function sql() { return '%'; } } + class TextSearchQuery_node_starts_with extends TextSearchQuery_node_word { var $op = "STARTS_WITH"; @@ -686,6 +690,12 @@ function sql () { return $this->_sql_quote($this->word).'%'; } } +// ^word: full phrase starts with +class TextSearchQuery_phrase_starts_with +extends TextSearchQuery_node_starts_with { + function regexp() { return '(?=^' . preg_quote($this->word, '/') . ')'; } +} + class TextSearchQuery_node_ends_with extends TextSearchQuery_node_word { var $op = "ENDS_WITH"; @@ -694,6 +704,12 @@ function sql () { return '%'.$this->_sql_quote($this->word); } } +// word$: full phrase ends with +class TextSearchQuery_phrase_ends_with +extends TextSearchQuery_node_ends_with { + function regexp() { return '(?=' . preg_quote($this->word, '/') . '$)'; } +} + class TextSearchQuery_node_exact extends TextSearchQuery_node_word { var $op = "EXACT"; @@ -935,7 +951,7 @@ * /"[^"]*"/ WORD * /'[^']*'/ WORD * - * ^WORD STARTS_WITH + * ^WORD TextSearchQuery_phrase_starts_with * WORD* STARTS_WITH * *WORD ENDS_WITH * ^WORD$ EXACT @@ -972,6 +988,12 @@ else return false; } + if ($is_toplevel and count($list) == 1) { + if ($this->lexer->query_str[0] == '^') + return new TextSearchQuery_phrase_starts_with($list[0]->word); + else + return $list[0]; + } return new TextSearchQuery_node_and($list); } @@ -1038,7 +1060,14 @@ if ( $accept & $const and (($word = $this->lexer->get($const)) !== false)) { - $classname = "TextSearchQuery_node_".strtolower($tok); + // phrase or word level? + if ($tok == 'STARTS_WITH' and $this->lexer->query_str[0] == '^') + $classname = "TextSearchQuery_phrase_".strtolower($tok); + elseif ($tok == 'ENDS_WITH' and + string_ends_with($this->lexer->query_str,'$')) + $classname = "TextSearchQuery_phrase_".strtolower($tok); + else + $classname = "TextSearchQuery_node_".strtolower($tok); return new $classname($word); } } @@ -1051,6 +1080,7 @@ $regex=TSQ_REGEX_AUTO) { $this->tokens = $this->tokenize($query_str, $case_exact, $regex); + $this->query_str = $query_str; $this->pos = 0; } Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2009-06-03 14:48:58 UTC (rev 6852) +++ trunk/lib/plugin/TitleSearch.php 2009-06-04 08:12:59 UTC (rev 6853) @@ -77,6 +77,8 @@ return HTML(); } + // ^S != S* ^ matches only beginning of phrase, not of word. + // x* matches any word beginning with x $query = new TextSearchQuery($args['s'], $args['case_exact'], $args['regex']); $pages = $dbi->titleSearch($query,$args['sortby'],$args['limit'],$args['exclude']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2009-06-04 08:43:17
|
Revision: 6857 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6857&view=rev Author: rurban Date: 2009-06-04 08:43:15 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Add format=json Fix and improve format=xml for AJAX Rearrange multipage pdf ordering Modified Paths: -------------- trunk/lib/display.php Added Paths: ----------- trunk/lib/pear/JSON.php Modified: trunk/lib/display.php =================================================================== --- trunk/lib/display.php 2009-06-04 08:29:25 UTC (rev 6856) +++ trunk/lib/display.php 2009-06-04 08:43:15 UTC (rev 6857) @@ -37,7 +37,7 @@ $pagename); } - +/* only on ?action= */ function actionPage(&$request, $action) { global $WikiTheme; @@ -112,7 +112,6 @@ break; } } - $args['VALID_LINKS'] = array($pagename); if (!$pagelist or !is_a($pagelist, 'PageList')) { if (!in_array($format, array("rss91","rss2","rss","atom","rdf"))) trigger_error(sprintf("Format %s requires an actionpage returning a pagelist.", @@ -120,7 +119,8 @@ ."\n".("Fall back to single page mode"), E_USER_WARNING); require_once('lib/PageList.php'); $pagelist = new PageList(); - $pagelist->addPage($page); + if ($format == 'pdf') + $pagelist->addPage($page); } else { foreach ($pagelist->_pages as $page) { $name = $page->getName(); @@ -130,10 +130,12 @@ } if ($format == 'pdf') { require_once("lib/pdf.php"); + array_unshift($args['VALID_LINKS'], $pagename); ConvertAndDisplayPdfPageList($request, $pagelist, $args); } elseif ($format == 'ziphtml') { // need to fix links require_once('lib/loadsave.php'); + array_unshift($args['VALID_LINKS'], $pagename); $request->setArg('zipname', FilenameForPage($pagename).".zip"); $request->setArg('pages', $args['VALID_LINKS']); MakeWikiZipHtml($request); @@ -147,6 +149,22 @@ $plugin = new WikiPlugin_RecentChanges(); return $plugin->format($plugin->getChanges($request->_dbi, $args), $args); } + } elseif ($format == 'json') { // for faster autocompletion on searches + $req_args = $request->args; + unset($req_args['format']); + $json = array('count' => count($pagelist->_pages), + 'list' => $args['VALID_LINKS'], + 'args' => $req_args, + 'phpwiki-version' => PHPWIKI_VERSION); + if (loadPhpExtension('json')) { + $json_enc = json_encode($json); + } else { + require_once("lib/pear/JSON.php"); + $j = new Services_JSON(); + $json_enc = $j->encode($json); + } + header("Content-Type: application/json"); + die($json_enc); } elseif ($format == 'rdf') { // all semantic relations and attributes require_once("lib/SemanticWeb.php"); $rdf = new RdfWriter($request, $pagelist); @@ -187,6 +205,26 @@ else { $revision = $page->getCurrentRevision(); } + $format = $request->getArg('format'); + if ($format == 'xml') { // fast ajax: include page content asynchronously + global $charset; + //header("Content-Type: application/xhtml+xml; charset=$charset"); + header("Content-Type: text/xml"); + if ($page->exists()) { + header("Last-Modified: " . Rfc1123DateTime($revision->get('mtime'))); + $request->cacheControl(); + echo "<","?xml version=\"1.0\" encoding=\"$charset\"?", ">\n"; + $page_content = $revision->getTransformedContent(); + $page_content->printXML(); + $request->finish(); + } + else { + $request->cacheControl(); + echo('<div style="display:none;" />'); + $request->finish(); + exit(); + } + } if (isSubPage($pagename)) { $pages = explode(SUBPAGE_SEPARATOR, $pagename); @@ -318,14 +356,10 @@ // pdf is a special action, but should be a format to dump multiple pages // if the actionpage plugin returns a pagelist. // rdf, owl, kbmodel, daml, ... are handled by SemanticWeb. - $format = $request->getArg('format'); /* Only single page versions. rss only if not already handled by RecentChanges. */ if (!$format or $format == 'html' or $format == 'sidebar' or $format == 'contribs') { $template->printExpansion($toks); - } elseif ($format == 'xml') { - $template = new Template('htmldump', $request); - $template->printExpansion($toks); } else { // No pagelist here. Single page version only require_once("lib/PageList.php"); @@ -352,6 +386,26 @@ require_once("lib/SemanticWeb.php"); $rdf = new OwlWriter($request, $pagelist); $rdf->format(); + } elseif ($format == 'json') { // include page content asynchronously + if ($page->exists()) + $content = $page_content->asXML(); + else + $content = ''; + $req_args = $request->args; + unset($req_args['format']); + // no meta-data so far, just the content + $json = array('content' => $content, + 'args' => $req_args, + 'phpwiki-version' => PHPWIKI_VERSION); + if (loadPhpExtension('json')) { + $json_enc = json_encode($json); + } else { + require_once("lib/pear/JSON.php"); + $j = new Services_JSON(); + $json_enc = $j->encode($json); + } + header("Content-Type: application/json"); + die($json_enc); } else { if (!in_array($pagename, array(_("LinkDatabase")))) trigger_error(sprintf(_("Unsupported argument: %s=%s"),"format",$format), Added: trunk/lib/pear/JSON.php =================================================================== --- trunk/lib/pear/JSON.php (rev 0) +++ trunk/lib/pear/JSON.php 2009-06-04 08:43:15 UTC (rev 6857) @@ -0,0 +1,806 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * Converts to and from JSON format. + * + * JSON (JavaScript Object Notation) is a lightweight data-interchange + * format. It is easy for humans to read and write. It is easy for machines + * to parse and generate. It is based on a subset of the JavaScript + * Programming Language, Standard ECMA-262 3rd Edition - December 1999. + * This feature can also be found in Python. JSON is a text format that is + * completely language independent but uses conventions that are familiar + * to programmers of the C-family of languages, including C, C++, C#, Java, + * JavaScript, Perl, TCL, and many others. These properties make JSON an + * ideal data-interchange language. + * + * This package provides a simple encoder and decoder for JSON notation. It + * is intended for use with client-side Javascript applications that make + * use of HTTPRequest to perform server communication functions - data can + * be encoded into JSON notation for use in a client-side javascript, or + * decoded from incoming Javascript requests. JSON format is native to + * Javascript, and can be directly eval()'ed with no further parsing + * overhead + * + * All strings should be in ASCII or UTF-8 format! + * + * LICENSE: Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: Redistributions of source code must retain the + * above copyright notice, this list of conditions and the following + * disclaimer. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * @category + * @package Services_JSON + * @author Michal Migurski <mik...@te...> + * @author Matt Knapp <mdknapp[at]gmail[dot]com> + * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_SLICE', 1); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_STR', 2); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_ARR', 3); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_OBJ', 4); + +/** + * Marker constant for Services_JSON::decode(), used to flag stack state + */ +define('SERVICES_JSON_IN_CMT', 5); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_LOOSE_TYPE', 16); + +/** + * Behavior switch for Services_JSON::decode() + */ +define('SERVICES_JSON_SUPPRESS_ERRORS', 32); + +/** + * Converts to and from JSON format. + * + * Brief example of use: + * + * <code> + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * </code> + */ +class Services_JSON +{ + /** + * constructs a new JSON instance + * + * @param int $use object behavior flags; combine with boolean-OR + * + * possible values: + * - SERVICES_JSON_LOOSE_TYPE: loose typing. + * "{...}" syntax creates associative arrays + * instead of objects in decode(). + * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression. + * Values which can't be encoded (e.g. resources) + * appear as NULL instead of throwing errors. + * By default, a deeply-nested resource will + * bubble up with an error, so all return values + * from encode() should be checked with isError() + */ + function Services_JSON($use = 0) + { + $this->use = $use; + } + + /** + * convert a string from one UTF-16 char to one UTF-8 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf16 UTF-16 character + * @return string UTF-8 character + * @access private + */ + function utf162utf8($utf16) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); + } + + $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + + switch(true) { + case ((0x7F & $bytes) == $bytes): + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x7F & $bytes); + + case (0x07FF & $bytes) == $bytes: + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xC0 | (($bytes >> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + function utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if(function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch(strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + function encode($var) + { + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = $this->utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + /* + * As per JSON spec if any array key is not an integer + * we must treat the the whole array as an object. We + * also try to catch a sparsely populated associative + * array with numeric keys here because some JS engines + * will create an array with empty indexes up to + * max_index which can cause memory issues and because + * the keys, which may be relevant, will be remapped + * otherwise. + * + * As per the ECMA and JSON specification an object may + * have any string as a property. Unfortunately due to + * a hole in the ECMA specification if the key is a + * ECMA reserved word or starts with a digit the + * parameter is only accessible using ECMAScript's + * bracket notation. + */ + + // treat as a JSON object + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array($this, 'name_value'), + array_keys($var), + array_values($var)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array($this, 'encode'), $var); + + foreach($elements as $element) { + if(Services_JSON::isError($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array($this, 'name_value'), + array_keys($vars), + array_values($vars)); + + foreach($properties as $property) { + if(Services_JSON::isError($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS) + ? 'null' + : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string"); + } + } + + /** + * array-walking function for use in generating JSON-formatted name-value pairs + * + * @param string $name name of key to use + * @param mixed $value reference to an array element to be encoded + * + * @return string JSON-formatted name-value pair, like '"name":value' + * @access private + */ + function name_value($name, $value) + { + $encoded_value = $this->encode($value); + + if(Services_JSON::isError($encoded_value)) { + return $encoded_value; + } + + return $this->encode(strval($name)) . ':' . $encoded_value; + } + + /** + * reduce a string by removing leading and trailing comments and whitespace + * + * @param $str string string value to strip of comments and whitespace + * + * @return string string value stripped of comments and whitespace + * @access private + */ + function reduce_string($str) + { + $str = preg_replace(array( + + // eliminate single line comments in '// ...' form + '#^\s*//(.+)$#m', + + // eliminate multi-line comments in '/* ... */' form, at start of string + '#^\s*/\*(.+)\*/#Us', + + // eliminate multi-line comments in '/* ... */' form, at end of string + '#/\*(.+)\*/\s*$#Us' + + ), '', $str); + + // eliminate extraneous space + return trim($str); + } + + /** + * decodes a JSON string into appropriate variable + * + * @param string $str JSON-formatted string + * + * @return mixed number, boolean, string, array, or object + * corresponding to given JSON input string. + * See argument 1 to Services_JSON() above for object-output behavior. + * Note that decode() always returns strings + * in ASCII or UTF-8 format! + * @access public + */ + function decode($str) + { + $str = $this->reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + // Lookie-loo, it's a number + + // This would work on its own, but I'm trying to be + // good about returning integers where appropriate: + // return (float)$str; + + // Return float or int, as appropriate + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + // STRINGS RETURNED IN UTF-8 FORMAT + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + // single, escaped unicode character + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= $this->utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + // characters U-00000080 - U-000007FF, mask 110XXXXX + //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + // characters U-00010000 - U-001FFFFF, mask 11110XXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + // characters U-00200000 - U-03FFFFFF, mask 111110XX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + // characters U-04000000 - U-7FFFFFFF, mask 1111110X + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + // array, or object notation + + if ($str{0} == '[') { + $stk = array(SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = array(); + } else { + $stk = array(SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + } + + array_push($stk, array('what' => SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = $this->reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + //print("\nparsing {$chrs}\n"); + + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + // found a comma that is not inside a string, array, etc., + // OR we've reached the end of the character list + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + // we are in an array, so just push an element onto the stack + array_push($arr, $this->decode($slice)); + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + // we are in an object, so figure + // out the property name and set an + // element in an associative array, + // for now + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // "name":value pair + $key = $this->decode($parts[1]); + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + // name:value pair, where name is unquoted + $key = $parts[1]; + $val = $this->decode($parts[2]); + + if ($this->use & SERVICES_JSON_LOOSE_TYPE) { + $obj[$key] = $val; + } else { + $obj->$key = $val; + } + } + + } + + } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + // found a quote, and we are not inside a string + array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + //print("Found start of string at {$c}\n"); + + } elseif (($chrs{$c} == $top['delim']) && + ($top['what'] == SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + // found a quote, we're in a string, and it's not escaped + // we know that it's not escaped becase there is _not_ an + // odd number of backslashes at the end of the string so far + array_pop($stk); + //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '[') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-bracket, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + //print("Found start of array at {$c}\n"); + + } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) { + // found a right-bracket, and we're in an array + array_pop($stk); + //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($chrs{$c} == '{') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a left-brace, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + //print("Found start of object at {$c}\n"); + + } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) { + // found a right-brace, and we're in an object + array_pop($stk); + //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) { + // found a comment start, and we are in an array, object, or slice + array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + //print("Found start of comment at {$c}\n"); + + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) { + // found a comment end, and we're in one now + array_pop($stk); + $c++; + + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + + //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n"); + + } + + } + + if (reset($stk) == SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * @todo Ultimately, this should just call PEAR::isError() + */ + function isError($data, $code = null) + { + if (class_exists('pear')) { + return PEAR::isError($data, $code); + } elseif (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } +} + +if (class_exists('PEAR_Error')) { + + class Services_JSON_Error extends PEAR_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + parent::PEAR_Error($message, $code, $mode, $options, $userinfo); + } + } + +} else { + + /** + * @todo Ultimately, this class shall be descended from PEAR_Error + */ + class Services_JSON_Error + { + function Services_JSON_Error($message = 'unknown error', $code = null, + $mode = null, $options = null, $userinfo = null) + { + + } + } + +} + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |