You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
| 2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
| 2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
| 2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
| 2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
| 2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
| 2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
| 2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
| 2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
| 2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
| 2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
| 2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
| 2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
| 2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
| 2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
| 2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
| 2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
| 2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
| 2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <var...@us...> - 2021-09-10 13:14:14
|
Revision: 10550
http://sourceforge.net/p/phpwiki/code/10550
Author: vargenau
Date: 2021-09-10 13:14:12 +0000 (Fri, 10 Sep 2021)
Log Message:
-----------
NewPagesPerUser plugin: check comments and links are boolean
Modified Paths:
--------------
trunk/lib/plugin/NewPagesPerUser.php
Modified: trunk/lib/plugin/NewPagesPerUser.php
===================================================================
--- trunk/lib/plugin/NewPagesPerUser.php 2021-09-10 13:12:44 UTC (rev 10549)
+++ trunk/lib/plugin/NewPagesPerUser.php 2021-09-10 13:14:12 UTC (rev 10550)
@@ -47,12 +47,11 @@
function getDefaultArguments()
{
return array('userid' => '',
- 'month' => 0,
- 'since' => 0,
- 'until' => 0,
- 'comments' => 0,
- 'links' => 1,
- 'debug' => 0,
+ 'month' => '',
+ 'since' => '',
+ 'until' => '',
+ 'comments' => false,
+ 'links' => true
);
}
@@ -68,6 +67,22 @@
global $WikiTheme;
$args = $this->getArgs($argstr, $request);
extract($args);
+
+ if (($comments == '0') || ($comments == 'false')) {
+ $comments = false;
+ } elseif (($comments == '1') || ($comments == 'true')) {
+ $comments = true;
+ } else {
+ return $this->error(sprintf(_("Argument '%s' must be a boolean"), "comments"));
+ }
+ if (($links == '0') || ($links == 'false')) {
+ $links = false;
+ } elseif (($links == '1') || ($links == 'true')) {
+ $links = true;
+ } else {
+ return $this->error(sprintf(_("Argument '%s' must be a boolean"), "links"));
+ }
+
if ($since)
$since = strtotime($since);
if ($month) {
@@ -85,11 +100,7 @@
if (!$page->exists()) continue;
$rev = $page->getRevision(1, false);
$date = $rev->get('mtime');
- //$author = $rev->get('author_id');
$author = $page->getOwner();
- if (defined('DEBUG') && DEBUG && $debug) {
- echo "<i>$pagename, ", strftime("%Y-%m-%d %h:%m:%s", $date), ", $author</i><br />\n";
- }
if ($userid and (!preg_match("/" . $userid . "/", $author))) continue;
if ($since and $date < $since) continue;
if ($until and $date > $until) continue;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-10 13:12:46
|
Revision: 10549
http://sourceforge.net/p/phpwiki/code/10549
Author: vargenau
Date: 2021-09-10 13:12:44 +0000 (Fri, 10 Sep 2021)
Log Message:
-----------
Update pgsrc/Help%2FNewPagesPerUserPlugin
Modified Paths:
--------------
trunk/pgsrc/Help%2FNewPagesPerUserPlugin
Modified: trunk/pgsrc/Help%2FNewPagesPerUserPlugin
===================================================================
--- trunk/pgsrc/Help%2FNewPagesPerUserPlugin 2021-09-09 15:06:43 UTC (rev 10548)
+++ trunk/pgsrc/Help%2FNewPagesPerUserPlugin 2021-09-10 13:12:44 UTC (rev 10549)
@@ -1,4 +1,4 @@
-Date: Thu, 13 Oct 2016 15:09:28 +0000
+Date: Fri, 10 Sep 2021 11:53:01 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=Help%2FNewPagesPerUserPlugin;
@@ -23,42 +23,73 @@
! Default value
|-
| **userid**
-|
-| 0
+| Limit to the pages created by a specific user.
+| //none//
|-
| **month**
-|
-| 0
+| Limit to the pages created during a specific month.
+| //none//
|-
| **since**
-|
-| 0
+| Limit to the pages created after a specific date.
+| //none//
|-
| **until**
-|
-| 0
+| Limit to the pages created before a specific date.
+| //none//
|-
| **comments**
-|
-| 0
+| Boolean. If true, pages that are comments are included (page names that include "/Comment").
+| false
|-
| **links**
-| Have a link to pages.
+| Boolean. If true, have a link to pages.
| true
|}
-== Example ==
+== Examples ==
{{{
-<<NewPagesPerUser links=0>>
+<<NewPagesPerUser userid=admin>>
}}}
-<<NewPagesPerUser links=0>>
+<<NewPagesPerUser userid=admin>>
+{{{
+<<NewPagesPerUser month=September>>
+}}}
+
+<<NewPagesPerUser month=September>>
+
+{{{
+<<NewPagesPerUser since=2021-08-20>>
+}}}
+
+<<NewPagesPerUser since=2021-08-20>>
+
+{{{
+<<NewPagesPerUser until="August 2021">>
+}}}
+
+<<NewPagesPerUser until="August 2021">>
+
+{{{
+<<NewPagesPerUser comments=true>>
+}}}
+
+<<NewPagesPerUser comments=true>>
+
+{{{
+<<NewPagesPerUser links=false>>
+}}}
+
+<<NewPagesPerUser links=false>>
+
== Author ==
* [[Help:Reini Urban|Reini Urban]]
== See Also ==
+* [[RecentNewPages]]
<noinclude>
----
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-09 15:06:44
|
Revision: 10548
http://sourceforge.net/p/phpwiki/code/10548
Author: vargenau
Date: 2021-09-09 15:06:43 +0000 (Thu, 09 Sep 2021)
Log Message:
-----------
lib/plugin/EditMetaData.php: use class error for error message
Modified Paths:
--------------
trunk/lib/plugin/EditMetaData.php
Modified: trunk/lib/plugin/EditMetaData.php
===================================================================
--- trunk/lib/plugin/EditMetaData.php 2021-09-08 11:54:16 UTC (rev 10547)
+++ trunk/lib/plugin/EditMetaData.php 2021-09-09 15:06:43 UTC (rev 10548)
@@ -158,7 +158,7 @@
$html->pushContent($form);
} else {
- $html->pushContent(HTML::em(_("Requires WikiAdmin privileges to edit.")));
+ $html->pushContent(HTML::p(array('class' => 'error'), _("Requires WikiAdmin privileges to edit.")));
}
return $html;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-08 11:54:19
|
Revision: 10547
http://sourceforge.net/p/phpwiki/code/10547
Author: vargenau
Date: 2021-09-08 11:54:16 +0000 (Wed, 08 Sep 2021)
Log Message:
-----------
Fix Help and PhpWikiManual links in SpecialPages
Modified Paths:
--------------
trunk/pgsrc/SpecialPages
trunk/themes/fusionforge/pgsrc/SpecialPages
Modified: trunk/pgsrc/SpecialPages
===================================================================
--- trunk/pgsrc/SpecialPages 2021-09-06 17:22:01 UTC (rev 10546)
+++ trunk/pgsrc/SpecialPages 2021-09-08 11:54:16 UTC (rev 10547)
@@ -1,4 +1,4 @@
-Date: Wed, 3 Aug 2021 09:27:34 +0000
+Date: Wed, 8 Sep 2021 09:52:29 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=SpecialPages;
@@ -10,8 +10,8 @@
|- style="vertical-align: top"
| style="padding-right: 10px" |
== Help ==
-* [[Help:Help|Help]]
-* [[Help:PhpWikiManual|PhpWikiManual]]
+* [[Help]]
+* [[PhpWikiManual]]
| style="padding-right: 10px" |
== Pages ==
* [[AllPages]]
Modified: trunk/themes/fusionforge/pgsrc/SpecialPages
===================================================================
--- trunk/themes/fusionforge/pgsrc/SpecialPages 2021-09-06 17:22:01 UTC (rev 10546)
+++ trunk/themes/fusionforge/pgsrc/SpecialPages 2021-09-08 11:54:16 UTC (rev 10547)
@@ -1,4 +1,4 @@
-Date: Wed, 4 Aug 2021 09:27:34 +0000
+Date: Wed, 8 Sep 2021 13:52:29 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=SpecialPages;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-06 17:22:03
|
Revision: 10546
http://sourceforge.net/p/phpwiki/code/10546
Author: vargenau
Date: 2021-09-06 17:22:01 +0000 (Mon, 06 Sep 2021)
Log Message:
-----------
Add braces
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-06 17:19:47 UTC (rev 10545)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-06 17:22:01 UTC (rev 10546)
@@ -1307,6 +1307,9 @@
/*
* LIMIT with OFFSET is not SQL specified.
+ *
+ * This function must be overloaded in specific backends.
+ *
* mysql: LIMIT $offset, $count
* pgsql,sqlite: LIMIT $count OFFSET $offset
* InterBase,FireBird: ROWS $offset TO $last
@@ -1329,10 +1332,12 @@
if ($offset) {
$limit = " LIMIT $count";
trigger_error("unsupported OFFSET in SQL ignored", E_USER_WARNING);
- } else
+ } else {
$limit = " LIMIT $count";
- } else
+ }
+ } else {
$limit = '';
+ }
return $limit;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-06 17:19:50
|
Revision: 10545
http://sourceforge.net/p/phpwiki/code/10545
Author: vargenau
Date: 2021-09-06 17:19:47 +0000 (Mon, 06 Sep 2021)
Log Message:
-----------
Fix syntax error
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO_mysql.php
trunk/lib/WikiDB/backend/PDO_pgsql.php
Modified: trunk/lib/WikiDB/backend/PDO_mysql.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO_mysql.php 2021-09-06 17:10:42 UTC (rev 10544)
+++ trunk/lib/WikiDB/backend/PDO_mysql.php 2021-09-06 17:19:47 UTC (rev 10545)
@@ -109,10 +109,10 @@
$limit = " LIMIT $from, $count";
} else {
$limit = " LIMIT $count";
+ }
} else {
$limit = '';
}
return $limit;
}
-
}
Modified: trunk/lib/WikiDB/backend/PDO_pgsql.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO_pgsql.php 2021-09-06 17:10:42 UTC (rev 10544)
+++ trunk/lib/WikiDB/backend/PDO_pgsql.php 2021-09-06 17:19:47 UTC (rev 10545)
@@ -47,10 +47,10 @@
$limit = " LIMIT $count OFFSET $from";
} else {
$limit = " LIMIT $count";
+ }
} else {
$limit = '';
}
return $limit;
}
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-06 17:10:44
|
Revision: 10544
http://sourceforge.net/p/phpwiki/code/10544
Author: vargenau
Date: 2021-09-06 17:10:42 +0000 (Mon, 06 Sep 2021)
Log Message:
-----------
Add braces, rename $offset to $from
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO_mysql.php
trunk/lib/WikiDB/backend/PDO_pgsql.php
Modified: trunk/lib/WikiDB/backend/PDO_mysql.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO_mysql.php 2021-09-06 17:08:49 UTC (rev 10543)
+++ trunk/lib/WikiDB/backend/PDO_mysql.php 2021-09-06 17:10:42 UTC (rev 10544)
@@ -99,19 +99,19 @@
/*
* offset specific syntax within mysql
- * convert from,count to SQL "LIMIT $offset, $count"
+ * convert from,count to SQL "LIMIT $from, $count"
*/
function _limit_sql($limit = false)
{
if ($limit) {
- list($offset, $count) = $this->limit($limit);
- if ($offset)
- // pgsql needs "LIMIT $count OFFSET $from"
- $limit = " LIMIT $offset, $count";
- else
+ list($from, $count) = $this->limit($limit);
+ if ($from) {
+ $limit = " LIMIT $from, $count";
+ } else {
$limit = " LIMIT $count";
- } else
+ } else {
$limit = '';
+ }
return $limit;
}
Modified: trunk/lib/WikiDB/backend/PDO_pgsql.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO_pgsql.php 2021-09-06 17:08:49 UTC (rev 10543)
+++ trunk/lib/WikiDB/backend/PDO_pgsql.php 2021-09-06 17:10:42 UTC (rev 10544)
@@ -30,25 +30,27 @@
class WikiDB_backend_PDO_pgsql
extends WikiDB_backend_PDO
{
+ function backendType()
+ {
+ return 'pgsql';
+ }
/*
+ * offset specific syntax within pgsql
* convert from,count to SQL "LIMIT $count OFFSET $from"
*/
function _limit_sql($limit = false)
{
if ($limit) {
- list($offset, $count) = $this->limit($limit);
- if ($offset)
- $limit = " LIMIT $count OFFSET $offset";
- else
+ list($from, $count) = $this->limit($limit);
+ if ($from) {
+ $limit = " LIMIT $count OFFSET $from";
+ } else {
$limit = " LIMIT $count";
- } else
+ } else {
$limit = '';
+ }
return $limit;
}
- function backendType()
- {
- return 'pgsql';
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-06 17:08:50
|
Revision: 10543
http://sourceforge.net/p/phpwiki/code/10543
Author: vargenau
Date: 2021-09-06 17:08:49 +0000 (Mon, 06 Sep 2021)
Log Message:
-----------
lib/WikiDB/backend/PDO_oci8.php: move function backendType at top
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO_oci8.php
Modified: trunk/lib/WikiDB/backend/PDO_oci8.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO_oci8.php 2021-09-06 16:49:20 UTC (rev 10542)
+++ trunk/lib/WikiDB/backend/PDO_oci8.php 2021-09-06 17:08:49 UTC (rev 10543)
@@ -1,5 +1,5 @@
<?php
-/*
+/**
* Copyright © 2007 $ThePhpWikiProgrammingTeam
*
* This file is part of PhpWiki.
@@ -30,6 +30,10 @@
class WikiDB_backend_PDO_oci8
extends WikiDB_backend_PDO
{
+ function backendType()
+ {
+ return 'oci8';
+ }
function optimize()
{
@@ -60,11 +64,6 @@
}
}
- function backendType()
- {
- return 'oci8';
- }
-
function write_accesslog(&$entry)
{
$dbh = &$this->_dbh;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-06 16:49:22
|
Revision: 10542
http://sourceforge.net/p/phpwiki/code/10542
Author: vargenau
Date: 2021-09-06 16:49:20 +0000 (Mon, 06 Sep 2021)
Log Message:
-----------
PDO: make paging work for mysql (AllPages, MostPopular...)
Modified Paths:
--------------
trunk/lib/WikiDB/PDO.php
Modified: trunk/lib/WikiDB/PDO.php
===================================================================
--- trunk/lib/WikiDB/PDO.php 2021-09-05 14:44:53 UTC (rev 10541)
+++ trunk/lib/WikiDB/PDO.php 2021-09-06 16:49:20 UTC (rev 10542)
@@ -47,7 +47,10 @@
$backend = $dbparams['dsn']['phptype'];
elseif (preg_match('/^(\w+):/', $dbparams['dsn'], $m))
$backend = $m[1];
- // Do we have a override? Currently none: mysql, sqlite, oci, mssql
+ // Do we have a override? Currently: mysql, oci8, pgsql
+ if ($backend == "mysqli") {
+ $backend = "mysql";
+ }
if (findFile("lib/WikiDB/backend/PDO_$backend.php", true)) {
$backend = 'PDO_' . $backend;
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-05 14:44:55
|
Revision: 10541
http://sourceforge.net/p/phpwiki/code/10541
Author: vargenau
Date: 2021-09-05 14:44:53 +0000 (Sun, 05 Sep 2021)
Log Message:
-----------
Single full stop
Modified Paths:
--------------
trunk/themes/Wordpress/templates/browse.tmpl
Modified: trunk/themes/Wordpress/templates/browse.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
+++ trunk/themes/Wordpress/templates/browse.tmpl 2021-09-05 14:44:53 UTC (rev 10541)
@@ -6,7 +6,7 @@
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
<p class="warning_msg"><?php echo _("Note:")?>
<?php echo _("You are viewing an old revision of this page.")?>
- <?php echo WikiLink($page, 'existing', _("View the current version."))?>.
+ <?php echo WikiLink($page, 'existing', _("View the current version."))?>
</p>
<hr class="ignore" />
<?php } ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-05 07:01:33
|
Revision: 10540
http://sourceforge.net/p/phpwiki/code/10540
Author: vargenau
Date: 2021-09-05 07:01:30 +0000 (Sun, 05 Sep 2021)
Log Message:
-----------
Use CSS class warning_msg for "You are viewing an old revision of this page."
Modified Paths:
--------------
trunk/themes/Crao/templates/browse.tmpl
trunk/themes/MonoBook/templates/browse.tmpl
trunk/themes/Portland/templates/browse.tmpl
trunk/themes/Wordpress/templates/browse.tmpl
trunk/themes/blog/templates/browse.tmpl
trunk/themes/default/templates/browse.tmpl
Modified: trunk/themes/Crao/templates/browse.tmpl
===================================================================
--- trunk/themes/Crao/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/Crao/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -2,8 +2,8 @@
$action = $request->getArg('action');
?>
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
<?php echo Button('browse', _("View the current version."), $page)?>
</p>
<?php } ?>
Modified: trunk/themes/MonoBook/templates/browse.tmpl
===================================================================
--- trunk/themes/MonoBook/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/MonoBook/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -2,8 +2,8 @@
$action = $request->getArg('action');
?>
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
<?php echo Button('browse', _("View the current version."), $page)?>
</p>
<?php } ?>
Modified: trunk/themes/Portland/templates/browse.tmpl
===================================================================
--- trunk/themes/Portland/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/Portland/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -4,9 +4,10 @@
<br class="clear-floats" />
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
- <?php echo WikiLink($page, 'existing', _("View the current version."))?></p>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
+ <?php echo WikiLink($page, 'existing', _("View the current version."))?>
+ </p>
<hr class="ignore" />
<?php } ?>
<?php if (!empty($redirected)) { ?>
Modified: trunk/themes/Wordpress/templates/browse.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/Wordpress/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -4,9 +4,10 @@
<br class="clear-floats" />
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
- <?php echo WikiLink($page, 'existing', _("View the current version."))?>.</p>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
+ <?php echo WikiLink($page, 'existing', _("View the current version."))?>.
+ </p>
<hr class="ignore" />
<?php } ?>
<?php if (!empty($redirected)) { ?>
Modified: trunk/themes/blog/templates/browse.tmpl
===================================================================
--- trunk/themes/blog/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/blog/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -2,8 +2,8 @@
$action = $request->getArg('action');
?>
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
<?php echo Button('browse', _("View the current version."), $page)?>
</p>
<?php } ?>
Modified: trunk/themes/default/templates/browse.tmpl
===================================================================
--- trunk/themes/default/templates/browse.tmpl 2021-09-04 11:54:14 UTC (rev 10539)
+++ trunk/themes/default/templates/browse.tmpl 2021-09-05 07:01:30 UTC (rev 10540)
@@ -2,8 +2,8 @@
$action = $request->getArg('action');
?>
<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?>
- <p><strong><?php echo _("Note:")?></strong>
- <?php echo _("You are viewing an old revision of this page.")?>
+ <p class="warning_msg"><?php echo _("Note:")?>
+ <?php echo _("You are viewing an old revision of this page.")?>
<?php echo Button('browse', _("View the current version."), $page)?>
</p>
<?php } ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-04 11:54:16
|
Revision: 10539
http://sourceforge.net/p/phpwiki/code/10539
Author: vargenau
Date: 2021-09-04 11:54:14 +0000 (Sat, 04 Sep 2021)
Log Message:
-----------
Add PhpWikiManual in HomePage
Modified Paths:
--------------
trunk/pgsrc/HomePage
Modified: trunk/pgsrc/HomePage
===================================================================
--- trunk/pgsrc/HomePage 2021-09-03 17:07:16 UTC (rev 10538)
+++ trunk/pgsrc/HomePage 2021-09-04 11:54:14 UTC (rev 10539)
@@ -1,4 +1,4 @@
-Date: Thu, 13 Oct 2016 15:09:28 +0000
+Date: Sat, 4 Sep 2021 13:53:01 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=HomePage;
@@ -14,4 +14,4 @@
* Find out which pages are [[MostPopular]].
* Read the [[ReleaseNotes]] and [[RecentReleases]].
* Administer this wiki via [[PhpWikiAdministration]].
-* See more [[:PhpWikiDocumentation]].
+* See more [[:PhpWikiDocumentation]] and [[PhpWikiManual]].
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 17:07:18
|
Revision: 10538
http://sourceforge.net/p/phpwiki/code/10538
Author: vargenau
Date: 2021-09-03 17:07:16 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Add "Rename" tab in Sidebar theme
Modified Paths:
--------------
trunk/locale/de/LC_MESSAGES/phpwiki.mo
trunk/locale/es/LC_MESSAGES/phpwiki.mo
trunk/locale/fr/LC_MESSAGES/phpwiki.mo
trunk/locale/it/LC_MESSAGES/phpwiki.mo
trunk/locale/ja/LC_MESSAGES/phpwiki.mo
trunk/locale/nl/LC_MESSAGES/phpwiki.mo
trunk/locale/po/de.po
trunk/locale/po/es.po
trunk/locale/po/fr.po
trunk/locale/po/it.po
trunk/locale/po/ja.po
trunk/locale/po/nl.po
trunk/locale/po/phpwiki.pot
trunk/locale/po/sv.po
trunk/locale/po/zh.po
trunk/locale/sv/LC_MESSAGES/phpwiki.mo
trunk/locale/zh/LC_MESSAGES/phpwiki.mo
trunk/pgsrc/ReleaseNotes
trunk/themes/Sidebar/templates/actionbar.tmpl
Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/po/de.po
===================================================================
--- trunk/locale/po/de.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/de.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2000-10-31 02:23+0200\n"
"Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp "
"<car...@us...>, Helmer Pardun <pardunpress@t-online."
@@ -5827,6 +5827,9 @@
msgid "Past versions of this page."
msgstr "Älteren Versionen dieser Seite."
+msgid "Rename this page"
+msgstr "Diese Seite umbenennen"
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/es.po
===================================================================
--- trunk/locale/po/es.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/es.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -11,7 +11,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2000-02-01 00:50-0500\n"
"Last-Translator: Pablo Roca <pr...@cl...>\n"
"Language-Team: \n"
@@ -3495,7 +3495,7 @@
#, php-format
msgid "Renamed page from “%s” to “%s”."
-msgstr "retitulado de “%s” para “%s”."
+msgstr "Retitulado de “%s” para “%s”."
#, php-format
msgid "Renaming created redirect page from “%s” to “%s”"
@@ -5659,6 +5659,9 @@
msgid "Past versions of this page."
msgstr "Versión anterior de esta página."
+msgid "Rename this page"
+msgstr "Retitule esta página"
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/fr.po
===================================================================
--- trunk/locale/po/fr.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/fr.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2004-06-22 21:10+0200\n"
"Last-Translator: Pierrick Meignen <mei...@wa...>, Roland "
"Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6."
@@ -5782,6 +5782,9 @@
msgid "Past versions of this page."
msgstr "Versions précédentes de cette page."
+msgid "Rename this page"
+msgstr "Renommer cette page"
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr "Ajouter ou supprimer de la liste de pages que vous surveillez"
Modified: trunk/locale/po/it.po
===================================================================
--- trunk/locale/po/it.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/it.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2005-02-12 16:23+0100\n"
"Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n"
"Language-Team: \n"
@@ -5618,6 +5618,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr "Rinominare questa pagina"
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/ja.po
===================================================================
--- trunk/locale/po/ja.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/ja.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2003-06-07 09:01+0900\n"
"Last-Translator: Tadashi Jokagi <web...@el...>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -5604,6 +5604,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr ""
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/nl.po
===================================================================
--- trunk/locale/po/nl.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/nl.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2000-09-30 02:23+0200\n"
"Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n"
"Language-Team: Dutch <nl...@li...>\n"
@@ -5610,6 +5610,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr ""
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/phpwiki.pot
===================================================================
--- trunk/locale/po/phpwiki.pot 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/phpwiki.pot 2021-09-03 17:07:16 UTC (rev 10538)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki-1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2002-12-14 17:51-0500\n"
"Last-Translator: Reini Urban <ru...@us...>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -5604,6 +5604,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr ""
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/sv.po
===================================================================
--- trunk/locale/po/sv.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/sv.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2001-01-27 01:58+0200\n"
"Last-Translator: Jon Åslund <jo...@he...>\n"
"Language-Team: \n"
@@ -5605,6 +5605,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr ""
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/po/zh.po
===================================================================
--- trunk/locale/po/zh.po 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/locale/po/zh.po 2021-09-03 17:07:16 UTC (rev 10538)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 15:22+0200\n"
+"POT-Creation-Date: 2021-09-03 19:05+0200\n"
"PO-Revision-Date: 2004-04-21 10:08+0800\n"
"Last-Translator: DruryL <dr...@us...>\n"
"Language-Team: DruryL <dr...@us...>\n"
@@ -5632,6 +5632,9 @@
msgid "Past versions of this page."
msgstr ""
+msgid "Rename this page"
+msgstr ""
+
msgid "Add/Remove this to/from the list of pages you're monitoring for changes"
msgstr ""
Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/pgsrc/ReleaseNotes
===================================================================
--- trunk/pgsrc/ReleaseNotes 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/pgsrc/ReleaseNotes 2021-09-03 17:07:16 UTC (rev 10538)
@@ -1,4 +1,4 @@
-Date: Fri, 3 Sep 2021 15:21:18 +0000
+Date: Fri, 3 Sep 2021 18:58:14 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=ReleaseNotes;
@@ -15,6 +15,7 @@
=== Changes ===
* Remove ADODB DATABASE_TYPE. Use SQL (Pear) or PDO.
+* Add "Rename" tab in Sidebar theme.
== 1.6.0 2021-08-12 Marc-Etienne Vargenau ==
Modified: trunk/themes/Sidebar/templates/actionbar.tmpl
===================================================================
--- trunk/themes/Sidebar/templates/actionbar.tmpl 2021-09-03 16:29:57 UTC (rev 10537)
+++ trunk/themes/Sidebar/templates/actionbar.tmpl 2021-09-03 17:07:16 UTC (rev 10538)
@@ -26,6 +26,8 @@
<?php echo ActionButton(__("PageHistory"), _("History"), false, array('title'=>_("Past versions of this page."))) ?>
<?php echo ActionButton("diff") ?>
<?php if ($user->isSignedIn()) { ?>
+ <?php echo ActionButton(__("rename"), _("Rename"), false,
+ array('title'=>_("Rename this page"))) ?>
<?php echo ActionButton(__("WatchPage"), _("Watch"), false,
array('title'=>_("Add/Remove this to/from the list of pages you're monitoring for changes"))) ?>
<?php } ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 16:30:00
|
Revision: 10537
http://sourceforge.net/p/phpwiki/code/10537
Author: vargenau
Date: 2021-09-03 16:29:57 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
PDO: let us unlock the same as we locked
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 13:24:39 UTC (rev 10536)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 16:29:57 UTC (rev 10537)
@@ -1137,7 +1137,7 @@
$sth->bindParam(2, $id, PDO::PARAM_INT);
$sth->execute();
}
- $this->unlock(array('page'));
+ $this->unlock(array('page', 'version', 'recent', 'nonempty', 'link'));
return $id;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 13:24:44
|
Revision: 10536
http://sourceforge.net/p/phpwiki/code/10536
Author: vargenau
Date: 2021-09-03 13:24:39 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Remove ADODB DATABASE_TYPE. Use SQL (Pear) or PDO.
Modified Paths:
--------------
trunk/config/config-default.ini
trunk/config/config-dist.ini
trunk/configurator.php
trunk/doc/INSTALL.mysql
trunk/doc/INSTALL.sqlite
trunk/doc/README.phpwiki-auth
trunk/lib/DbSession/PDO.php
trunk/lib/DbSession.php
trunk/lib/IniConfig.php
trunk/lib/PageList.php
trunk/lib/Request.php
trunk/lib/WikiDB/SQL.php
trunk/lib/WikiDB/backend/PDO.php
trunk/lib/WikiDB/backend/file.php
trunk/lib/WikiDB/backend.php
trunk/lib/WikiDB.php
trunk/lib/WikiGroup.php
trunk/lib/WikiUser/Db.php
trunk/lib/WikiUser.php
trunk/lib/main.php
trunk/lib/plugin/SqlResult.php
trunk/lib/plugin/SystemInfo.php
trunk/lib/plugin/WhoIsOnline.php
trunk/lib/prepend.php
trunk/lib/wikilens/RatingsDb.php
trunk/locale/Makefile
trunk/locale/de/LC_MESSAGES/phpwiki.mo
trunk/locale/es/LC_MESSAGES/phpwiki.mo
trunk/locale/fr/LC_MESSAGES/phpwiki.mo
trunk/locale/it/LC_MESSAGES/phpwiki.mo
trunk/locale/ja/LC_MESSAGES/phpwiki.mo
trunk/locale/nl/LC_MESSAGES/phpwiki.mo
trunk/locale/po/de.po
trunk/locale/po/es.po
trunk/locale/po/fr.po
trunk/locale/po/it.po
trunk/locale/po/ja.po
trunk/locale/po/nl.po
trunk/locale/po/phpwiki.pot
trunk/locale/po/sv.po
trunk/locale/po/zh.po
trunk/locale/sv/LC_MESSAGES/phpwiki.mo
trunk/locale/update-makefile.sh
trunk/locale/zh/LC_MESSAGES/phpwiki.mo
trunk/pgsrc/Help%2FPluginManagerPlugin
trunk/pgsrc/ReleaseNotes
trunk/tests/unit/lib/SetupWiki.php
trunk/tests/unit/readme.html
trunk/tests/unit/runme_all
trunk/tests/unit/test.php
trunk/tests/xmlrpc/xmlrpc-servers.php
Removed Paths:
-------------
trunk/doc/INSTALL.mssqlnative
trunk/lib/DbSession/ADODB.php
trunk/lib/WikiDB/ADODB.php
trunk/lib/WikiDB/adodb/
trunk/lib/WikiDB/backend/ADODB.php
trunk/lib/WikiDB/backend/ADODB_mssql.php
trunk/lib/WikiDB/backend/ADODB_mssqlnative.php
trunk/lib/WikiDB/backend/ADODB_mysql.php
trunk/lib/WikiDB/backend/ADODB_oci8po.php
trunk/lib/WikiDB/backend/ADODB_postgres7.php
trunk/lib/WikiDB/backend/ADODB_sqlite.php
trunk/lib/WikiUser/AdoDb.php
trunk/locale/.exclude
Modified: trunk/config/config-default.ini
===================================================================
--- trunk/config/config-default.ini 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/config/config-default.ini 2021-09-03 13:24:39 UTC (rev 10536)
@@ -51,7 +51,7 @@
INSECURE_ACTIONS_LOCALHOST_ONLY = true
ENABLE_MODERATEDPAGE_ALL = false
ACCESS_LOG = ""
-; ACCESS_LOG_SQL: on SQL or ADODB 2, else 0
+; ACCESS_LOG_SQL: on SQL 2, else 0
; ACCESS_LOG_SQL = 0
; COMPRESS_OUTPUT = true
CACHE_CONTROL = LOOSE
Modified: trunk/config/config-dist.ini
===================================================================
--- trunk/config/config-dist.ini 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/config/config-dist.ini 2021-09-03 13:24:39 UTC (rev 10536)
@@ -284,7 +284,7 @@
;
; If defined (e.g. 1) read-access is done via SQL.
; If flag 2 is set, phpwiki also writes. Default on SQL database.
-; This must use DATABASE_TYPE = SQL or ADODB or PDO.
+; This must use DATABASE_TYPE = SQL or PDO.
; ACCESS_LOG_SQL = 0 ; disable SQL access logging
; ACCESS_LOG_SQL = 1 ; phpwiki reads, apache mod_log_sql writes
;ACCESS_LOG_SQL = 2 ; read + write
@@ -392,8 +392,7 @@
; Select the database backend type:
;
; SQL: access one of several SQL databases using the PEAR DB library.
-; ADODB: uses the ADODB library for data access. (most general)
-; PDO: The new PHP5 dataobkject library. (experimental, no paging yet)
+; PDO: The new PHP5 library.
; dba: use one of the standard UNIX dbm libraries. Use BerkeleyDB (db3,4) (fastest)
; file: use a serialized file database. (easiest)
; flatfile: use a flat file database. (experimental, readable, slow)
@@ -519,8 +518,7 @@
; BogoLogin: WikiWord username, with no *actual* password checking,
; although the user will still have to enter one.
; PersonalPage: Store passwords in the users homepage metadata (simple)
-; Db: Use DBAUTH_AUTH_* (see below) with PearDB or
-; ADODB only.
+; Db: Use DBAUTH_AUTH_* (see below) with PearDB
; LDAP: Authenticate against LDAP_AUTH_HOST with LDAP_BASE_DN
; IMAP: Authenticate against IMAP_AUTH_HOST (email account)
; POP3: Authenticate against POP3_AUTH_HOST (email account)
Modified: trunk/configurator.php
===================================================================
--- trunk/configurator.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/configurator.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -674,15 +674,14 @@
new _define_selection("DATABASE_TYPE",
array('dba' => "dba",
'SQL' => "SQL PEAR",
- 'ADODB' => "SQL ADODB",
'PDO' => "PDO",
'file' => "flatfile")/*, "
Select the database backend type:
Choose dba (default) to use one of the standard UNIX dba libraries. This is the fastest.
-Choose ADODB or SQL to use an SQL database with ADODB or PEAR.
-Choose PDO to use an SQL database. (experimental, no paging yet)
+Choose SQL to use an SQL database with PEAR.
+Choose PDO to use an SQL database.
flatfile is simple and slow.
-Recommended is dba or SQL: PEAR or ADODB."*/);
+Recommended is dba or SQL: PEAR."*/);
$properties["SQL DSN Setup"] =
new unchangeable_variable('_sqldsnstuff', "", "
@@ -705,7 +704,7 @@
DATABASE_DSN = pgsql://localhost/user_phpwiki
</pre>");
-// Choose ADODB or SQL to use an SQL database with ADODB or PEAR.
+// Choose SQL to use an SQL database with PEAR.
// Choose dba to use one of the standard UNIX dbm libraries.
$properties["SQL Type"] =
@@ -715,9 +714,9 @@
'mssql' => "Microsoft SQL Server",
'mssqlnative' => "Microsoft SQL Server (native)",
'oci8' => "Oracle 8",
- 'mysqli' => "mysqli (only ADODB)",
- 'mysqlt' => "mysqlt (only ADODB)",
- 'ODBC' => "ODBC (only ADODB or PDO)",
+ 'mysqli' => "mysqli",
+ 'mysqlt' => "mysqlt)",
+ 'ODBC' => "ODBC (only PDO)",
'firebird' => "Firebird (only PDO)",
'oracle' => "Oracle (only PDO)",
), "
@@ -858,7 +857,7 @@
<dt>PersonalPage</dt>
<dd>Store passwords in the users homepage metadata (simple)</dd>
<dt>Db</dt>
- <dd>Use DBAUTH_AUTH_* (see below) with PearDB or ADODB only.</dd>
+ <dd>Use DBAUTH_AUTH_* (see below) with PearDB only.</dd>
<dt>LDAP</dt>
<dd>Authenticate against LDAP_AUTH_HOST with LDAP_BASE_DN.</dd>
<dt>IMAP</dt>
Deleted: trunk/doc/INSTALL.mssqlnative
===================================================================
--- trunk/doc/INSTALL.mssqlnative 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/doc/INSTALL.mssqlnative 2021-09-03 13:24:39 UTC (rev 10536)
@@ -1,49 +0,0 @@
-Installing phpwiki with MS SQL Server Native Driver for ADOdb
------------------------------------------------------------
-
-Microsoft has been working hard to get support for their products
-into Open Source projects. The MS SQL Server 2005 Driver for ADOdb
-is one step in that direction. The following is instructions on how
-to get and install the new mssql php driver for ADOdb as well as
-how to get the new driver to work with phpWiki.
-
-As of the writing of this walkthrough, the latest version of the PHP
-driver for SQL Server 2005 is the May 2008 Community Technical Preview.
-If you don't already have a copy of the SQL Server 2005 for PHP
-driver installed on your server, you can get a copy at:
-http://www.microsoft.com/sql/technologies/php/default.mspx
-
-This assumes that you have PHP 5 installed as well as a working copy of
-any edition of SQL Server 2005 or SQL Server 2000 (including Express
-Edition). If you do not have a copy of the free SQL Server 2005 Express
-Edition you can download it from:
-http://go.microsoft.com/fwlink/?LinkId=64064
-
-1. If you do not have a database created already, create one using
- the SQL Server Management tool. You can get the free Express version at:
- http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-
- 4E3D-94B8-5A0F62BF7796&displaylang=en
-
-2. If necessary create a user for that database which has the rights
- to select, insert, update, delete. For more information on how to use
- SQL Server 2005 you can download SQL Server 2005 Books Online at:
- http://www.microsoft.com/downloads/details.aspx?FamilyId=BE6A2C5D-00DF-
- 4220-B133-29C1E0B6585F&displaylang=en
-
-3. Create the tables and functions inside your database by running the SQL
- file included with the phpWiki project located at:
- schemas/sqlsrv-initialize.sql
-
-4. Edit the DATABASE settings in config/config.ini to reflect your settings.
-
- a) DATABASE_TYPE should be set to 'ADODB' (case sensitive)
- b) DATABASE_DSN should be set to something like:
- 'mssqlnative://username:password@pathtosqlserver/databasename'
- c) Note that if you set DATABASE_PREFIX to a non-empty string, you will
- have to edit schemas/sqlsrv-initialize.sql before you perform step
- three (above). You might also edit schemas/sqlsrv-destroy.sql at the
- same time, so you don't forget.
-
- Note: DATABASE_DIRECTORY and DATABASE_DBA_HANDLER are ignored for mssql.
-
-That's it. phpWiki should work now.
Modified: trunk/doc/INSTALL.mysql
===================================================================
--- trunk/doc/INSTALL.mysql 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/doc/INSTALL.mysql 2021-09-03 13:24:39 UTC (rev 10536)
@@ -40,7 +40,7 @@
4. Edit the DATABASE settings in config/config.ini to reflect your settings.
- a) DATABASE_TYPE should be set to 'SQL' or 'ADODB'.
+ a) DATABASE_TYPE should be set to 'SQL'.
b) DATABASE_DSN should be set to something like
'mysql://guest@unix(/var/lib/mysql/mysql.sock)/phpwiki".
(where 'phpwiki' is the mysql database name.)
Modified: trunk/doc/INSTALL.sqlite
===================================================================
--- trunk/doc/INSTALL.sqlite 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/doc/INSTALL.sqlite 2021-09-03 13:24:39 UTC (rev 10536)
@@ -20,7 +20,6 @@
Edit the DATABASE settings in config/config.ini to reflect your settings.
a) DATABASE_TYPE must be set to 'SQL'.
- ADODB not yet. This is planned for the 1.4.0 release.
b) DATABASE_DSN should be set to something like
DATABASE_DSN = "sqlite:////tmp/phpwiki-sqlite.db?mode=0664&persistent=1"
Modified: trunk/doc/README.phpwiki-auth
===================================================================
--- trunk/doc/README.phpwiki-auth 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/doc/README.phpwiki-auth 2021-09-03 13:24:39 UTC (rev 10536)
@@ -126,8 +126,8 @@
* __~BogoLogin__: This will eventually replace the old ALLOW_BOGO_LOGIN constant,
but it will require PASSWORD_LENGTH_MINIMUM. So non-empty passwords can be disabled.
* __~PersonalPage__: Store passwords in the users homepage metadata (simple)
-* __Db__: Use $DBAuthParams~[~] (see below) with PearDB or ADODB only.
- If 'auth_dsn' is undefined, and wiki pages are stored via SQL or ADODB,
+* __Db__: Use $DBAuthParams~[~] (see below) with PearDB only.
+ If 'auth_dsn' is undefined, and wiki pages are stored via SQL,
it uses the same database. (fastest)
* __LDAP__: Authenticate against LDAP_AUTH_HOST with the LDAP_AUTH_SEARCH settings
* __IMAP__: Authenticate against IMAP_AUTH_HOST (e.g. an existing email account)
@@ -170,9 +170,7 @@
The database can be external like radius, phpnuke, courier authmysql,
apache auth_mysql or just a simple user table within phpwiki.
The most likely auth_dsn option is the same dsn as the wikipages, in
-fact if it's empty $DBParams~['dsn'~] is used. If
-$DBParams~['db_type'~] is not ADODB, the Pear DB library is used
-(db_type = SQL).
+fact if it's empty $DBParams~['dsn'~] is used.
This is the list of the available options and some examples. For the statements we use the following symbolic variables:
$user_id : loginname
@@ -181,9 +179,6 @@
$groupname : groupname
Note: The symbolic variables (like "$password", ...) must be enclosed in double quotes!
-ADODB Warning: With ADODB we must currently define the correct alias names: SELECT db_column as name
-This requirement will go away when we switch to FETCH_ROW instead of the slower FETCH_ASSOC
-(scheduled for 1.4.0)
;auth_dsn: 'mysql://user@password:localhost/phpwiki'
Deleted: trunk/lib/DbSession/ADODB.php
===================================================================
--- trunk/lib/DbSession/ADODB.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/DbSession/ADODB.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -1,256 +0,0 @@
-<?php
-/**
- * Copyright © 2005 $ThePhpWikiProgrammingTeam
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- *
- */
-
-/**
- * ADODB db sessions, based on pear DB Sessions.
- *
- * @author: Reini Urban
- */
-
-class DbSession_ADODB
- extends DbSession
-{
- public $_backend_type = "ADODB";
-
- function __construct($dbh, $table)
- {
- $this->_dbh = $dbh;
- $this->_table = $table;
-
- session_set_save_handler(array(&$this, 'open'),
- array(&$this, 'close'),
- array(&$this, 'read'),
- array(&$this, 'write'),
- array(&$this, 'destroy'),
- array(&$this, 'gc'));
- }
-
- function & _connect()
- {
- global $request;
- static $parsed = false;
- $dbh = &$this->_dbh;
- if (!$dbh or !is_resource($dbh->_connectionID)) {
- if (!$parsed) $parsed = parseDSN($request->_dbi->getParam('dsn'));
- $this->_dbh = ADONewConnection($parsed['phptype']); // Probably only MySql works just now
- $this->_dbh->Connect($parsed['hostspec'], $parsed['username'],
- $parsed['password'], $parsed['database']);
- $dbh = &$this->_dbh;
- }
- return $dbh;
- }
-
- function query($sql)
- {
- return $this->_dbh->Execute($sql);
- }
-
- // adds surrounding quotes
- function quote($string)
- {
- return $this->_dbh->qstr($string);
- }
-
- function _disconnect()
- {
- if (0 and $this->_dbh)
- $this->_dbh->close();
- }
-
- /**
- * Opens a session.
- *
- * Actually this function is a fake for session_set_save_handle.
- * @param string $save_path a path to stored files
- * @param string $session_name a name of the concrete file
- * @return boolean true just a variable to notify PHP that everything
- * is good.
- */
- public function open($save_path, $session_name)
- {
- //$this->log("_open($save_path, $session_name)");
- return true;
- }
-
- /**
- * Closes a session.
- *
- * This function is called just after <i>write</i> call.
- *
- * @return boolean true just a variable to notify PHP that everything
- * is good.
- */
- public function close()
- {
- //$this->log("_close()");
- return true;
- }
-
- /**
- * Reads the session data from DB.
- *
- * @param string $id an id of current session
- * @return string
- */
- public function read($id)
- {
- //$this->log("_read($id)");
- $dbh = $this->_connect();
- $table = $this->_table;
- $qid = $dbh->qstr($id);
- $res = '';
- $row = $dbh->GetRow("SELECT sess_data FROM $table WHERE sess_id=$qid");
- if ($row)
- $res = $row[0];
- $this->_disconnect();
- if (!empty($res) and preg_match('|^[a-zA-Z0-9/+=]+$|', $res))
- $res = base64_decode($res);
- if (strlen($res) > 4000) {
- // trigger_error("Overlarge session data! ".strlen($res). " gt. 4000", E_USER_WARNING);
- $res = preg_replace('/s:6:"_cache";O:12:"WikiDB_cache".+}$/', "", $res);
- $res = preg_replace('/s:12:"_cached_html";s:.+",s:4:"hits"/', 's:4:"hits"', $res);
- if (strlen($res) > 4000) {
- $res = '';
- }
- }
- return $res;
- }
-
- /**
- * Saves the session data into DB.
- *
- * Just a comment: The "write" handler is not
- * executed until after the output stream is closed. Thus,
- * output from debugging statements in the "write" handler
- * will never be seen in the browser. If debugging output
- * is necessary, it is suggested that the debug output be
- * written to a file instead.
- *
- * @param string $id
- * @param string $sess_data
- * @return boolean true if data saved successfully and false
- * otherwise.
- */
- public function write($id, $sess_data)
- {
- /**
- * @var WikiRequest $request
- */
- global $request;
-
- if (defined("WIKI_XMLRPC") or defined("WIKI_SOAP")) return false;
-
- $dbh = $this->_connect();
- $table = $this->_table;
- $qid = $dbh->qstr($id);
- $qip = $dbh->qstr($request->get('REMOTE_ADDR'));
- $time = $dbh->qstr(time());
-
- // postgres can't handle binary data in a TEXT field.
- if (is_a($dbh, 'ADODB_postgres64'))
- $sess_data = base64_encode($sess_data);
- $qdata = $dbh->qstr($sess_data);
-
- $dbh->execute("DELETE FROM $table WHERE sess_id=$qid");
- $rs = $dbh->execute("INSERT INTO $table"
- . " (sess_id, sess_data, sess_date, sess_ip)"
- . " VALUES ($qid, $qdata, $time, $qip)");
- $result = !$rs->EOF;
- if ($result) $rs->free();
- $this->_disconnect();
- return $result;
- }
-
- /**
- * Destroys a session.
- *
- * Removes a session from the table.
- *
- * @param string $id
- * @return boolean true
- */
- public function destroy($id)
- {
- $dbh = $this->_connect();
- $table = $this->_table;
- $qid = $dbh->qstr($id);
-
- $dbh->Execute("DELETE FROM $table WHERE sess_id=$qid");
-
- $this->_disconnect();
- return true;
- }
-
- /**
- * Cleans out all expired sessions.
- *
- * @param int $maxlifetime session's time to live.
- * @return boolean true
- */
- public function gc($maxlifetime)
- {
- $dbh = $this->_connect();
- $table = $this->_table;
- $threshold = time() - $maxlifetime;
-
- $dbh->Execute("DELETE FROM $table WHERE sess_date < $threshold");
-
- $this->_disconnect();
- return true;
- }
-
- // WhoIsOnline support
- // TODO: ip-accesstime dynamic blocking API
- function currentSessions()
- {
- $sessions = array();
- $dbh = $this->_connect();
- $table = $this->_table;
- $rs = $dbh->Execute("SELECT sess_data,sess_date,sess_ip FROM $table ORDER BY sess_date DESC");
- if ($rs->EOF) {
- $rs->free();
- return $sessions;
- }
- while (!$rs->EOF) {
- $row = $rs->fetchRow();
- $data = $row[0];
- $date = $row[1];
- $ip = $row[2];
- if (preg_match('|^[a-zA-Z0-9/+=]+$|', $data))
- $data = base64_decode($data);
- if ($date < 908437560 or $date > 1588437560)
- $date = 0;
- // session_data contains the <variable name> + "|" + <packed string>
- // we need just the wiki_user object (might be array as well)
- $user = strstr($data, "wiki_user|");
- $sessions[] = array('wiki_user' => substr($user, 10), // from "O:" onwards
- 'date' => $date,
- 'ip' => $ip);
- $rs->MoveNext();
- }
- $rs->free();
- $this->_disconnect();
- return $sessions;
- }
-}
Modified: trunk/lib/DbSession/PDO.php
===================================================================
--- trunk/lib/DbSession/PDO.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/DbSession/PDO.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -120,9 +120,6 @@
$res = '';
}
$this->_disconnect();
- if (!empty($res) and is_a($dbh, 'ADODB_postgres64')) {
- $res = base64_decode($res);
- }
if (strlen($res) > 4000) {
// trigger_error("Overlarge session data! ".strlen($res). " gt. 4000", E_USER_WARNING);
$res = preg_replace('/s:6:"_cache";O:12:"WikiDB_cache".+}$/', "", $res);
@@ -163,10 +160,6 @@
$time = time();
$remote_addr = $request->get('REMOTE_ADDR');
- // postgres can't handle binary data in a TEXT field.
- if (is_a($dbh, 'ADODB_postgres64'))
- $sess_data = base64_encode($sess_data);
-
$this->_backend->beginTransaction();
$delete = $dbh->prepare("DELETE FROM $table WHERE sess_id=?");
$delete->bindParam(1, $id, PDO::PARAM_STR, 32);
Modified: trunk/lib/DbSession.php
===================================================================
--- trunk/lib/DbSession.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/DbSession.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -24,7 +24,7 @@
*/
/**
- * Store sessions data in Pear DB / ADODB / dba / PDO, ....
+ * Store sessions data in Pear DB / dba / PDO, ....
*
* History
*
@@ -31,7 +31,7 @@
* Originally by Stanislav Shramko <st...@mo...>
* Minor rewrite by Reini Urban <ru...@x-...> for Phpwiki.
* Quasi-major rewrite/decruft/fix by Jeff Dairiki <da...@da...>.
- * ADODB, dba and PDO classes by Reini Urban.
+ * dba and PDO classes by Reini Urban.
*
*/
class DbSession
Modified: trunk/lib/IniConfig.php
===================================================================
--- trunk/lib/IniConfig.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/IniConfig.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -320,7 +320,7 @@
unset($rsdef[$item]);
}
}
- $valid_database_types = array('SQL', 'ADODB', 'PDO', 'dba', 'file', 'flatfile');
+ $valid_database_types = array('SQL', 'PDO', 'dba', 'file', 'flatfile');
if (!in_array(DATABASE_TYPE, $valid_database_types))
trigger_error(sprintf("Invalid DATABASE_TYPE=%s. Choose one of %s",
DATABASE_TYPE, join(",", $valid_database_types)),
@@ -333,7 +333,7 @@
// USE_DB_SESSION default logic:
if (!defined('USE_DB_SESSION')) {
if ($DBParams['db_session_table']
- and in_array($DBParams['dbtype'], array('SQL', 'ADODB', 'PDO', 'dba'))
+ and in_array($DBParams['dbtype'], array('SQL', 'PDO', 'dba'))
) {
define('USE_DB_SESSION', true);
} else {
@@ -391,7 +391,7 @@
if (!defined('ACCESS_LOG_SQL')) {
if (array_key_exists('ACCESS_LOG_SQL', $rs)) {
// WikiDB_backend::isSql() not yet loaded
- if (!in_array(DATABASE_TYPE, array('SQL', 'ADODB', 'PDO'))) {
+ if (!in_array(DATABASE_TYPE, array('SQL', 'PDO'))) {
// override false config setting on no SQL WikiDB database.
define('ACCESS_LOG_SQL', 0);
}
@@ -398,7 +398,7 @@
// SQL defaults to ACCESS_LOG_SQL = 2
} else {
define('ACCESS_LOG_SQL',
- in_array(DATABASE_TYPE, array('SQL', 'ADODB', 'PDO')) ? 2 : 0);
+ in_array(DATABASE_TYPE, array('SQL', 'PDO')) ? 2 : 0);
}
}
Modified: trunk/lib/PageList.php
===================================================================
--- trunk/lib/PageList.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/PageList.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -985,10 +985,6 @@
$res = $dbi->_backend->_dbh->getOne("SELECT max(length(pagename)) FROM $page_tbl");
if (DB::isError($res) || empty($res)) return false;
else return $res;
- } elseif (is_a($dbi, 'WikiDB_ADODB')) {
- extract($dbi->_backend->_table_names);
- $row = $dbi->_backend->_dbh->getRow("SELECT max(length(pagename)) FROM $page_tbl");
- return $row ? $row[0] : false;
} else
return false;
}
Modified: trunk/lib/Request.php
===================================================================
--- trunk/lib/Request.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/Request.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -821,8 +821,8 @@
if ($do_sql) {
global $DBParams;
- if (!in_array($DBParams['dbtype'], array('SQL', 'ADODB', 'PDO'))) {
- trigger_error(_("Unsupported database backend for ACCESS_LOG_SQL. Need DATABASE_TYPE=SQL or ADODB or PDO."));
+ if (!in_array($DBParams['dbtype'], array('SQL', 'PDO'))) {
+ trigger_error(_("Unsupported database backend for ACCESS_LOG_SQL. Need DATABASE_TYPE=SQL or PDO."));
} else {
$this->logtable = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '') . "accesslog";
}
Deleted: trunk/lib/WikiDB/ADODB.php
===================================================================
--- trunk/lib/WikiDB/ADODB.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/WikiDB/ADODB.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -1,140 +0,0 @@
-<?php
-/**
- * Copyright © 2001,2003 Jeff Dairiki
- * Copyright © 2001-2002 Carsten Klapp
- * Copyright © 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-or-later
- *
- */
-
-require_once 'lib/WikiDB.php';
-
-/**
- * WikiDB layer for ADODB, which does nothing more than calling the
- * mysql-specific ADODB backend.
- * Support for a newer adodb library, the adodb extension library
- * and more databases will come with PhpWiki v1.3.10
- *
- * @author: Lawrence Akka, Reini Urban
- */
-
-class WikiDB_ADODB extends WikiDB
-{
- function __construct($dbparams)
- {
- $backend = 'ADODB';
- if (is_array($dbparams['dsn']))
- $backend = $dbparams['dsn']['phptype'];
- elseif (preg_match('/^(\w+):/', $dbparams['dsn'], $m))
- $backend = $m[1];
- // Do we have a override? (currently: mysql, sqlite, oracle, mssql, oci8po, postgres7)
- // TODO: mysqlt (innodb or bdb)
- if ($backend == 'pgsql') { // PearDB DSN cross-compatibility hack (for unit testing)
- $backend = 'postgres7';
- if (is_string($dbparams['dsn']))
- $dbparams['dsn'] = $backend . ':' . substr($dbparams['dsn'], 6);
- }
- if (findFile("lib/WikiDB/backend/ADODB_" . $backend . ".php", true)) {
- $backend = 'ADODB_' . $backend;
- } else {
- $backend = 'ADODB';
- }
- include_once 'lib/WikiDB/backend/' . $backend . '.php';
- $backend_class = "WikiDB_backend_" . $backend;
- $backend = new $backend_class($dbparams);
- if (!$backend->_dbh->_connectionID) return;
- parent::__construct($backend, $dbparams);
- }
-
- /*
- * Determine whether page exists (in non-default form).
- * @see WikiDB::isWikiPage for the slow generic version
- */
- public function isWikiPage($pagename)
- {
- $pagename = (string)$pagename;
- if ($pagename === '') {
- return false;
- }
- if (!array_key_exists($pagename, $this->_cache->_id_cache)) {
- $this->_cache->_id_cache[$pagename] = $this->_backend->is_wiki_page($pagename);
- }
- return $this->_cache->_id_cache[$pagename];
- }
-
- // add surrounding quotes '' if string
- public function quote($s)
- {
- if (is_int($s) || is_double($s)) {
- return $s;
- } elseif (is_bool($s)) {
- return $s ? 1 : 0;
- } elseif (is_null($s)) {
- return 'NULL';
- } else {
- return $this->_backend->_dbh->qstr($s);
- }
- }
-
- // ADODB handles everything as string
- // Don't add surrounding quotes '', same as in PearDB
- public function qstr($in)
- {
- return $this->_backend->_dbh->addq($in);
- }
-
- public function isOpen()
- {
- /**
- * @var WikiRequest $request
- */
- global $request;
-
- if (!$request->_dbi) {
- return false;
- }
- return is_resource($this->_backend->connection());
- }
-
- // SQL result: for simple select or create/update queries
- // returns the database specific resource type
- public function genericSqlQuery($sql, $args = array())
- {
- if ($args)
- $result = $this->_backend->_dbh->Execute($sql, $args);
- else
- $result = $this->_backend->_dbh->Execute($sql);
- if (!$result) {
- trigger_error("SQL Error: " . $this->_backend->_dbh->ErrorMsg(), E_USER_WARNING);
- return false;
- } else {
- return $result;
- }
- }
-
- // SQL iter: for simple select or create/update queries
- // returns the generic iterator object (count, next)
- public function genericSqlIter($sql, $field_list = NULL)
- {
- $result = $this->genericSqlQuery($sql);
- return new WikiDB_backend_ADODB_generic_iter($this->_backend, $result, $field_list);
- }
-
-}
Modified: trunk/lib/WikiDB/SQL.php
===================================================================
--- trunk/lib/WikiDB/SQL.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/WikiDB/SQL.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -34,7 +34,7 @@
$backend = $dbparams['dsn']['phptype'];
elseif (preg_match('/^(\w+):/', $dbparams['dsn'], $m))
$backend = $m[1];
- if ($backend == 'postgres7') { // ADODB cross-compatibility hack (for unit testing)
+ if ($backend == 'postgres7') {
$backend = 'pgsql';
if (is_string($dbparams['dsn']))
$dbparams['dsn'] = $backend . ':' . substr($dbparams['dsn'], 10);
Deleted: trunk/lib/WikiDB/backend/ADODB.php
===================================================================
--- trunk/lib/WikiDB/backend/ADODB.php 2021-09-03 11:30:25 UTC (rev 10535)
+++ trunk/lib/WikiDB/backend/ADODB.php 2021-09-03 13:24:39 UTC (rev 10536)
@@ -1,1492 +0,0 @@
-<?php
-/**
- * Copyright © 2002,2004,2005,2006 $ThePhpWikiProgrammingTeam
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- *
- */
-
-/**
- * Based on PearDB.php.
- * @author: Lawrence Akka, Reini Urban
- *
- * Now (since phpwiki-1.3.10) with adodb-4.22, by Reini Urban:
- * 1) Extended to use all available database backends, not only mysql.
- * 2) It uses the ultra-fast binary adodb extension if loaded.
- * 3) We use FETCH_NUM instead of FETCH_ASSOC (faster and more generic)
- * 4) To support generic iterators which return ASSOC fields, and to support queries with
- * variable columns, some trickery was needed to use recordset specific fetchMode.
- * The first Execute uses the global fetchMode (ASSOC), then it's resetted back to NUM
- * and the recordset fetchmode is set to ASSOC.
- * 5) Transaction support, and locking as fallback.
- * 6) 2004-12-10 added extra page.cached_html
- *
- * phpwiki-1.3.11, by Philippe Vanhaesendonck
- * - pass column list to iterators so we can FETCH_NUM in all cases
- * phpwiki-1.3.12: get rid of ISNULL
- * phpwiki-1.3.13: tsearch2 and stored procedures
- *
- * ADODB basic differences to PearDB: It pre-fetches the first row into fields,
- * is dirtier in style, layout and more low-level ("worse is better").
- * It has less needed basic features (modifyQuery, locks, ...), but some more
- * unneeded features included: paging, monitoring and sessions, and much more drivers.
- * No locking (which PearDB supports in some backends), and sequences are very
- * bad compared to PearDB.
- * Old Comments, by Lawrence Akka:
- * 1) ADODB's GetRow() is slightly different from that in PEAR. It does not
- * accept a fetchmode parameter
- * That doesn't matter too much here, since we only ever use FETCHMODE_ASSOC
- * 2) No need for ''s around strings in sprintf arguments - qstr puts them
- * there automatically
- * 3) ADODB has a version of GetOne, but it is difficult to use it when
- * FETCH_ASSOC is in effect.
- * Instead, use $rs = Execute($query); $value = $rs->fields["$colname"]
- * 4) No error handling yet - could use ADOConnection->raiseErrorFn
- * 5) It used to be faster then PEAR/DB at the beginning of 2002.
- * Now at August 2002 PEAR/DB with our own page cache added,
- * performance is comparable.
- */
-
-require_once 'lib/WikiDB/backend.php';
-// Error handling - calls trigger_error. NB - does not close the connection. Does it need to?
-include_once 'lib/WikiDB/adodb/adodb-errorhandler.inc.php';
-// include the main adodb file
-require_once 'lib/WikiDB/adodb/adodb.inc.php';
-
-class WikiDB_backend_ADODB
- extends WikiDB_backend
-{
-
- function __construct($dbparams)
- {
- $parsed = parseDSN($dbparams['dsn']);
- $this->_dbparams = $dbparams;
- $this->_parsedDSN =& $parsed;
- $this->_dbh = ADONewConnection($parsed['phptype']);
- if (DEBUG & _DEBUG_SQL) {
- $this->_dbh->debug = true;
- $GLOBALS['ADODB_OUTP'] = '_sql_debuglog';
- }
- $this->_dsn = $parsed;
- // persistent is defined as DSN option, or with a config value.
- // phptype://username:password@hostspec/database?persistent=false
-
- //FIXME: how to catch connection errors for dbamin_user?
- if (!empty($parsed['persistent']) or DATABASE_PERSISTENT)
- $conn = $this->_dbh->PConnect($parsed['hostspec'], $parsed['username'],
- $parsed['password'], $parsed['database']);
- else
- $conn = $this->_dbh->Connect($parsed['hostspec'], $parsed['username'],
- $parsed['password'], $parsed['database']);
- if (!$conn) return;
-
- // Since 1.3.10 we use the faster ADODB_FETCH_NUM,
- // with some ASSOC based recordsets.
- $GLOBALS['ADODB_FETCH_MODE'] = ADODB_FETCH_NUM;
- $this->_dbh->SetFetchMode(ADODB_FETCH_NUM);
- $GLOBALS['ADODB_COUNTRECS'] = false;
-
- $prefix = isset($dbparams['prefix']) ? $dbparams['prefix'] : '';
- $this->_table_names
- = array('page_tbl' => $prefix . 'page',
- 'version_tbl' => $prefix . 'version',
- 'link_tbl' => $prefix . 'link',
- 'recent_tbl' => $prefix . 'recent',
- 'nonempty_tbl' => $prefix . 'nonempty');
- $page_tbl = $this->_table_names['page_tbl'];
- $version_tbl = $this->_table_names['version_tbl'];
- $this->page_tbl_fields = "$page_tbl.id AS id, $page_tbl.pagename AS pagename, "
- . "$page_tbl.hits AS hits";
- $this->links_field_list = array('id', 'pagename');
- $this->page_tbl_field_list = array('id', 'pagename', 'hits');
- $this->version_tbl_fields = "$version_tbl.version AS version, "
- . "$version_tbl.mtime AS mtime, "
- . "$version_tbl.minor_edit AS minor_edit, $version_tbl.content AS content, "
- . "$version_tbl.versiondata AS versiondata";
- $this->version_tbl_field_list = array('version', 'mtime', 'minor_edit', 'content',
- 'versiondata');
-
- $this->_expressions
- = array('maxmajor' => "MAX(CASE WHEN minor_edit=0 THEN version END)",
- 'maxminor' => "MAX(CASE WHEN minor_edit<>0 THEN version END)",
- 'maxversion' => "MAX(version)",
- 'notempty' => "<>''",
- 'iscontent' => "$version_tbl.content<>''");
- $this->_lock_count = 0;
- }
-
- /**
- * Close database connection.
- */
- function close()
- {
- if (!$this->_dbh) {
- return;
- }
- if ($this->_lock_count) {
- trigger_error("WARNING: database still locked " .
- '(lock_count = $this->_lock_count)' . "\n<br />",
- E_USER_WARNING);
- }
- $this->unlock(array(), 'force');
-
- $this->_dbh->close();
- $this->_dbh = false;
- }
-
- /*
- * Fast test for wikipage.
- */
- function is_wiki_page($pagename)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- $row = $dbh->GetRow(sprintf("SELECT $page_tbl.id AS id"
- . " FROM $nonempty_tbl, $page_tbl"
- . " WHERE $nonempty_tbl.id=$page_tbl.id"
- . " AND pagename=%s",
- $dbh->qstr($pagename)));
- return $row ? $row[0] : false;
- }
-
- function get_all_pagenames()
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- $result = $dbh->Execute("SELECT pagename"
- . " FROM $nonempty_tbl, $page_tbl"
- . " WHERE $nonempty_tbl.id=$page_tbl.id");
- return $result->GetArray();
- }
-
- /*
- * filter (nonempty pages) currently ignored
- */
- function numPages($filter = false, $exclude = '')
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- $result = $dbh->getRow("SELECT count(*)"
- . " FROM $nonempty_tbl, $page_tbl"
- . " WHERE $nonempty_tbl.id=$page_tbl.id");
- return $result[0];
- }
-
- function increaseHitCount($pagename)
- {
- $dbh = &$this->_dbh;
- // Hits is the only thing we can update in a fast manner.
- // Note that this will fail silently if the page does not
- // have a record in the page table. Since it's just the
- // hit count, who cares?
- $dbh->Execute(sprintf("UPDATE %s SET hits=hits+1 WHERE pagename=%s",
- $this->_table_names['page_tbl'],
- $dbh->qstr($pagename)));
- return;
- }
-
- /*
- * Read page information from database.
- */
- function get_pagedata($pagename)
- {
- $dbh = &$this->_dbh;
- $row = $dbh->GetRow(sprintf("SELECT id,pagename,hits,pagedata FROM %s WHERE pagename=%s",
- $this->_table_names['page_tbl'],
- $dbh->qstr($pagename)));
- return $row ? $this->_extract_page_data($row[3], $row[2]) : false;
- }
-
- public function _extract_page_data($data, $hits)
- {
- if (empty($data)) {
- return array('hits' => $hits);
- } else {
- return array_merge(array('hits' => $hits), $this->_unserialize($data));
- }
- }
-
- function update_pagedata($pagename, $newdata)
- {
- $dbh = &$this->_dbh;
- $page_tbl = $this->_table_names['page_tbl'];
-
- // Hits is the only thing we can update in a fast manner.
- if (count($newdata) == 1 && isset($newdata['hits'])) {
- // Note that this will fail silently if the page does not
- // have a record in the page table. Since it's just the
- // hit count, who cares?
- $dbh->Execute(sprintf("UPDATE $page_tbl SET hits=%d WHERE pagename=%s",
- $newdata['hits'], $dbh->qstr($pagename)));
- return true;
- }
- $where = sprintf("pagename=%s", $dbh->qstr($pagename));
- $dbh->BeginTrans();
- $dbh->RowLock($page_tbl, $where);
-
- $data = $this->get_pagedata($pagename);
- if (!$data) {
- $data = array();
- $this->_get_pageid($pagename, true); // Creates page record
- }
-
- $hits = (empty($data['hits'])) ? 0 : (int)$data['hits'];
- unset($data['hits']);
-
- foreach ($newdata as $key => $val) {
- if ($key == 'hits')
- $hits = (int)$val;
- else if (empty($val))
- unset($data[$key]);
- else
- $data[$key] = $val;
- }
- if ($dbh->Execute("UPDATE $page_tbl"
- . " SET hits=?, pagedata=?"
- . " WHERE pagename=?",
- array($hits, $this->_serialize($data), $pagename))
- ) {
- $dbh->CommitTrans();
- return true;
- } else {
- $dbh->RollbackTrans();
- return false;
- }
- }
-
- function get_cached_html($pagename)
- {
- $dbh = &$this->_dbh;
- $page_tbl = $this->_table_names['page_tbl'];
- $row = $dbh->GetRow(sprintf("SELECT cached_html FROM $page_tbl WHERE pagename=%s",
- $dbh->qstr($pagename)));
- return $row ? $row[0] : false;
- }
-
- function set_cached_html($pagename, $data)
- {
- $dbh = &$this->_dbh;
- $page_tbl = $this->_table_names['page_tbl'];
- if (empty($data)) $data = '';
- $dbh->Execute("UPDATE $page_tbl"
- . " SET cached_html=?"
- . " WHERE pagename=?",
- array($data, $pagename));
- }
-
- function _get_pageid($pagename, $create_if_missing = false)
- {
- // check id_cache
- global $request;
- $cache =& $request->_dbi->_cache->_id_cache;
- if (isset($cache[$pagename])) {
- if ($cache[$pagename] or !$create_if_missing) {
- return $cache[$pagename];
- }
- }
-
- // attributes play this game.
- if ($pagename === '') return 0;
-
- $dbh = &$this->_dbh;
- $page_tbl = $this->_table_names['page_tbl'];
- $query = sprintf("SELECT id FROM $page_tbl WHERE pagename=%s",
- $dbh->qstr($pagename));
- if (!$create_if_missing) {
- $row = $dbh->GetRow($query);
- return $row ? $row[0] : false;
- }
- $row = $dbh->GetRow($query);
- if (!$row) {
- //TODO: Does the DBM has subselects? Then we can do it with select max(id)+1
- // $this->lock(array('page'));
- $dbh->BeginTrans();
- $dbh->CommitLock($page_tbl);
- if (0 and $dbh->hasGenID) {
- // requires create permissions
- $id = $dbh->GenID($page_tbl . "_id");
- } else {
- // Better generic version than with adodb::genID
- $row = $dbh->GetRow("SELECT MAX(id) FROM $page_tbl");
- $id = $row[0] + 1;
- }
- $rs = $dbh->Execute(sprintf("INSERT INTO $page_tbl"
- . " (id,pagename,hits)"
- . " VALUES (%d,%s,0)",
- $id, $dbh->qstr($pagename)));
- if ($rs) $dbh->CommitTrans();
- else $dbh->RollbackTrans();
- // $this->unlock(array('page'));
- } else {
- $id = $row[0];
- }
- assert($id);
- return $id;
- }
-
- function get_latest_version($pagename)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- $row = $dbh->GetRow(sprintf("SELECT latestversion"
- . " FROM $page_tbl, $recent_tbl"
- . " WHERE $page_tbl.id=$recent_tbl.id"
- . " AND pagename=%s",
- $dbh->qstr($pagename)));
- return $row ? (int)$row[0] : false;
- }
-
- function get_previous_version($pagename, $version)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- // Use SELECTLIMIT for maximum portability
- $rs = $dbh->SelectLimit(sprintf("SELECT version"
- . " FROM $version_tbl, $page_tbl"
- . " WHERE $version_tbl.id=$page_tbl.id"
- . " AND pagename=%s"
- . " AND version < %d"
- . " ORDER BY version DESC",
- $dbh->qstr($pagename),
- $version),
- 1);
- return $rs->fields ? (int)$rs->fields[0] : false;
- }
-
- /**
- * Get version data.
- *
- * @param string $pagename Name of the page
- * @param int $version Which version to get
- * @param bool $want_content Do we need content?
- *
- * @return array|false The version data, or false if specified version does not exist.
- */
- function get_versiondata($pagename, $version, $want_content = false)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
- extract($this->_expressions);
-
- assert(is_string($pagename) and $pagename != '');
- assert($version > 0);
-
- // FIXME: optimization: sometimes don't get page data?
- if ($want_content) {
- $fields = $this->page_tbl_fields
- . ",$page_tbl.pagedata AS pagedata,"
- . $this->version_tbl_fields;
- } else {
- $fields = $this->page_tbl_fields . ", '' AS pagedata"
- . ", $version_tbl.version AS version, $version_tbl.mtime AS mtime, "
- . "$version_tbl.minor_edit AS minor_edit, $iscontent AS have_content, "
- . "$version_tbl.versiondata as versiondata";
- }
- $row = $dbh->GetRow(sprintf("SELECT $fields"
- . " FROM $page_tbl, $version_tbl"
- . " WHERE $page_tbl.id=$version_tbl.id"
- . " AND pagename=%s"
- . " AND version=%d",
- $dbh->qstr($pagename), $version));
- return $row ? $this->_extract_version_data_num($row, $want_content) : false;
- }
-
- private function _extract_version_data_num($row, $want_content)
- {
- if (!$row)
- return false;
-
- //$id &= $row[0];
- //$pagename &= $row[1];
- $data = empty($row[8]) ? array() : $this->_unserialize($row[8]);
- $data['mtime'] = $row[5];
- $data['is_minor_edit'] = !empty($row[6]);
- if ($want_content) {
- $data['%content'] = $row[7];
- } else {
- $data['%content'] = !empty($row[7]);
- }
- if (!empty($row[3])) {
- $data['%pagedata'] = $this->_extract_page_data($row[3], $row[2]);
- }
- return $data;
- }
-
- function _extract_version_data_assoc($row)
- {
- if (!$row)
- return false;
-
- extract($row);
- $data = empty($versiondata) ? array() : $this->_unserialize($versiondata);
- $data['mtime'] = $mtime;
- $data['is_minor_edit'] = !empty($minor_edit);
- if (isset($content))
- $data['%content'] = $content;
- elseif ($have_content)
- $data['%content'] = true; else
- $data['%content'] = '';
- if (!empty($pagedata)) {
- // hmm, $pagedata = is already extracted by WikiDB_backend_ADODB_iter
- //$data['%pagedata'] = $this->_extract_page_data($pagedata, $hits);
- $data['%pagedata'] = $pagedata;
- }
- return $data;
- }
-
- /*
- * Create a new revision of a page.
- */
- function set_versiondata($pagename, $version, $data)
- {
- $dbh = &$this->_dbh;
- $version_tbl = $this->_table_names['version_tbl'];
-
- $minor_edit = (int)!empty($data['is_minor_edit']);
- unset($data['is_minor_edit']);
-
- $mtime = (int)$data['mtime'];
- unset($data['mtime']);
- assert(!empty($mtime));
-
- $content = isset($data['%content']) ? (string)$data['%content'] : '';
- unset($data['%content']);
- unset($data['%pagedata']);
-
- $this->lock(array('page', 'recent', 'version', 'nonempty'));
- $dbh->BeginTrans();
- $dbh->CommitLock($version_tbl);
- $id = $this->_get_pageid($pagename, true);
- $dbh->Execute(sprintf("DELETE FROM $version_tbl"
- . " WHERE id=%d AND version=%d",
- $id, $version));
- $rs = $dbh->Execute("INSERT INTO $version_tbl"
- . " (id,version,mtime,minor_edit,content,versiondata)"
- . " VALUES(?,?,?,?,?,?)",
- array($id, $version, $mtime, $minor_edit,
- $content, $this->_serialize($data)));
- $this->_update_recent_table($id);
- $this->_update_nonempty_table($id);
- if ($rs) {
- $dbh->CommitTrans();
- } else {
- $dbh->RollbackTrans();
- }
- $this->unlock(array('page', 'recent', 'version', 'nonempty'));
- }
-
- /*
- * Delete an old revision of a page.
- */
- function delete_versiondata($pagename, $version)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
- $this->lock(array('version'));
- if (($id = $this->_get_pageid($pagename))) {
- $dbh->Execute("DELETE FROM $version_tbl"
- . " WHERE id=$id AND version=$version");
- $this->_update_recent_table($id);
- // This shouldn't be needed (as long as the latestversion
- // never gets deleted.) But, let's be safe.
- $this->_update_nonempty_table($id);
- }
- $this->unlock(array('version'));
- }
-
- /*
- * Delete page from the database with backup possibility.
- * i.e save_page('') and DELETE nonempty id
- *
- * deletePage increments latestversion in recent to a non-existent version,
- * and removes the nonempty row,
- * so that get_latest_version returns id+1 and get_previous_version returns prev id
- * and page->exists returns false.
- */
- function delete_page($pagename)
- {
- /**
- * @var WikiRequest $request
- */
- global $request;
-
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
- $dbh->BeginTrans();
- $dbh->CommitLock($recent_tbl);
- if (($id = $this->_get_pageid($pagename)) === false) {
- $dbh->RollbackTrans();
- return false;
- }
- $mtime = time();
- $user =& $request->_user;
- $meta = array('author' => $user->getId(),
- 'author_id' => $user->getAuthenticatedId(),
- 'mtime' => $mtime);
- $this->lock(array('version', 'recent', 'nonempty', 'page', 'link'));
- $version = $this->get_latest_version($pagename);
- if ($dbh->Execute("UPDATE $recent_tbl SET latestversion=latestversion+1,"
- . "latestmajor=latestversion+1,latestminor=NULL WHERE id=$id")
- and $dbh->Execute("INSERT INTO $version_tbl"
- . " (id,version,mtime,minor_edit,content,versiondata)"
- . " VALUES(?,?,?,?,?,?)",
- array($id, $version + 1, $mtime, 0,
- '', $this->_serialize($meta)))
- and $dbh->Execute("DELETE FROM $nonempty_tbl WHERE id=$id")
- // need to keep perms and LOCKED, otherwise you can reset the perm
- // by action=remove and re-create it with default perms
- // keep hits but delete meta-data
- //and $dbh->Execute("UPDATE $page_tbl SET pagedata='' WHERE id=$id")
- ) {
- $this->set_links($pagename, array());
- $this->unlock(array('version', 'recent', 'nonempty', 'page', 'link'));
- $dbh->CommitTrans();
- return true;
- } else {
- $this->unlock(array('version', 'recent', 'nonempty', 'page', 'link'));
- $dbh->RollbackTrans();
- return false;
- }
- }
-
- /*
- * Delete page completely from the database.
- */
- function purge_page($pagename)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
- $this->lock(array('version', 'recent', 'nonempty', 'page', 'link'));
- if (($id = $this->_get_pageid($pagename))) {
- $dbh->Execute("DELETE FROM $nonempty_tbl WHERE id=$id");
- $dbh->Execute("DELETE FROM $recent_tbl WHERE id=$id");
- $dbh->Execute("DELETE FROM $version_tbl WHERE id=$id");
- $this->set_links($pagename, array());
- $row = $dbh->GetRow("SELECT COUNT(*) FROM $link_tbl WHERE linkto=$id");
- if ($row and $row[0]) {
- // We're still in the link table (dangling link) so we can't delete this
- // altogether.
- $dbh->Execute("UPDATE $page_tbl SET hits=0, pagedata='' WHERE id=$id");
- $result = 0;
- } else {
- $dbh->Execute("DELETE FROM $page_tbl WHERE id=$id");
- $result = 1;
- }
- } else {
- $result = -1; // already purged or not existing
- }
- $this->unlock(array('version', 'recent', 'nonempty', 'page', 'link'));
- return $result;
- }
-
- /**
- * 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)
- {
- // Update link table.
- // FIXME: optimize: mysql can do this all in one big INSERT/REPLACE.
-
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
- $this->lock(array('link'));
- $pageid = $this->_get_pageid($pagename, true);
-
- $oldlinks = $dbh->getAssoc("SELECT $link_tbl.linkto as id, page.pagename FROM $link_tbl"
- . " JOIN page ON ($link_tbl.linkto = page.id)"
- . " WHERE linkfrom=$pageid");
- // Delete current links,
- $dbh->Execute("DELETE FROM $link_tbl WHERE linkfrom=$pageid");
- // and insert new links. Faster than checking for all single links
- if ($links) {
- foreach ($links as $link) {
- $linkto = $link['linkto'];
- if ($linkto === "") { // ignore attributes
- continue;
- }
- if (isset($link['relation']))
- $relation = $this->_get_pageid($link['relation'], true);
- else
- $relation = 0;
- // avoid duplicates
- if (isset($linkseen[$linkto]) and !$relation) {
- continue;
- }
- if (!$relation) {
- $linkseen[$linkto] = true;
- }
- $linkid = $this->_get_pageid($linkto, true);
- assert($linkid);
- if ($relation) {
- $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto, relation)"
- . " VALUES ($pageid, $linkid, $relation)");
- } else {
- $dbh->Execute("INSERT INTO $link_tbl (linkfrom, linkto)"
- . " VALUES ($pageid, $linkid)");
- }
- if ($oldlinks and array_key_exists($linkid, $oldlinks)) {
- // This was also in the previous page
- unset($oldlinks[$linkid]);
- }
- }
- }
- $this->unlock(array('link'));
- }
-
- /**
- * 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
- * existing links.
- *
- * relations: $backend->get_links is responsible to add the relation to the pagehash
- * as 'linkrelation' key as pagename. See WikiDB_PageIterator::next
- * if (isset($next['linkrelation']))
- */
- function get_links($pagename, $reversed = true, $include_empty = false,
- $sortby = '', $limit = '', $exclude = '',
- $want_relations = false)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
- if ($reversed)
- list($have, $want) = array('linkee', 'linker');
- else
- list($have, $want) = array('linker', 'linkee');
- $orderby = $this->sortby($sortby, 'db', array('pagename'));
- if ($orderby) $orderby = " ORDER BY $want." . $orderby;
- if ($exclude) // array of pagenames
- $exclude = " AND $want.pagename NOT IN " . $this->_sql_set($exclude);
- else
- $exclude = '';
-
- $qpagename = $dbh->qstr($pagename);
- // removed ref to FETCH_MODE in next line
- $sql = "SELECT $want.id AS id, $want.pagename AS pagename, "
- . ($want_relations ? " related.pagename as linkrelation" : " $want.hits AS hits")
- . " FROM "
- . (!$include_empty ? "$nonempty_tbl, " : '')
- . " $page_tbl linkee, $page_tbl linker, $link_tbl "
- . ($want_relations ? " JOIN $page_tbl related ON ($link_tbl.relation=related.id)" : '')
- . " WHERE linkfrom=linker.id AND linkto=linkee.id"
- . " AND $have.pagename=$qpagename"
- . (!$include_empty ? " AND $nonempty_tbl.id=$want.id" : "")
- //. " GROUP BY $want.id"
- . $exclude
- . $orderby;
- if ($limit) {
- // extract from,count from limit
- list($offset, $count) = $this->limit($limit);
- $result = $dbh->SelectLimit($sql, $count, $offset);
- } else {
- $result = $dbh->Execute($sql);
- }
- $fields = $this->links_field_list;
- if ($want_relations) // instead of hits
- $fields[2] = 'linkrelation';
- return new WikiDB_backend_ADODB_iter($this, $result, $fields);
- }
-
- /*
- * Find if a page links to another page
- */
- function exists_link($pagename, $link, $reversed = false)
- {
- $dbh = &$this->_dbh;
- extract($this->_table_names);
-
...
[truncated message content] |
|
From: <var...@us...> - 2021-09-03 11:30:27
|
Revision: 10535
http://sourceforge.net/p/phpwiki/code/10535
Author: vargenau
Date: 2021-09-03 11:30:25 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
PDO: better check _unserialize
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 10:18:08 UTC (rev 10534)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 11:30:25 UTC (rev 10535)
@@ -1273,7 +1273,13 @@
*/
function _unserialize($data)
{
- return empty($data) ? array() : unserialize($data);
+ if ($data === "") {
+ return array();
+ } else if (is_string($data)) {
+ return unserialize($data);
+ } else {
+ return array();
+ }
}
/* some variables and functions for DB backend abstraction (action=upgrade) */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 10:18:10
|
Revision: 10534
http://sourceforge.net/p/phpwiki/code/10534
Author: vargenau
Date: 2021-09-03 10:18:08 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Remove references to CSS2, CSS3 is needed
Modified Paths:
--------------
trunk/themes/MonoBook/commonPrint.css
trunk/themes/MonoBook/monobook.css
trunk/themes/MonoBook/themeinfo.php
trunk/themes/Sidebar/sidebar.css
trunk/themes/SpaceWiki/SpaceWiki.css
Modified: trunk/themes/MonoBook/commonPrint.css
===================================================================
--- trunk/themes/MonoBook/commonPrint.css 2021-09-03 10:12:29 UTC (rev 10533)
+++ trunk/themes/MonoBook/commonPrint.css 2021-09-03 10:18:08 UTC (rev 10534)
@@ -1,5 +1,5 @@
/*
-** Mediawiki Print style sheet for CSS2-capable browsers.
+** Mediawiki Print style sheet
** Copyright Gabriel Wicke, http://www.aulinx.de/
**
** Derived from the plone (http://plone.org/) styles
Modified: trunk/themes/MonoBook/monobook.css
===================================================================
--- trunk/themes/MonoBook/monobook.css 2021-09-03 10:12:29 UTC (rev 10533)
+++ trunk/themes/MonoBook/monobook.css 2021-09-03 10:18:08 UTC (rev 10534)
@@ -1,5 +1,5 @@
/*
-** MediaWiki 'monobook' style sheet for CSS2-capable browsers.
+** MediaWiki 'monobook' style sheet
** Copyright Gabriel Wicke - http://wikidev.net/
** License: GPL (http://www.gnu.org/copyleft/gpl.html)
**
Modified: trunk/themes/MonoBook/themeinfo.php
===================================================================
--- trunk/themes/MonoBook/themeinfo.php 2021-09-03 10:12:29 UTC (rev 10533)
+++ trunk/themes/MonoBook/themeinfo.php 2021-09-03 10:18:08 UTC (rev 10534)
@@ -31,7 +31,7 @@
/**
* The new mediawiki (Wikipedia.org) default style.
- * Mediawiki 'monobook' style sheet for CSS2-capable browsers.
+ * Mediawiki 'monobook' style sheet
* Copyright Gabriel Wicke - http://www.aulinx.de/
* See main.css for more.
*/
Modified: trunk/themes/Sidebar/sidebar.css
===================================================================
--- trunk/themes/Sidebar/sidebar.css 2021-09-03 10:12:29 UTC (rev 10533)
+++ trunk/themes/Sidebar/sidebar.css 2021-09-03 10:18:08 UTC (rev 10534)
@@ -1,5 +1,5 @@
/*
-** Based upon the MediaWiki 'monobook' style sheet for CSS2-capable browsers.
+** Based upon the MediaWiki 'monobook' style sheet
** Copyright Gabriel Wicke - http://wikidev.net/
** License: GPL (http://www.gnu.org/copyleft/gpl.html)
**
Modified: trunk/themes/SpaceWiki/SpaceWiki.css
===================================================================
--- trunk/themes/SpaceWiki/SpaceWiki.css 2021-09-03 10:12:29 UTC (rev 10533)
+++ trunk/themes/SpaceWiki/SpaceWiki.css 2021-09-03 10:18:08 UTC (rev 10534)
@@ -2,8 +2,6 @@
* This theme will probably be renamed something like "Space" to
* avoid any potential copyright issues.
*
- * http://www.w3.org/TR/REC-CSS2/indexlist.html
- *
* #fff; white
* #000; black
* #fff313; yellow
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 10:12:31
|
Revision: 10533
http://sourceforge.net/p/phpwiki/code/10533
Author: vargenau
Date: 2021-09-03 10:12:29 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
PDO: better test $this->_result
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 08:40:08 UTC (rev 10532)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 10:12:29 UTC (rev 10533)
@@ -1391,7 +1391,7 @@
function free()
{
- if ($this->_result) {
+ if (isset($this->_result)) {
unset($this->_result);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 08:40:10
|
Revision: 10532
http://sourceforge.net/p/phpwiki/code/10532
Author: vargenau
Date: 2021-09-03 08:40:08 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Add function reset in class WikiDB_backend_PDO_iter
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 07:49:05 UTC (rev 10531)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 08:40:08 UTC (rev 10532)
@@ -1385,6 +1385,10 @@
return $result->fetch(PDO::FETCH_BOTH);
}
+ function reset()
+ {
+ }
+
function free()
{
if ($this->_result) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 07:49:08
|
Revision: 10531
http://sourceforge.net/p/phpwiki/code/10531
Author: vargenau
Date: 2021-09-03 07:49:05 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Make RecentChanges work with PDO
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 07:12:24 UTC (rev 10530)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 07:49:05 UTC (rev 10531)
@@ -1402,7 +1402,7 @@
if (!is_object($result)) {
return false;
}
- $this->_backend = &$backend;
+ $backend = &$this->_backend;
$rec = $result->fetch(PDO::FETCH_ASSOC);
if (isset($rec['pagedata']))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 07:12:27
|
Revision: 10530
http://sourceforge.net/p/phpwiki/code/10530
Author: vargenau
Date: 2021-09-03 07:12:24 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Make list of pages work with PDO (~AllPages, ~MostPopular...)
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
trunk/pgsrc/ReleaseNotes
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-09-03 06:52:13 UTC (rev 10529)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-03 07:12:24 UTC (rev 10530)
@@ -810,8 +810,7 @@
. $limit);
$sth->bindParam(1, $pagename, PDO::PARAM_STR, 100);
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_BOTH);
- return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list);
+ return new WikiDB_backend_PDO_iter($this, $sth, $this->page_tbl_field_list);
}
/*
@@ -890,8 +889,7 @@
}
$sth = $dbh->prepare($sql . $limit);
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_BOTH);
- return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list);
+ return new WikiDB_backend_PDO_iter($this, $sth, $this->page_tbl_field_list);
}
/*
@@ -935,8 +933,7 @@
. $orderby
. $limit);
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_NUM);
- $iter = new WikiDB_backend_PDO_iter($this, $result, $field_list);
+ $iter = new WikiDB_backend_PDO_iter($this, $sth, $field_list);
$iter->stoplisted = $searchobj->stoplisted;
return $iter;
}
@@ -990,8 +987,7 @@
$sth = $dbh->prepare($sql);
}
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_NUM);
- return new WikiDB_backend_PDO_iter($this, $result, $this->page_tbl_field_list);
+ return new WikiDB_backend_PDO_iter($this, $sth, $this->page_tbl_field_list);
}
/*
@@ -1063,8 +1059,7 @@
$sth = $dbh->prepare($sql);
}
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_NUM);
- return new WikiDB_backend_PDO_iter($this, $result,
+ return new WikiDB_backend_PDO_iter($this, $sth,
array_merge($this->page_tbl_field_list, $this->version_tbl_field_list));
}
@@ -1108,8 +1103,7 @@
$sth = $dbh->prepare($sql);
}
$sth->execute();
- $result = $sth->fetch(PDO::FETCH_NUM);
- return new WikiDB_backend_PDO_iter($this, $result, array('pagename', 'wantedfrom'));
+ return new WikiDB_backend_PDO_iter($this, $sth, array('pagename', 'wantedfrom'));
}
/**
Modified: trunk/pgsrc/ReleaseNotes
===================================================================
--- trunk/pgsrc/ReleaseNotes 2021-09-03 06:52:13 UTC (rev 10529)
+++ trunk/pgsrc/ReleaseNotes 2021-09-03 07:12:24 UTC (rev 10530)
@@ -1,4 +1,4 @@
-Date: Wed, 11 Aug 2021 10:03:04 +0000
+Date: Fri, 3 Sep 2021 09:09:27 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=ReleaseNotes;
@@ -8,6 +8,11 @@
<<CreateToc with_toclink||=1 headers||=1,2,3 width=300px position=right>>
+== 1.6.1 2021-XX-XX Marc-Etienne Vargenau ==
+
+=== Fixes ===
+* Make list of pages work with PDO (~AllPages, ~MostPopular...)
+
== 1.6.0 2021-08-12 Marc-Etienne Vargenau ==
Major release:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-03 06:52:16
|
Revision: 10529
http://sourceforge.net/p/phpwiki/code/10529
Author: vargenau
Date: 2021-09-03 06:52:13 +0000 (Fri, 03 Sep 2021)
Log Message:
-----------
Remove "Bad pagename" warning
Modified Paths:
--------------
trunk/lib/stdlib.php
Modified: trunk/lib/stdlib.php
===================================================================
--- trunk/lib/stdlib.php 2021-09-01 16:32:44 UTC (rev 10528)
+++ trunk/lib/stdlib.php 2021-09-03 06:52:13 UTC (rev 10529)
@@ -913,8 +913,6 @@
private function _normalize_bad_pagename($name)
{
- trigger_error("Bad pagename: " . $name, E_USER_WARNING);
-
// Punt... You really shouldn't get here.
if (empty($name)) {
global $request;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-01 16:32:46
|
Revision: 10528
http://sourceforge.net/p/phpwiki/code/10528
Author: vargenau
Date: 2021-09-01 16:32:44 +0000 (Wed, 01 Sep 2021)
Log Message:
-----------
PearDB.php: move functions getRow and _sql_set
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PearDB.php
Modified: trunk/lib/WikiDB/backend/PearDB.php
===================================================================
--- trunk/lib/WikiDB/backend/PearDB.php 2021-09-01 16:12:07 UTC (rev 10527)
+++ trunk/lib/WikiDB/backend/PearDB.php 2021-09-01 16:32:44 UTC (rev 10528)
@@ -77,6 +77,12 @@
}
+ /* with one result row */
+ function getRow($sql)
+ {
+ return $this->_dbh->getRow($sql);
+ }
+
/**
* Close database connection.
*/
@@ -207,17 +213,6 @@
else
$data[$key] = $val;
}
-
- /* Portability issue -- not all DBMS supports huge strings
- * so we need to 'bind' instead of building a simple SQL statment.
- * Note that we do not need to escapeSimple when we bind
- $dbh->query(sprintf("UPDATE $page_tbl"
- . " SET hits=%d, pagedata='%s'"
- . " WHERE pagename='%s'",
- $hits,
- $dbh->escapeSimple($this->_serialize($data)),
- $dbh->escapeSimple($pagename)));
- */
$dbh->query("UPDATE $page_tbl"
. " SET hits=?, pagedata=?"
. " WHERE pagename=?",
@@ -757,6 +752,15 @@
return "pagename LIKE '%$word%' OR content LIKE '%$word%'";
}
+ function _sql_set(&$pagenames)
+ {
+ $s = '(';
+ foreach ($pagenames as $p) {
+ $s .= ("'" . $this->_dbh->escapeSimple($p) . "',");
+ }
+ return substr($s, 0, -1) . ")";
+ }
+
/*
* Find highest or lowest hit counts.
*/
@@ -902,15 +906,6 @@
return new WikiDB_backend_PearDB_generic_iter($this, $result);
}
- function _sql_set(&$pagenames)
- {
- $s = '(';
- foreach ($pagenames as $p) {
- $s .= ("'" . $this->_dbh->escapeSimple($p) . "',");
- }
- return substr($s, 0, -1) . ")";
- }
-
/**
* Rename page in the database.
*
@@ -954,13 +949,13 @@
$this->lock();
$dbh->query("DELETE FROM $recent_tbl"
- . ($pageid ? " WHERE id=$pageid" : ""));
+ . ($pageid ? " WHERE id=$pageid" : ""));
$dbh->query("INSERT INTO $recent_tbl"
- . " (id, latestversion, latestmajor, latestminor)"
- . " SELECT id, $maxversion, $maxmajor, $maxminor"
- . " FROM $version_tbl"
- . ($pageid ? " WHERE id=$pageid" : "")
- . " GROUP BY id");
+ . " (id, latestversion, latestmajor, latestminor)"
+ . " SELECT id, $maxversion, $maxmajor, $maxminor"
+ . " FROM $version_tbl"
+ . ($pageid ? " WHERE id=$pageid" : "")
+ . " GROUP BY id");
$this->unlock();
}
@@ -1140,11 +1135,6 @@
return $this->_dbh->connection;
}
- function getRow($query)
- {
- return $this->_dbh->getRow($query);
- }
-
function listOfTables()
{
return $this->_dbh->getListOf('tables');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-09-01 16:12:08
|
Revision: 10527
http://sourceforge.net/p/phpwiki/code/10527
Author: vargenau
Date: 2021-09-01 16:12:07 +0000 (Wed, 01 Sep 2021)
Log Message:
-----------
PDO.php: better check $id
Modified Paths:
--------------
trunk/lib/WikiDB/backend/PDO.php
Modified: trunk/lib/WikiDB/backend/PDO.php
===================================================================
--- trunk/lib/WikiDB/backend/PDO.php 2021-08-17 16:44:58 UTC (rev 10526)
+++ trunk/lib/WikiDB/backend/PDO.php 2021-09-01 16:12:07 UTC (rev 10527)
@@ -384,7 +384,7 @@
if (!$create_if_missing) {
return $id;
}
- if (!$id) {
+ if (empty($id)) {
//mysql, mysqli or mysqlt
if (substr($dbh->databaseType, 0, 5) == 'mysql') {
// have auto-incrementing, atomic version
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <var...@us...> - 2021-08-17 16:44:59
|
Revision: 10526
http://sourceforge.net/p/phpwiki/code/10526
Author: vargenau
Date: 2021-08-17 16:44:58 +0000 (Tue, 17 Aug 2021)
Log Message:
-----------
Remove "Optimizing database" E_USER_NOTICE
Modified Paths:
--------------
trunk/lib/WikiDB.php
trunk/lib/main.php
Modified: trunk/lib/WikiDB.php
===================================================================
--- trunk/lib/WikiDB.php 2021-08-17 16:43:43 UTC (rev 10525)
+++ trunk/lib/WikiDB.php 2021-08-17 16:44:58 UTC (rev 10526)
@@ -1086,11 +1086,7 @@
or (DATABASE_OPTIMISE_FREQUENCY > 0 and
(time() % DATABASE_OPTIMISE_FREQUENCY == 0))
) {
- if ($backend->optimize()) {
- if ((int)DEBUG) {
- trigger_error(_("Optimizing database"), E_USER_NOTICE);
- }
- }
+ $backend->optimize();
}
/* Generate notification emails? */
Modified: trunk/lib/main.php
===================================================================
--- trunk/lib/main.php 2021-08-17 16:43:43 UTC (rev 10525)
+++ trunk/lib/main.php 2021-08-17 16:44:58 UTC (rev 10526)
@@ -102,11 +102,7 @@
or (DATABASE_OPTIMISE_FREQUENCY > 0 and
(time() % DATABASE_OPTIMISE_FREQUENCY == 0))
) {
- if ($this->_dbi->_backend->optimize()) {
- if ((int)DEBUG) {
- trigger_error(_("Optimizing database"), E_USER_NOTICE);
- }
- }
+ $this->_dbi->_backend->optimize();
}
// Restore auth state. This doesn't check for proper authorization!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|