From: <var...@us...> - 2016-10-10 12:26:46
|
Revision: 9949 http://sourceforge.net/p/phpwiki/code/9949 Author: vargenau Date: 2016-10-10 12:26:44 +0000 (Mon, 10 Oct 2016) Log Message: ----------- Add standard file header Modified Paths: -------------- trunk/lib/DbSession.php trunk/lib/DbaDatabase.php trunk/lib/DbaPartition.php trunk/lib/ErrorManager.php trunk/lib/ExternalReferrer.php trunk/lib/FileFinder.php trunk/lib/Google.php trunk/lib/HtmlElement.php trunk/lib/HttpClient.php trunk/lib/RssWriter.php trunk/lib/RssWriter091.php trunk/lib/RssWriter2.php trunk/lib/Template.php trunk/lib/TextSearchQuery.php trunk/lib/Units.php trunk/lib/WikiCallback.php trunk/lib/WikiDB.php trunk/lib/WikiPlugin.php trunk/lib/XmlElement.php trunk/lib/XmlRpcClient.php trunk/lib/config.php trunk/lib/editpage.php trunk/lib/fortune.php trunk/lib/mimelib.php trunk/lib/prepend.php trunk/lib/purgepage.php trunk/lib/removepage.php trunk/lib/spam_babycart.php Modified: trunk/lib/DbSession.php =================================================================== --- trunk/lib/DbSession.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/DbSession.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,27 @@ <?php +/** + * Copyright © 2002,2004-2005 Reini Urban + * Copyright © 2003 Jeff Dairiki + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ /** * Store sessions data in Pear DB / ADODB / dba / PDO, .... Modified: trunk/lib/DbaDatabase.php =================================================================== --- trunk/lib/DbaDatabase.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/DbaDatabase.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001 Jeff Dairiki + * Copyright © 2001-2002 Carsten Klapp + * Copyright © 2004-2006,2009-2010 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ require_once 'lib/ErrorManager.php'; Modified: trunk/lib/DbaPartition.php =================================================================== --- trunk/lib/DbaPartition.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/DbaPartition.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,27 @@ <?php +/** + * Copyright © 2001 Jeff Dairiki + * Copyright © 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ class DbaPartition { Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/ErrorManager.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2002 Carsten Klapp + * Copyright © 2002,2004-2008 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ if (isset($GLOBALS['ErrorManager'])) return; Modified: trunk/lib/ExternalReferrer.php =================================================================== --- trunk/lib/ExternalReferrer.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/ExternalReferrer.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,5 +1,28 @@ <?php /** + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/** * Detect external referrers * Currently only search engines, and highlight the searched item. * Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/FileFinder.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2003 Carsten Klapp + * Copyright © 2002,2004-2005,2007,2010 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ require_once(dirname(__FILE__) . '/stdlib.php'); Modified: trunk/lib/Google.php =================================================================== --- trunk/lib/Google.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/Google.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,36 +1,41 @@ <?php /** + * Copyright © 2002 Intercept Vector + * Copyright © 2004 Reini Urban + * + * This file is part of PhpWiki. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA. + * + * SPDX-License-Identifier: LGPL-2.1+ + * + */ + +/** * Google API * * @author: Chris Petersen, Reini Urban - */ -/* - Copyright (c) 2002 Intercept Vector - Copyright (c) 2004 Reini Urban - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - If you have any questions or comments, please email: - - Chris Petersen - ad...@in... - Intercept Vector - http://www.interceptvector.com -*/ - -/* + * + * If you have any questions or comments, please email: + * + * Chris Petersen + * ad...@in... + * Intercept Vector + * http://www.interceptvector.com + * * @seealso: http://scripts.incutio.com/google/ */ Modified: trunk/lib/HtmlElement.php =================================================================== --- trunk/lib/HtmlElement.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/HtmlElement.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,5 +1,29 @@ <?php /** + * Copyright © 2010 Reini Urban + * Copyright © 2014 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/** * Code for writing the HTML subset of XML. * @author: Jeff Dairiki * Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/HttpClient.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,12 +1,32 @@ <?php +/** + * Copyright © 2003 Simon Willison, Incutio Limited + * Copyright © 2004,2006-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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: Artistic-1.0+ + * + */ /** Version 0.9, 6th April 2003 - Simon Willison ( http://simon.incutio.com/ ) Manual: http://scripts.incutio.com/httpclient/ -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 Todo: proxy support */ Modified: trunk/lib/RssWriter.php =================================================================== --- trunk/lib/RssWriter.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/RssWriter.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,29 @@ <?php +/** + * Copyright © 2001-2002 Jeff Dairiki + * Copyright © 2002 Carsten Klapp + * Copyright © 2004,2007,2009 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + /* * Code for creating RSS 1.0. */ Modified: trunk/lib/RssWriter091.php =================================================================== --- trunk/lib/RssWriter091.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/RssWriter091.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,21 +1,30 @@ <?php +/** + * Copyright © 2002 Lawrence Akka + * Copyright © 2002-2003 Jeff Dairiki + * Copyright © 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + // ---------------------------------------------------------------------- -// phpWiki -// ---------------------------------------------------------------------- -// LICENSE -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License (GPL) -// 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 for more details. -// -// To read the license please visit http://www.gnu.org/copyleft/gpl.html -// ---------------------------------------------------------------------- // Original Author of file: Lawrence Akka // Purpose of file: Plugin and associated classes // for outputting RecentChanges in RSS 0.91 format Modified: trunk/lib/RssWriter2.php =================================================================== --- trunk/lib/RssWriter2.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/RssWriter2.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,27 @@ <?php +/** + * Copyright © 2004-2005 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + /* * Code for creating RSS 2.0 * Author: Reini Urban for PhpWiki Modified: trunk/lib/Template.php =================================================================== --- trunk/lib/Template.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/Template.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2003 Carsten Klapp + * Copyright © 2002,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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ require_once 'lib/ErrorManager.php'; Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/TextSearchQuery.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,5 +1,29 @@ <?php /** + * Copyright © 2001-2002 Jeff Dairiki + * Copyright © 2004-2009 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/** * A text search query, converting queries to PCRE and SQL matchers. * * This represents an enhanced "Google-like" text search query: Modified: trunk/lib/Units.php =================================================================== --- trunk/lib/Units.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/Units.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,6 +1,29 @@ <?php /** + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/** + * * Interface to man units(1), /usr/share/units.dat * * $ units "372.0 mi2" Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/WikiCallback.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,27 @@ <?php +/** + * Copyright © 2001 Jeff Dairiki + * Copyright © 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ /** * A callback Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/WikiDB.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,30 @@ <?php +/** + * Copyright © 2001-2002 Jeff Dairiki + * Copyright © 2002 Lawrence Akka + * Copyright © 2003 Carsten Klapp + * Copyright © 2002,2004-2010 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + require_once 'lib/PageType.php'; /** Modified: trunk/lib/WikiPlugin.php =================================================================== --- trunk/lib/WikiPlugin.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/WikiPlugin.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2002-2003 Carsten Klapp + * Copyright © 2002,2004-2005,2007-2008 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ abstract class WikiPlugin { Modified: trunk/lib/XmlElement.php =================================================================== --- trunk/lib/XmlElement.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/XmlElement.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,5 +1,31 @@ <?php /** + * Copyright © 2002 Carsten Klapp + * Copyright © 2002-2003 Jeff Dairiki + * Copyright © 2002,2004-2008,2010 Reini Urban + * Copyright © 2010 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/** * Code for writing XML. * @package Markup * @author: Jeff Dairiki, Modified: trunk/lib/XmlRpcClient.php =================================================================== --- trunk/lib/XmlRpcClient.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/XmlRpcClient.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,7 +1,28 @@ <?php +/* 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ -/* Copyright (C) 2002, Lawrence Akka <la...@us...> - * Copyright (C) 2004,2005,2006 $ThePhpWikiProgrammingTeam +/* Copyright © 2002, Lawrence Akka <la...@us...> + * Copyright © 2004,2005,2006 $ThePhpWikiProgrammingTeam */ // All these global declarations that this file // XmlRpcClient.php can be included within a function body Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/config.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,33 @@ <?php +/** + * Copyright © 2000-2001 Arno Hollosi + * Copyright © 2000-2001 Steve Wainstead + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2002-2002 Carsten Klapp + * Copyright © 2002-2002 Lawrence Akka + * Copyright © 2002,2004-2009 Reini Urban + * Copyright © 2008-2014 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + /* * NOTE: The settings here should probably not need to be changed. * The user-configurable settings have been moved to IniConfig.php Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/editpage.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,35 @@ <?php +/** + * Copyright © 2000 Steve Wainstead + * Copyright © 2000-2001 Arno Hollosi + * Copyright © 2001 Joel Uckelman + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2003 Carsten Klapp + * Copyright © 2002 Lawrence Akka + * Copyright © 2004-2009 Reini Urban + * Copyright © 2007 Sabri Labbenes + * Copyright © 2008-2015 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + require_once 'lib/Template.php'; require_once 'lib/WikiUser.php'; Modified: trunk/lib/fortune.php =================================================================== --- trunk/lib/fortune.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/fortune.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,30 @@ <?php +/** + * Copyright © 2004 Henrik Aasted Sørensen + * Copyright © 2004,2007 Reini Urban + * Copyright © 2014 Marc-Etienne Vargenau, Alcatel-Lucent + + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + // PHP Fortune - Made by he...@aa.... HP: http://www.aasted.org /* Modified: trunk/lib/mimelib.php =================================================================== --- trunk/lib/mimelib.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/mimelib.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,31 @@ <?php +/** + * Copyright © 2000 Steve Wainstead + * Copyright © 2001 Arno Hollosi + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2003 Carsten Klapp + * Copyright © 2004-2008 Reini Urban + * Copyright © 2009-2015 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ /** * Routines for Mime mailification of pages. Modified: trunk/lib/prepend.php =================================================================== --- trunk/lib/prepend.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/prepend.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,6 +1,31 @@ <?php -/* lib/prepend.php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2002 Carsten Klapp + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +/* + * * Things which must be done and defined before anything else. */ Modified: trunk/lib/purgepage.php =================================================================== --- trunk/lib/purgepage.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/purgepage.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,26 @@ <?php +/** + * Copyright © 2008-2009,2011 Marc-Etienne Vargenau, Alcatel-Lucent + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ require_once 'lib/Template.php'; Modified: trunk/lib/removepage.php =================================================================== --- trunk/lib/removepage.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/removepage.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,4 +1,28 @@ <?php +/** + * Copyright © 2001-2003 Jeff Dairiki + * Copyright © 2001-2002 Carsten Klapp + * Copyright © 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ require_once 'lib/Template.php'; Modified: trunk/lib/spam_babycart.php =================================================================== --- trunk/lib/spam_babycart.php 2016-10-07 16:41:52 UTC (rev 9948) +++ trunk/lib/spam_babycart.php 2016-10-10 12:26:44 UTC (rev 9949) @@ -1,13 +1,36 @@ <?php +/** + * Copyright © 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + /* -* Author: Bob Apthorpe <apt...@cy...> -* Proof-of-concept PHP fragment to flag blog/wiki spam -* -* URL: <http://www.cynistar.net/~apthorpe/code/babycart/babycart.html> -* INSTALL: -* cpan Blog::SpamAssassin -* copy contrib/babycart to /usr/local/bin/ -*/ + * Author: Bob Apthorpe <apt...@cy...> + * Proof-of-concept PHP fragment to flag blog/wiki spam + * + * URL: <http://www.cynistar.net/~apthorpe/code/babycart/babycart.html> + * INSTALL: + * cpan Blog::SpamAssassin + * copy contrib/babycart to /usr/local/bin/ + */ function check_babycart(&$text, $ip) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-10-10 12:28:03
|
Revision: 9950 http://sourceforge.net/p/phpwiki/code/9950 Author: vargenau Date: 2016-10-10 12:28:00 +0000 (Mon, 10 Oct 2016) Log Message: ----------- Add SPDX-License-Identifier Modified Paths: -------------- trunk/lib/ArchiveCleaner.php trunk/lib/AtomParser.php trunk/lib/BlockParser.php trunk/lib/CachedMarkup.php trunk/lib/Captcha.php trunk/lib/DbSession/ADODB.php trunk/lib/DbSession/PDO.php trunk/lib/DbSession/SQL.php trunk/lib/DbSession/dba.php trunk/lib/HtmlParser.php trunk/lib/IniConfig.php trunk/lib/InlineParser.php trunk/lib/MailNotify.php trunk/lib/PageList.php trunk/lib/PagePerm.php trunk/lib/PageType.php trunk/lib/Request.php trunk/lib/RssParser.php trunk/lib/SemanticWeb.php trunk/lib/SpamBlocklist.php trunk/lib/WikiGroup.php trunk/lib/WikiPluginCached.php trunk/lib/WikiTheme.php trunk/lib/WikiUser/AdoDb.php trunk/lib/WikiUser/BogoLogin.php trunk/lib/WikiUser/Db.php trunk/lib/WikiUser/Facebook.php trunk/lib/WikiUser/File.php trunk/lib/WikiUser/Forbidden.php trunk/lib/WikiUser/FusionForge.php trunk/lib/WikiUser/HttpAuth.php trunk/lib/WikiUser/HttpAuthUpper.php trunk/lib/WikiUser/IMAP.php trunk/lib/WikiUser/LDAP.php trunk/lib/WikiUser/LdapUpper.php trunk/lib/WikiUser/OpenID.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/WikiUser.php trunk/lib/XmlParser.php trunk/lib/XmlRpcServer.php trunk/lib/diff.php trunk/lib/diff3.php trunk/lib/difflib.php trunk/lib/display.php trunk/lib/imagecache.php trunk/lib/install.php trunk/lib/loadsave.php trunk/lib/main.php trunk/lib/pdf.php trunk/lib/stdlib.php trunk/lib/upgrade.php Modified: trunk/lib/ArchiveCleaner.php =================================================================== --- trunk/lib/ArchiveCleaner.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/ArchiveCleaner.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,6 @@ <?php -/* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> +/** + * Copyright © 2002 Geoffrey T. Dairiki <da...@da...> * * This file is part of PhpWiki. * @@ -16,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class ArchiveCleaner Modified: trunk/lib/AtomParser.php =================================================================== --- trunk/lib/AtomParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/AtomParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2010 Sébastien Le Callonnec +/** + * Copyright © 2010 Sébastien Le Callonnec * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** * This class is a poor-man Atom parser, it does no validation of the feed. Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/BlockParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> - * Copyright (C) 2004,2005 Reini Urban - * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2002 Geoffrey T. Dairiki <da...@da...> + * Copyright © 2004,2005 Reini Urban + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ require_once 'lib/CachedMarkup.php'; require_once 'lib/InlineParser.php'; Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/CachedMarkup.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> - * Copyright (C) 2004-2010 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2002 Geoffrey T. Dairiki <da...@da...> + * Copyright © 2004-2010 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ require_once 'lib/Units.php'; Modified: trunk/lib/Captcha.php =================================================================== --- trunk/lib/Captcha.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/Captcha.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -19,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with This File; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class Captcha Modified: trunk/lib/DbSession/ADODB.php =================================================================== --- trunk/lib/DbSession/ADODB.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/DbSession/ADODB.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2005 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2005 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** @@ -24,6 +27,7 @@ * * @author: Reini Urban */ + class DbSession_ADODB extends DbSession { Modified: trunk/lib/DbSession/PDO.php =================================================================== --- trunk/lib/DbSession/PDO.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/DbSession/PDO.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2005 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2005 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** @@ -24,6 +27,7 @@ * * @author: Reini Urban */ + class DbSession_PDO extends DbSession { Modified: trunk/lib/DbSession/SQL.php =================================================================== --- trunk/lib/DbSession/SQL.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/DbSession/SQL.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2005 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2005 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/DbSession/dba.php =================================================================== --- trunk/lib/DbSession/dba.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/DbSession/dba.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2005 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2005 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** DBA Sessions @@ -29,6 +32,7 @@ * the db is opened and closed for each access. * @author: Reini Urban. */ + class DbSession_dba extends DbSession { Modified: trunk/lib/HtmlParser.php =================================================================== --- trunk/lib/HtmlParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/HtmlParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2004 Reini Urban +/** + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/IniConfig.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam - * Copyright 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/InlineParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> - * Copyright (C) 2004-2010 Reini Urban - * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2002 Geoffrey T. Dairiki <da...@da...> + * Copyright © 2004-2010 Reini Urban + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/MailNotify.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,7 @@ <?php -/* Copyright (C) 2006-2007,2009 Reini Urban - * Copyright (C) 2009 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2006-2007,2009 Reini Urban + * Copyright © 2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -17,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/PageList.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,7 @@ <?php -/* Copyright (C) 2004-2010 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2004-2010 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -17,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/PagePerm.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright 2004,2007 $ThePhpWikiProgrammingTeam - * Copyright 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2004,2007 $ThePhpWikiProgrammingTeam + * Copyright © 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/PageType.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 1999,2000,2001,2002,2003,2004,2005,2006 $ThePhpWikiProgrammingTeam +/** + * Copyright © 1999,2000,2001,2002,2003,2004,2005,2006 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ require_once 'lib/CachedMarkup.php'; Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/Request.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2002,2004,2005,2006,2009 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2002,2004,2005,2006,2009 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class Request Modified: trunk/lib/RssParser.php =================================================================== --- trunk/lib/RssParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/RssParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,5 @@ <?php -/* +/** * This file is part of PhpWiki. * * PhpWiki is free software; you can redistribute it and/or modify @@ -15,6 +15,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/SemanticWeb.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2004,2007 Reini Urban +/** + * Copyright © 2004,2007 Reini Urban * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/SpamBlocklist.php =================================================================== --- trunk/lib/SpamBlocklist.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/SpamBlocklist.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,6 @@ <?php -/* Copyright (C) 2005 Reini Urban +/** + * Copyright © 2005 Reini Urban * * This file is part of PhpWiki. * @@ -17,6 +18,9 @@ * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * SPDX-License-Identifier: GPL-2.0+ + * + * */ /* Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiGroup.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright (C) 2003, 2004 $ThePhpWikiProgrammingTeam - * Copyright (C) 2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2003, 2004 $ThePhpWikiProgrammingTeam + * Copyright © 2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ if (!defined('GROUP_METHOD') or Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiPluginCached.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright (C) 2002 Johannes Große - * Copyright (C) 2004,2007 Reini Urban +/** + * Copyright © 2002 Johannes Große + * Copyright © 2004,2007 Reini Urban * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiTheme.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,6 @@ <?php -/* Copyright (C) 2002,2004,2005,2006,2008,2009,2010 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2002,2004,2005,2006,2008,2009,2010 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -16,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/WikiUser/AdoDb.php =================================================================== --- trunk/lib/WikiUser/AdoDb.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/AdoDb.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ include_once 'lib/WikiUser/Db.php'; Modified: trunk/lib/WikiUser/BogoLogin.php =================================================================== --- trunk/lib/WikiUser/BogoLogin.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/BogoLogin.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Without stored password. A _BogoLoginPassUser with password Modified: trunk/lib/WikiUser/Db.php =================================================================== --- trunk/lib/WikiUser/Db.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/Db.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/WikiUser/Facebook.php =================================================================== --- trunk/lib/WikiUser/Facebook.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/Facebook.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2009 Reini Urban +/** + * Copyright © 2009 Reini Urban * * This file is part of PhpWiki. * @@ -19,6 +18,9 @@ * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * SPDX-License-Identifier: GPL-2.0+ + * + * * From http://developeronline.blogspot.com/2008/10/using-perl-against-facebook-part-i.html: * GET 'http://www.facebook.com/login.php', and rest our virtual browser there to collect the cookies * POST to 'https://login.facebook.com/login.php' with the proper parameters Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/File.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class _FilePassUser Modified: trunk/lib/WikiUser/Forbidden.php =================================================================== --- trunk/lib/WikiUser/Forbidden.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/Forbidden.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,12 +17,16 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** * The PassUser name gets created automatically. * That's why this class is empty, but must exist. */ + class _ForbiddenPassUser extends _ForbiddenUser { Modified: trunk/lib/WikiUser/FusionForge.php =================================================================== --- trunk/lib/WikiUser/FusionForge.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/FusionForge.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - /* - * Copyright (C) 2006 Alain Peyrat + * Copyright © 2006 Alain Peyrat * * This file is part of PhpWiki. * @@ -18,11 +17,15 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Call the FusionForge functions to get the username * */ + class _FusionForgePassUser extends _PassUser { Modified: trunk/lib/WikiUser/HttpAuth.php =================================================================== --- trunk/lib/WikiUser/HttpAuth.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/HttpAuth.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** @@ -32,6 +34,7 @@ * Try the available auth methods (most likely Bogo) and sent this header back. * header('Authorization: Basic '.base64_encode("$userid:$passwd")."\r\n"; */ + class _HttpAuthPassUser extends _PassUser { Modified: trunk/lib/WikiUser/HttpAuthUpper.php =================================================================== --- trunk/lib/WikiUser/HttpAuthUpper.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/HttpAuthUpper.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004,2007 ReiniUrban +/** + * Copyright © 2004,2007 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** @@ -33,6 +35,7 @@ * Try the available auth methods (most likely Bogo) and sent this header back. * header('Authorization: Basic '.base64_encode("$userid:$passwd")."\r\n"; */ + class _HttpAuthUpperPassUser extends _PassUser { Modified: trunk/lib/WikiUser/IMAP.php =================================================================== --- trunk/lib/WikiUser/IMAP.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/IMAP.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2004 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class _IMAPPassUser Modified: trunk/lib/WikiUser/LDAP.php =================================================================== --- trunk/lib/WikiUser/LDAP.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/LDAP.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004,2007 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2004,2007 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ class _LDAPPassUser Modified: trunk/lib/WikiUser/LdapUpper.php =================================================================== --- trunk/lib/WikiUser/LdapUpper.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/LdapUpper.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2007,2009 Reini Urban +/** + * Copyright © 2007,2009 Reini Urban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ include_once 'lib/WikiUser/LDAP.php'; Modified: trunk/lib/WikiUser/OpenID.php =================================================================== --- trunk/lib/WikiUser/OpenID.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/OpenID.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2010 ReiniUrban +/** + * Copyright © 2010 ReiniUrban * Zend_OpenId_Consumer parts from Zend licensed under * http://framework.zend.com/license/new-bsd * @@ -21,6 +20,9 @@ * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * SPDX-License-Identifier: GPL-2.0+ + * + * * This is not yet finished. We do not want to use zend extensions. * * See http://openid.net/specs/openid-authentication-1_1.html Modified: trunk/lib/WikiUser/POP3.php =================================================================== --- trunk/lib/WikiUser/POP3.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/POP3.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2004 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ require_once 'lib/WikiUser/IMAP.php'; Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/PdoDb.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004, 2005 ReiniUrban +/** + * Copyright © 2004, 2005 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ include_once 'lib/WikiUser/Db.php'; Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/PearDb.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,7 +17,11 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ + include_once 'lib/WikiUser/Db.php'; class _PearDbPassUser Modified: trunk/lib/WikiUser/PersonalPage.php =================================================================== --- trunk/lib/WikiUser/PersonalPage.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/PersonalPage.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/WikiUser/Session.php =================================================================== --- trunk/lib/WikiUser/Session.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser/Session.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,6 @@ <?php - -/* - * Copyright (C) 2004 ReiniUrban +/** + * Copyright © 2004 ReiniUrban * * This file is part of PhpWiki. * @@ -18,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** @@ -27,6 +29,7 @@ * define('AUTH_SESS_USER','userid'); * define('AUTH_SESS_LEVEL',2); */ + class _SessionPassUser extends _PassUser { Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/WikiUser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,8 @@ <?php -/* Copyright (C) 2004,2005,2006,2007,2009,2010 $ThePhpWikiProgrammingTeam - * Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent - * Copyright (C) 2009-2010 Roger Guignard, Alcatel-Lucent +/** + * Copyright © 2004,2005,2006,2007,2009,2010 $ThePhpWikiProgrammingTeam + * Copyright © 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright © 2009-2010 Roger Guignard, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/XmlParser.php =================================================================== --- trunk/lib/XmlParser.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/XmlParser.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,5 @@ <?php -/* +/** * This file is part of PhpWiki. * * PhpWiki is free software; you can redistribute it and/or modify @@ -15,6 +15,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/XmlRpcServer.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright (C) 2002, Lawrence Akka <la...@us...> - * Copyright (C) 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2002, Lawrence Akka <la...@us...> + * Copyright © 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /* Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/diff.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2000, 2001 Geoffrey T. Dairiki <da...@da...> +/** + * Copyright © 2000, 2001 Geoffrey T. Dairiki <da...@da...> * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ // diff.php Modified: trunk/lib/diff3.php =================================================================== --- trunk/lib/diff3.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/diff3.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2001 Geoffrey T. Dairiki <da...@da...> +/** + * Copyright © 2001 Geoffrey T. Dairiki <da...@da...> * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ // diff3.php Modified: trunk/lib/difflib.php =================================================================== --- trunk/lib/difflib.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/difflib.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2000, 2001 Geoffrey T. Dairiki <da...@da...> +/** + * Copyright © 2000, 2001 Geoffrey T. Dairiki <da...@da...> * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ // difflib.php Modified: trunk/lib/display.php =================================================================== --- trunk/lib/display.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/display.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,5 +1,6 @@ <?php -/* Copyright (C) 2004-2011 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2004-2011 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -16,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ // display.php: fetch page or get default content Modified: trunk/lib/imagecache.php =================================================================== --- trunk/lib/imagecache.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/imagecache.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright (C) 2002 Johannes Große +/** + * Copyright © 2002 Johannes Große * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/install.php =================================================================== --- trunk/lib/install.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/install.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,6 +1,6 @@ <?php -/* - * Copyright 2004 $ThePhpWikiProgrammingTeam +/** + * Copyright © 2004 $ThePhpWikiProgrammingTeam * * This file is part of PhpWiki. * @@ -17,6 +17,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/loadsave.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright 1999,2000,2001,2002,2004,2005,2006,2007 $ThePhpWikiProgrammingTeam - * Copyright 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 1999,2000,2001,2002,2004,2005,2006,2007 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ require_once 'lib/mimelib.php'; Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/main.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,8 +1,8 @@ <?php -/* - * Copyright 1999-2008 $ThePhpWikiProgrammingTeam - * Copyright (C) 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent - * Copyright (C) 2009 Roger Guignard, Alcatel-Lucent +/** + * Copyright © 1999-2008 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2010 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright © 2009 Roger Guignard, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -19,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ define ('USE_PREFS_IN_PAGE', true); Modified: trunk/lib/pdf.php =================================================================== --- trunk/lib/pdf.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/pdf.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,8 +1,8 @@ <?php -/* - * Copyright (C) 2003 Olivier PLATHEY - * Copyright (C) 200? Don Sebà - * Copyright (C) 2004,2006,2007 Reini Urban +/** + * Copyright © 2003 Olivier PLATHEY + * Copyright © 200? Don Sebà + * Copyright © 2004,2006,2007 Reini Urban * * This file is part of PhpWiki. * @@ -19,6 +19,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ //define("USE_EXTERNAL_HTML2PDF", "htmldoc --quiet --format pdf14 --jpeg --webpage --no-toc --no-title %s"); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/stdlib.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright 1999-2008 $ThePhpWikiProgrammingTeam - * Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 1999-2008 $ThePhpWikiProgrammingTeam + * Copyright © 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /* Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2016-10-10 12:26:44 UTC (rev 9949) +++ trunk/lib/upgrade.php 2016-10-10 12:28:00 UTC (rev 9950) @@ -1,7 +1,7 @@ <?php -/* - * Copyright 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam - * Copyright 2008 Marc-Etienne Vargenau, Alcatel-Lucent +/** + * Copyright © 2004,2005,2006,2007 $ThePhpWikiProgrammingTeam + * Copyright © 2008 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. * @@ -18,6 +18,9 @@ * You should have received a copy of the GNU General Public License along * with PhpWiki; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * SPDX-License-Identifier: GPL-2.0+ + * */ /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-10-10 12:30:09
|
Revision: 9951 http://sourceforge.net/p/phpwiki/code/9951 Author: vargenau Date: 2016-10-10 12:30:07 +0000 (Mon, 10 Oct 2016) Log Message: ----------- ReiniUrban --> Reini Urban Modified Paths: -------------- trunk/lib/WikiGroup.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/OpenID.php trunk/lib/WikiUser/PdoDb.php trunk/lib/WikiUser/PearDb.php trunk/lib/WikiUser/PersonalPage.php trunk/lib/WikiUser/Session.php trunk/lib/config.php trunk/lib/plugin/AddComment.php trunk/lib/plugin/FileInfo.php trunk/lib/plugin/IncludePages.php trunk/lib/plugin/ModeratedPage.php trunk/lib/plugin/SqlResult.php trunk/lib/plugin/UpLoad.php trunk/lib/plugin/WikiBlog.php trunk/lib/plugin/WikiPoll.php Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiGroup.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -609,7 +609,7 @@ * GroupDb is configured by $DbAuthParams[] statements * * Fixme: adodb - * @author ReiniUrban + * @author Reini Urban */ class GroupDb extends WikiGroup { @@ -655,7 +655,7 @@ /** * PearDB methods * - * @author ReiniUrban + * @author Reini Urban */ class GroupDb_PearDB extends GroupDb { @@ -743,7 +743,7 @@ /** * ADODB methods * - * @author ReiniUrban + * @author Reini Urban */ class GroupDb_ADODB extends GroupDb { @@ -838,7 +838,7 @@ * GroupFile is configured by AUTH_GROUP_FILE * groupname: user1 user2 ... * - * @author ReiniUrban + * @author Reini Urban */ class GroupFile extends WikiGroup { @@ -944,7 +944,7 @@ /** * Ldap is configured in index.php * - * @author ReiniUrban + * @author Reini Urban */ class GroupLdap extends WikiGroup { Modified: trunk/lib/WikiUser/BogoLogin.php =================================================================== --- trunk/lib/WikiUser/BogoLogin.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/BogoLogin.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/Db.php =================================================================== --- trunk/lib/WikiUser/Db.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/Db.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/File.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/Forbidden.php =================================================================== --- trunk/lib/WikiUser/Forbidden.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/Forbidden.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/HttpAuth.php =================================================================== --- trunk/lib/WikiUser/HttpAuth.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/HttpAuth.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/HttpAuthUpper.php =================================================================== --- trunk/lib/WikiUser/HttpAuthUpper.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/HttpAuthUpper.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004,2007 ReiniUrban + * Copyright © 2004,2007 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/OpenID.php =================================================================== --- trunk/lib/WikiUser/OpenID.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/OpenID.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2010 ReiniUrban + * Copyright © 2010 Reini Urban * Zend_OpenId_Consumer parts from Zend licensed under * http://framework.zend.com/license/new-bsd * Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/PdoDb.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004, 2005 ReiniUrban + * Copyright © 2004, 2005 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/PearDb.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/PersonalPage.php =================================================================== --- trunk/lib/WikiUser/PersonalPage.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/PersonalPage.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/WikiUser/Session.php =================================================================== --- trunk/lib/WikiUser/Session.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/WikiUser/Session.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -1,6 +1,6 @@ <?php /** - * Copyright © 2004 ReiniUrban + * Copyright © 2004 Reini Urban * * This file is part of PhpWiki. * Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/config.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -61,7 +61,7 @@ /** * Browser Detection Functions * - * @author: ReiniUrban + * @author: Reini Urban */ function browserAgent() { Modified: trunk/lib/plugin/AddComment.php =================================================================== --- trunk/lib/plugin/AddComment.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/AddComment.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -29,7 +29,7 @@ * TODO: * For admin user, put checkboxes beside comments to allow for bulk removal. * - * @author: ReiniUrban + * @author: Reini Urban */ include_once 'lib/plugin/WikiBlog.php'; Modified: trunk/lib/plugin/FileInfo.php =================================================================== --- trunk/lib/plugin/FileInfo.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/FileInfo.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -32,7 +32,7 @@ * <<FileInfo file=Upload:setup.exe display=name,version,date * format="%s (version: %s, date: %s)" >> * - * @author: ReiniUrban + * @author: Reini Urban */ class WikiPlugin_FileInfo Modified: trunk/lib/plugin/IncludePages.php =================================================================== --- trunk/lib/plugin/IncludePages.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/IncludePages.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -25,7 +25,7 @@ /** * IncludePages: Include a list of multiple pages, based on IncludePage. * usage: <<IncludePages pages=<!plugin-list BackLinks !> >> - * author: ReiniUrban + * author: Reini Urban */ include_once 'lib/plugin/IncludePage.php'; Modified: trunk/lib/plugin/ModeratedPage.php =================================================================== --- trunk/lib/plugin/ModeratedPage.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/ModeratedPage.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -32,7 +32,7 @@ * Not yet ready! part 3/3 is missing: The moderator approve/reject methods. * * See http://phpwiki.fr/Help/ModeratedPagePlugin - * Author: ReiniUrban + * Author: Reini Urban */ require_once 'lib/WikiPlugin.php'; Modified: trunk/lib/plugin/SqlResult.php =================================================================== --- trunk/lib/plugin/SqlResult.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/SqlResult.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -55,7 +55,7 @@ * ORDER BY m.date DESC * >> * - * @author: ReiniUrban + * @author: Reini Urban */ require_once 'lib/PageList.php'; Modified: trunk/lib/plugin/UpLoad.php =================================================================== --- trunk/lib/plugin/UpLoad.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/UpLoad.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -28,7 +28,7 @@ * which should preferably be added to the InterWikiMap * Usage: <<UpLoad>> * Author: NathanGass <ga...@io...> - * Changes: ReiniUrban <ru...@x-...>, + * Changes: Reini Urban <ru...@x-...>, * qubit <rt...@da...> * Marc-Etienne Vargenau, Alcatel-Lucent */ Modified: trunk/lib/plugin/WikiBlog.php =================================================================== --- trunk/lib/plugin/WikiBlog.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/WikiBlog.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -24,7 +24,7 @@ /** * @author: MichaelVanDam, major refactor by JeffDairiki (as AddComment) - * @author: Changed as baseclass to AddComment and WikiForum and EditToolbar integration by ReiniUrban. + * @author: Changed as baseclass to AddComment and WikiForum and EditToolbar integration by Reini Urban. */ require_once 'lib/TextSearchQuery.php'; Modified: trunk/lib/plugin/WikiPoll.php =================================================================== --- trunk/lib/plugin/WikiPoll.php 2016-10-10 12:28:00 UTC (rev 9950) +++ trunk/lib/plugin/WikiPoll.php 2016-10-10 12:30:07 UTC (rev 9951) @@ -30,7 +30,7 @@ * admin page (view and reset statistics) * for now only radio, support checkboxes (multiple selections) also? * - * Author: ReiniUrban + * Author: Reini Urban */ class WikiPlugin_WikiPoll This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-10-10 13:21:44
|
Revision: 9956 http://sourceforge.net/p/phpwiki/code/9956 Author: vargenau Date: 2016-10-10 13:21:42 +0000 (Mon, 10 Oct 2016) Log Message: ----------- Remove functions to test browser: browserVersion, isBrowserKonqueror, isBrowserSafari, isBrowserOpera Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/lib/config.php trunk/lib/plugin/YouTube.php trunk/lib/stdlib.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2016-10-10 13:05:42 UTC (rev 9955) +++ trunk/lib/WikiTheme.php 2016-10-10 13:21:42 UTC (rev 9956) @@ -1187,8 +1187,6 @@ { // Don't set title on default style. This makes it clear to // the user which is the default (i.e. most supported) style. - if ($is_alt and isBrowserKonqueror()) - return HTML(); $link = HTML::link(array('rel' => $is_alt ? 'alternate stylesheet' : 'stylesheet', 'type' => 'text/css', 'href' => $this->_findData($css_file))); Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2016-10-10 13:05:42 UTC (rev 9955) +++ trunk/lib/config.php 2016-10-10 13:21:42 UTC (rev 9956) @@ -81,53 +81,11 @@ return (strpos(strtolower(browserAgent()), strtolower($match)) !== false); } -// returns a similar number for Netscape/Mozilla (gecko=5.0)/IE/Opera features. -function browserVersion() -{ - $agent = browserAgent(); - if (strstr($agent, "Mozilla/4.0 (compatible; MSIE")) - return (float)substr($agent, 30); - elseif (strstr($agent, "Mozilla/5.0 (compatible; Konqueror/")) - return (float)substr($agent, 36); - elseif (strstr($agent, "AppleWebKit/")) - return (float)substr($agent, strpos($agent, "AppleWebKit/") + 12); - else - return (float)substr($agent, 8); -} - function isBrowserIE() { - return (browserDetect('Mozilla/') and - browserDetect('MSIE')); + return (browserDetect('Mozilla/') and browserDetect('MSIE')); } -// 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) -{ - if ($version) - return browserDetect('Konqueror/') and browserVersion() >= $version; - return browserDetect('Konqueror/'); -} - -// MacOSX Safari has certain limitations. Need detection and patches. -// * no <object>, only <embed> -function isBrowserSafari($version = false) -{ - $found = browserDetect('Spoofer/'); - $found = browserDetect('AppleWebKit/') || $found; - if ($version) - return $found and browserVersion() >= $version; - return $found; -} - -function isBrowserOpera($version = false) -{ - if ($version) - return browserDetect('Opera/') and browserVersion() >= $version; - return browserDetect('Opera/'); -} - /** * If $LANG is undefined: * Smart client language detection, based on our supported languages Modified: trunk/lib/plugin/YouTube.php =================================================================== --- trunk/lib/plugin/YouTube.php 2016-10-10 13:05:42 UTC (rev 9955) +++ trunk/lib/plugin/YouTube.php 2016-10-10 13:21:42 UTC (rev 9956) @@ -193,9 +193,6 @@ 'type' => 'application/x-shockwave-flash', 'width' => $width, 'height' => $height); - if (isBrowserSafari()) { - return HTML::object($attrs); - } $object->pushContent(HTML::param(array('name' => 'movie', 'value' => $url))); $object->pushContent(HTML::param(array('name' => 'wmode', 'value' => 'transparent'))); $object->pushContent(HTML::object($attrs)); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2016-10-10 13:05:42 UTC (rev 9955) +++ trunk/lib/stdlib.php 2016-10-10 13:21:42 UTC (rev 9956) @@ -651,9 +651,6 @@ if ($params) { foreach ($params as $param) $object->pushContent($param); } - if (isBrowserSafari() and !isBrowserSafari(532)) { // recent chrome can do OBJECT - return HTML::embed($object->_attr, $object->_content); - } $object->pushContent(HTML::embed($object->_attr)); return $object; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-10-14 08:24:20
|
Revision: 9964 http://sourceforge.net/p/phpwiki/code/9964 Author: vargenau Date: 2016-10-14 08:24:17 +0000 (Fri, 14 Oct 2016) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/Google.php trunk/lib/SemanticWeb.php trunk/lib/XmlParser.php trunk/lib/plugin/RecentComments.php trunk/lib/plugin/RelatedChanges.php Modified: trunk/lib/Google.php =================================================================== --- trunk/lib/Google.php 2016-10-13 13:15:43 UTC (rev 9963) +++ trunk/lib/Google.php 2016-10-14 08:24:17 UTC (rev 9964) @@ -94,7 +94,7 @@ public $_fields = "documentFiltering,searchComments,estimatedTotalResultsCount,estimateIsExact,searchQuery,startIndex,endIndex,searchTips,directoryCategories,searchTime,resultElements"; public $resultElements, $results; - function GoogleSearchResults($result) + function __construct($result) { $this->fields = explode(',', $this->_fields); foreach ($this->fields as $f) { @@ -150,7 +150,7 @@ { public $_fields = "summary,URL,snippet,title,cachedSize,relatedInformationPresent,hostName,directoryCategory,directoryTitle"; - function GoogleSearchResult($result) + function __construct($result) { $this->fields = explode(',', $this->_fields); foreach ($this->fields as $f) { @@ -162,8 +162,7 @@ class Google { - - function Google($maxResults = 10, $license_key = false) + function __construct($maxResults = 10, $license_key = false) { if ($license_key) $this->license_key = $license_key; Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2016-10-13 13:15:43 UTC (rev 9963) +++ trunk/lib/SemanticWeb.php 2016-10-14 08:24:17 UTC (rev 9964) @@ -371,7 +371,7 @@ */ class ReasonerBackend { - function ReasonerBackend() + function __construct() { ; } Modified: trunk/lib/XmlParser.php =================================================================== --- trunk/lib/XmlParser.php 2016-10-13 13:15:43 UTC (rev 9963) +++ trunk/lib/XmlParser.php 2016-10-14 08:24:17 UTC (rev 9964) @@ -53,8 +53,8 @@ { public $_parser, $root, $current, $previous, $parent; - function XmlParser($encoding = '') - { // "ISO-8859-1" + function __construct($encoding = '') + { if ($encoding) $this->_parser = xml_parser_create($encoding); else Modified: trunk/lib/plugin/RecentComments.php =================================================================== --- trunk/lib/plugin/RecentComments.php 2016-10-13 13:15:43 UTC (rev 9963) +++ trunk/lib/plugin/RecentComments.php 2016-10-14 08:24:17 UTC (rev 9964) @@ -133,7 +133,7 @@ */ class RecentCommentsRevisionIterator extends WikiDB_PageRevisionIterator { - function RecentCommentsRevisionIterator($revisions, &$dbi) + function __construct($revisions, &$dbi) { $this->_revisions = $revisions; $this->_wikidb = $dbi; Modified: trunk/lib/plugin/RelatedChanges.php =================================================================== --- trunk/lib/plugin/RelatedChanges.php 2016-10-13 13:15:43 UTC (rev 9963) +++ trunk/lib/plugin/RelatedChanges.php 2016-10-14 08:24:17 UTC (rev 9964) @@ -126,7 +126,7 @@ */ class RelatedChangesRevisionIterator extends WikiDB_PageRevisionIterator { - function RelatedChangesRevisionIterator($revisions, &$dbi, $pagename) + function __construct($revisions, &$dbi, $pagename) { $this->_revisions = $revisions; $this->_wikidb = $dbi; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2017-05-30 14:27:33
|
Revision: 10016 http://sourceforge.net/p/phpwiki/code/10016 Author: vargenau Date: 2017-05-30 14:27:31 +0000 (Tue, 30 May 2017) Log Message: ----------- IsSafeURL: change default value of $http_only from true to false Modified Paths: -------------- trunk/lib/plugin/Transclude.php trunk/lib/stdlib.php Modified: trunk/lib/plugin/Transclude.php =================================================================== --- trunk/lib/plugin/Transclude.php 2017-05-30 12:33:34 UTC (rev 10015) +++ trunk/lib/plugin/Transclude.php 2017-05-30 14:27:31 UTC (rev 10016) @@ -92,7 +92,7 @@ if ($src == $request->getURLtoSelf()) { return $this->error(fmt("Recursive inclusion of url %s", $src)); } - if (!IsSafeURL($src)) { + if (!IsSafeURL($src, true)) { // http or https only return $this->error(_("Bad URL in src")); } Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2017-05-30 12:33:34 UTC (rev 10015) +++ trunk/lib/stdlib.php 2017-05-30 14:27:31 UTC (rev 10016) @@ -355,7 +355,7 @@ * @param bool $http_only if true, accept only http and https URLs * @return bool true if safe, false else. */ -function IsSafeURL($url, $http_only = true) +function IsSafeURL($url, $http_only = false) { if (preg_match('/([<>"])|(%3C)|(%3E)|(%22)/', $url)) { return false; @@ -381,7 +381,7 @@ function LinkURL($url, $linktext = '') { // FIXME: Is this needed (or sufficient?) - if (!IsSafeURL($url, false)) { + if (!IsSafeURL($url)) { $link = HTML::span(array('class' => 'error'), _('Bad URL')); return $link; } else { @@ -419,7 +419,7 @@ // Extract URL $arr = explode(' ', $url); if (!empty($arr)) $url = $arr[0]; - if (!IsSafeURL($url, false)) { + if (!IsSafeURL($url)) { $link = HTML::span(array('class' => 'error'), _('Bad URL for image')); return $link; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2017-10-01 19:00:42
|
Revision: 10034 http://sourceforge.net/p/phpwiki/code/10034 Author: vargenau Date: 2017-10-01 19:00:39 +0000 (Sun, 01 Oct 2017) Log Message: ----------- Remote code execution through preg_replace() calls. Patches by Thomas Gerbet, Tuleap Modified Paths: -------------- trunk/lib/ErrorManager.php trunk/lib/WikiTheme.php trunk/lib/plugin/WikiAdminRename.php trunk/lib/plugin/WikiAdminSearchReplace.php trunk/lib/stdlib.php trunk/lib/wikilens/Utils.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/ErrorManager.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -494,7 +494,7 @@ $dir .= "\\"; } else $dir .= '/'; - $errfile = preg_replace('|^' . preg_quote($dir) . '|', '', $this->errfile); + $errfile = preg_replace('|^' . preg_quote($dir, '|') . '|', '', $this->errfile); $lines = explode("\n", $this->errstr); if (DEBUG & _DEBUG_VERBOSE) { $msg = sprintf("%s:%d %s[%d]: %s", @@ -637,7 +637,7 @@ $dir .= "\\"; } else $dir .= '/'; - $errfile = preg_replace('|^' . preg_quote($dir) . '|', '', $this->errfile); + $errfile = preg_replace('|^' . preg_quote($dir, '|') . '|', '', $this->errfile); if (is_string($this->errstr)) $lines = explode("\n", $this->errstr); elseif (is_object($this->errstr)) Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/WikiTheme.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -884,13 +884,25 @@ $qtext = urlencode($text); $url = $this->_findButton("$qtext.png"); if ($url && strstr($url, '%')) { - $url = preg_replace('|([^/]+)$|e', 'urlencode("\\1")', $url); + $url = preg_replace_callback( + '|([^/]+)$|', + function (array $matches) { + return urlencode($matches[1]); + }, + $url + ); } if (!$url) { // Jeff complained about png not supported everywhere. // This was not PC until 2005. $url = $this->_findButton("$qtext.gif"); if ($url && strstr($url, '%')) { - $url = preg_replace('|([^/]+)$|e', 'urlencode("\\1")', $url); + $url = preg_replace_callback( + '|([^/]+)$|', + function (array $matches) { + return urlencode($matches[1]); + }, + $url + ); } } if ($url and $this->DUMP_MODE) { Modified: trunk/lib/plugin/WikiAdminRename.php =================================================================== --- trunk/lib/plugin/WikiAdminRename.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/plugin/WikiAdminRename.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -56,7 +56,7 @@ public static function renameHelper($name, $from, $to, $options = array()) { if (isset($options['regex'])) { - return preg_replace('/' . $from . '/' . (isset($options['icase']) ? 'i' : ''), $to, $name); + return preg_replace('/' . str_replace('/', '\/', $from) . '/'.($options['icase']?'i':''), $to, $name); } elseif (isset($options['icase'])) { return str_ireplace($from, $to, $name); } else { Modified: trunk/lib/plugin/WikiAdminSearchReplace.php =================================================================== --- trunk/lib/plugin/WikiAdminSearchReplace.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/plugin/WikiAdminSearchReplace.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -167,7 +167,7 @@ $version = $current->getVersion(); $text = $current->getPackedContent(); if ($regex) { - $newtext = preg_replace("/" . $from . "/" . ($case_exact ? '' : 'i'), $to, $text); + $newtext = preg_replace('/' . str_replace('/', '\/', $from) . '/' .($case_exact?'':'i'), $to, $text); } else { if ($case_exact) { $newtext = str_replace($from, $to, $text); Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/stdlib.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -1458,7 +1458,7 @@ $glob = str_replace("/", "\\/", $glob); // first convert some unescaped expressions to pcre style: . => \. $special = '.^$'; - $re = preg_replace('/([^\xff])?([' . preg_quote($special) . '])/', + $re = preg_replace('/([^\xff])?(['.preg_quote($special, '/').'])/', "\\1\xff\\2", $glob); // * => .*, ? => . Modified: trunk/lib/wikilens/Utils.php =================================================================== --- trunk/lib/wikilens/Utils.php 2017-10-01 18:27:52 UTC (rev 10033) +++ trunk/lib/wikilens/Utils.php 2017-10-01 19:00:39 UTC (rev 10034) @@ -41,9 +41,9 @@ } // add new data to the appropriate line - if (preg_match('/^' . preg_quote($START_DELIM) . '/', $text)) { + if (preg_match('/^' . preg_quote($START_DELIM, '/') . '/', $text)) { // need multiline modifier to match EOL correctly - $text = preg_replace('/(^' . preg_quote($START_DELIM) . '.*)$/m', + $text = preg_replace('/(^' . preg_quote($START_DELIM, '/') . '.*)$/m', '$1' . $DELIM . $new_data, $text); } else { // handle case where the line does not yet exist This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2017-10-02 09:11:43
|
Revision: 10035 http://sourceforge.net/p/phpwiki/code/10035 Author: vargenau Date: 2017-10-02 09:11:41 +0000 (Mon, 02 Oct 2017) Log Message: ----------- Check with isset() Modified Paths: -------------- trunk/lib/plugin/WikiAdminRename.php trunk/lib/stdlib.php Modified: trunk/lib/plugin/WikiAdminRename.php =================================================================== --- trunk/lib/plugin/WikiAdminRename.php 2017-10-01 19:00:39 UTC (rev 10034) +++ trunk/lib/plugin/WikiAdminRename.php 2017-10-02 09:11:41 UTC (rev 10035) @@ -56,7 +56,7 @@ public static function renameHelper($name, $from, $to, $options = array()) { if (isset($options['regex'])) { - return preg_replace('/' . str_replace('/', '\/', $from) . '/'.($options['icase']?'i':''), $to, $name); + return preg_replace('/' . str_replace('/', '\/', $from) . '/' . (isset($options['icase']) ? 'i' : ''), $to, $name); } elseif (isset($options['icase'])) { return str_ireplace($from, $to, $name); } else { Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2017-10-01 19:00:39 UTC (rev 10034) +++ trunk/lib/stdlib.php 2017-10-02 09:11:41 UTC (rev 10035) @@ -1458,7 +1458,7 @@ $glob = str_replace("/", "\\/", $glob); // first convert some unescaped expressions to pcre style: . => \. $special = '.^$'; - $re = preg_replace('/([^\xff])?(['.preg_quote($special, '/').'])/', + $re = preg_replace('/([^\xff])?([' . preg_quote($special, '/') . '])/', "\\1\xff\\2", $glob); // * => .*, ? => . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2019-04-18 14:38:57
|
Revision: 10103 http://sourceforge.net/p/phpwiki/code/10103 Author: vargenau Date: 2019-04-18 14:38:56 +0000 (Thu, 18 Apr 2019) Log Message: ----------- More strict tests Modified Paths: -------------- trunk/lib/main.php trunk/lib/plugin/UserPreferences.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2019-04-18 14:36:33 UTC (rev 10102) +++ trunk/lib/main.php 2019-04-18 14:38:56 UTC (rev 10103) @@ -332,7 +332,7 @@ // Convenience function: function getPref($key) { - if (isset($this->_prefs)) { + if (isset($this->_prefs) && ($this->_prefs)) { return $this->_prefs->get($key); } return false; Modified: trunk/lib/plugin/UserPreferences.php =================================================================== --- trunk/lib/plugin/UserPreferences.php 2019-04-18 14:36:33 UTC (rev 10102) +++ trunk/lib/plugin/UserPreferences.php 2019-04-18 14:38:56 UTC (rev 10103) @@ -57,9 +57,11 @@ $pref = $user->getPreferences(); } $prefs = array(); - //we need a hash of pref => default_value - foreach ($pref->_prefs as $name => $obj) { - $prefs[$name] = $obj->default_value; + if ($pref) { + //we need a hash of pref => default_value + foreach ($pref->_prefs as $name => $obj) { + $prefs[$name] = $obj->default_value; + } } return $prefs; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2019-09-02 19:17:11
|
Revision: 10147 http://sourceforge.net/p/phpwiki/code/10147 Author: vargenau Date: 2019-09-02 19:17:09 +0000 (Mon, 02 Sep 2019) Log Message: ----------- Improve setPreferences() Modified Paths: -------------- trunk/lib/ErrorManager.php trunk/lib/WikiUser.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2019-09-02 16:15:33 UTC (rev 10146) +++ trunk/lib/ErrorManager.php 2019-09-02 19:17:09 UTC (rev 10147) @@ -66,7 +66,7 @@ $this->_postpone_mask = 0; $this->_postponed_errors = array(); - set_error_handler('ErrorManager_errorHandler'); + // set_error_handler('ErrorManager_errorHandler'); } /** Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2019-09-02 16:15:33 UTC (rev 10146) +++ trunk/lib/WikiUser.php 2019-09-02 19:17:09 UTC (rev 10147) @@ -1206,18 +1206,21 @@ // FIXME: strange why this should be needed... include_once 'lib/WikiUser/Db.php'; include_once 'lib/WikiUser/AdoDb.php'; - $pref = new _AdoDbPassUser(); - return $pref->setPreferences($prefs, $id_only); + $user = new _AdoDbPassUser(); + $this->_prefs = $user->setPreferences($prefs, $id_only); + return $this->_prefs; } elseif ($this->_prefs->_method == 'SQL') { include_once 'lib/WikiUser/Db.php'; include_once 'lib/WikiUser/PearDb.php'; - $pref = new _PearDbPassUser(); - return $pref->setPreferences($prefs, $id_only); + $user = new _PearDbPassUser(); + $this->_prefs = $user->setPreferences($prefs, $id_only); + return $this->_prefs; } elseif ($this->_prefs->_method == 'PDO') { include_once 'lib/WikiUser/Db.php'; include_once 'lib/WikiUser/PdoDb.php'; - $pref = new _PdoDbPassUser(); - return $pref->setPreferences($prefs, $id_only); + $user = new _PdoDbPassUser(); + $this->_prefs = $user->setPreferences($prefs, $id_only); + return $this->_prefs; } } if ($updated = _AnonUser::setPreferences($prefs, $id_only)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2020-03-23 11:59:34
|
Revision: 10155 http://sourceforge.net/p/phpwiki/code/10155 Author: vargenau Date: 2020-03-23 11:59:33 +0000 (Mon, 23 Mar 2020) Log Message: ----------- make sure overriden functions have same signatures (and default arguments) as in base class -- patches by Christof Meerwald Modified Paths: -------------- trunk/lib/RssWriter.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/diff.php trunk/lib/plugin/SemanticSearch.php trunk/lib/plugin/SemanticSearchAdvanced.php trunk/lib/plugin/VisualWiki.php trunk/lib/plugin/WikiAdminSetAclSimple.php Modified: trunk/lib/RssWriter.php =================================================================== --- trunk/lib/RssWriter.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/RssWriter.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -277,7 +277,7 @@ * @param bool $uri * @return XmlElement */ - function __node($type, $attr, $properties, $uri = false) + function __atom_node($type, $attr, $properties, $uri = false) { if (!$uri) $uri = $properties['link']; @@ -292,7 +292,7 @@ // comment function addItem($properties, $attr = false, $uri = false) { - $this->_items[] = $this->__node('entry', $attr, $properties, $uri); + $this->_items[] = $this->__atom_node('entry', $attr, $properties, $uri); } /** Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/WikiDB/backend/dbaBase.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -726,7 +726,7 @@ $this->_options = $options; if ($pages) { if (!empty($options['sortby'])) { - $sortby = WikiDB_backend::sortby($options['sortby'], 'db', + $sortby = $backend->sortby($options['sortby'], 'db', array('pagename', 'mtime')); // check for which column to sortby if ($sortby and !strstr($sortby, "hits ")) { Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/diff.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -185,7 +185,7 @@ unset($this->block); } - protected function lines($lines, $class, $prefix = false, $elem = false) + protected function html_lines($lines, $class, $prefix = false, $elem = false) { if (!$prefix) $prefix = HTML::raw(' '); @@ -203,24 +203,24 @@ protected function context($lines) { - $this->lines($lines, 'context'); + $this->html_lines($lines, 'context'); } protected function deleted($lines) { - $this->lines($lines, 'deleted', '-', 'del'); + $this->html_lines($lines, 'deleted', '-', 'del'); } protected function added($lines) { - $this->lines($lines, 'added', '+', 'ins'); + $this->html_lines($lines, 'added', '+', 'ins'); } protected function changed($orig, $final) { $diff = new WordLevelDiff($orig, $final); - $this->lines($diff->orig(), 'original', '-'); - $this->lines($diff->finalize(), 'final', '+'); + $this->html_lines($diff->orig(), 'original', '-'); + $this->html_lines($diff->finalize(), 'final', '+'); } } Modified: trunk/lib/plugin/SemanticSearch.php =================================================================== --- trunk/lib/plugin/SemanticSearch.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/plugin/SemanticSearch.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -89,7 +89,7 @@ )); } - function showForm(&$dbi, &$request, $args) + function showForm(&$dbi, &$request, $args, $allrelations = array()) { $action = $request->getPostURL(); $hiddenfield = HiddenInputs($request->getArgs(), '', Modified: trunk/lib/plugin/SemanticSearchAdvanced.php =================================================================== --- trunk/lib/plugin/SemanticSearchAdvanced.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/plugin/SemanticSearchAdvanced.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -82,7 +82,7 @@ )); } - function showForm(&$dbi, &$request, $args, $allrelations) + function showForm(&$dbi, &$request, $args, $allrelations = array()) { $action = $request->getPostURL(); $hiddenfield = HiddenInputs($request->getArgs(), '', Modified: trunk/lib/plugin/VisualWiki.php =================================================================== --- trunk/lib/plugin/VisualWiki.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/plugin/VisualWiki.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -419,7 +419,7 @@ * 'number': label by unique number * @return bool error status; true=ok; false=error */ - function createDotFile($filename, $argarray) + function createDotFile($filename = '', $argarray = array()) { extract($argarray); if (!$fp = fopen($filename, 'w')) Modified: trunk/lib/plugin/WikiAdminSetAclSimple.php =================================================================== --- trunk/lib/plugin/WikiAdminSetAclSimple.php 2020-03-23 11:21:53 UTC (rev 10154) +++ trunk/lib/plugin/WikiAdminSetAclSimple.php 2020-03-23 11:59:33 UTC (rev 10155) @@ -100,7 +100,7 @@ $pagelist->addPageList($pages); $button_label_liberal = _("Set Liberal Access Rights"); $button_label_restrictive = _("Set Restrictive Access Rights"); - $header = $this->setaclForm($header, $pages); + $header = $this->setaclFormSimple($header, $pages); $header->pushContent(HTML::legend(_("Select the pages where to change access rights"))); $buttons = HTML::p(Button('submit:admin_setacl[aclliberal]', $button_label_liberal, 'wikiadmin'), @@ -174,7 +174,7 @@ return $perm; } - function setaclForm(&$header, $pagehash) + function setaclFormSimple(&$header, $pagehash) { $pages = array(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-01-04 14:11:02
|
Revision: 10223 http://sourceforge.net/p/phpwiki/code/10223 Author: vargenau Date: 2021-01-04 14:10:59 +0000 (Mon, 04 Jan 2021) Log Message: ----------- Remove code for reading old PhpWiki cookie formats Modified Paths: -------------- trunk/lib/Request.php trunk/lib/WikiUser.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2021-01-04 08:55:25 UTC (rev 10222) +++ trunk/lib/Request.php 2021-01-04 14:10:59 UTC (rev 10223) @@ -639,29 +639,6 @@ return false; } - function get_old($key) - { - if (defined('FUSIONFORGE') && FUSIONFORGE) { - return false; - } - $vars = &$GLOBALS['HTTP_COOKIE_VARS']; - if (isset($vars[$key])) { - @$decode = base64_decode($vars[$key]); - if (strlen($decode) > 3 and substr($decode, 1, 1) == ':') { - @$val = unserialize($decode); - if (!empty($val)) - return $val; - } - @$val = unserialize($vars[$key]); - if (!empty($val)) - return $val; - @$val = $vars[$key]; - if (!empty($val)) - return $val; - } - return false; - } - function set($key, $val, $persist_days = false, $path = false) { // if already defined, ignore Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2021-01-04 08:55:25 UTC (rev 10222) +++ trunk/lib/WikiUser.php 2021-01-04 14:10:59 UTC (rev 10223) @@ -719,68 +719,12 @@ $this->_prefs = new UserPreferences(); $UserName = $this->UserName(); - // Try to read deprecated 1.3.x style cookies - if ($cookie = $request->cookies->get_old(WIKI_NAME)) { - if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) { - trigger_error(_("Empty Preferences or format of UserPreferences cookie not recognised.") - . "\n" - . sprintf("%s='%s'", WIKI_NAME, $cookie) - . "\n" - . _("Default preferences will be used."), - E_USER_NOTICE); - } - /** - * Only set if it matches the UserName who is - * signing in or if this really is an Anon login (no - * username). (Remember, _BogoUser and higher inherit this - * function too!). - */ - if (!$UserName || $UserName == @$unboxedcookie['userid']) { - $this->_prefs->updatePrefs($unboxedcookie); - $UserName = @$unboxedcookie['userid']; - if (is_string($UserName) and (substr($UserName, 0, 2) != 's:')) - $this->_userid = $UserName; - else - $UserName = false; - } - // v1.3.8 policy: don't set PhpWiki cookies, only plaintext WIKI_ID cookies - if (!headers_sent()) - $request->deleteCookieVar(WIKI_NAME); - } - // Try to read deprecated 1.3.4 style cookies - if (!$UserName and ($cookie = $request->cookies->get_old("WIKI_PREF2"))) { - if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) { - if (!$UserName || $UserName == $unboxedcookie['userid']) { - $this->_prefs->updatePrefs($unboxedcookie); - $UserName = $unboxedcookie['userid']; - if (is_string($UserName) and (substr($UserName, 0, 2) != 's:')) - $this->_userid = $UserName; - else - $UserName = false; - } - if (!headers_sent()) - $request->deleteCookieVar("WIKI_PREF2"); - } - } if (!$UserName) { - // Try reading userid from old PhpWiki cookie formats: - if ($cookie = $request->cookies->get_old(getCookieName())) { - if (is_string($cookie) and (substr($cookie, 0, 2) != 's:')) - $UserName = $cookie; - elseif (is_array($cookie) and !empty($cookie['userid'])) - $UserName = $cookie['userid']; - } if (!$UserName and !headers_sent()) $request->deleteCookieVar(getCookieName()); else $this->_userid = $UserName; } - - // initializeTheme() needs at least an empty object - /* - if (empty($this->_prefs)) - $this->_prefs = new UserPreferences(); - */ return $this->_prefs; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-02-04 18:00:48
|
Revision: 10243 http://sourceforge.net/p/phpwiki/code/10243 Author: vargenau Date: 2021-02-04 18:00:47 +0000 (Thu, 04 Feb 2021) Log Message: ----------- Remove useless DEBUG Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/TextSearchQuery.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiTheme.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2021-01-16 19:56:38 UTC (rev 10242) +++ trunk/lib/PageList.php 2021-02-04 18:00:47 UTC (rev 10243) @@ -1086,23 +1086,13 @@ if ($action == 'get') { return $order . $column; } elseif ($action == 'flip_order') { - if (0 and DEBUG) - trigger_error("flip $order $column " . $this->id, E_USER_NOTICE); return ($order == '+' ? '-' : '+') . $column; } elseif ($action == 'init') { // only allowed from PageList::PageList - if (0 and DEBUG) { - if ($this->sortby($column, 'clicked')) { - trigger_error("clicked $order $column $this->id", E_USER_NOTICE); - } - } $this->_sortby[$column] = $order; // forces show icon return $order . $column; } elseif ($action == 'check') { // show icon? //if specified via arg or if clicked $show = (!empty($this->_sortby[$column]) or $this->sortby($column, 'clicked')); - if (0 and $show and DEBUG) { - trigger_error("show $order $column " . $this->id, E_USER_NOTICE); - } return $show; } elseif ($action == 'clicked') { // flip sort order? global $request; Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2021-01-16 19:56:38 UTC (rev 10242) +++ trunk/lib/TextSearchQuery.php 2021-02-04 18:00:47 UTC (rev 10243) @@ -573,11 +573,6 @@ return false; $search = $this->workquery; $result = false; - //if (DEBUG & _DEBUG_VERBOSE) - // trigger_error("\$result = (boolean)($search);", E_USER_NOTICE); - // We might have a numerical problem: - // php-4.2.2 eval'ed as module: "9.636e+08 > 1000" false; - // php-5.1.2 cgi true, 4.2.2 cgi true eval("\$result = (boolean)($search);"); if ($result and is_array($p)) { return $this->bound(); Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2021-01-16 19:56:38 UTC (rev 10242) +++ trunk/lib/WikiDB/backend/PearDB.php 2021-02-04 18:00:47 UTC (rev 10243) @@ -484,7 +484,6 @@ /* * Update link table. - * on DEBUG: delete old, deleted links from page */ function set_links($pagename, $links) { @@ -519,7 +518,6 @@ $linkid = $this->_get_pageid($linkto, true); if (!$linkid) { echo("No link for $linkto on page $pagename"); - //printSimpleTrace(debug_backtrace()); trigger_error("No link for $linkto on page $pagename"); } assert($linkid); Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2021-01-16 19:56:38 UTC (rev 10242) +++ trunk/lib/WikiTheme.php 2021-02-04 18:00:47 UTC (rev 10243) @@ -296,8 +296,6 @@ $path = $parent->_findFile($file, 1); if ($path) { return $path; - } elseif (0 and DEBUG & (_DEBUG_VERBOSE + _DEBUG_REMOTE)) { - trigger_error("$parent->_theme/$file: not found", E_USER_NOTICE); } } if (isset($this->_default_theme)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-09 14:08:46
|
Revision: 10278 http://sourceforge.net/p/phpwiki/code/10278 Author: vargenau Date: 2021-06-09 14:08:42 +0000 (Wed, 09 Jun 2021) Log Message: ----------- This file is part of PhpWiki. Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB_postgres7.php trunk/lib/WikiDB/backend/PearDB_mysqli.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/plugin/AnalyseAccessLogSql.php trunk/lib/plugin/SearchHighlight.php Modified: trunk/lib/WikiDB/backend/ADODB_postgres7.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_postgres7.php 2021-05-07 11:02:55 UTC (rev 10277) +++ trunk/lib/WikiDB/backend/ADODB_postgres7.php 2021-06-09 14:08:42 UTC (rev 10278) @@ -2,6 +2,8 @@ /** * Copyright © 2005-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 Modified: trunk/lib/WikiDB/backend/PearDB_mysqli.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_mysqli.php 2021-05-07 11:02:55 UTC (rev 10277) +++ trunk/lib/WikiDB/backend/PearDB_mysqli.php 2021-06-09 14:08:42 UTC (rev 10278) @@ -3,6 +3,8 @@ * Copyright © 2001 Jeff Dairiki * Copyright © 2004-2006 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 Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-05-07 11:02:55 UTC (rev 10277) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-06-09 14:08:42 UTC (rev 10278) @@ -3,6 +3,8 @@ * Copyright © 2004 Philippe Vanhaesendonck * 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 Modified: trunk/lib/plugin/AnalyseAccessLogSql.php =================================================================== --- trunk/lib/plugin/AnalyseAccessLogSql.php 2021-05-07 11:02:55 UTC (rev 10277) +++ trunk/lib/plugin/AnalyseAccessLogSql.php 2021-06-09 14:08:42 UTC (rev 10278) @@ -2,7 +2,7 @@ /** * Copyright © 2005 Charles Corrigan and $ThePhpWikiProgrammingTeam * - * This file is (not yet) part of PhpWiki. + * 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 Modified: trunk/lib/plugin/SearchHighlight.php =================================================================== --- trunk/lib/plugin/SearchHighlight.php 2021-05-07 11:02:55 UTC (rev 10277) +++ trunk/lib/plugin/SearchHighlight.php 2021-06-09 14:08:42 UTC (rev 10278) @@ -2,7 +2,7 @@ /** * Copyright © 2004,2007 $ThePhpWikiProgrammingTeam * - * This file is NOT part of PhpWiki. + * 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-16 15:49:39
|
Revision: 10285 http://sourceforge.net/p/phpwiki/code/10285 Author: vargenau Date: 2021-06-16 15:49:41 +0000 (Wed, 16 Jun 2021) Log Message: ----------- Remove "limit_by_db" Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2021-06-16 15:48:56 UTC (rev 10284) +++ trunk/lib/PageList.php 2021-06-16 15:49:41 UTC (rev 10285) @@ -945,7 +945,7 @@ $this->addPage($page); } } - if (!is_array($page_iter->_options) || !array_key_exists('limit_by_db', $page_iter->_options) || !$page_iter->_options['limit_by_db']) + if (!is_array($page_iter->_options)) $this->_options['slice'] = 1; if ($i and empty($this->_options['count'])) $this->_options['count'] = $i; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2021-06-16 15:48:56 UTC (rev 10284) +++ trunk/lib/WikiDB/backend/PearDB.php 2021-06-16 15:49:41 UTC (rev 10285) @@ -652,10 +652,8 @@ // extract from,count from limit list($from, $count) = $this->limit($limit); $result = $dbh->limitQuery($sql, $from, $count); - $options = array('limit_by_db' => 1); } else { $result = $dbh->query($sql); - $options = array('limit_by_db' => 0); } return new WikiDB_backend_PearDB_iter($this, $result, $options); } Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-06-16 15:48:56 UTC (rev 10284) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-06-16 15:49:41 UTC (rev 10285) @@ -414,10 +414,8 @@ // extract from,count from limit list($from, $count) = $this->limit($limit); $result = $dbh->limitQuery($sql, $from, $count); - $options = array('limit_by_db' => 1); } else { $result = $dbh->query($sql); - $options = array('limit_by_db' => 0); } return new WikiDB_backend_PearDB_iter($this, $result, $options); } Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2021-06-16 15:48:56 UTC (rev 10284) +++ trunk/lib/WikiDB.php 2021-06-16 15:49:41 UTC (rev 10285) @@ -320,9 +320,8 @@ $exclude); return new WikiDB_PageIterator($this, $result, array('include_empty' => $include_empty, - 'exclude' => $exclude, - 'limit_by_db' => $result->_options['limit_by_db'], - 'limit' => $result->limit())); + 'exclude' => $exclude, + 'limit' => $result->limit())); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-22 09:09:12
|
Revision: 10312 http://sourceforge.net/p/phpwiki/code/10312 Author: vargenau Date: 2021-06-22 09:09:11 +0000 (Tue, 22 Jun 2021) Log Message: ----------- Remove specific getPreferences and setPreferences for databases so that preferences work Modified Paths: -------------- trunk/lib/WikiUser/AdoDb.php trunk/lib/WikiUser/PdoDb.php trunk/lib/WikiUser/PearDb.php trunk/lib/WikiUser.php trunk/lib/plugin/UserPreferences.php Modified: trunk/lib/WikiUser/AdoDb.php =================================================================== --- trunk/lib/WikiUser/AdoDb.php 2021-06-21 15:24:45 UTC (rev 10311) +++ trunk/lib/WikiUser/AdoDb.php 2021-06-22 09:09:11 UTC (rev 10312) @@ -63,83 +63,6 @@ return $this; } - function getPreferences() - { - // override the generic slow method here for efficiency - _AnonUser::getPreferences(); - $this->getAuthDbh(); - if (isset($this->_prefs->_select)) { - $dbh = & $this->_auth_dbi; - $rs = $dbh->Execute(sprintf($this->_prefs->_select, $dbh->qstr($this->_userid))); - if ($rs->EOF) { - $rs->Close(); - } else { - $prefs_blob = @$rs->fields['prefs']; - $rs->Close(); - if ($restored_from_db = $this->_prefs->retrieve($prefs_blob)) { - $this->_prefs->updatePrefs($restored_from_db); - return $this->_prefs; - } - } - } - if (!empty($this->_HomePagehandle)) { - if ($restored_from_page = $this->_prefs->retrieve - ($this->_HomePagehandle->get('pref')) - ) { - $this->_prefs->updatePrefs($restored_from_page); - return $this->_prefs; - } - } - return $this->_prefs; - } - - function setPreferences($prefs, $id_only = false) - { - // if the prefs are changed - if (_AnonUser::setPreferences($prefs, 1)) { - global $request; - $packed = $this->_prefs->store(); - //$user = $request->_user; - //unset($user->_auth_dbi); - if (!$id_only and isset($this->_prefs->_update)) { - $this->getAuthDbh(); - $dbh = &$this->_auth_dbi; - // check if the user already exists (not needed with mysql REPLACE) - $rs = $dbh->Execute(sprintf($this->_prefs->_select, $dbh->qstr($this->_userid))); - if ($rs->EOF) { - $rs->Close(); - $prefs_blob = false; - } else { - $prefs_blob = @$rs->fields['prefs']; - $rs->Close(); - } - if ($prefs_blob) { - $db_result = $dbh->Execute(sprintf($this->_prefs->_update, - $dbh->qstr($packed), - $dbh->qstr($this->_userid))); - } else { - // Otherwise, insert a record for them and set it to the defaults. - $dbi = $request->getDbh(); - $this->_prefs->_insert = $this->prepare($dbi->getAuthParam('pref_insert'), - array("pref_blob", "userid")); - $db_result = $dbh->Execute(sprintf($this->_prefs->_insert, - $dbh->qstr($packed), - $dbh->qstr($this->_userid))); - } - $db_result->Close(); - // delete pageprefs: - if ($this->_HomePagehandle and $this->_HomePagehandle->get('pref')) - $this->_HomePagehandle->set('pref', ''); - } else { - //store prefs in homepage, not in cookie - if ($this->_HomePagehandle and !$id_only) - $this->_HomePagehandle->set('pref', $packed); - } - return count($this->_prefs->unpack($packed)); - } - return 0; - } - function userExists() { /** Modified: trunk/lib/WikiUser/PdoDb.php =================================================================== --- trunk/lib/WikiUser/PdoDb.php 2021-06-21 15:24:45 UTC (rev 10311) +++ trunk/lib/WikiUser/PdoDb.php 2021-06-22 09:09:11 UTC (rev 10312) @@ -62,64 +62,6 @@ return $this; } - function getPreferences() - { - // override the generic slow method here for efficiency and not to - // clutter the homepage metadata with prefs. - _AnonUser::getPreferences(); - $this->getAuthDbh(); - if (isset($this->_prefs->_select)) { - $dbh = &$this->_auth_dbi; - $db_result = $dbh->query(sprintf($this->_prefs->_select, $dbh->quote($this->_userid))); - // patched by fre...@pa... - $prefs = $db_result->fetch(PDO::FETCH_BOTH); - $prefs_blob = @$prefs["prefs"]; - if ($restored_from_db = $this->_prefs->retrieve($prefs_blob)) { - $this->_prefs->updatePrefs($restored_from_db); - return $this->_prefs; - } - } - if (isset($this->_HomePagehandle) && $this->_HomePagehandle) { - if ($restored_from_page = $this->_prefs->retrieve - ($this->_HomePagehandle->get('pref')) - ) { - $this->_prefs->updatePrefs($restored_from_page); - return $this->_prefs; - } - } - return $this->_prefs; - } - - function setPreferences($prefs, $id_only = false) - { - // if the prefs are changed - if ($count = _AnonUser::setPreferences($prefs, 1)) { - $this->getAuthDbh(); - $packed = $this->_prefs->store(); - if (!$id_only and isset($this->_prefs->_update)) { - $dbh =& $this->_auth_dbi; - try { - $sth = $dbh->prepare($this->_prefs->_update); - $sth->bindParam("prefs", $packed); - $sth->bindParam("user", $this->_userid); - $sth->execute(); - } catch (PDOException $e) { - trigger_error("SQL Error: " . $e->getMessage(), E_USER_WARNING); - return false; - } - //delete pageprefs: - if (isset($this->_HomePagehandle) && $this->_HomePagehandle and $this->_HomePagehandle->get('pref')) - $this->_HomePagehandle->set('pref', ''); - } else { - //store prefs in homepage, not in cookie - if (isset($this->_HomePagehandle) && $this->_HomePagehandle and !$id_only) - $this->_HomePagehandle->set('pref', $packed); - } - return $count; - } - return 0; - } - function userExists() { /** Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2021-06-21 15:24:45 UTC (rev 10311) +++ trunk/lib/WikiUser/PearDb.php 2021-06-22 09:09:11 UTC (rev 10312) @@ -61,79 +61,6 @@ return $this; } - function getPreferences() - { - // override the generic slow method here for efficiency and not to - // clutter the homepage metadata with prefs. - _AnonUser::getPreferences(); - $this->getAuthDbh(); - if (isset($this->_prefs->_select)) { - $dbh = &$this->_auth_dbi; - $db_result = $dbh->query(sprintf($this->_prefs->_select, $dbh->quote($this->_userid))); - // patched by fre...@pa... - $prefs = $db_result->fetchRow(); - $prefs_blob = @$prefs["prefs"]; - if ($restored_from_db = $this->_prefs->retrieve($prefs_blob)) { - $this->_prefs->updatePrefs($restored_from_db); - return $this->_prefs; - } - } - if (isset($this->_HomePagehandle) && $this->_HomePagehandle) { - if ($restored_from_page = $this->_prefs->retrieve - ($this->_HomePagehandle->get('pref')) - ) { - $this->_prefs->updatePrefs($restored_from_page); - return $this->_prefs; - } - } - return $this->_prefs; - } - - function setPreferences($prefs, $id_only = false) - { - /** - * @var WikiRequest $request - */ - global $request; - - // if the prefs are changed - if ($count = _AnonUser::setPreferences($prefs, 1)) { - $this->getAuthDbh(); - $packed = $this->_prefs->store(); - if (!$id_only and isset($this->_prefs->_update)) { - $dbh = &$this->_auth_dbi; - // check if the user already exists (not needed with mysql REPLACE) - $db_result = $dbh->query(sprintf($this->_prefs->_select, - $dbh->quote($this->_userid))); - $prefs = $db_result->fetchRow(); - $prefs_blob = @$prefs["prefs"]; - // If there are prefs for the user, update them. - if ($prefs_blob != "") { - $dbh->simpleQuery(sprintf($this->_prefs->_update, - $dbh->quote($packed), - $dbh->quote($this->_userid))); - } else { - // Otherwise, insert a record for them and set it to the defaults. - // jo...@de... - $dbi = $request->getDbh(); - $this->_prefs->_insert = $this->prepare($dbi->getAuthParam('pref_insert'), - array("pref_blob", "userid")); - $dbh->simpleQuery(sprintf($this->_prefs->_insert, - $dbh->quote($packed), $dbh->quote($this->_userid))); - } - //delete pageprefs: - if (isset($this->_HomePagehandle) && $this->_HomePagehandle and $this->_HomePagehandle->get('pref')) - $this->_HomePagehandle->set('pref', ''); - } else { - //store prefs in homepage, not in cookie - if (isset($this->_HomePagehandle) && $this->_HomePagehandle and !$id_only) - $this->_HomePagehandle->set('pref', $packed); - } - return $count; - } - return 0; - } - function userExists() { /** Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2021-06-21 15:24:45 UTC (rev 10311) +++ trunk/lib/WikiUser.php 2021-06-22 09:09:11 UTC (rev 10312) @@ -1099,29 +1099,6 @@ function getPreferences() { - if (!empty($this->_prefs->_method)) { - if ($this->_prefs->_method == 'ADODB') { - // FIXME: strange why this should be needed... - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/AdoDb.php'; - $user = new _AdoDbPassUser(); - $this->_prefs = $user->getPreferences(); - return $this->_prefs; - } elseif ($this->_prefs->_method == 'SQL') { - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/PearDb.php'; - $user = new _PearDbPassUser(); - $this->_prefs = $user->getPreferences(); - return $this->_prefs; - } elseif ($this->_prefs->_method == 'PDO') { - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/PdoDb.php'; - $user = new _PdoDbPassUser(); - $this->_prefs = $user->getPreferences(); - return $this->_prefs; - } - } - // We don't necessarily have to read the cookie first. Since // the user has a password, the prefs stored in the homepage // cannot be arbitrarily altered by other Bogo users. @@ -1146,28 +1123,6 @@ */ global $request; - if (!empty($this->_prefs->_method)) { - if ($this->_prefs->_method == 'ADODB') { - // FIXME: strange why this should be needed... - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/AdoDb.php'; - $user = new _AdoDbPassUser(); - $this->_prefs = $user->setPreferences($prefs, $id_only); - return $this->_prefs; - } elseif ($this->_prefs->_method == 'SQL') { - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/PearDb.php'; - $user = new _PearDbPassUser(); - $this->_prefs = $user->setPreferences($prefs, $id_only); - return $this->_prefs; - } elseif ($this->_prefs->_method == 'PDO') { - include_once 'lib/WikiUser/Db.php'; - include_once 'lib/WikiUser/PdoDb.php'; - $user = new _PdoDbPassUser(); - $this->_prefs = $user->setPreferences($prefs, $id_only); - return $this->_prefs; - } - } if ($updated = _AnonUser::setPreferences($prefs, $id_only)) { // Encode only the _prefs array of the UserPreference object // If no DB method exists to store the prefs we must store it in the page, not in the cookies. Modified: trunk/lib/plugin/UserPreferences.php =================================================================== --- trunk/lib/plugin/UserPreferences.php 2021-06-21 15:24:45 UTC (rev 10311) +++ trunk/lib/plugin/UserPreferences.php 2021-06-22 09:09:11 UTC (rev 10312) @@ -87,9 +87,8 @@ } if ((!isActionPage($request->getArg('pagename')) and (!isset($user->_prefs->_method) - or !in_array($user->_prefs->_method, array('ADODB', 'SQL', 'PDO')))) or (in_array($request->getArg('action'), array('zip', 'ziphtml', 'dumphtml'))) - or (is_a($user, '_ForbiddenUser')) + or (is_a($user, '_ForbiddenUser')))) ) { $no_args = $this->getDefaultArguments(); $no_args['errmsg'] = HTML::p(array('class' => 'error'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-28 09:25:09
|
Revision: 10328 http://sourceforge.net/p/phpwiki/code/10328 Author: vargenau Date: 2021-06-28 09:25:09 +0000 (Mon, 28 Jun 2021) Log Message: ----------- php7:notice PHP Deprecated: Array and string offset access syntax with curly braces is deprecated Modified Paths: -------------- trunk/lib/ASCIIMathPHP/ASCIIMathPHP.class.php trunk/lib/plugin/text2png.php Modified: trunk/lib/ASCIIMathPHP/ASCIIMathPHP.class.php =================================================================== --- trunk/lib/ASCIIMathPHP/ASCIIMathPHP.class.php 2021-06-28 07:37:34 UTC (rev 10327) +++ trunk/lib/ASCIIMathPHP/ASCIIMathPHP.class.php 2021-06-28 09:25:09 UTC (rev 10328) @@ -880,7 +880,7 @@ return($node_1); } elseif (isset($sym['func'])) { //added 2006-9-7 David Lippman $expr = ltrim($this->getCurrExpr()); - $st = $expr{0}; + $st = $expr[0]; $node_0 = $this->parseSmplExpr(); //$node_0->removeBrackets(); if ($st=='^' || $st == '_' || $st=='/' || $st=='|' || $st==',') { @@ -905,7 +905,7 @@ $end_brckt = '"'; $txt = substr($expr,0,strpos($expr,$end_brckt)); } else { - switch($expr{0}) { + switch($expr[0]) { case '(': $end_brckt = ')'; break; @@ -929,7 +929,7 @@ $node_0->setName('mrow'); if ($len > 0) { - if ($txt{0} == " ") { + if ($txt[0] == " ") { $node_1 = $this->createNode(); $node_1->setName('mspace'); $node_1->setAttr('width','1ex'); @@ -943,7 +943,7 @@ $node_0->addChild($node_3); - if ($len > 1 && $txt{$len-1} == " ") { + if ($len > 1 && $txt[$len-1] == " ") { $node_2 = $this->createNode(); $node_2->setName('mspace'); $node_2->setAttr('width','1ex'); Modified: trunk/lib/plugin/text2png.php =================================================================== --- trunk/lib/plugin/text2png.php 2021-06-28 07:37:34 UTC (rev 10327) +++ trunk/lib/plugin/text2png.php 2021-06-28 09:25:09 UTC (rev 10328) @@ -102,7 +102,7 @@ if ($h[0] != '#') return $default; $rgb = substr($h, 1); if (strlen($rgb) == 3) - return array(hexdec($rgb{0}), hexdec($rgb{1}), hexdec($rgb{2})); + return array(hexdec($rgb[0]), hexdec($rgb[1]), hexdec($rgb[2])); elseif (strlen($rgb) == 6) return array(hexdec(substr($rgb, 0, 2)), hexdec(substr($rgb, 2, 2)), hexdec(substr($rgb, 4, 2))); return $default; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-06-29 12:54:21
|
Revision: 10337 http://sourceforge.net/p/phpwiki/code/10337 Author: vargenau Date: 2021-06-29 12:54:19 +0000 (Tue, 29 Jun 2021) Log Message: ----------- php7:notice PHP Deprecated: Array and string offset access syntax with curly braces is deprecated Modified Paths: -------------- trunk/lib/WikiDB/adodb/drivers/adodb-oci8po.inc.php trunk/lib/WikiDB.php trunk/lib/pear/Cache/Container/imgfile.php trunk/lib/pear/JSON.php Modified: trunk/lib/WikiDB/adodb/drivers/adodb-oci8po.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-oci8po.inc.php 2021-06-28 15:17:30 UTC (rev 10336) +++ trunk/lib/WikiDB/adodb/drivers/adodb-oci8po.inc.php 2021-06-29 12:54:19 UTC (rev 10337) @@ -120,7 +120,7 @@ /* * find the next character of the string */ - $c = $sql{$i}; + $c = $sql[$i]; if ($c == "'" && !$inString && $escaped==0) /* Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2021-06-28 15:17:30 UTC (rev 10336) +++ trunk/lib/WikiDB.php 2021-06-29 12:54:19 UTC (rev 10337) @@ -157,7 +157,7 @@ **/ public static function open($dbparams) { - $dbtype = $dbparams{'dbtype'}; + $dbtype = $dbparams['dbtype']; include_once("lib/WikiDB/$dbtype.php"); $class = 'WikiDB_' . $dbtype; Modified: trunk/lib/pear/Cache/Container/imgfile.php =================================================================== --- trunk/lib/pear/Cache/Container/imgfile.php 2021-06-28 15:17:30 UTC (rev 10336) +++ trunk/lib/pear/Cache/Container/imgfile.php 2021-06-29 12:54:19 UTC (rev 10337) @@ -80,7 +80,7 @@ { // make relative paths absolute for use in deconstructor. // it looks like the deconstructor has problems with relative paths - if (OS_UNIX && '/' != $this->cache_dir{0} ) + if (OS_UNIX && '/' != $this->cache_dir[0] ) $this->cache_dir = realpath( getcwd() . '/' . $this->cache_dir) . '/'; // check if a trailing slash is in cache_dir Modified: trunk/lib/pear/JSON.php =================================================================== --- trunk/lib/pear/JSON.php 2021-06-28 15:17:30 UTC (rev 10336) +++ trunk/lib/pear/JSON.php 2021-06-29 12:54:19 UTC (rev 10337) @@ -169,7 +169,7 @@ return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); } - $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); + $bytes = (ord($utf16[0]) << 8) | ord($utf16[1]); switch(true) { case ((0x7F & $bytes) == $bytes): @@ -222,17 +222,17 @@ 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}))); + 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}))); + 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 @@ -315,7 +315,7 @@ */ for ($c = 0; $c < $strlen_var; ++$c) { - $ord_var_c = ord($var{$c}); + $ord_var_c = ord($var[$c]); switch (true) { case $ord_var_c == 0x08: @@ -338,12 +338,12 @@ case $ord_var_c == 0x2F: case $ord_var_c == 0x5C: // double quote, slash, slosh - $ascii .= '\\'.$var{$c}; + $ascii .= '\\'.$var[$c]; break; case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII) - $ascii .= $var{$c}; + $ascii .= $var[$c]; break; case (($ord_var_c & 0xE0) == 0xC0): @@ -355,7 +355,7 @@ break; } - $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $char = pack('C*', $ord_var_c, ord($var[$c + 1])); $c += 1; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -370,8 +370,8 @@ // 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})); + @ord($var[$c + 1]), + @ord($var[$c + 2])); $c += 2; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -386,9 +386,9 @@ // 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})); + ord($var[$c + 1]), + ord($var[$c + 2]), + ord($var[$c + 3])); $c += 3; $utf16 = $this->utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); @@ -403,10 +403,10 @@ break; } $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 + 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)); @@ -421,11 +421,11 @@ // 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})); + 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)); @@ -618,7 +618,7 @@ for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - $ord_chrs_c = ord($chrs{$c}); + $ord_chrs_c = ord($chrs[$c]); switch (true) { case $substr_chrs_c_2 == '\b': @@ -648,7 +648,7 @@ case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { - $utf8 .= $chrs{++$c}; + $utf8 .= $chrs[++$c]; } break; @@ -661,7 +661,7 @@ break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): - $utf8 .= $chrs{$c}; + $utf8 .= $chrs[$c]; break; case ($ord_chrs_c & 0xE0) == 0xC0: @@ -708,7 +708,7 @@ } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { // array, or object notation - if ($str{0} == '[') { + if ($str[0] == '[') { $stk = array(SERVICES_JSON_IN_ARR); $arr = array(); } else { @@ -747,7 +747,7 @@ $top = end($stk); $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); - if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) { + 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 = $this->substr8($chrs, $top['where'], ($c - $top['where'])); @@ -788,12 +788,12 @@ } - } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) { + } 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})); + 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']) && + } elseif (($chrs[$c] == $top['delim']) && ($top['what'] == SERVICES_JSON_IN_STR) && (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { // found a quote, we're in a string, and it's not escaped @@ -802,24 +802,24 @@ array_pop($stk); //print("Found end of string at {$c}: ".$this->substr8($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '[') && + } 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)) { + } 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}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); - } elseif (($chrs{$c} == '{') && + } 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)) { + } 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}: ".$this->substr8($chrs, $top['where'], (1 + $c - $top['where']))."\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-07-29 17:42:06
|
Revision: 10397 http://sourceforge.net/p/phpwiki/code/10397 Author: vargenau Date: 2021-07-29 17:42:03 +0000 (Thu, 29 Jul 2021) Log Message: ----------- Remove function listOfFields that calls mysql_list_fields in PEAR Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_mysql.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/upgrade.php Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2021-07-29 17:14:42 UTC (rev 10396) +++ trunk/lib/WikiDB/backend/ADODB.php 2021-07-29 17:42:03 UTC (rev 10397) @@ -1295,31 +1295,6 @@ { return $this->_dbh->MetaTables(); } - - // other database needs another connection and other privileges. - function listOfFields($database, $table) - { - $field_list = array(); - $old_db = $this->database(); - if ($database != $old_db) { - $this->_dbh->Connect($this->_parsedDSN['hostspec'], - DBADMIN_USER ? DBADMIN_USER : $this->_parsedDSN['username'], - DBADMIN_PASSWD ? DBADMIN_PASSWD : $this->_parsedDSN['password'], - $database); - } - foreach ($this->_dbh->MetaColumns($table, false) as $field) { - $field_list[] = $field->name; - } - if ($database != $old_db) { - $this->_dbh->close(); - $this->_dbh->Connect($this->_parsedDSN['hostspec'], - $this->_parsedDSN['username'], - $this->_parsedDSN['password'], - $old_db); - } - return $field_list; - } - } class WikiDB_backend_ADODB_generic_iter Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2021-07-29 17:14:42 UTC (rev 10396) +++ trunk/lib/WikiDB/backend/PDO.php 2021-07-29 17:42:03 UTC (rev 10397) @@ -1297,12 +1297,6 @@ return array(); } - function listOfFields($database, $table) - { - trigger_error("PDO: virtual listOfFields", E_USER_ERROR); - return array(); - } - /* * LIMIT with OFFSET is not SQL specified. * mysql: LIMIT $offset, $count Modified: trunk/lib/WikiDB/backend/PDO_mysql.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_mysql.php 2021-07-29 17:14:42 UTC (rev 10396) +++ trunk/lib/WikiDB/backend/PDO_mysql.php 2021-07-29 17:42:03 UTC (rev 10397) @@ -97,37 +97,6 @@ return $tables; } - function listOfFields($database, $table) - { - $old_db = $this->database(); - if ($database != $old_db) { - try { - $dsn = preg_replace("/dbname=\w+;/", "dbname=" . $database, $this->_dsn); - $dsn = preg_replace("/database=\w+;/", "database=" . $database, $dsn); - $conn = new PDO($dsn, - DBADMIN_USER ? DBADMIN_USER : $this->_parsedDSN['username'], - DBADMIN_PASSWD ? DBADMIN_PASSWD : $this->_parsedDSN['password']); - } catch (PDOException $e) { - echo "<br>\nDB Connection failed: " . $e->getMessage(); - echo "<br>\nDSN: '", $this->_dsn, "'"; - echo "<br>\n_parsedDSN: '", print_r($this->_parsedDSN), "'"; - $conn = $this->_dbh; - } - } else { - $conn = $this->_dbh; - } - $sth = $conn->prepare("SHOW COLUMNS FROM $table"); - $sth->execute(); - $field_list = array(); - while ($row = $sth->fetch(PDO::FETCH_NUM)) { - $field_list[] = $row[0]; - } - if ($database != $old_db) { - unset($conn); - } - return $field_list; - } - /* * offset specific syntax within mysql * convert from,count to SQL "LIMIT $offset, $count" Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2021-07-29 17:14:42 UTC (rev 10396) +++ trunk/lib/WikiDB/backend/PearDB.php 2021-07-29 17:42:03 UTC (rev 10397) @@ -1151,28 +1151,6 @@ { return $this->_dbh->getListOf('tables'); } - - function listOfFields($database, $table) - { - if (($this->backendType() == 'mysql') || ($this->backendType() == 'mysqli')) { - $fields = array(); - assert(!empty($database)); - assert(!empty($table)); - $result = mysql_list_fields($database, $table, $this->_dbh->connection) or - trigger_error(__FILE__ . ':' . __LINE__ . ' ' . mysql_error(), E_USER_WARNING); - if (!$result) return array(); - $columns = mysql_num_fields($result); - for ($i = 0; $i < $columns; $i++) { - $fields[] = mysql_field_name($result, $i); - } - mysql_free_result($result); - return $fields; - } else { - // TODO: try ADODB version? - trigger_error("Unsupported dbtype and backend. Either switch to ADODB or check it manually."); - return false; - } - } } /** Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2021-07-29 17:14:42 UTC (rev 10396) +++ trunk/lib/upgrade.php 2021-07-29 17:42:03 UTC (rev 10397) @@ -24,7 +24,7 @@ */ /** - * Upgrade existing WikiDB and config settings after installing a new PhpWiki sofwtare version. + * Upgrade existing WikiDB and config settings after installing a new PhpWiki software version. * Status: almost no queries for verification. * simple merge conflict resolution, or Overwrite All. * @@ -57,7 +57,7 @@ public $error_caught; public $_configUpdates; public $check_args; - private $dbi; + public $dbi; private $request; private $phpwiki_version; private $isSQL; @@ -403,208 +403,6 @@ } /** - * Update from ~1.3.4 to current. - * tables: Only session, user, pref and member - * jeffs-hacks database api (around 1.3.2) later: - * people should export/import their pages if using that old versions. - */ - public function CheckDatabaseUpdate() - { - global $DBParams; - - echo "<h2>", sprintf(_("Check for necessary %s updates"), - _("database")), - " - ", DATABASE_TYPE, "</h2>\n"; - echo _("db version: we want "), $this->current_db_version, "\n<br />"; - echo _("db version: we have "), $this->db_version, "\n<br />"; - if ($this->db_version >= $this->current_db_version) { - echo _("OK"), "<br />\n"; - return; - } - - $backend_type = $this->dbi->_backend->backendType(); - if ($this->isSQL) { - echo "<p>", _("Backend type: "), $backend_type, "</p>\n"; - $prefix = isset($DBParams['prefix']) ? $DBParams['prefix'] : ''; - $tables = $this->dbi->_backend->listOfTables(); - foreach (explode(':', 'session:pref:member') as $table) { - echo sprintf(_("Check for table %s"), $table), " ... "; - if (!in_array($prefix . $table, $tables)) { - $this->installTable($table, $backend_type); - } else { - echo _("OK"), " <br />\n"; - } - } - } - - if ($this->phpwiki_version >= 1030.12200612 and $this->db_version < 1030.13) { - if ($this->isSQL and preg_match("/(pgsql|postgres)/", $backend_type)) { - trigger_error(_("You need to upgrade to schema/psql-initialize.sql manually!"), - E_USER_WARNING); - // $this->_upgrade_psql_tsearch2(); - } - $this->_upgrade_relation_links(); - } - - if (ACCESS_LOG_SQL and $this->isSQL) { - $table = "accesslog"; - echo sprintf(_("Check for table %s"), $table), " ... "; - if (!in_array($prefix . $table, $tables)) { - $this->installTable($table, $backend_type); - } else { - echo _("OK"), " <br />\n"; - } - } - if ($this->isSQL and (class_exists("RatingsUserFactory") or $this->dbi->isWikiPage(_("RateIt")))) { - $table = "rating"; - echo sprintf(_("Check for table %s"), $table), " ... "; - if (!in_array($prefix . $table, $tables)) { - $this->installTable($table, $backend_type); - } else { - echo _("OK"), " <br />\n"; - } - } - $backend = &$this->dbi->_backend->_dbh; - if ($this->isSQL) - extract($this->dbi->_backend->_table_names); - - // 1.3.8 added session.sess_ip - if ($this->isSQL and $this->phpwiki_version >= 1030.08 and USE_DB_SESSION - and isset($this->request->_dbsession) - ) { - echo _("Check for new session.sess_ip column"), " ... "; - $database = $this->dbi->_backend->database(); - assert(!empty($DBParams['db_session_table'])); - $session_tbl = $prefix . $DBParams['db_session_table']; - $sess_fields = $this->dbi->_backend->listOfFields($database, $session_tbl); - if (!$sess_fields) { - echo _("SKIP"); - } elseif (!strstr(strtolower(join(':', $sess_fields)), "sess_ip")) { - // TODO: postgres test (should be able to add columns at the end, but not in between) - echo "<b>", _("ADDING"), "</b>", " ... "; - $this->dbi->genericSqlQuery("ALTER TABLE $session_tbl ADD sess_ip CHAR(15) NOT NULL"); - $this->dbi->genericSqlQuery("CREATE INDEX sess_date ON $session_tbl (sess_date)"); - } else { - echo _("OK"); - } - echo "<br />\n"; - if (substr($backend_type, 0, 5) == 'mysql') { - // upgrade to 4.1.8 destroyed my session table: - // sess_id => varchar(10), sess_data => varchar(5). For others obviously also. - echo _("Check for mysql session.sess_id sanity"), " ... "; - $result = $this->dbi->genericSqlQuery("DESCRIBE $session_tbl"); - if (DATABASE_TYPE == 'SQL') { - $iter = new WikiDB_backend_PearDB_generic_iter($backend, $result); - } elseif (DATABASE_TYPE == 'ADODB') { - $iter = new WikiDB_backend_ADODB_generic_iter($backend, $result, - array("Field", "Type", "Null", "Key", "Default", "Extra")); - } elseif (DATABASE_TYPE == 'PDO') { - $iter = new WikiDB_backend_PDO_generic_iter($backend, $result); - } - while ($col = $iter->next()) { - if ($col["Field"] == 'sess_id' and !strstr(strtolower($col["Type"]), 'char(32)')) { - $this->dbi->genericSqlQuery("ALTER TABLE $session_tbl CHANGE sess_id" - . " sess_id CHAR(32) NOT NULL"); - echo "sess_id ", $col["Type"], " ", _("fixed"), " => CHAR(32) "; - } - if ($col["Field"] == 'sess_ip' and !strstr(strtolower($col["Type"]), 'char(15)')) { - $this->dbi->genericSqlQuery("ALTER TABLE $session_tbl CHANGE sess_ip" - . " sess_ip CHAR(15) NOT NULL"); - echo "sess_ip ", $col["Type"], " ", _("fixed"), " => CHAR(15) "; - } - } - echo _("OK"), "<br />\n"; - } - } - - if ($this->isSQL and ACCESS_LOG_SQL & 2) { - echo _("Check for ACCESS_LOG_SQL passwords in POST requests"), " ... "; - // Don't display passwords in POST requests (up to 2005-02-04 12:03:20) - $res = $this->dbi->genericSqlIter("SELECT time_stamp, remote_host, " . - "request_args FROM ${prefix}accesslog WHERE request_args LIKE " . - "'%s:6:\"passwd\"%' AND request_args NOT LIKE '%s:6:\"passwd\";" . - "s:15:\"<not displayed>\"%'"); - $count = 0; - while ($row = $res->next()) { - $args = preg_replace("/(s:6:\"passwd\";s:15:\").*(\")/", - "$1<not displayed>$2", $row["request_args"]); - $ts = $row["time_stamp"]; - $rh = $row["remote_host"]; - $this->dbi->genericSqlQuery("UPDATE ${prefix}accesslog SET " . - "request_args='$args' WHERE time_stamp=$ts AND " . - "remote_host='$rh'"); - $count++; - } - if ($count > 0) - echo "<b>" . _("FIXED") . "</b><br />\n"; - else - echo _("OK") . "<br />\n"; - - if ($this->phpwiki_version >= 1030.13) { - echo _("Check for ACCESS_LOG_SQL remote_host varchar(50)"), " ... "; - $database = $this->dbi->_backend->database(); - $accesslog_tbl = $prefix . 'accesslog'; - $fields = $this->dbi->_backend->listOfFields($database, $accesslog_tbl); - if (!$fields) { - echo _("SKIP"); - } elseif (strstr(strtolower(join(':', $sess_fields)), "remote_host")) { - // TODO: how to check size, already done? - echo "<b>", _("FIXING"), "remote_host</b>", " ... "; - $this->dbi->genericSqlQuery("ALTER TABLE $accesslog_tbl CHANGE remote_host VARCHAR(100)"); - } else { - echo _("FAILED"); - } - echo "<br />\n"; - } - } - $this->_upgrade_cached_html(); - - if ($this->db_version < $this->current_db_version) { - $this->dbi->set_db_version($this->current_db_version); - $this->db_version = $this->dbi->get_db_version(); - echo _("db version: upgrade to "), $this->db_version, " ... ", _("OK"), "<br />\n"; - flush(); - } - } - - /** - * if page.cached_html does not exists: - * put _cached_html from pagedata into a new separate blob, - * not into the huge serialized string. - * - * It is only rarely needed: for current page only, if-not-modified, - * but was extracted for every simple page iteration. - */ - private function _upgrade_cached_html() - { - if (!$this->isSQL) - return; - if ($this->phpwiki_version >= 1030.10) { - echo _("Check for extra page.cached_html column"), " ... "; - $database = $this->dbi->_backend->database(); - extract($this->dbi->_backend->_table_names); - $fields = $this->dbi->_backend->listOfFields($database, $page_tbl); - if (!$fields) { - echo _("SKIP"), "<br />\n"; - return; - } - if (!strstr(strtolower(join(':', $fields)), "cached_html")) { - echo "<b>", _("ADDING"), "</b>", " ... "; - $backend_type = $this->dbi->_backend->backendType(); - if (substr($backend_type, 0, 5) == 'mysql') - $this->dbi->genericSqlQuery("ALTER TABLE $page_tbl ADD cached_html MEDIUMBLOB"); - else - $this->dbi->genericSqlQuery("ALTER TABLE $page_tbl ADD cached_html BLOB"); - echo "<b>", _("CONVERTING"), "</b>", " ... "; - $count = $this->_convert_cached_html(); - echo $count, " ", _("OK"), "<br />\n"; - } else { - echo _("OK"), "<br />\n"; - } - } - } - - /** * move _cached_html for all pages from pagedata into a new separate blob. * decoupled from action=upgrade, so that it can be used by a WikiAdminUtils button also. */ @@ -634,44 +432,6 @@ } /** - * upgrade to 1.3.13 link structure. - */ - private function _upgrade_relation_links() - { - if ($this->phpwiki_version >= 1030.12200610 and $this->isSQL) { - echo _("Check for relation field in link table"), " ... "; - $database = $this->dbi->_backend->database(); - $prefix = isset($DBParams['prefix']) ? $DBParams['prefix'] : ''; - $link_tbl = $prefix . 'link'; - $fields = $this->dbi->_backend->listOfFields($database, $link_tbl); - if (!$fields) { - echo _("SKIP"); - } elseif (strstr(strtolower(join(':', $fields)), "link")) { - echo "<b>", _("ADDING"), " relation</b>", " ... "; - $this->dbi->genericSqlQuery("ALTER TABLE $link_tbl ADD relation INT DEFAULT 0;"); - $this->dbi->genericSqlQuery("CREATE INDEX link_relation ON $link_tbl (relation);"); - } else { - echo _("FAILED"); - } - echo "<br />\n"; - } - if ($this->phpwiki_version >= 1030.12200610) { - echo _("Rebuild entire database to upgrade relation links"), " ... "; - if (DATABASE_TYPE == 'dba') { - echo "<b>", _("CONVERTING"), " dba linktable</b>", "(~2 min, max 4 min) ... "; - flush(); - longer_timeout(240); - $this->dbi->_backend->_linkdb->rebuild(); - } else { - flush(); - longer_timeout(180); - $this->dbi->_backend->rebuild(); - } - echo _("OK"), "<br />\n"; - } - } - - /** * preg_replace over local file. * Only line-orientated matches possible. */ @@ -731,7 +491,7 @@ array('key' => 'cache_control_none', 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "CACHE_CONTROL = NONE"), - 'applicable_args' => 'CACHE_CONTROL', + 'applicable_args' => array('CACHE_CONTROL'), 'notice' => _("CACHE_CONTROL is set to 'NONE', and must be changed to 'NO_CACHE'"), 'check_args' => array("/^\s*CACHE_CONTROL\s*=\s*NONE/", "CACHE_CONTROL = NO_CACHE"))); $entry->setApplicableCb(new WikiMethodCb($entry, '_applicable_defined_and_empty')); @@ -741,7 +501,7 @@ array('key' => 'group_method_none', 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "GROUP_METHOD = NONE"), - 'applicable_args' => 'GROUP_METHOD', + 'applicable_args' => array('GROUP_METHOD'), 'notice' => _("GROUP_METHOD is set to NONE, and must be changed to \"NONE\""), 'check_args' => array("/^\s*GROUP_METHOD\s*=\s*NONE/", "GROUP_METHOD = \"NONE\""))); $entry->setApplicableCb(new WikiMethodCb($entry, '_applicable_defined_and_empty')); @@ -751,7 +511,7 @@ array('key' => 'blog_empty_default_prefix', 'fixed_with' => 1013.0, 'header' => sprintf(_("Check for %s"), "BLOG_EMPTY_DEFAULT_PREFIX"), - 'applicable_args' => 'BLOG_EMPTY_DEFAULT_PREFIX', + 'applicable_args' => array('BLOG_EMPTY_DEFAULT_PREFIX'), 'notice' => _("fix BLOG_EMPTY_DEFAULT_PREFIX into BLOG_DEFAULT_EMPTY_PREFIX"), 'check_args' => array("/BLOG_EMPTY_DEFAULT_PREFIX\s*=/", "BLOG_DEFAULT_EMPTY_PREFIX ="))); $entry->setApplicableCb(new WikiMethodCb($entry, '_applicable_defined')); @@ -808,10 +568,6 @@ $this->{$k} = $params[$k]; } } - if (!is_array($this->applicable_args)) // single arg convenience shortcut - $this->applicable_args = array($this->applicable_args); - if (!is_array($this->check_args)) // single arg convenience shortcut - $this->check_args = array($this->check_args); if ($this->notice === '' and count($this->applicable_args) > 0) $this->notice = 'Check for ' . join(', ', $this->applicable_args); $this->_db_key = "_upgrade"; @@ -940,9 +696,6 @@ @ini_set("implicit_flush", true); StartLoadDump($request, _("Upgrading this PhpWiki")); $upgrade = new Upgrade($request); - if (!$request->getArg('nodb')) { - $upgrade->CheckDatabaseUpdate(); // first check cached_html and friends - } if (!$request->getArg('nopgsrc')) { $upgrade->CheckPgsrcUpdate(); $upgrade->CheckActionPageUpdate(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-05 14:06:31
|
Revision: 10441 http://sourceforge.net/p/phpwiki/code/10441 Author: vargenau Date: 2021-08-05 14:06:23 +0000 (Thu, 05 Aug 2021) Log Message: ----------- Remove functions get_db_version, set_db_version, phpwiki_version; simplify upgrade Modified Paths: -------------- trunk/lib/WikiDB.php trunk/lib/main.php trunk/lib/prepend.php trunk/lib/stdlib.php trunk/lib/upgrade.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2021-08-05 10:43:36 UTC (rev 10440) +++ trunk/lib/WikiDB.php 2021-08-05 14:06:23 UTC (rev 10441) @@ -634,19 +634,6 @@ } /** - * Roughly similar to the float in phpwiki_version(). Set by action=upgrade. - */ - public function get_db_version() - { - return (float)$this->get('_db_version'); - } - - public function set_db_version($ver) - { - $this->set('_db_version', (float)$ver); - } - - /** * Access WikiDB global meta-data. * * NOTE: this is currently implemented in a hackish and Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-08-05 10:43:36 UTC (rev 10440) +++ trunk/lib/main.php 2021-08-05 14:06:23 UTC (rev 10441) @@ -93,7 +93,6 @@ // Fixme: Does pear reset the error mask to 1? We have to find the culprit //$x = error_reporting(); - $this->version = phpwiki_version(); parent::__construct(); // [90ms] // Normalize args... Modified: trunk/lib/prepend.php =================================================================== --- trunk/lib/prepend.php 2021-08-05 10:43:36 UTC (rev 10440) +++ trunk/lib/prepend.php 2021-08-05 14:06:23 UTC (rev 10441) @@ -29,7 +29,6 @@ * Things which must be done and defined before anything else. */ -// see lib/stdlib.php: phpwiki_version() define('PHPWIKI_VERSION', '1.6.0'); // A new php-5.1.x feature: Turn off php-5.1.x auto_globals_jit = On, or use this mess below. Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2021-08-05 10:43:36 UTC (rev 10440) +++ trunk/lib/stdlib.php 2021-08-05 14:06:23 UTC (rev 10441) @@ -72,7 +72,6 @@ subPageSlice ($pagename, $pos) isActionPage ($filename) - phpwiki_version () isWikiWord ($word) url_get_contents ($uri) GenerateId ($name) @@ -1677,24 +1676,6 @@ } } -// 1.3.8 => 1030.08 -// 1.3.9-p1 => 1030.091 -// 1.3.10pre => 1030.099 -// 1.3.11pre-20041120 => 1030.1120041120 -// 1.3.12-rc1 => 1030.119 -function phpwiki_version() -{ - static $PHPWIKI_VERSION; - if (!isset($PHPWIKI_VERSION)) { - $arr = explode('.', preg_replace('/\D+$/', '', PHPWIKI_VERSION)); // remove the pre - $arr[2] = preg_replace('/\.+/', '.', preg_replace('/\D/', '.', $arr[2])); - $PHPWIKI_VERSION = $arr[0] * 1000 + $arr[1] * 10 + 0.01 * $arr[2]; - if (strstr(PHPWIKI_VERSION, 'pre') or strstr(PHPWIKI_VERSION, 'rc')) - $PHPWIKI_VERSION -= 0.01; - } - return $PHPWIKI_VERSION; -} - function phpwiki_gzhandler($ob) { /** Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2021-08-05 10:43:36 UTC (rev 10440) +++ trunk/lib/upgrade.php 2021-08-05 14:06:23 UTC (rev 10441) @@ -53,22 +53,15 @@ class Upgrade { - public $current_db_version; public $_configUpdates; public $check_args; public $dbi; private $request; - private $phpwiki_version; - private $isSQL; - private $db_version; function __construct(&$request) { $this->request =& $request; $this->dbi =& $request->_dbi; - $this->phpwiki_version = $this->current_db_version = phpwiki_version(); - $this->db_version = $this->dbi->get_db_version(); - $this->isSQL = $this->dbi->_backend->isSQL(); } private function doPgsrcUpdate($pagename, $path, $filename) @@ -182,11 +175,7 @@ } } - echo "<h2>", sprintf(_("Check for necessary %s updates"), - "pgsrc"), "</h2>\n"; - if ($this->db_version < 1030.12200612) { - echo "<h3>", _("Rename to Help: pages"), "</h3>\n"; - } + echo "<h2>", sprintf(_("Check for necessary %s updates"), "pgsrc"), "</h2>\n"; $translation = __("HomePage"); if ($translation == "HomePage") { $path = findFile(WIKI_PGSRC); @@ -202,9 +191,7 @@ if (!isActionPage($filename)) { // There're a lot of now unneeded pages around. // At first rename the BlaPlugin pages to Help/<pagename> and then to the update. - if ($this->db_version < 1030.12200612) { - $this->_rename_to_help_page($pagename); - } + $this->_rename_to_help_page($pagename); if (in_array($pagename, $themepgsrc)) { echo sprintf(_('%s already checked in theme pgsrc'), $pagename).' ... '._('Skipped').'<br />'; } else { @@ -216,15 +203,13 @@ private function _rename_page_helper($oldname, $pagename) { - echo sprintf(_("rename %s to %s"), $oldname, $pagename), " ... "; if ($this->dbi->isWikiPage($oldname) and !$this->dbi->isWikiPage($pagename)) { + echo sprintf(_("rename %s to %s"), $oldname, $pagename), " ... "; if ($this->dbi->_backend->rename_page($oldname, $pagename)) { echo _("OK"), " <br />\n"; } else { echo ' <span style="color: red; font-weight: bold;">' . _("FAILED") . "</span><br />\n"; } - } else { - echo " " . _("Skipped") . "<br />\n"; } } @@ -278,9 +263,9 @@ unlink($out); return array(false, $reason); } else { - @unlink("$file.bak"); - @rename($file, "$file.bak"); - if (!rename($tmp, $file)) + @unlink($filename.".bak"); + @rename($filename, $filename.".bak"); + if (!rename($tmp, $filename)) return array(false, sprintf(_("couldn't move %s to %s"), $tmp, $filename)); return true; } @@ -295,7 +280,6 @@ "config.ini"), "</h2>\n"; $entry = new UpgradeConfigEntry($this, array('key' => 'cache_control_none', - 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "CACHE_CONTROL = NONE"), 'applicable_args' => array('CACHE_CONTROL'), 'notice' => _("CACHE_CONTROL is set to 'NONE', and must be changed to 'NO_CACHE'"), @@ -305,7 +289,6 @@ $entry = new UpgradeConfigEntry($this, array('key' => 'group_method_none', - 'fixed_with' => 1012.0, 'header' => sprintf(_("Check for %s"), "GROUP_METHOD = NONE"), 'applicable_args' => array('GROUP_METHOD'), 'notice' => _("GROUP_METHOD is set to NONE, and must be changed to \"NONE\""), @@ -315,7 +298,6 @@ $entry = new UpgradeConfigEntry($this, array('key' => 'blog_empty_default_prefix', - 'fixed_with' => 1013.0, 'header' => sprintf(_("Check for %s"), "BLOG_EMPTY_DEFAULT_PREFIX"), 'applicable_args' => array('BLOG_EMPTY_DEFAULT_PREFIX'), 'notice' => _("fix BLOG_EMPTY_DEFAULT_PREFIX into BLOG_DEFAULT_EMPTY_PREFIX"), @@ -337,7 +319,6 @@ { public $applicable_cb; public $header; - public $fixed_with; public $method_cb; public $check_cb; public $reason; @@ -356,10 +337,9 @@ */ function __construct(&$parent, $params) { - $this->parent =& $parent; // get the properties db_version + $this->parent =& $parent; foreach (array('key' => 'required', // the wikidb stores the version when we actually fixed that. - 'fixed_with' => 'required', 'header' => '', // always printed 'applicable_cb' => null, // method to check if applicable 'applicable_args' => array(), // might be the config name @@ -386,25 +366,9 @@ $this->applicable_cb =& $object; } - private function _check_if_already_fixed() - { - // not yet fixed? - if (!isset($this->upgrade['name'])) - return false; - // override with force? - if ($this->parent->request->getArg('force')) - return false; - // already fixed and with an ok version - if ($this->upgrade['name'] >= $this->fixed_with) - return $this->upgrade['name']; - // already fixed but with an older version. do it again. - return false; - } - public function pass() { // store in db no to fix again - $this->upgrade['name'] = $this->parent->phpwiki_version; $this->parent->dbi->set($this->_db_key, $this->upgrade); echo "<b>", _("FIXED"), "</b>"; if (isset($this->reason)) @@ -436,12 +400,6 @@ public function check($args = null) { if ($this->header) echo $this->header, ' ... '; - if ($when = $this->_check_if_already_fixed()) { - // be totally silent if no header is defined. - if ($this->header) echo _("fixed with"), " ", $when, "<br />\n"; - flush(); - return true; - } if (is_object($this->applicable_cb)) { if (!$this->applicable_cb->call_array($this->applicable_args)) return $this->skip(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-06 07:54:30
|
Revision: 10442 http://sourceforge.net/p/phpwiki/code/10442 Author: vargenau Date: 2021-08-06 07:54:22 +0000 (Fri, 06 Aug 2021) Log Message: ----------- Simplify include_once Modified Paths: -------------- trunk/lib/WikiUser/File.php trunk/lib/main.php Modified: trunk/lib/WikiUser/File.php =================================================================== --- trunk/lib/WikiUser/File.php 2021-08-05 14:06:23 UTC (rev 10441) +++ trunk/lib/WikiUser/File.php 2021-08-06 07:54:22 UTC (rev 10442) @@ -22,6 +22,8 @@ * */ +include_once 'lib/pear/File_Passwd.php'; + class _FilePassUser extends _PassUser /** @@ -43,13 +45,10 @@ parent::__construct($UserName); } $this->_userid = $UserName; - // read the .htaccess style file. We use our own copy of the standard pear class. + // read the .htaccess style file. $this->_may_change = defined('AUTH_USER_FILE_STORABLE') && AUTH_USER_FILE_STORABLE; if (empty($file) and defined('AUTH_USER_FILE')) $file = AUTH_USER_FILE; - // same style as in main.php - include_once(dirname(__FILE__) . "/../pear/File_Passwd.php"); - // "__PHP_Incomplete_Class" if (empty($file)) { return; } @@ -84,7 +83,6 @@ if (!$this->_checkPassLength($submitted_password)) { return WIKIAUTH_FORBIDDEN; } - //include_once 'lib/pear/File_Passwd.php'; if ($this->_file->verifyPassword($this->_userid, $submitted_password)) { $this->_authmethod = 'File'; $this->_level = WIKIAUTH_USER; Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2021-08-05 14:06:23 UTC (rev 10441) +++ trunk/lib/main.php 2021-08-06 07:54:22 UTC (rev 10442) @@ -57,8 +57,7 @@ // first mysql request costs [958ms]! [670ms] is mysql_connect() if (in_array('File', $this->_dbi->getAuthParam('USER_AUTH_ORDER'))) { - // force our local copy, until the pear version is fixed. - include_once(dirname(__FILE__) . "/pear/File_Passwd.php"); + include_once 'lib/pear/File_Passwd.php'; } // Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name // There's no way to demand-load it later. This way it's much slower, but needs slightly This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-06 14:42:29
|
Revision: 10454 http://sourceforge.net/p/phpwiki/code/10454 Author: vargenau Date: 2021-08-06 14:42:27 +0000 (Fri, 06 Aug 2021) Log Message: ----------- functions rebuild and check: return status; display status in WikiAdminUtils Modified Paths: -------------- trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend.php trunk/lib/plugin/WikiAdminUtils.php Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2021-08-06 14:40:18 UTC (rev 10453) +++ trunk/lib/WikiDB/backend/dbaBase.php 2021-08-06 14:42:27 UTC (rev 10454) @@ -113,11 +113,15 @@ function rebuild($args = false) { if (!empty($args['all'])) { - parent::rebuild(); + $result = parent::rebuild(); + if ($result == false) { + return false; + } } // rebuild backlink table $this->_linkdb->rebuild(); $this->optimize(); + return true; } function check($args = false) Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2021-08-06 14:40:18 UTC (rev 10453) +++ trunk/lib/WikiDB/backend/file.php 2021-08-06 14:42:27 UTC (rev 10454) @@ -686,6 +686,7 @@ function check($args = false) { //trigger_error("check: Not Implemented", E_USER_WARNING); + return true; } /** @@ -699,6 +700,7 @@ function rebuild($args = false) { //trigger_error("rebuild: Not Implemented", E_USER_WARNING); + return true; } function _parse_searchwords($search) Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2021-08-06 14:40:18 UTC (rev 10453) +++ trunk/lib/WikiDB/backend.php 2021-08-06 14:42:27 UTC (rev 10454) @@ -494,6 +494,7 @@ */ function check($args = false) { + return true; } /** @@ -530,6 +531,7 @@ $this->set_links($pagename, $links); $this->unlock(array('version', 'page', 'recent', 'link', 'nonempty')); } + return true; } function _parse_searchwords($search) Modified: trunk/lib/plugin/WikiAdminUtils.php =================================================================== --- trunk/lib/plugin/WikiAdminUtils.php 2021-08-06 14:40:18 UTC (rev 10453) +++ trunk/lib/plugin/WikiAdminUtils.php 2021-08-06 14:42:27 UTC (rev 10454) @@ -156,9 +156,9 @@ } } $pages->free(); - if (!$count) + if (!$count) { return _("No pages with bad names had to be deleted."); - else { + } else { return HTML(fmt("Deleted %d pages with invalid names:", $count), HTML::div(array('class' => 'align-left'), $list)); } @@ -210,8 +210,12 @@ { longer_timeout(180); $dbh = $request->getDbh(); - //FIXME: display result. - return $dbh->_backend->check($args); + $result = $dbh->_backend->check($args); + if ($result) { + return _("Database check was successful."); + } else { + return _("Database check failed."); + } } private function _do_db_rebuild($request, $args) @@ -218,8 +222,12 @@ { longer_timeout(240); $dbh = $request->getDbh(); - //FIXME: display result. - return $dbh->_backend->rebuild($args); + $result = $dbh->_backend->rebuild($args); + if ($result) { + return _("Database rebuild was successful."); + } else { + return _("Database rebuild failed."); + } } // pagelist with enable/disable button This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-11 10:16:03
|
Revision: 10482 http://sourceforge.net/p/phpwiki/code/10482 Author: vargenau Date: 2021-08-11 10:16:00 +0000 (Wed, 11 Aug 2021) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/ADODB_mssqlnative.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend.php trunk/lib/plugin/AnalyseAccessLogSql.php Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/ADODB.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -373,8 +373,7 @@ * @param int $version Which version to get * @param bool $want_content Do we need content? * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array The version data, or false if specified version does not exist. */ function get_versiondata($pagename, $version, $want_content = false) { @@ -592,8 +591,12 @@ return $result; } - /* - * Update link table. + /** + * Set links for page. + * + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. + * * on DEBUG: delete old, deleted links from page */ function set_links($pagename, $links) @@ -757,9 +760,20 @@ return true; } - /* + /** * Find pages which link to or are linked from a page. * + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations + * + * FIXME: array or iterator? + * @return object A WikiDB_backend_iterator. + * * Optimization: save request->_dbi->_iwpcache[] to avoid further iswikipage checks * (linkExistingWikiWord or linkUnknownWikiWord) * This is called on every page header GleanDescription, so we can store all the @@ -1113,9 +1127,13 @@ return new WikiDB_backend_ADODB_iter($this, $result, array('pagename', 'wantedfrom')); } - /* + /** * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name */ + function rename_page($pagename, $to) { $dbh = &$this->_dbh; Modified: trunk/lib/WikiDB/backend/ADODB_mssqlnative.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -95,8 +95,12 @@ return empty($data) ? array() : unserialize(stripslashes($data)); } - /* - * Update link table. + /** + * Set links for page. + * + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. + * * on DEBUG: delete old, deleted links from page */ function set_links($pagename, $links) Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/PDO.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -456,8 +456,7 @@ * @param int $version Which version to get * @param bool $want_content Do we need content? * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array The version data, or false if specified version does not exist. */ function get_versiondata($pagename, $version, $want_content = false) { @@ -716,8 +715,12 @@ return $result; } - /* - * Update link table. + /** + * Set links for page. + * + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. + * * on DEBUG: delete old, deleted links from page */ function set_links($pagename, $links) @@ -767,9 +770,20 @@ return true; } - /* + /** * Find pages which link to or are linked from a page. * + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations + * + * FIXME: array or iterator? + * @return object A WikiDB_backend_iterator. + * * Optimization: save request->_dbi->_iwpcache[] to avoid further iswikipage checks * (linkExistingWikiWord or linkUnknownWikiWord) * This is called on every page header GleanDescription, so we can store all the @@ -1107,9 +1121,13 @@ return new WikiDB_backend_PDO_iter($this, $result, array('pagename', 'wantedfrom')); } - /* + /** * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name */ + function rename_page($pagename, $to) { $dbh = &$this->_dbh; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/PearDB.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -323,8 +323,7 @@ * @param int $version Which version to get * @param bool $want_content Do we need content? * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array The version data, or false if specified version does not exist. */ function get_versiondata($pagename, $version, $want_content = false) { @@ -482,8 +481,11 @@ return $result; } - /* - * Update link table. + /** + * Set links for page. + * + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. */ function set_links($pagename, $links) { @@ -529,9 +531,20 @@ $this->unlock(); } - /* + /** * Find pages which link to or are linked from a page. * + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations + * + * FIXME: array or iterator? + * @return object A WikiDB_backend_iterator. + * * TESTME relations: get_links is responsible to add the relation to the pagehash * as 'linkrelation' key as pagename. See WikiDB_PageIterator::next * if (isset($next['linkrelation'])) @@ -901,9 +914,13 @@ return substr($s, 0, -1) . ")"; } - /* + /** * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name */ + function rename_page($pagename, $to) { $dbh = &$this->_dbh; Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -178,8 +178,7 @@ * @param int $version Which version to get * @param bool $want_content Do we need content? * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array The version data, or false if specified version does not exist. */ function get_versiondata($pagename, $version, $want_content = false) { @@ -299,9 +298,20 @@ return $result; } - /* + /** * Find pages which link to or are linked from a page. * + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations + * + * FIXME: array or iterator? + * @return object A WikiDB_backend_iterator. + * * TESTME relations: get_links is responsible to add the relation to the pagehash * as 'linkrelation' key as pagename. See WikiDB_PageIterator::next * if (isset($next['linkrelation'])) @@ -574,9 +584,13 @@ return new WikiDB_backend_PearDB_generic_iter($this, $result); } - /* + /** * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name */ + function rename_page($pagename, $to) { $dbh = &$this->_dbh; Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/dbaBase.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -214,8 +214,7 @@ * @param int $version Which version to get * @param bool $want_content Do we need content? * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array The version data, or false if specified version does not exist. */ function get_versiondata($pagename, $version, $want_content = false) { @@ -279,6 +278,13 @@ $this->set_links($pagename, array()); } + /** + * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name + */ + function rename_page($pagename, $to) { /** @@ -430,11 +436,32 @@ array('sortby' => $sortby)); // already limited } + /** + * Set links for page. + * + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. + */ function set_links($pagename, $links) { $this->_linkdb->set_links($pagename, $links); } + /** + * Find pages which link to or are linked from a page. + * + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations + * + * FIXME: array or iterator? + * @return object A WikiDB_backend_iterator. + */ + function get_links($pagename, $reversed = true, $include_empty = false, $sortby = '', $limit = '', $exclude = '', $want_relations = false) Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend/file.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -307,7 +307,7 @@ * will not affect the value of 'hits' (or whatever other meta-data * may have been stored for the page.) * - * To delete a particular piece of meta-data, set it's value to false. + * To delete a particular piece of meta-data, set its value to false. * <pre> * $backend->update_pagedata($pagename, array('locked' => false)); * </pre> @@ -338,7 +338,7 @@ /** * Get the current version number for a page. * - * @param $pagename string Page name. + * @param string $pagename Page name. * @return int The latest version number for the page. Returns zero if * no versions of a page exist. */ @@ -350,10 +350,10 @@ /** * Get preceding version number. * - * @param $pagename string Page name. - * @param $version int Find version before this one. + * @param string $pagename Page name. + * @param int $version Find version before this one. * @return int The version number of the version in the database which - * immediately preceeds $version. + * immediately precedes $version. * * FIXED: Check if this version really exists! */ @@ -369,9 +369,9 @@ /** * Get revision meta-data and content. * - * @param $pagename string Page name. - * @param $version integer Which version to get. - * @param $want_content boolean + * @param string $pagename Page name. + * @param int $version Which version to get. + * @param bool $want_content * Indicates the caller really wants the page content. If this * flag is not set, the backend is free to skip fetching of the * page content (as that may be expensive). If the backend omits @@ -378,8 +378,7 @@ * the content, the backend might still want to set the value of * '%content' to the empty string if it knows there's no content. * - * @return array hash The version data, or false if specified version does not - * exist. + * @return array|bool The version data, or false if specified version does not exist. * * Some keys which might be present in the $versiondata hash are: * <dl> @@ -399,10 +398,14 @@ return $vd; } - /* - * Rename all files for this page + /** + * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name */ - public function rename_page($pagename, $to) + + function rename_page($pagename, $to) { $version = $this->_getLatestVersion($pagename); foreach ($this->_dir_names as $type => $path) { @@ -425,11 +428,9 @@ } /** - * Delete page from the database. + * Delete page (and all its revisions) from the database. * - * Delete page (and all it's revisions) from the database. - * - * @param $pagename string Page name. + * @param string $pagename Page name. */ function purge_page($pagename) { @@ -453,8 +454,8 @@ * In fact, to be safe, backends should probably allow the deletion of * the most recent version. * - * @param $pagename string Page name. - * @param $version integer Version to delete. + * @param string $pagename Page name. + * @param int $version int Version to delete. */ function delete_versiondata($pagename, $version) { @@ -480,7 +481,7 @@ * If the given ($pagename,$version) is already in the database, * this method completely overwrites any stored data for that version. * - * @param string $pagename Page name. + * @param string $pagename string Page name. * @param int $version New revisions content. * @param array $data hash New revision metadata. * @@ -522,9 +523,8 @@ /** * Set links for page. * - * @param $pagename string Page name. - * - * @param $links array List of page(names) which page links to. + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. */ function set_links($pagename, $links) { @@ -534,13 +534,13 @@ /** * Find pages which link to or are linked from a page. * - * @param string $pagename Page name. - * @param bool $reversed True to get backlinks. - * @param bool $include_empty True to get empty pages - * @param string $sortby - * @param string $limit - * @param string $exclude Pages to exclude. - * @param bool $want_relations True to get relations. + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages + * @param string $sortby + * @param string $limit + * @param string $exclude Pages to exclude + * @param bool $want_relations True to get relations * * FIXME: array or iterator? * @return object A WikiDB_backend_iterator. @@ -571,7 +571,7 @@ /** * Get all revisions of a page. * - * @param $pagename string The page name. + * @param string $pagename The page name. * @return object A WikiDB_backend_iterator. */ /* @@ -585,7 +585,7 @@ * Get all pages in the database. * * Pages should be returned in alphabetical order if that is - * feasable. + * feasible. * * @param bool $include_empty * If set, even pages with no content will be returned @@ -602,7 +602,8 @@ * * @return object A WikiDB_backend_iterator. */ - public function get_all_pages($include_empty = false, $sortby = '', $limit = '', $exclude = '') + public function get_all_pages($include_empty = false, + $sortby = '', $limit = '', $exclude = '') { require_once 'lib/PageList.php'; $this->_loadLatestVersions(); @@ -634,21 +635,36 @@ return count($this->_latest_versions); } - /* + /** * Lock backend database. + * + * Calls may be nested. + * + * @param array $tables + * @param bool $write_lock Unless this is set to false, a write lock + * is acquired, otherwise a read lock. If the backend doesn't support + * read locking, then it should make a write lock no matter which type + * of lock was requested. + * + * All backends <em>should</em> support write locking. */ function lock($tables = array(), $write_lock = true) { } - /* + /** * Unlock backend database. + * + * @param array $tables + * @param bool $force Normally, the database is not unlocked until + * unlock() is called as many times as lock() has been. If $force is + * set to true, the the database is unconditionally unlocked. */ function unlock($tables = array(), $force = false) { } - /* + /** * Close database. */ function close() @@ -655,7 +671,7 @@ { } - /* + /** * Synchronize with filesystem. * * This should flush all unwritten data to the filesystem. @@ -664,12 +680,15 @@ { } - /* + /** * Optimize the database. + * + * @return bool */ function optimize() { - return true; //trigger_error("optimize: Not Implemented", E_USER_WARNING); + //trigger_error("optimize: Not Implemented", E_USER_WARNING); + return true; } /** @@ -681,7 +700,8 @@ * trigger_error("Message goes here.", E_USER_WARNING); * </pre> * - * @return boolean True iff database is in a consistent state. + * @param bool $args + * @return bool True iff database is in a consistent state. */ function check($args = false) { @@ -690,12 +710,14 @@ } /** - * Put the database into a consistent state. + * Put the database into a consistent state + * by reparsing and restoring all pages. * * This should put the database into a consistent state. * (I.e. rebuild indexes, etc...) * - * @return boolean True iff successful. + * @param bool $args + * @return bool True iff successful. */ function rebuild($args = false) { Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/WikiDB/backend.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -11,7 +11,7 @@ * * 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 + * 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 @@ -31,7 +31,7 @@ * //:pagename (*) * * hits - * is_locked + * locked * * Versiondata * @@ -150,8 +150,7 @@ * the content, the backend might still want to set the value of * '%content' to the empty string if it knows there's no content. * - * @return array|bool hash The version data, or false if specified version does not - * exist. + * @return array|bool The version data, or false if specified version does not exist. * * Some keys which might be present in the $versiondata hash are: * <dl> @@ -166,6 +165,15 @@ abstract function get_versiondata($pagename, $version, $want_content = false); /** + * Rename page in the database. + * + * @param string $pagename Current page name + * @param string $to Future page name + */ + + abstract function rename_page($pagename, $to); + + /** * Delete page from the database with backup possibility. * This should remove all links (from the named page) from * the link database. @@ -268,9 +276,10 @@ /** * Set links for page. * - * @param string $pagename Page name. + * @param string $pagename Page name + * @param array $links List of page(names) which page links to. * - * @param array $links List of page(names) which page links to. + * on DEBUG: delete old, deleted links from page */ abstract function set_links($pagename, $links); @@ -277,12 +286,13 @@ /** * Find pages which link to or are linked from a page. * - * @param string $pagename Page name. - * @param bool $reversed True to get backlinks. - * @param bool $include_empty + * @param string $pagename Page name + * @param bool $reversed True to get backlinks + * @param bool $include_empty True to get empty pages * @param string $sortby * @param string $limit - * @param string $exclude + * @param string $exclude Pages to exclude + * @param bool $want_relations * * FIXME: array or iterator? * @return object A WikiDB_backend_iterator. @@ -290,7 +300,8 @@ // FIXME: implement simple (but slow) link finder. abstract function get_links($pagename, $reversed = true, $include_empty = false, - $sortby = '', $limit = '', $exclude = ''); + $sortby = '', $limit = '', $exclude = '', + $want_relations = false); /** * Get all revisions of a page. @@ -324,8 +335,8 @@ * @param string $exclude * @return object A WikiDB_backend_iterator. */ - abstract public function get_all_pages($include_empty, - $sortby = '', $limit = '', $exclude = ''); + abstract function get_all_pages($include_empty, + $sortby = '', $limit = '', $exclude = ''); /** * Title or full text search. Modified: trunk/lib/plugin/AnalyseAccessLogSql.php =================================================================== --- trunk/lib/plugin/AnalyseAccessLogSql.php 2021-08-11 08:05:47 UTC (rev 10481) +++ trunk/lib/plugin/AnalyseAccessLogSql.php 2021-08-11 10:16:00 UTC (rev 10482) @@ -11,7 +11,7 @@ * * 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 + * 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-13 14:26:00
|
Revision: 10507 http://sourceforge.net/p/phpwiki/code/10507 Author: vargenau Date: 2021-08-13 14:25:58 +0000 (Fri, 13 Aug 2021) Log Message: ----------- Move functions _ncsa_time and _zone_offset from class Request_AccessLogEntry to stdlib Modified Paths: -------------- trunk/lib/Request.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiUser.php trunk/lib/stdlib.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2021-08-13 13:33:55 UTC (rev 10506) +++ trunk/lib/Request.php 2021-08-13 14:25:58 UTC (rev 10507) @@ -1067,41 +1067,6 @@ $this->duration = strtr(sprintf("%f", $seconds), ",", "."); } - /** - * Get time zone offset. - * - * @param int $time Unix timestamp (defaults to current time). - * @return string Zone offset, e.g. "-0800" for PST. - */ - static function _zone_offset($time = 0) - { - if (!$time) - $time = time(); - $offset = date("Z", $time); - $negoffset = ""; - if ($offset < 0) { - $negoffset = "-"; - $offset = -$offset; - } - $offhours = floor($offset / 3600); - $offmins = $offset / 60 - $offhours * 60; - return sprintf("%s%02d%02d", $negoffset, $offhours, $offmins); - } - - /** - * Format time in NCSA format. - * - * @param int $time Unix timestamp (defaults to current time). - * @return string Formatted date & time. - */ - function _ncsa_time($time = 0) - { - if (!$time) - $time = time(); - return date("d/M/Y:H:i:s", $time) . - " " . $this->_zone_offset(); - } - function write() { if ($this->_accesslog->logfile) $this->write_file(); @@ -1115,7 +1080,7 @@ { $entry = sprintf('%s %s %s [%s] "%s" %d %d "%s" "%s"', $this->host, $this->ident, $this->user, - $this->_ncsa_time($this->time), + _ncsa_time($this->time), $this->request, $this->status, $this->size, $this->referer, $this->user_agent); if (!empty($this->_accesslog->reader)) { Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 13:33:55 UTC (rev 10506) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 14:25:58 UTC (rev 10507) @@ -162,7 +162,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - $entry->_ncsa_time($entry->time), + _ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 13:33:55 UTC (rev 10506) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 14:25:58 UTC (rev 10507) @@ -115,7 +115,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - $entry->_ncsa_time($entry->time), + _ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2021-08-13 13:33:55 UTC (rev 10506) +++ trunk/lib/WikiUser.php 2021-08-13 14:25:58 UTC (rev 10507) @@ -598,7 +598,7 @@ if ($logout) { // Log out if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = Request_AccessLogEntry::_zone_offset(); + $zone_offset = _zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"', (string)$request->get('REMOTE_HOST'), @@ -634,7 +634,7 @@ $authlevel = $this->checkPass($passwd === false ? '' : $passwd); if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = Request_AccessLogEntry::_zone_offset(); + $zone_offset = _zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $manglepasswd = $passwd; for ($i = 0; $i < strlen($manglepasswd); $i++) { Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2021-08-13 13:33:55 UTC (rev 10506) +++ trunk/lib/stdlib.php 2021-08-13 14:25:58 UTC (rev 10507) @@ -1074,6 +1074,40 @@ } /** + * Get time zone offset. + * + * @param int $time Unix timestamp (defaults to current time). + * @return string Zone offset, e.g. "-0800" for PST. + */ +function _zone_offset($time = 0) +{ + if (!$time) + $time = time(); + $offset = date("Z", $time); + $negoffset = ""; + if ($offset < 0) { + $negoffset = "-"; + $offset = -$offset; + } + $offhours = floor($offset / 3600); + $offmins = $offset / 60 - $offhours * 60; + return sprintf("%s%02d%02d", $negoffset, $offhours, $offmins); +} + +/** + * Format time in NCSA format. + * + * @param int $time Unix timestamp (defaults to current time). + * @return string Formatted date & time. + */ +function _ncsa_time($time = 0) +{ + if (!$time) + $time = time(); + return date("d/M/Y:H:i:s", $time) . " " . _zone_offset(); +} + +/** * Get time offset for local time zone. * * @param int $time Get offset for this time. Default: now. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-08-13 14:39:57
|
Revision: 10508 http://sourceforge.net/p/phpwiki/code/10508 Author: vargenau Date: 2021-08-13 14:39:54 +0000 (Fri, 13 Aug 2021) Log Message: ----------- Rename _ncsa_time as ncsa_time, _zone_offset as zone_offset; no parameter for zone_offset Modified Paths: -------------- trunk/lib/Request.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiDB/backend.php trunk/lib/WikiUser.php trunk/lib/stdlib.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/Request.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1080,7 +1080,7 @@ { $entry = sprintf('%s %s %s [%s] "%s" %d %d "%s" "%s"', $this->host, $this->ident, $this->user, - _ncsa_time($this->time), + ncsa_time($this->time), $this->request, $this->status, $this->size, $this->referer, $this->user_agent); if (!empty($this->_accesslog->reader)) { Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -162,7 +162,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - _ncsa_time($entry->time), + ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PDO.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1359,7 +1359,7 @@ $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); - $ncsa_time = _ncsa_time($entry->time); + $ncsa_time = ncsa_time($entry->time); $sth->bindParam(8, $ncsa_time, PDO::PARAM_STR, 28); $sth->bindParam(9, $entry->time, PDO::PARAM_INT); $sth->bindParam(10, $entry->status, PDO::PARAM_INT); Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -82,7 +82,7 @@ $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); - $ncsa_time = _ncsa_time($entry->time); + $ncsa_time = ncsa_time($entry->time); $sth->bindParam(8, $ncsa_time, PDO::PARAM_STR, 28); $sth->bindParam(9, $entry->time, PDO::PARAM_INT); $sth->bindParam(10, $entry->status, PDO::PARAM_INT); Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -115,7 +115,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - _ncsa_time($entry->time), + ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -707,7 +707,7 @@ $entry->request, $entry->request_args, $entry->request_uri, - $entry->_ncsa_time($entry->time), + $entry->ncsa_time($entry->time), $entry->status, (int)$entry->size, $entry->referer, Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiUser.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -598,7 +598,7 @@ if ($logout) { // Log out if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = _zone_offset(); + $zone_offset = zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"', (string)$request->get('REMOTE_HOST'), @@ -634,7 +634,7 @@ $authlevel = $this->checkPass($passwd === false ? '' : $passwd); if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = _zone_offset(); + $zone_offset = zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $manglepasswd = $passwd; for ($i = 0; $i < strlen($manglepasswd); $i++) { Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/stdlib.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1076,13 +1076,11 @@ /** * Get time zone offset. * - * @param int $time Unix timestamp (defaults to current time). * @return string Zone offset, e.g. "-0800" for PST. */ -function _zone_offset($time = 0) +function zone_offset() { - if (!$time) - $time = time(); + $time = time(); $offset = date("Z", $time); $negoffset = ""; if ($offset < 0) { @@ -1100,11 +1098,11 @@ * @param int $time Unix timestamp (defaults to current time). * @return string Formatted date & time. */ -function _ncsa_time($time = 0) +function ncsa_time($time = 0) { if (!$time) $time = time(); - return date("d/M/Y:H:i:s", $time) . " " . _zone_offset(); + return date("d/M/Y:H:i:s", $time) . " " . zone_offset(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |