From: <var...@us...> - 2010-08-11 13:00:55
|
Revision: 7641 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7641&view=rev Author: vargenau Date: 2010-08-11 13:00:46 +0000 (Wed, 11 Aug 2010) Log Message: ----------- Harmonize header Modified Paths: -------------- trunk/lib/DbSession/ADODB.php trunk/lib/HtmlParser.php trunk/lib/PageType.php trunk/lib/RssParser.php trunk/lib/SemanticWeb.php trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/WikiDB/backend/PDO_pgsql.php trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend/flatfile.php trunk/lib/WikiDB/file.php trunk/lib/WikiDB/flatfile.php trunk/lib/XmlParser.php trunk/lib/install.php trunk/lib/loadsave.php trunk/lib/wikilens/PageListColumns.php trunk/lib/wikilens/Utils.php Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/DbSession/ADODB.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -1,25 +1,25 @@ <?php // rcs_id('$Id$'); /* - Copyright 2005 $ThePhpWikiProgrammingTeam + * Copyright 2005 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/** +/** * ADODB db sessions, based on pear DB Sessions. * * @author: Reini Urban @@ -52,13 +52,13 @@ if (!$dbh or !is_resource($dbh->_connectionID)) { if (!$parsed) $parsed = parseDSN($request->_dbi->getParam('dsn')); $this->_dbh =& ADONewConnection($parsed['phptype']); // Probably only MySql works just now - $this->_dbh->Connect($parsed['hostspec'],$parsed['username'], + $this->_dbh->Connect($parsed['hostspec'],$parsed['username'], $parsed['password'], $parsed['database']); - $dbh = &$this->_dbh; + $dbh = &$this->_dbh; } return $dbh; } - + function query($sql) { return $this->_dbh->Execute($sql); } @@ -78,7 +78,7 @@ * Actually this function is a fake for session_set_save_handle. * @param string $save_path a path to stored files * @param string $session_name a name of the concrete file - * @return boolean true just a variable to notify PHP that everything + * @return boolean true just a variable to notify PHP that everything * is good. * @access private */ @@ -92,7 +92,7 @@ * * This function is called just after <i>write</i> call. * - * @return boolean true just a variable to notify PHP that everything + * @return boolean true just a variable to notify PHP that everything * is good. * @access private */ @@ -129,11 +129,11 @@ } return $res; } - + /** * Saves the session data into DB. * - * Just a comment: The "write" handler is not + * Just a comment: The "write" handler is not * executed until after the output stream is closed. Thus, * output from debugging statements in the "write" handler * will never be seen in the browser. If debugging output @@ -147,8 +147,8 @@ * @access private */ function write ($id, $sess_data) { - if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; - + if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return; + $dbh = $this->_connect(); $table = $this->_table; $qid = $dbh->qstr($id); @@ -181,7 +181,7 @@ } } $result = ! $rs->EOF; - if ($result) $rs->free(); + if ($result) $rs->free(); $this->_disconnect(); return $result; } @@ -192,7 +192,7 @@ * Removes a session from the table. * * @param string $id - * @return boolean true + * @return boolean true * @access private */ function destroy ($id) { @@ -203,7 +203,7 @@ $dbh->Execute("DELETE FROM $table WHERE sess_id=$qid"); $this->_disconnect(); - return true; + return true; } /** @@ -224,7 +224,7 @@ return true; } - // WhoIsOnline support. + // WhoIsOnline support. // TODO: ip-accesstime dynamic blocking API function currentSessions() { $sessions = array(); Modified: trunk/lib/HtmlParser.php =================================================================== --- trunk/lib/HtmlParser.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/HtmlParser.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -6,23 +6,23 @@ */ /* - Copyright (C) 2004 Reini Urban - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright (C) 2004 Reini Urban + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/PageType.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -1,23 +1,23 @@ <?php // -*-php-*- // rcs_id('$Id$'); /* - Copyright 1999,2000,2001,2002,2003,2004,2005,2006 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 1999,2000,2001,2002,2003,2004,2005,2006 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once('lib/CachedMarkup.php'); @@ -57,7 +57,7 @@ * Currently the only information encapsulated is how to format * the specific page type. In the future or capabilities may be * added, e.g. the abilities to edit different page types (differently.) - * e.g. Support for the javascript htmlarea editor, which can only edit + * e.g. Support for the javascript htmlarea editor, which can only edit * pure HTML. * * IMPORTANT NOTE: Since the whole PageType class gets stored (serialized) @@ -142,7 +142,7 @@ trigger_error(_("WARNING: InterWikiMap page is unlocked, so not using those links.")); $intermap = false; } - else + else $intermap = false; } else { $intermap = $this->_getMapFromWikiText($pagetext); @@ -171,7 +171,7 @@ function link ($link, $linktext = false) { global $WikiTheme; list ($moniker, $page) = explode (":", $link, 2); - + if (!isset($this->_map[$moniker])) { return HTML::span(array('class' => 'bad-interwiki'), $linktext ? $linktext : $link); @@ -198,7 +198,7 @@ $link_prefix = NormalizeWebFileName(substr($url, strlen($wikiroot))); } } - + // Urlencode page only if it's a query arg. // FIXME: this is a somewhat broken heuristic. if ($moniker == 'Upload') { @@ -223,7 +223,7 @@ $link->pushContent(PossiblyGlueIconToText('interwiki', $linktext)); $link->setAttr('class', 'named-interwiki'); } - + return $link; } @@ -240,13 +240,13 @@ // Add virtual monikers: "Upload:" "Talk:" "User:", ":" // and expand special variables %u, %b, %d - // Upload: Should be expanded later to user-specific upload dirs. + // Upload: Should be expanded later to user-specific upload dirs. // In the Upload plugin, not here: Upload:ReiniUrban/uploaded-file.png if (empty($map['Upload'])) { $map['Upload'] = getUploadDataPath(); } // User:ReiniUrban => ReiniUrban or Users/ReiniUrban - // Can be easily overriden by a customized InterWikiMap: + // Can be easily overriden by a customized InterWikiMap: // User Users/%s if (empty($map["User"])) { $map["User"] = "%s"; @@ -270,15 +270,15 @@ // %s is expanded later to the pagename if (strstr($map[$special], '%u')) $map[$special] = str_replace($map[$special], - '%u', + '%u', $GLOBALS['request']->_user->_userid); if (strstr($map[$special], '%b')) $map[$special] = str_replace($map[$special], - '%b', + '%b', PHPWIKI_BASE_URL); if (strstr($map[$special], '%d')) $map[$special] = str_replace($map[$special], - '%d', + '%d', // such as 2003-01-11T14:03:02+00:00 Iso8601DateTime()); } @@ -295,7 +295,7 @@ function _getMapFromFile ($filename) { if (defined('WARN_NONPUBLIC_INTERWIKIMAP') and WARN_NONPUBLIC_INTERWIKIMAP) { - $error_html = sprintf(_("Loading InterWikiMap from external file %s."), + $error_html = sprintf(_("Loading InterWikiMap from external file %s."), $filename); trigger_error( $error_html, E_USER_NOTICE ); } @@ -313,7 +313,7 @@ function _getRegexp () { if (!$this->_map) return '(?:(?!a)a)'; // Never matches. - + foreach (array_keys($this->_map) as $moniker) $qkeys[] = preg_quote($moniker, '/'); return "(?:" . join("|", $qkeys) . ")"; @@ -335,7 +335,7 @@ if (!empty($meta['markup'])) $this->_markup = $meta['markup']; else - $this->_markup = 2; // dump used old-markup as empty. + $this->_markup = 2; // dump used old-markup as empty. // FIXME: To be able to restore old plain-backups we should keep markup 1 as default. // New policy: default = new markup (old crashes quite often) } @@ -355,7 +355,7 @@ } } -class PageFormatter_wikitext extends PageFormatter +class PageFormatter_wikitext extends PageFormatter { function format(&$text) { return HTML::div(array('class' => 'wikitext'), @@ -379,12 +379,12 @@ function _getFooter($text) { return preg_replace('@.*?(</verbatim>|\Z)@s', '', $text, 1); } - + function _getMap($pagetext) { $map = getInterwikiMap($pagetext, 'force'); return $map->_map; } - + function _formatMap($pagetext) { $map = $this->_getMap($pagetext); if (!$map) @@ -392,14 +392,14 @@ $mon_attr = array('class' => 'interwiki-moniker'); $url_attr = array('class' => 'interwiki-url'); - + $thead = HTML::thead(HTML::tr(HTML::th($mon_attr, _("Moniker")), HTML::th($url_attr, _("InterWiki Address")))); foreach ($map as $moniker => $interurl) { $rows[] = HTML::tr(HTML::td($mon_attr, new Cached_WikiLinkIfKnown($moniker)), HTML::td($url_attr, HTML::tt($interurl))); } - + return HTML::table(array('class' => 'interwiki-map'), $thead, HTML::tbody(false, $rows)); @@ -422,7 +422,7 @@ class PageFormatter_attach extends PageFormatter { var $type, $prefix; - + // Display templated contents for wikiblog, comment and wikiforum function format($text) { if (empty($this->type)) @@ -439,7 +439,7 @@ $meta = $this->_meta[$this->type]; foreach(array('ctime', 'creator', 'creator_id') as $key) $tokens[$this->prefix . "_" . strtoupper($key)] = $meta[$key]; - + return new Template($this->type, $request, $tokens); } } @@ -454,12 +454,12 @@ var $type = 'wikiforum', $prefix = "FORUM"; } -/** wikiabuse for htmlarea editing. not yet used. +/** wikiabuse for htmlarea editing. not yet used. * * Warning! Once a page is edited with a htmlarea like control it is * stored in HTML and cannot be converted back to WikiText as long as - * we have no HTML => WikiText or any other interim format (WikiExchangeFormat e.g. XML) - * converter. See lib/HtmlParser.php for ongoing work on that. + * we have no HTML => WikiText or any other interim format (WikiExchangeFormat e.g. XML) + * converter. See lib/HtmlParser.php for ongoing work on that. * So it has a viral effect and certain plugins will not work anymore. * But a lot of wikiusers seem to like it. */ @@ -497,7 +497,7 @@ // We can make use of several pdf extensions. This one - fpdf // - is pure php and very easy, but looks quite ugly and has a - // terrible interface, as terrible as most of the othes. + // terrible interface, as terrible as most of the othes. // The closest to HTML is htmldoc which needs an external cgi // binary. // We use a custom HTML->PDF class converter from PHPWebthings Modified: trunk/lib/RssParser.php =================================================================== --- trunk/lib/RssParser.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/RssParser.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -12,21 +12,21 @@ */ /* - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/SemanticWeb.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -84,23 +84,23 @@ */ /*============================================================================*/ /* - Copyright 2004,2007 Reini Urban - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 2004,2007 Reini Urban + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once('lib/RssWriter.php'); @@ -403,5 +403,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/ADODB.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,26 +2,25 @@ // rcs_id('$Id$'); /* - Copyright 2002,2004,2005,2006 $ThePhpWikiProgrammingTeam + * Copyright 2002,2004,2005,2006 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ - /** * Based on PearDB.php. * @author: Lawrence Akka, Reini Urban @@ -162,7 +161,7 @@ $dbh->qstr($pagename))); return $row ? $row[0] : false; } - + function get_all_pagenames() { $dbh = &$this->_dbh; extract($this->_table_names); @@ -230,13 +229,13 @@ $where = sprintf("pagename=%s", $dbh->qstr($pagename)); $dbh->BeginTrans( ); $dbh->RowLock($page_tbl,$where); - + $data = $this->get_pagedata($pagename); if (!$data) { $data = array(); $this->_get_pageid($pagename, true); // Creates page record } - + $hits = (empty($data['hits'])) ? 0 : (int)$data['hits']; unset($data['hits']); @@ -353,7 +352,7 @@ 1); return $rs->fields ? (int)$rs->fields[0] : false; } - + /** * Get version data. * @@ -366,10 +365,10 @@ $dbh = &$this->_dbh; extract($this->_table_names); extract($this->_expressions); - + assert(is_string($pagename) and $pagename != ''); assert($version > 0); - + // FIXME: optimization: sometimes don't get page data? if ($want_content) { $fields = $this->page_tbl_fields . ", $page_tbl.pagedata AS pagedata" @@ -437,10 +436,10 @@ function set_versiondata($pagename, $version, $data) { $dbh = &$this->_dbh; $version_tbl = $this->_table_names['version_tbl']; - + $minor_edit = (int) !empty($data['is_minor_edit']); unset($data['is_minor_edit']); - + $mtime = (int)$data['mtime']; unset($data['mtime']); assert(!empty($mtime)); @@ -448,7 +447,7 @@ @$content = (string) $data['%content']; unset($data['%content']); unset($data['%pagedata']); - + $this->lock(array('page','recent','version','nonempty')); $dbh->BeginTrans( ); $dbh->CommitLock($version_tbl); @@ -468,7 +467,7 @@ else $dbh->RollbackTrans( ); $this->unlock(array('page','recent','version','nonempty')); } - + /** * Delete an old revision of a page. */ @@ -542,7 +541,7 @@ function purge_page($pagename) { $dbh = &$this->_dbh; extract($this->_table_names); - + $this->lock(array('version','recent','nonempty','page','link')); if ( ($id = $this->_get_pageid($pagename, false)) ) { $dbh->Execute("DELETE FROM $nonempty_tbl WHERE id=$id"); @@ -615,7 +614,7 @@ if ($relation) { $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto, relation)" . " VALUES ($pageid, $linkid, $relation)"); - } else { + } else { $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto)" . " VALUES ($pageid, $linkid)"); } @@ -702,7 +701,7 @@ if ($relation) { $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto, relation)" . " VALUES ($pageid, $linkid, $relation)"); - } else { + } else { $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto)" . " VALUES ($pageid, $linkid)"); } @@ -736,7 +735,7 @@ $this->unlock(array('link')); return true; } - + /** * Find pages which link to or are linked from a page. * @@ -785,7 +784,7 @@ echo "SELECT linkee.id AS id, linkee.pagename AS pagename, related.pagename as linkrelation FROM link, page linkee, page linker JOIN page related ON (link.relation=related.id) WHERE linkfrom=linker.id AND linkto=linkee.id AND linker.pagename='SanDiego'" | mysql phpwiki id pagename linkrelation 2268 California located_in -*/ +*/ if ($limit) { // extract from,count from limit list($offset,$count) = $this->limit($limit); @@ -883,7 +882,7 @@ //$dbh->SetFetchMode(ADODB_FETCH_NUM); return new WikiDB_backend_ADODB_iter($this, $result, $this->page_tbl_field_list); } - + /** * Title and fulltext search. */ @@ -894,13 +893,13 @@ extract($this->_table_names); $orderby = $this->sortby($sortby, 'db'); if ($orderby) $orderby = ' ORDER BY ' . $orderby; - + $table = "$nonempty_tbl, $page_tbl"; $join_clause = "$nonempty_tbl.id=$page_tbl.id"; $fields = $this->page_tbl_fields; $field_list = $this->page_tbl_field_list; $searchobj = new WikiDB_backend_ADODB_search($search, $dbh); - + if ($fullsearch) { $table .= ", $recent_tbl"; $join_clause .= " AND $page_tbl.id=$recent_tbl.id"; @@ -915,7 +914,7 @@ } else { $callback = new WikiMethodCb($searchobj, "_pagename_match_clause"); } - + $search_clause = $search->makeSqlClauseObj($callback); $sql = "SELECT $fields FROM $table" . " WHERE $join_clause" @@ -1000,7 +999,7 @@ $pick = array(); if ($since) $pick[] = "mtime >= $since"; - + if ($include_all_revisions) { // Include all revisions of each page. $table = "$page_tbl, $version_tbl"; @@ -1020,7 +1019,7 @@ $join_clause = "$page_tbl.id=$recent_tbl.id"; $table .= ", $version_tbl"; $join_clause .= " AND $version_tbl.id=$page_tbl.id"; - + if ($exclude_major_revisions) { // Include only most recent minor revision $pick[] = 'version=latestminor'; @@ -1068,7 +1067,7 @@ extract($this->_table_names); if ($orderby = $this->sortby($sortby, 'db', array('pagename','wantedfrom'))) $orderby = 'ORDER BY ' . $orderby; - + if ($exclude_from) // array of pagenames $exclude_from = " AND pp.pagename NOT IN ".$this->_sql_set($exclude_from); if ($exclude) // array of pagenames @@ -1107,7 +1106,7 @@ function rename_page($pagename, $to) { $dbh = &$this->_dbh; extract($this->_table_names); - + $this->lock(array('page','version','recent','nonempty','link')); if ( ($id = $this->_get_pageid($pagename, false)) ) { if ($new = $this->_get_pageid($to, false)) { @@ -1204,7 +1203,7 @@ function _lock_tables($tables, $write_lock) { return $this->_current_lock; } - + /** * Release a write lock on the tables in the SQL database. * @@ -1269,7 +1268,7 @@ function listOfTables() { return $this->_dbh->MetaTables(); } - + // other database needs another connection and other privileges. function listOfFields($database, $table) { $field_list = array(); @@ -1315,7 +1314,7 @@ $this->_fields = $field_list; } - + function count() { if (!$this->_result) { return false; @@ -1568,5 +1567,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/PDO.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,25 +2,25 @@ // rcs_id('$Id$'); /* - Copyright 2005 $ThePhpWikiProgrammingTeam + * Copyright 2005 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - /** * @author: Reini Urban */ @@ -220,7 +220,7 @@ else return false; } - + function get_all_pagenames() { $dbh = &$this->_dbh; extract($this->_table_names); @@ -292,7 +292,7 @@ $data = array(); $this->_get_pageid($pagename, true); // Creates page record } - + $hits = (empty($data['hits'])) ? 0 : (int)$data['hits']; unset($data['hits']); @@ -354,7 +354,7 @@ // attributes play this game. if ($pagename === '') return 0; - + $dbh = &$this->_dbh; $page_tbl = $this->_table_names['page_tbl']; $sth = $dbh->prepare("SELECT id FROM $page_tbl WHERE pagename=? LIMIT 1"); @@ -422,7 +422,7 @@ $sth->execute(); return $sth->fetchSingle(); } - + /** * Get version data. * @@ -435,10 +435,10 @@ $dbh = &$this->_dbh; extract($this->_table_names); extract($this->_expressions); - + assert(is_string($pagename) and $pagename != ''); assert($version > 0); - + // FIXME: optimization: sometimes don't get page data? if ($want_content) { $fields = $this->page_tbl_fields . ", $page_tbl.pagedata AS pagedata" @@ -508,10 +508,10 @@ function set_versiondata($pagename, $version, $data) { $dbh = &$this->_dbh; $version_tbl = $this->_table_names['version_tbl']; - + $minor_edit = (int) !empty($data['is_minor_edit']); unset($data['is_minor_edit']); - + $mtime = (int)$data['mtime']; unset($data['mtime']); assert(!empty($mtime)); @@ -519,7 +519,7 @@ @$content = (string) $data['%content']; unset($data['%content']); unset($data['%pagedata']); - + $this->lock(array('page','recent','version','nonempty')); $this->beginTransaction(); $id = $this->_get_pageid($pagename, true); @@ -559,7 +559,7 @@ else $this->rollBack( ); $this->unlock(array('page','recent','version','nonempty')); } - + /** * Delete an old revision of a page. */ @@ -638,7 +638,7 @@ function purge_page($pagename) { $dbh = &$this->_dbh; extract($this->_table_names); - + $this->lock(array('version','recent','nonempty','page','link')); if ( ($id = $this->_get_pageid($pagename, false)) ) { $dbh->query("DELETE FROM $version_tbl WHERE id=$id"); @@ -716,7 +716,7 @@ $this->unlock(array('link')); return true; } - + /** * Find pages which link to or are linked from a page. * @@ -832,7 +832,7 @@ $result = $sth->fetch(PDO_FETCH_BOTH); return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list); } - + /** * Title search. */ @@ -848,7 +848,7 @@ $fields = $this->page_tbl_fields; $field_list = $this->page_tbl_field_list; $searchobj = new WikiDB_backend_PDO_search($search, $dbh); - + if ($fullsearch) { $table .= ", $recent_tbl"; $join_clause .= " AND $page_tbl.id=$recent_tbl.id"; @@ -862,7 +862,7 @@ } else { $callback = new WikiMethodCb($searchobj, "_pagename_match_clause"); } - + $search_clause = $search->makeSqlClauseObj($callback); $sth = $dbh->prepare("SELECT $fields FROM $table" . " WHERE $join_clause" @@ -942,7 +942,7 @@ $pick = array(); if ($since) $pick[] = "mtime >= $since"; - + if ($include_all_revisions) { // Include all revisions of each page. $table = "$page_tbl, $version_tbl"; @@ -962,7 +962,7 @@ $join_clause = "$page_tbl.id=$recent_tbl.id"; $table .= ", $version_tbl"; $join_clause .= " AND $version_tbl.id=$page_tbl.id"; - + if ($exclude_major_revisions) { // Include only most recent minor revision $pick[] = 'version=latestminor'; @@ -1008,7 +1008,7 @@ extract($this->_table_names); if ($orderby = $this->sortby($sortby, 'db', array('pagename','wantedfrom'))) $orderby = 'ORDER BY ' . $orderby; - + if ($exclude_from) // array of pagenames $exclude_from = " AND linked.pagename NOT IN ".$this->_sql_set($exclude_from); if ($exclude) // array of pagenames @@ -1047,7 +1047,7 @@ function rename_page($pagename, $to) { $dbh = &$this->_dbh; extract($this->_table_names); - + $this->lock(array('page','version','recent','nonempty','link')); if ( ($id = $this->_get_pageid($pagename, false)) ) { if ($new = $this->_get_pageid($to, false)) { @@ -1153,7 +1153,7 @@ } $this->_dbh->query("LOCK TABLES " . join(",", $locks)); } - + /** * Release a write lock on the tables in the SQL database. * @@ -1286,7 +1286,7 @@ $this->_result = $query_result; //$this->_fields = $field_list; } - + function count() { if (!is_object($this->_result)) { return false; @@ -1497,5 +1497,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,25 +2,25 @@ // rcs_id('$Id$'); /* - Copyright 2005 $ThePhpWikiProgrammingTeam + * Copyright 2005 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - /** * @author: Reini Urban */ @@ -156,5 +156,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,25 +2,25 @@ // rcs_id('$Id$'); /* - Copyright 2007 $ThePhpWikiProgrammingTeam + * Copyright 2007 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - /** * @author: Reini Urban */ @@ -41,7 +41,7 @@ */ function _lock_tables($write_lock=true) { $dbh = &$this->_dbh; - + // Not sure if we really need to lock tables here, the Oracle row // locking mechanism should be more than enough // For the time being, lets stay on the safe side and lock... @@ -93,5 +93,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/PDO_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_pgsql.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/PDO_pgsql.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,25 +2,25 @@ // rcs_id('$Id$'); /* - Copyright 2005 $ThePhpWikiProgrammingTeam + * Copyright 2005 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - /** * @author: Reini Urban */ @@ -56,5 +56,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php =================================================================== --- trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/dumb/LinkSearchIter.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -1,23 +1,23 @@ <?php // -*-php-*- // rcs_id('$Id$'); /* - Copyright 2007 Reini Urban - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 2007 Reini Urban + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/file.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,23 +2,23 @@ // rcs_id('$Id$'); /** - Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** @@ -311,7 +311,7 @@ $this->_savePageData($pagename, $newdata); // create a new pagedata-file return; } - + foreach ($newdata as $key => $val) { if (empty($val)) unset($data[$key]); @@ -320,8 +320,8 @@ } $this->_savePageData($pagename, $data); // write new pagedata-file } - + /** * Get the current version number for a page. * @@ -332,7 +332,7 @@ function get_latest_version($pagename) { return $this->_getLatestVersion($pagename); } - + /** * Get preceding version number. * @@ -350,7 +350,7 @@ } return $prev; } - + /** * Get revision meta-data and content. * @@ -426,7 +426,7 @@ // remove page from latest_version... $this->_setLatestVersion($pagename, 0); } - + /** * Delete an old revision of a page. * @@ -453,7 +453,7 @@ } } $this->_removePage('ver_data', $pagename, $version); - } + } /** * Create a new page revision. @@ -497,7 +497,7 @@ } $this->set_versiondata($pagename, $version, $data); } - + /** * Set links for page. * @@ -508,7 +508,7 @@ function set_links($pagename, $links) { $this->_savePageLinks($pagename, $links); } - + /** * Find pages which link to or are linked from a page. * @@ -552,7 +552,7 @@ return new WikiDB_backend_dumb_AllRevisionsIter($this, $pagename); } */ - + /** * Get all pages in the database. * @@ -678,7 +678,7 @@ $search = strtolower(trim($search)); if (!$search) return array(array(),array()); - + $words = preg_split('/\s+/', $search); $exclude = array(); foreach ($words as $key => $word) { @@ -690,7 +690,7 @@ } return array($words, $exclude); } - + }; class WikiDB_backend_file_iter extends WikiDB_backend_iterator @@ -703,7 +703,7 @@ if (count($this->_result) > 0) reset($this->_result); } - + function next() { if (!$this->_result) return false; @@ -714,7 +714,7 @@ if ($e == false) { return false; } - + $pn = $e[1]; if (is_array($pn) and isset($pn['linkto'])) { // support relation link iterator $pn = $pn['linkto']; Modified: trunk/lib/WikiDB/backend/flatfile.php =================================================================== --- trunk/lib/WikiDB/backend/flatfile.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/backend/flatfile.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,23 +2,23 @@ // rcs_id('$Id$'); /** - Copyright 1999,2005,2006 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 1999,2005,2006 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** @@ -51,7 +51,7 @@ return $this->_dir_names[$type].'/'.FilenameForPage($pagename); else return $this->_dir_names[$type].'/'.FilenameForPage($pagename).'--'.$version; -*/ +*/ } // Load/Save Page-Data @@ -62,7 +62,7 @@ } } //$pd = $this->_loadPage('page_data', $pagename, 0); - + $filename = $this->_pagename2filename('page_data', $pagename, 0); if (!file_exists($filename)) return NULL; if (!filesize($filename)) return array(); @@ -85,7 +85,7 @@ } fclose($fd); } - + if ($pd != NULL) $this->_page_data = $pd; if ($this->_page_data != NULL) { @@ -95,7 +95,7 @@ } return array(); // no values found } - + /** Store latest version as full page_data flatfile, * earlier versions as file backend ver_data. * _cached_html will not be stored. @@ -114,7 +114,7 @@ $this->_savePage('ver_data', $pagename, $version, $data); } } - + // This is different to file and not yet finished. // TODO: fields not being saved as page_data should be saved to ver_data // Store as full page_data flatfile @@ -176,7 +176,7 @@ $pagedata .= sprintf("Mime-Version: 1.0 (Produced by PhpWiki %s)\r\n", PHPWIKI_VERSION); $pagedata .= MimeifyPageRevision($page, $current); - + if ($fd = fopen($filename, 'a+b')) { $locked = flock($fd, 2); // Exclusive blocking lock if (!$locked) { Modified: trunk/lib/WikiDB/file.php =================================================================== --- trunk/lib/WikiDB/file.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/file.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -3,23 +3,23 @@ // rcs_id( '$Id$' ); /** - Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 1999, 2000, 2001, 2002, 2003 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -55,6 +55,6 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: +// End: ?> Modified: trunk/lib/WikiDB/flatfile.php =================================================================== --- trunk/lib/WikiDB/flatfile.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/WikiDB/flatfile.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -1,28 +1,26 @@ <?php - // rcs_id( '$Id$' ); /** - Copyright 1999, 2005 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Copyright 1999, 2005 $ThePhpWikiProgrammingTeam + * + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - require_once( 'lib/WikiDB.php' ); require_once( 'lib/WikiDB/backend/flatfile.php' ); @@ -55,6 +53,5 @@ // c-basic-offset: 4 // c-hanging-comment-ender-p: nil // indent-tabs-mode: nil -// End: - +// End: ?> Modified: trunk/lib/XmlParser.php =================================================================== --- trunk/lib/XmlParser.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/XmlParser.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -21,21 +21,21 @@ */ /* - This file is part of PhpWiki. - - PhpWiki 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. - - PhpWiki is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with PhpWiki; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * This file is part of PhpWiki. + * + * PhpWiki 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. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpWiki; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** @@ -79,7 +79,7 @@ if (!empty($this->_parser)) xml_parser_free($this->_parser); unset($this->_parser); - + if (isset($xml_parser_root)) { $xml_parser_root->_destruct(); unset($xml_parser_root); // nested parsing forbidden! Modified: trunk/lib/install.php =================================================================== --- trunk/lib/install.php 2010-08-11 12:33:25 UTC (rev 7640) +++ trunk/lib/install.php 2010-08-11 13:00:46 UTC (rev 7641) @@ -2,23 +2,23 @@ // rcs_id('$Id$'); /* - Copyright 2004 $ThePhpWikiProgrammingTeam - - This file is part of PhpWiki. - - PhpWiki 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 late... [truncated message content] |