You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ru...@us...> - 2010-06-08 08:19:48
|
Revision: 7491 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7491&view=rev Author: rurban Date: 2010-06-08 08:19:42 +0000 (Tue, 08 Jun 2010) Log Message: ----------- less memory: Omit empty relation at getWikiPageLinks use the gforge hack on any gforge derived theme doc: clarify main::isActionPage Modified Paths: -------------- trunk/lib/CachedMarkup.php Modified: trunk/lib/CachedMarkup.php =================================================================== --- trunk/lib/CachedMarkup.php 2010-06-08 08:15:49 UTC (rev 7490) +++ trunk/lib/CachedMarkup.php 2010-06-08 08:19:42 UTC (rev 7491) @@ -1,7 +1,7 @@ <?php // rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> - * Copyright (C) 2004-2008 $ThePhpWikiProgrammingTeam + * Copyright (C) 2004-2010 $ThePhpWikiProgrammingTeam * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. @@ -42,7 +42,8 @@ // a single quote is entered in the Summary box: // - the history is wrong (user and comment missing) // - the table of contents plugin no longer works - if (defined('GFORGE') and GFORGE) { + global $WikiTheme; + if (isa($WikiTheme, 'WikiTheme_gforge')) { return serialize($this); } @@ -364,7 +365,7 @@ if ($basepage == '') return false; if (isset($this->_nolink)) return false; if ($link = $this->getPagename($basepage)) - return array(array('linkto' => $link, 'relation' => 0)); + return array(array('linkto' => $link)); else return false; } @@ -693,9 +694,12 @@ /* ":DontStoreLink" */ if (substr($this->_link,0,1) == ':') return false; /* store only links to valid pagenames */ - if ($link = $this->getPagename($basepage)) - return array(array('linkto' => $link, 'relation' => 0)); - else return false; // dont store external links + $dbi = $GLOBALS['request']->getDbh(); + if ($link = $this->getPagename($basepage) and $dbi->isWikiPage($link)) { + return array(array('linkto' => $link)); + } else { + return false; // dont store external links + } } function _getName($basepage) { @@ -751,6 +755,7 @@ /** * 1.3.13: Previously stored was only _pi. * A fresh generated cache has now ->name and ->args also. + * main::isActionPage only checks the raw content. */ class Cached_PluginInvocation extends Cached_DynamicContent { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-08 08:15:55
|
Revision: 7490 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7490&view=rev Author: rurban Date: 2010-06-08 08:15:49 +0000 (Tue, 08 Jun 2010) Log Message: ----------- simplify if GFORGE Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2010-06-08 06:27:08 UTC (rev 7489) +++ trunk/lib/WikiTheme.php 2010-06-08 08:15:49 UTC (rev 7490) @@ -223,7 +223,7 @@ return; } $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("wikicommon.js")))); - if (!DEBUG and (!defined('GFORGE') or !GFORGE)) { + if (!DEBUG and !GFORGE) { // Gforge and non-debug already load this $this->addMoreHeaders(JavaScript('',array('src' => $this->_findData("sortable.js")))); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-08 06:27:14
|
Revision: 7489 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7489&view=rev Author: rurban Date: 2010-06-08 06:27:08 +0000 (Tue, 08 Jun 2010) Log Message: ----------- make right logo transparent Modified Paths: -------------- trunk/themes/MonoBook/images/wiki_stamp.png Modified: trunk/themes/MonoBook/images/wiki_stamp.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-08 06:26:27
|
Revision: 7488 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7488&view=rev Author: rurban Date: 2010-06-08 06:26:20 +0000 (Tue, 08 Jun 2010) Log Message: ----------- fix sidebar css Modified Paths: -------------- trunk/themes/Sidebar/sidebar-min.css trunk/themes/Sidebar/sidebar.css trunk/themes/Sidebar/themeinfo.php Removed Paths: ------------- trunk/themes/Sidebar/monobook.css trunk/themes/Sidebar/wikibits.js Deleted: trunk/themes/Sidebar/monobook.css =================================================================== --- trunk/themes/Sidebar/monobook.css 2010-06-08 06:01:36 UTC (rev 7487) +++ trunk/themes/Sidebar/monobook.css 2010-06-08 06:26:20 UTC (rev 7488) @@ -1,1979 +0,0 @@ -/** - * $Id$ - */ - -/* -** MediaWiki 'monobook' style sheet for CSS2-capable browsers. -** Copyright Gabriel Wicke - http://wikidev.net/ -** License: GPL (http://www.gnu.org/copyleft/gpl.html) -** -** Loosely based on http://www.positioniseverything.net/ordered-floats.html by Big John -** and the Plone 2.0 styles, see http://plone.org/ (Alexander Limi,Joe Geldart & Tom Croucher, -** Michael Zeltner and Geir Bækholt) -** All you guys rock :) -** Added phpwiki integration: Reini Urban, based on the phpwiki.css by Jeff Dairiki -*/ - -#column-content { - width: 100%; - float: right; - margin: 0 0 .6em -12.2em; - padding: 0; -} -#content { - /* margin: 2.8em 0 0 12.2em; */ - /* padding: 0em 1em 1.5em 1em; */ - margin: 61px 0 0 12.2em; - padding: 1em 1em 1.5em 1em; - background: White; - border: 1px solid #aaaaaa; - border-right: none; - line-height: 1.5em; - position: relative; - z-index: 2; -} -#column-one { padding-top: 50px; } -/* the left column width is specified in class .portlet */ - -/* Font size: -** We take advantage of keyword scaling- browsers won't go below 9px -** More at http://www.w3.org/2003/07/30-font-size -** http://style.cleverchimp.com/font_size_intervals/altintervals.html -*/ - -body { - font: small sans-serif; - background: #ffffff; -/* background: #f9f9f9 url("images/headbg.jpg") 0px 0px no-repeat; */ - color: black; - margin: 0; - padding: 0; -} - -/* scale back up to a sane default */ -#globalWrapper { - font-size:127%; - width: 100%; - margin: 0; - padding: 0; -} -.visualClear { clear: both; } - -/* general styles */ - -table { - font-size: 100%; - color: black; -} -a { - text-decoration: none; - color: #004ba6; - background: none; -} -a:visited { color: #5a3696; } -a:active { color: #faa700; } -a:hover { text-decoration: underline; } -a.stub { color: #772233; } -a.new, #p-personal a.new { - color: #ba0000; -} -a.new:visited, #p-personal a.new:visited { - color: #a55858; -} - -img { - border: none; - /*vertical-align: middle;*/ -} -p { - margin: .4em 0 .5em 0; - line-height: 1.5em; -} -p img { - margin: 0; -} -img.inlineimage { - border: none; - display: inline; -} - -hr { - height: 1px; - color: #aaa; - background-color: #aaa; - border: 0; - margin: .2em 0 .2em 0; -} - -h1, h2, h3, h4, h5, h6 { - color: black; - background: none; - font-weight: bold; - font-family: Tahoma, sans-serif; - margin: 0; - padding-top: 0.5em; - padding-bottom: 0.17em; - border-bottom: 1px solid #aaa; -} -h1 { font-size: 188%; } -h2 { font-size: 150%; } -h3, h4, h5, h6 { - border-bottom: none; - font-weight: bold; -} -h3 { font-size: 132%; } -h4 { font-size: 116%; } -h5 { font-size: 100%; } -h6 { font-size: 80%; } - -ul { - line-height: 1.5em; - list-style-type: square; - margin: 0.3em 0 0 1.5em; - padding:0; - list-style-image: url("images/bullet.png"); -} -ol { - line-height: 1.5em; - margin: 0.3em 0 0 3.2em; - padding:0; - list-style-image: none; -} -li { margin-bottom: 0.1em; } -dt { - font-size: 115%; - /*font-weight: bolder;*/ - /*background-color: #ddd;*/ - margin-bottom: .5em; -} -dl { - margin-top: .2em; - margin-bottom: .5em; -} -dd { - line-height: 1.5em; - margin-left: 2em; - margin-bottom: .1em; -} - -fieldset { - border: 1px solid #2f6fab; - margin: 1em 0 1em 0; - padding: 0 1em 1em 1em; - line-height: 1.5em; -} -legend { - /*background: white;*/ - padding: 0.5em; - font-size: 95%; -} -form { - border: none; - margin: 0; -} - -textarea { - width: 100%; - padding: .1em; -} - -input.historysubmit { - padding: 0 0.3em 0.3em 0.3em !important; - font-size: 94%; - cursor: pointer; - height: 1.7em !important; - margin-left: 1.6em; -} -select { - vertical-align: top; -} -abbr, acronym, .explain { - border-bottom: 1px dotted black; - color: black; - background: none; - cursor: help; -} -q { - font-family: Times, "Times New Roman", serif; - font-style: italic; -} -/* disabled for now -blockquote { - font-family: Times, "Times New Roman", serif; - font-style: italic; -}*/ -code { - background-color: #f9f9f9; -} -pre { - padding: 1em; - border: 1px dashed #2f6fab; - color: black; - background-color: #f9f9f9; - line-height: 1.1em; -} - -/* -** the main content area -*/ - -#siteSub { display: none; } -#jump-to-nav { - display: none; -} -#contentSub { - font-size: 84%; - line-height: 1.2em; - margin: 0 0 1.4em 1em; - color: #7d7d7d; - width: auto; -} -span.subpages { display: block; } - -/* Space for the right logo + rating */ -h1.firstHeading { - margin-right: 220px; - line-height: 1.2em; -} -/* Some space under the headers in the content area */ -#bodyContent h1, #bodyContent h2 { - margin-bottom: .6em; -} -#bodyContent h3, #bodyContent h4, #bodyContent h5 { - margin-bottom: .3em; -} -.firstHeading { margin-bottom: 0.1em; } - -/* user notification thing */ -.usermessage { - background-color: #ffce7b; - border: 1px solid #ffa500; - color: black; - font-weight: bold; - margin: 2em 0 1em; - padding: .5em 1em; - vertical-align: middle; -} -#siteNotice { - text-align: center; - font-size: 95%; - padding: 0 .9em; -} -#siteNotice p { - margin: 0; - padding: 0; -} -.error { - color: red; - font-size: larger; -} -.errorbox, .successbox { - font-size: larger; - border: 2px solid; - padding: .5em 1em; - float: left; - margin-bottom: 2em; - color: #000; -} -.errorbox { - border-color: red; - background-color: #fff2f2; -} -.successbox { - border-color: green; - background-color: #dfd; -} -.errorbox h2, .successbox h2 { - font-size: 1em; - font-weight: bold; - display: inline; - margin: 0 .5em 0 0; - border: none; -} - -#catlinks { - border: 1px solid #aaa; - background-color: #f9f9f9; - padding: 5px; - margin-top: 1em; - clear: both; -} -/* currently unused, intended to be used by a metadata box -in the bottom-right corner of the content area */ -.documentDescription { - /* The summary text describing the document */ - font-weight: bold; - display: block; - margin: 1em 0; - line-height: 1.5em; -} -.documentByLine { - text-align: right; - font-size: 90%; - clear: both; - font-weight: normal; - color: #76797c; -} - -/* emulate center */ -.center { - width: 100%; - text-align: center; -} -*.center * { - margin-left: auto; - margin-right: auto; -} -/* small for tables and similar */ -.small, .small * { - font-size: 94%; -} -table.small { - font-size: 100%; -} - -/* -** RecentChanges -*/ -.pageinfo-majoredit { - font-weight: normal; /*bold;*/ -} -.wiki-summary { - font-size: 94%; - font-style: italic; -} - -/* -** content styles -*/ -.mw-warning { - border: 1px solid #aaa; - background-color: #f9f9f9; - padding: 5px; - margin-bottom: 8px; - font-size: 95%; -} -#toc, -.toc { - width: 200px; - border: 1px solid #aaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; - float: right; - clear: right; -} -#toc h2, -.toc h2 { - display: inline; - border: none; - padding: 0; - font-size: 100%; - font-weight: bold; -} -.toc .toclist, -.toc #toclist { - width: auto; - border: none; -} -#toc #toctitle, -.toc #toctitle, -#toc .toctitle, -.toc .toctitle { - text-align: center; -} -#toc ul, -.toc ul { - list-style-type: none; - list-style-image: none; - margin-left: 0; - padding-left: 0; - text-align: left; -} -#toc ul ul, -.toc ul ul { - margin: 0 0 0 2em; -} -#toc .toctoggle, -.toc .toctoggle { - font-size: 94%; -} - -.mw-warning { - margin-left: 50px; - margin-right: 50px; - text-align: center; -} - -/* images */ -div.floatright, table.floatright { - clear: right; - float: right; - position: relative; - margin: 0 0 .5em .5em; - border: 0; -/* - border: .5em solid white; - border-width: .5em 0 .8em 1.4em; -*/ -} -div.floatright p { font-style: italic; } -div.floatleft, table.floatleft { - float: left; - position: relative; - margin: 0 .5em .5em 0; - border: 0; -/* - margin: .3em .5em .5em 0; - border: .5em solid white; - border-width: .5em 1.4em .8em 0; -*/ -} -div.floatleft p { font-style: italic; } -/* thumbnails */ -div.thumb { - margin-bottom: .5em; - border-style: solid; - border-color: white; - width: auto; -} -div.thumb div { - border: 1px solid #ccc; - padding: 3px !important; - background-color: #f9f9f9; - font-size: 94%; - text-align: center; - overflow: hidden; -} -div.thumb div a img { - border: 1px solid #ccc; -} -div.thumb div div.thumbcaption { - border: none; - text-align: left; - line-height: 1.4em; - padding: .3em 0 .1em 0; -} -div.magnify { - float: right; - border: none !important; - background: none !important; -} -div.magnify a, div.magnify img { - display: block; - border: none !important; - background: none !important; -} -div.tright { - clear: right; - float: right; - border-width: .5em 0 .8em 1.4em; -} -div.tleft { - float: left; - margin-right: .5em; - border-width: .5em 1.4em .8em 0; -} - -.hiddenStructure { - display: none; - speak: none; -} -img.tex { - vertical-align: middle; -} -span.texhtml { - font-family: serif; -} - -/* -** classes for special content elements like town boxes -** intended to be referenced directly from the wiki src -*/ - -/* -** User styles -*/ -/* table standards */ -table.rimage { - float: right; - position: relative; - margin-left: 1em; - margin-bottom: 1em; - text-align: center; -} -.toccolours { - border: 1px solid #aaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; -} -div.townBox { - position: relative; - float: right; - background: white; - margin-left: 1em; - border: 1px solid gray; - padding: .3em; - width: 200px; - overflow: hidden; - clear: right; -} -div.townBox dl { - padding: 0; - margin: 0 0 .3em; - font-size: 96%; -} -div.townBox dl dt { - background: none; - margin: .4em 0 0; -} -div.townBox dl dd { - margin: .1em 0 0 1.1em; - background-color: #f3f3f3; -} - -/* -** edit views etc -*/ -.special li { - line-height: 1.4em; - margin: 0; - padding: 0; -} - -/* Page history styling */ -/* the auto-generated edit comments */ -.autocomment { - color: gray; -} -#pagehistory span.user { - margin-left: 1.4em; - margin-right: .4em; -} -#pagehistory span.minor { - font-weight: bold; -} -#pagehistory li { - border: 1px solid white; -} -#pagehistory li.selected { - background-color: #f9f9f9; - border: 1px dashed #aaa; -} - -/* -** Diff rendering (unused) -*/ -table.diff, td.diff-otitle, td.diff-ntitle { - background-color: white; -} -td.diff-addedline { - background: #cfc; - font-size: smaller; -} -td.diff-deletedline { - background: #ffa; - font-size: smaller; -} -td.diff-context { - background: #eee; - font-size: smaller; -} -span.diffchange { - color: red; - font-weight: bold; -} - -/** - * Diff Output - */ -/* main box */ -.diff { - margin-top: 1ex; - margin-bottom: 0.5ex; - background: white; - /* Netscape 4 requires this 1px border. - Without it, the paper borders below cause - the white background to disappear. */ - border: 1px #ccc solid; - color: black; - border-top: 1px solid #494f5d; - border-left: 1px solid #494f5d; - border-bottom: 1px solid #c6d2de; - border-right: 1px solid #c6d2de; - padding-top: 1px; - padding-bottom: 1px; - padding-left: .125em; - padding-right: .125em; - padding: 0; - /* "paper" borders */ - /*border-top: 2px #d2d2d2 solid; - border-left: 2px #b2b2b2 solid; - border-bottom: 2px #e8e6df solid; - border-right: 2px #e8e6df solid;*/ -/* padding-left: 0em; - padding-bottom: 0ex;*/ -/* border-style: inset;*/ - /*This breaks Netscape 4: (display does not go full width). - * width: auto; - */ - /* I'm not sure what the intent of this was, but it's - * not valid CSS: */ - /* display: editarea; */ - clear: both; -} -.diff .block { - background: #ddd; - padding-left: 1em; - /* for NS4 */ - /*border: none;*/ -} - -/* individual blocks */ -.diff .context { - background: white; - /* for NS4 */ - border: none; -} -/* entire difftextblock */ -.difftext { - margin-top: 0; - margin-bottom: 0; - background: white; - /* Netscape 4 requires this 1px border. - Without it, the paper borders below cause - the white background to disappear. */ - border: 1px black solid; - /* "paper" borders */ - border-top: 1px #e8e6df solid; - border-left: 1px #e8e6df solid; - border-bottom: 1px #d2d2d2 solid; - border-right: 1px #b2b2b2 solid; - padding-left: 0em; - padding-right: 0em; - padding-top: 0ex; - padding-bottom: 0ex; - /*This breaks Netscape 4: (display does not go full width). - * width: auto; - */ - clear: both; -} -/* + - line prefix */ -.diff .block tt { - font-weight: normal; - font-family: monospace; - color: black; - /* for NS4 */ - margin-left: 0; - border: none; -} -/* changed words */ -.diff del, .diff ins { - font-weight: bold; - text-decoration: none; -} - -/* blocks containing deleted or added words */ -.diff .original, .diff .deleted, -.diff .final, .diff .added { - background: white; -} -/* blocks containing deleted words */ -.diff .original, .diff .deleted { - background: #fcc; - /* for NS4 */ - border: none; -} -/* blocks containing added words */ -.diff .final, .diff .added { - background: #cfc; - /* for NS4 */ - border: none; -} - -/* These don't work in NS4 -- it completely ignores <del> and <ins>. */ -/* deleted words */ -.diff del { background: #f99; } -/* added words */ -.diff ins { background: #9f9; } - -/** - * PageHistory, Info - */ -td.pageinfo { font-weight: bold; } -.pageinfo-minoredit, .pageinfo-authorid { - font-size: smaller; - font-style: oblique; -} - -/** - * Calendar plugin - */ -table.cal { - border: 1px outset gray; - background: white; - margin: 0.5ex 0.5em; - padding: 1px; - /* For Mozilla */ - empty-cells: hide; -} - -/* cells */ -table.cal td { - background: white; - text-align: right; -} - -/* Month-name header */ -table.cal-header { font-size: larger; } -table.cal-header tr, table.cal-header td { text-align: center; } -.cal-arrow { - font-weight: bold; - text-decoration: none; -} - -/* Day-names header */ -table.cal tbody tr .cal-dayname { } -.cal-dayname td { - text-align: center; - font-size: smaller; - text-decoration: underline; -} - -/* Individual days */ -a.cal-hide { text-decoration: none; } - -/* Today */ - /* cell */ -table.cal td.cal-today { - margin: 1px; - border: 1px solid gray; -} - /* text */ -table.cal td.cal-today a.cal-hide { } - -/* -** keep the whitespace in front of the ^=, hides rule from konqueror -** this is css3, the validator doesn't like it when validating as css2 -*/ -#bodyContent a.external, -#bodyContent a[href ^="gopher://"] { - background: url("images/url.png") center right no-repeat; - padding-right: 13px; -} -#bodyContent a[href ^="https://"], -.link-https { - background: url("images/lock_icon.png") center right no-repeat; - padding-right: 16px; -} -#bodyContent a[href ^="mailto:"], -.link-mailto { - background: url("images/mail_icon.png") center right no-repeat; - padding-right: 18px; -} -#bodyContent a[href ^="news://"] { - background: url("images/news_icon.png") center right no-repeat; - padding-right: 18px; -} -#bodyContent a[href ^="ftp://"], -.link-ftp { - background: url("images/file_icon.png") center right no-repeat; - padding-right: 18px; -} -#bodyContent a[href ^="irc://"], -.link-irc { - background: url("images/discussionitem_icon.png") center right no-repeat; - padding-right: 18px; -} -/* disable interwiki styling */ -#bodyContent a.extiw, -#bodyContent a.extiw:active { - color: #36b; - background: none; - padding: 0; -} -#bodyContent a.external { - color: #36b; -} -/* this can be used in the content area to switch off -special external link styling */ -#bodyContent .plainlinks a { - background: none !important; - padding: 0 !important; -} -/* -** Structural Elements -*/ - -/* -** general portlet styles (elements in the quickbar) -*/ -.portlet { - border: none; - margin: 0 0 .5em; - padding: 0; - float: none; - width: 11.6em; - overflow: hidden; -} -.portlet h4 { - font-size: 95%; - font-weight: normal; - white-space: nowrap; -} -.portlet h5 { - background: transparent; - padding: 0em 1em 0em 0.5em; - /*text-transform: lowercase;*/ - display: inline; - font-size: 91%; - height: 16px; - width: 11.6em; - font-weight: bold; - white-space: nowrap; -} -.portlet h5 img { - padding: 0; - margin: 0; - top: 0px; - right: 0px; - height: 15px; - width: 15px; - border: 0; -} -.portlet h6 { - background: #ffae2e; - border: 1px solid #2f6fab; - border-style: solid solid none solid; - padding: 0em 1em 0em 1em; - /*text-transform: lowercase;*/ - display: block; - font-size: 1em; - height: 1.2em; - font-weight: normal; - white-space: nowrap; -} -.pBody { - font-size: 95%; - background-color: white; - color: black; - border-collapse: collapse; - border: 1px solid #aaa; - padding: 0 .8em .3em .5em; -} -.portlet h1, -.portlet h2, -.portlet h3, -.portlet h4 { - margin: 0; - padding: 0; -} -.portlet ul { - line-height: 1.5em; - list-style-type: square; - list-style-image: url("images/bullet.png"); - font-size:95%; -} -.portlet li { - padding:0; - margin: 0 0 0 0; - margin-bottom: 0; -} - -/* -** Logo properties - * Optionally at the right also an image -*/ -#p-logo { - z-index: 1; - position: absolute; /*needed to use z-index */ - top: 0; - left: 0; - height: 42px; - width: 100%; - /*width: 340px;*/ - overflow: visible; - background: #000099; -} -#p-logo h5 { display: none; } -#p-logo a, -#p-logo a:hover { - display: block; - height: 42px; - /*width: 12.2em;*/ - background-repeat: no-repeat; - background-position: 35% 50% !important; -} -span.logo { - z-index: 1; - position: absolute; /*needed to use z-index */ - white-space: nowrap; - left: 100px; - top: 15px; - color: #ffffff; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11pt; - font-weight: bolder; - text-decoration: none; - vertical-align: middle; -} - -/* At the right we put a small "wiki stamp" */ -#img-logo-right { - position: absolute; - z-index: 3; - top: 0; - right: 0; - height: 101px; - width: 99px; -} - -/* -** the navigation portlet -*/ - -#p-navigation { - position: relative; - z-index: 3; -} -#p-navigation .pBody { - padding-right: 0; -} -#p-nav1 { - position:relative; - z-index:3; -} - -#p-navigation a { - display: block; -} - -#p-navigation li.active a, #p-navigation li.active a:hover { - text-decoration: none; - display: inline; - font-weight: bold; -} - - -/* -** Search portlet -* Search in the top row (not yet), see p-personal how to do that -*/ -#logo-search { - position:absolute; - z-index: 4; - top: 5px; - left: 340px; - height: 25px; - /*width: 100%;*/ - overflow: visible; -} -#p-search { - position:relative; - z-index:3; -} -#p-search .pBody { - /*text-align: center;*/ -} -div.pBody > button, #searchButton { - margin: 0; - padding: 0; -} -#p-search .pBody { - margin: 0; - padding: .5em 0 .4em .4em; - /*text-align: center;*/ -} -#searchholder form.searchform { - margin: 0; - padding: 0; - display: inline; -} -button.searchButton { - margin: 0; - padding: 0; - cursor: pointer; - width: 18px; - height: 18px; - border: 1px solid ButtonShadow; -} -input.searchButton { - margin-top: 1px; - /*padding: 0 0.4em !important;*/ - font-size: 8pt; - cursor: pointer; - width: 64px; - padding-left: 1px; - background-color: White; - border: 1px solid #2f6fab; - text-transform: capitalize; -} -#searchInput { - width: 120px; - height: 18px; - margin: 0; - font-size: 95%; - border-width: 1px; - border-style: solid; - border-color: #aaa #eee #eee #aaa; - -moz-box-sizing: border-box; -} - -/* -** the personal toolbar -*/ - -#p-personal { - /* width:100%; */ - white-space:nowrap; - padding:0 0 0 0; - margin:0; - position: absolute; - left: 400px; - right: 90px; - top: 15px; - z-index: 4; - border: none; - /* background: white; */ - overflow: visible; - color: black; - line-height: 1.2em; -} - -#p-personal h5 { - display:none; -} -#p-personal .portlet, -#p-personal .pBody { - padding:0; - margin:0; - border: none; - z-index:0; - overflow: visible; - background: none; -} -/* this is the ul contained in the portlet */ -#p-personal ul { - border: none; - line-height: 1.5em; - color: #2f6fab; - padding: 0em 1.5em 0 2em; - margin: 0; - text-align: right; - /* text-transform: lowercase; */ - list-style: none; - z-index:0; - background: none; - cursor: default; -} -#p-personal li { - z-index:0; - border:none; - padding:0; - display: inline; - color: #2f6fab; - margin-left: 0.8em; - line-height: 1.2em; - background: none; -} -#p-personal li a { - text-decoration: none; - color: white; - background: #000099; - padding-bottom: 0.2em; - /* letter-spacing: 110%; */ - /* background: none; */ -} -#p-personal li a:hover { - color: white; - background: #3358bb; - padding-bottom: 0.2em; -/* letter-spacing: 120%; */ - font-weight: bold; - text-decoration: none; -} - -/* the icon in front of the user name, single quotes - in bg url to hide it from iemac */ -li#pt-mypages, -li#pt-mychanges, -li#pt-userpage, -li#pt-anonuserpage, -li#pt-login { - background: url('images/wikiuser.png') top left no-repeat; - background-repeat: no-repeat; - padding-left: 10px; - text-transform: none; -} -#p-personal a.new { color:#ba0000; } - -/* -** the page-related actions- page/talk, edit etc -*/ -#p-cactions { - position: absolute; - top: 40px; /*1.3em;*/ - left: /*11.5em;*/ 13.2em; - margin: 0; - white-space:nowrap; - width: 76%; - line-height: 1.1em; - overflow: visible; - background: none; - border-collapse: collapse; - padding-left: 1em; - list-style: none; - font-size: 95%; -} -#p-cactions .hiddenStructure { display: none; } -#p-cactions ul { - list-style: none; -} -#p-cactions li { - display: inline; - border: 1px solid #aaa; - border-bottom: none; - padding: 0 0 .1em 0; - margin: 0 .3em 0 0; - overflow: visible; - background: white; -} -#p-cactions li.selected { - border-color: #fabd23; - padding: 0 0 0.2em 0; -} -#p-cactions li a { - background-color: #fbfbfb; - color: #002bb8; - border: none; - padding: 0 .8em .3em; - text-decoration: none; - /*text-transform: lowercase;*/ - position: relative; - z-index: 0; - margin: 0; -} -#p-cactions li.selected a { - z-index: 3; - background-color: #fff; - padding: 0 1em .2em; -} -#p-cactions .new a { - color: #ba0000; -} -#p-cactions li a:hover { - z-index: 3; - text-decoration: none; - background-color: #fff; - padding-bottom: 0.3em; -} -/* http://universaleditbutton.org */ -#p-cactions li a#btn-edit { - background: url('images/UEB16.png') top left no-repeat; - background-repeat: no-repeat; - padding-left: 20px !important; - text-transform: none; -} -#p-cactions li a#btn-edit:hover { - z-index: 3; - text-decoration: none; - background-color: #fff; - /*padding-bottom: 0.3em !important;*/ -} -#p-cactions h5 { - display: none; -} -#p-cactions li.istalk { - margin-right: 0; -} -#p-cactions li.istalk a { - padding-right: .5em; -} -#p-cactions #ca-addsection a { - padding-left: .4em; - padding-right: .4em; -} -/* offsets to distinguish the tab groups */ -li#ca-talk { - margin-right: 1.6em; -} -li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { - margin-left: 1.6em; -} - -/* -** the remaining portlets -*/ -#p-tbx, -#p-lang { - position: relative; - z-index: 3; -} - -/* -** footer -*/ -#footer, #bottom { - background-color: white; - border: 1px solid #fabd23; - /* top, right, bottom, left */ - margin: 0.6em 0.5em 1em 13.6em; - /*margin-left: 13.6em;*/ - padding: .4em 0 1.2em 0; - text-align: center; - font-size: 90%; -} -#footer li { - display: inline; - margin: 0 1.3em; -} -#bottom { - border: none; - text-align: left; -} -/* hide from incapable browsers */ -head:first-child+body #footer li { white-space: nowrap; } -#f-poweredbyico, #f-copyrightico { - margin: 0 8px; - /*vertical-align: middle;*/ - height: 31px; - position: relative; - top: -31px; /* Bump it up just a tad */ -} -#f-poweredbyico { - float: right; -} -#f-copyrightico { - float: left; -} - -/* js pref toc */ -#preftoc { - float: left; - margin: 1em 1em 1em 1em; - width: 13em; -} -#preftoc li { border: 1px solid White; } -#preftoc li.selected { - background-color:#f9f9f9; - border:1px dashed #aaaaaa; -} -#preftoc a, -#preftoc a:active { - display: block; - color: #0014a6; -} -#prefcontrol { - clear: both; - float: left; - margin-top: 1em; -} -div.prefsectiontip { - font-size: 95%; - margin-top: 1em; -} -fieldset.operaprefsection { margin-left: 15em } - -/* -** IE/Mac fixes, hope to find a validating way to move this -** to a separate stylesheet. This would work but doesn't validate: -** @import("IEMacFixes.css"); -*/ - -/* tabs: border on the a, not the div */ -* > html #p-cactions li { border:none; } -* > html #p-cactions li a { - border: 1px solid #aaa; - border-bottom: none; -} -* > html #p-cactions li.selected a { border-color: #fabd23; } -/* footer icons need a fixed width */ -* > html #f-poweredbyico, -* > html #f-copyrightico { width: 88px; } -* > html #bodyContent, -* > html #bodyContent pre { - overflow-x: auto; - width: 100%; - padding-bottom: 25px; -} - -/* more IE fixes */ -/* float/negative margin brokenness */ -* html #footer {margin-top: 0;} -* html #column-content { - display: inline; - margin-bottom: 0; -} -* html div.editsection { font-size: smaller; } -#pagehistory li.selected { position: relative; } - -/* Mac IE 5.0 fix; floated content turns invisible */ -* > html #column-content { - float: none; -} -* > html #column-one { - position: absolute; - left: 0; - top: 0; -} -* > html #footer { - margin-left: 13.2em; -} -.redirectText { - font-size: 150%; - margin: 5px; -} - -.printfooter { - display: none; -} - -.not-patrolled { - background-color: #ffa; -} -div.patrollink { - font-size: 75%; - text-align: right; -} -span.newpage, span.minor, span.searchmatch, span.bot { - font-weight: bold; -} -span.unpatrolled { - font-weight: bold; - color: red; -} - -span.searchmatch { - color: red; -} -.sharedUploadNotice { - font-style: italic; -} - -span.updatedmarker { - color: black; - background-color: #0f0; -} -span.newpageletter { - font-weight: bold; - color: black; - background-color: yellow; -} -span.minoreditletter { - color: black; - background-color: #c5ffe6; -} - -table.gallery { - border: 1px solid #ccc; - margin: 2px; - padding: 2px; - background-color: white; -} - -table.gallery tr { - vertical-align: top; -} - -table.gallery td { - vertical-align: top; - background-color: #f9f9f9; - border: solid 2px white; -} - -table.gallery td.galleryheader { - text-align: center; - font-weight: bold; -} - -div.gallerybox { - margin: 2px; - width: 150px; -} - -div.gallerybox div.thumb { - text-align: center; - border: 1px solid #ccc; - margin: 2px; -} - -div.gallerytext { - font-size: 94%; - padding: 2px 4px; -} - -span.comment { - font-style: italic; -} - -span.changedby { - font-size: 95%; -} - -.previewnote { - text-indent: 3em; - color: #c00; - border-bottom: 1px solid #aaa; - padding-bottom: 1em; - margin-bottom: 1em; -} - -.previewnote p { - margin: 0; - padding: 0; -} - -.editExternally { - border: 1px solid gray; - background-color: #ffffff; - padding: 3px; - margin-top: 0.5em; - float: left; - font-size: small; - text-align: center; -} -.editExternallyHelp { - font-style: italic; - color: gray; -} - -li span.deleted, span.history-deleted { - text-decoration: line-through; - color: #888; - font-style: italic; -} - -.toggle { - margin-left: 2em; - text-indent: -2em; -} - -/* Classes for EXIF data display */ -table.mw_metadata { - font-size: 0.8em; - margin-left: 0.5em; - margin-bottom: 0.5em; - width: 300px; -} - -table.mw_metadata caption { - font-weight: bold; -} - -table.mw_metadata th { - font-weight: normal; -} - -table.mw_metadata td { - padding: 0.1em; -} - -table.mw_metadata { - border: none; - border-collapse: collapse; -} - -table.mw_metadata td, table.mw_metadata th { - text-align: center; - border: 1px solid #aaaaaa; - padding-left: 0.1em; - padding-right: 0.1em; -} - -table.mw_metadata th { - background-color: #f9f9f9; -} - -table.mw_metadata td { - background-color: #fcfcfc; -} - -table.collapsed tr.collapsable { - display: none; -} - - -/* filetoc */ -ul#filetoc { - text-align: center; - border: 1px solid #aaaaaa; - background-color: #f9f9f9; - padding: 5px; - font-size: 95%; - margin-bottom: 0.5em; - margin-left: 0; - margin-right: 0; -} - -#filetoc li { - display: inline; - list-style-type: none; - padding-right: 2em; -} - -/* @bug 1714 */ -input#wpSave, input#wpDiff { - margin-right: 0.33em; -} - -#editform .editOptions { - display: inline; -} - -#wpSave { - font-weight: bold; -} - -/* Classes for article validation */ - -table.revisionform_default { - border: 1px solid #000000; -} - -table.revisionform_focus { - border: 1px solid #000000; - background-color:#00BBFF; -} - -tr.revision_tr_default { - background-color:#EEEEEE; -} - -tr.revision_tr_first { - background-color:#DDDDDD; -} - -p.revision_saved { - color: green; - font-weight:bold; -} - -#mw_trackbacks { - border: solid 1px #bbbbff; - background-color: #eeeeff; - padding: 0.2em; -} - - -/* Allmessages table */ - -#allmessagestable th { - background-color: #b2b2ff; -} - -#allmessagestable tr.orig { - background-color: #ffe2e2; -} - -#allmessagestable tr.new { - background-color: #e2ffe2; -} - -#allmessagestable tr.def { - background-color: #f0f0ff; -} - - -/* noarticletext */ -div.noarticletext { - border: 1px solid #ccc; - background: #fff; - padding: .2em 1em; - color: #000; -} - -div#searchTargetContainer { - left: 10px; - top: 10px; - width: 90%; - background: white; -} - -div#searchTarget { - padding: 3px; - margin: 5px; - background: #F0F0F0; - border: solid 1px blue; -} - -div#searchTarget ul li { - list-style: none; -} - -div#searchTarget ul li:before { - color: orange; - content: "\00BB \0020"; -} - -div.multipageimagenavbox { - border: solid 1px silver; - padding: 4px; - margin: 1em; - -moz-border-radius: 6px; - background: #f0f0f0; -} - -div.multipageimagenavbox div.thumb { - border: none; - margin-left: 2em; - margin-right: 2em; -} - -div.multipageimagenavbox hr { - margin: 6px; -} - -table.multipageimage td { - text-align: center; -} - -/* - Table pager (e.g. Special:Imagelist) - - remove underlines from the navigation link - - collapse borders - - set the borders to outsets (similar to Special:Allmessages) - - remove line wrapping for all td and th, set background color - - restore line wrapping for the last two table cells (description and size) -*/ -.TablePager_nav a { text-decoration: none; } -.TablePager { border-collapse: collapse; } -.TablePager, .TablePager td, .TablePager th { - border: 0.15em solid #777777; - padding: 0 0.15em 0 0.15em; -} -.TablePager th { background-color: #eeeeff } -.TablePager td { background-color: #ffffff } -.TablePager tr:hover td { background-color: #eeeeff } - -.imagelist td, .imagelist th { white-space: nowrap } -.imagelist .TablePager_col_links { background-color: #eeeeff } -.imagelist .TablePager_col_img_description { white-space: normal } -.imagelist th.TablePager_sort { background-color: #ccccff } - -/** - * PhpWiki Tables - */ -.pagelist { - font-size: smaller; -} -.pagelist thead td { - background: #e8e8e8; - text-decoration: none; - font-weight: bold; -} -.pagelist thead td u { text-decoration: none; } -.pagelist tr.evenrow { background: #eee; } -.pagelist tr.oddrow { background: white; } -th.gridbutton { - background-color: ThreeDLightShadow; - color: black; - font-family: Tahoma, Arial, Helvetica, sans-serif; - font-size: small; - font-weight: normal; - white-space: nowrap; - margin: 5px 0px; - max-height: 24px; - padding: 5px 0px 5px 0px; - border-width: 1px; - border-style: solid; - border-color: ThreeDHighlight ThreeDDarkShadow ThreeDDarkShadow ThreeDHighlight; -} -input.gridbutton, a.gridbutton, a:hover.gridbutton, a:visited.gridbutton { - text-decoration: none; - font-size: small; - font-weight: normal; - font-family: Tahoma, Arial, Helvetica, sans-serif; - background-color: ThreeDLightShadow; - color: black; -} - -.wikipaging { font-size: 80% } -.wikipaging-disabled { color: #999 } - -/* plugin BoxRight */ -div.boxright { - background-color: #e9fbff; - width: 200px; - right: 10px; - float: right; - border: thin solid #888888; - padding: 0.5em 0.5em 0.5em 0.5em; - margin: 0; -} - -div.boxright > blockquote { - padding: 0.5em; - margin: 0; -} - -/* PHP Warnings */ -div.errors { - color: black; - background-color: #FF9999; - margin-top: 1em; - margin-bottom: 1em; - padding-left: 0.8em; - padding-right: 0.8em; - padding-top: 0.8ex; - padding-bottom: 0; - border: medium solid red; - clear: both; -} -h4.errors { - color: red; - margin: 0; - padding: 0; - text-decoration: underline; -} -div.warning { - color: black; - background-color: #FFCCCC; - margin-top: 1em; - margin-bottom: 1em; - padding-left: 0.8em; - padding-right: 0.8em; - padding-top: 0.8ex; - padding-bottom: 0; - border: 1px solid #aaa; - clear: both; -} -.error { font-family: monospace; font-size: 120%; } -.error ul { font-family: monospace; } - -/* Debug */ -.debug { - color: black; - background: white; - font-family: monospace; - font-size: smaller; - margin: 1ex 0; - padding: 0.5ex 0.5em; - border: medium solid #fff8dc; /* darker ivory */ -} -/* Hints */ -.hint { - color: black; - background: #eeeeee; - /* font-size: smaller; */ - font-style: italic; - margin-left: 3em; - padding: 0.5ex 0.5em; - border: thin solid #aaaaaa; -} -span.hint { - padding: 0; -} -/* Disabled Plugins */ -.disabled-plugin -{ - clear: both; - margin: 1ex 0; - padding: 0; -} -.disabled-plugin .title { - color: #400; - background-color: inherit; - font-size: x-small; - text-align: right; - padding: 0 0.5em; -} -.disabled-plugin pre { - color: black; - background: #ddd; - margin: 0; - padding: 0.3ex 0.5em; -} - -/* "(Redirected from ...)" message. */ -span.redirectfrom { - font-size: small; - font-style: oblique; - font-weight: normal; - padding-left: 1em; -} -.search-context { background: white; font-style: oblique; } -.search-term { - background: yellow; - font-weight: normal; -} - -a.spell-wrong { - color:#ba0000; - background: yellow; -} -span.spell-wrong { - color:#ba0000; -} - - -/** - * Wiki Forms - * - * The div inside the wikiadmin upload form does not - * have a class yet, so it must be referenced indirectly - */ -/* div.wikiaction { background-color: #eee; } */ -/* div.wikiadmin { background-color: #fee; } */ -/* form.wikiadmin div { background-color: #fee; } */ -form.wikiformrich { background-color: #eee; } - -/** - * Link styles - */ -.wiki, .named-wiki { - text-decoration: none; - font-weight: normal; - /* font-weight: bold; */ -} -.wiki relation, .named-wiki relation, .wiki attribute, .named-wiki attribute { - font-style: oblique; - /* font-weight: normal; */ - font-weight: bold; -} - -span.relation-symbol { - font-weight: bold; - font-family: monospace; - letter-spacing: 0.1em; -} - -/* Action buttons */ -a.wikiaction, a.wikiadmin, a.wiki-rc-action, a.wikiunsafe, -input.wikiaction, input.button, input.wikiadmin { - text-decoration: none; - font-family: Arial, Helvetica, sans-serif; - /* don't wrap text buttons */ - white-space: nowrap; - /*font-size: inherit; */ -} - -/* -a.wikiaction, a.wikiaction:visited, input.wikiaction, input.button { - background-color: #ddd; -} -*/ - -.wikiunsafe { background-color: #fcc; } - -/* -a.wikiadmin, a.wikiadmin:visited, input.wikiadmin { - background-color: #fdd; -} -*/ - -/* Unknown links */ -.wikiunknown, .named-wikiunknown { - font-weight: normal; - font-size: 100%; -} - /* QuestionMark #600 */ -.wikiunknown a, .named-wikiunknown a { - color: #447; - background-color: #eee; - text-decoration: none; - font-weight: normal; - font-size: smaller; -} - -/* Backlinks */ -.backlinks { - text-decoration: underline; - color: #006; -} -h1 .backlinks { - text-decoration: underline; -} - -/* Interwiki links */ -/* .wikipage { font-weight: bold; } */ -.wikipage { font-weight: normal; } -.interwiki { text-decoration: none; } -.interwiki, i.interwiki .wikipage, em .interwiki .wikipage { font-style: oblique; } -.interwiki .wikipage, i .interwiki, em .interwiki { font-style: normal; } - -/* - * "E-mail" style blockquote - */ -blockquote.mail-style-quote { - border-left: medium #284 solid; - padding-left: 1em; - margin-left: 0; - margin-right: 0; -} -.mail-style-quote blockquote.mail-style-quote { - margin-left: -0.6em; -} - -#p-rc-body div div.box-title { display: none; } - -/* RssFeed */ -div.rss { margin: 1em; padding: 1em; font-size: 0.9em; background-color: #eeeeee; border: thin dashed #aaa; } -div.feed { color: #333; margin: -0.5em; margin-bottom: 0em; padding: 0.3em; font-weight: bold; background-color: #f2f2f2; font-size: 1.2em; } -div.itemdesc { padding-left: 1em; } -div.rssitem { border-top: thin dashed #aaa; } -a.rssicon { font-weight: normal; font-size: small; vertical-align: middle; } - -/* Top-page - RateIt */ -div#rateit-widget-top-1 { - width: 120px; - height: 29px; - top: 5px; - right: 75px; - z-index: 1; - position: absolute; /*needed to use z-index */ -} -div#rateit-widget-top { - padding-top: 0px; - position: absolute; - z-index: 1; - width: 120px; - height: 29px; - top: 0px; /* 34 */ - right: 110px; -} -/* Top-page - RateIt */ -span.rateit { - text-decoration: none; - font-family: Arial, Helvetica, sans-serif; - font-size: 10px; -} - -/* - * table class="boxed" - * will put a border around the table (but not around the cells) - * - * table class="bordered" - * will put a border around the table and the cells - * - * In both cases, the caption will be bold and centered under the table - * - * In both cases, the headers (th) will have a "#d8d8d8" background - */ - -table.boxed, table.bordered, table.bordered th, table.bordered td { - border-width: 1px; - border-style: solid; - border-collapse: collapse; - vertical-align: top; -} - -table.boxed td, table.bordered td, -table.boxed th, table.bordered th { - padding-left: 5px; - padding-right: 5px; - padding-top: 0px; - padding-bottom: 0px; -} - -table.boxed caption, table.bordered caption { - text-align: center; - font-weight: bold; - caption-side: bottom; - padding-top: 0.8em; -} - -table.boxed th, table.bordered th { - font-weight: bold; - background-color: #d8d8d8; -} Modified: trunk/themes/Sidebar/sidebar-min.css =================================================================== --- trunk/themes/Sidebar/sidebar-min.css 2010-06-08 06:01:36 UTC (rev 7487) +++ trunk/themes/Sidebar/sidebar-min.css 2010-06-08 06:26:20 UTC (rev 7488) @@ -1 +1 @@ -@import url("../default/phpwiki.css");body{background:#fff;font-family:Arial,Helvetica,sans-serif;font-size:85%;margin:0;}div.wikitext{margin-left:.5em;border-top:1px solid #e8e6df;border-left:1px solid #e8e6df;border-bottom:1px solid #b2b2b2;border-right:1px solid #b2b2b2;}div#logo img{left:1ex;top:1ex;margin:0;}h1{top:0;padding-top:.5ex;padding-bottom:.5ex;padding-left:.25em;width:100%;border-bottom:2px solid black;}h1 a.backlinks{text-decoration:none;}#navbar hr,#actionbar hr{display:none;}#actionbuttons,#signin{line-height:2.4ex;}.sidebar{line-height:1em;}.sidebar a.wikiadmin,.sidebar a.wikiaction{border:0;margin:0;padding:0;-moz-appearance:none;-moz-box-sizing:auto;-moz-border-radius:0;background-color:#fff;}div#signin{margin-bottom:1ex;}div#searchholder{display:inline;position:relative;}#searchGoButton{background-color:#fff;border:none;padding:0;height:15px;width:15px;-moz-appearance:none;-moz-box-sizing:auto;-moz-border-radius:0;line-height:1em;position:absolute;top:5px;left:132px;}#livesearch{position:relative;margin-left:.5em;}p.editdate{background:white;padding:.25ex .5em;border-top:1px solid #e8e6df;border-left:1px solid #e8e6df;border-bottom:1px solid #d3d2c8;border-right:1px solid #e8e6df;margin-left:.5em;margin-right:1em;margin-top:.5ex;margin-bottom:.5ex;}.debug{margin-left:.5em;left:.5em;max-width:13em;}div#xhtml-validator{right:.75em;}.clear-floats{clear:both;}div.box-title a,div.box-title a:visited,div.box-title a:link{font-weight:normal;text-decoration:none;color:black;}div.box-title a:hover{padding:0 4px 0 4px;background-color:ThreedLightShadow;border:1px outset;}div.box-data a,div.box-data a:visited,div.box-data a:link{text-decoration:none;color:black;font-size:smaller;}div.box-data a:hover{background-color:ThreedLightShadow;border:1px outset;} \ No newline at end of file +#column-content{width:100%;float:right;margin:0 0 .6em -12.2em;padding:0;}#content{margin:61px 0 0 12.2em;padding:1em 1em 1.5em 1em;background:White;border:1px solid #aaa;border-right:none;line-height:1.5em;position:relative;z-index:2;}#column-one{padding-top:50px;}body{font:small sans-serif;background:#fff;color:black;margin:0;padding:0;}#globalWrapper{font-size:127%;width:100%;margin:0;padding:0;}.visualClear{clear:both;}table{font-size:100%;color:black;}a{text-decoration:none;color:#004ba6;background:none;}a:visited{color:#5a3696;}a:active{color:#faa700;}a:hover{text-decoration:underline;}a.stub{color:#723;}a.new,#p-personal a.new{color:#ba0000;}a.new:visited,#p-personal a.new:visited{color:#a55858;}img{border:none;}p{margin:.4em 0 .5em 0;line-height:1.5em;}p img{margin:0;}img.inlineimage{border:none;display:inline;}hr{height:1px;color:#aaa;background-color:#aaa;border:0;margin:.2em 0 .2em 0;}h1,h2,h3,h4,h5,h6{color:black;background:none;font-weight:bold;font-family:Tahoma,sans-serif;margin:0;padding-top:.5em;padding-bottom:.17em;border-bottom:1px solid #aaa;}h1{font-size:188%;}h2{font-size:150%;}h3,h4,h5,h6{border-bottom:none;font-weight:bold;}h3{font-size:132%;}h4{font-size:116%;}h5{font-size:100%;}h6{font-size:80%;}ul{line-height:1.5em;list-style-type:square;margin:.3em 0 0 1.5em;padding:0;list-style-image:url("images/bullet.png");}ul.clicked{line-height:1.5em;list-style-type:square;margin:.3em 0 0 1.5em;padding:0;list-style-image:url("images/bulletLoading.gif");}ol{line-height:1.5em;margin:.3em 0 0 3.2em;padding:0;list-style-image:none;}li{margin-bottom:.1em;}dt{font-size:115%;margin-bottom:.5em;}dl{margin-top:.2em;margin-bottom:.5em;}dd{line-height:1.5em;margin-left:2em;margin-bottom:.1em;}fieldset{border:1px solid #2f6fab;margin:1em 0 1em 0;padding:0 1em 1em 1em;line-height:1.5em;}legend{padding:.5em;font-size:95%;}form{border:none;margin:0;}textarea{width:100%;padding:.1em;}input.historysubmit{padding:0 .3em .3em .3em!important;font-size:94%;cursor:pointer;height:1.7em!important;margin-left:1.6em;}select{vertical-align:top;}abbr,acronym,.explain{border-bottom:1px dotted black;color:black;background:none;cursor:help;}q{font-family:Times,"Times New Roman",serif;font-style:italic;}code{background-color:#f9f9f9;}pre{padding:1em;border:1px dashed #2f6fab;color:black;background-color:#f9f9f9;line-height:1.1em;}#siteSub{display:none;}#jump-to-nav{display:none;}#contentSub{font-size:84%;line-height:1.2em;margin:0 0 1.4em 1em;color:#7d7d7d;width:auto;}span.subpages{display:block;}h1.firstHeading-rating{margin-right:220px;line-height:1.2em;}h1.firstHeading{margin-right:40px;line-height:1.2em;}#edit-public,h1.firstHeading-public,h1.firstHeading-rating-public{background-color:#ffce7b;border:1px solid #ffa500;}#bodyContent h1,#bodyContent h2{margin-bottom:.6em;}#bodyContent h3,#bodyContent h4,#bodyContent h5{margin-bottom:.3em;}.firstHeading{margin-bottom:.1em;}.usermessage{background-color:#ffce7b;border:1px solid #ffa500;color:black;font-weight:bold;margin:2em 0 1em;padding:.5em 1em;vertical-align:middle;}#siteNotice{text-align:center;font-size:95%;padding:0 .9em;}#siteNotice p{margin:0;padding:0;}.error{color:red;font-size:larger;}.errorbox,.successbox{font-size:larger;border:2px solid;padding:.5em 1em;float:left;margin-bottom:2em;color:#000;}.errorbox{border-color:red;background-color:#fff2f2;}.successbox{border-color:green;background-color:#dfd;}.errorbox h2,.successbox h2{font-size:1em;font-weight:bold;display:inline;margin:0 .5em 0 0;border:none;}#catlinks{border:1px solid #aaa;background-color:#f9f9f9;padding:5px;margin-top:1em;clear:both;}.documentDescription{font-weight:bold;display:block;margin:1em 0;line-height:1.5em;}.documentByLine{text-align:right;font-size:90%;clear:both;font-weight:normal;color:#76797c;}.center{width:100%;text-align:center;}*.center *{margin-left:auto;margin-right:auto;}.small,.small *{font-size:94%;}table.small{font-size:100%;}.pageinfo-majoredit{font-weight:normal;}.wiki-summary{font-size:94%;font-style:italic;}.mw-warning{border:1px solid #aaa;background-color:#f9f9f9;padding:5px;margin-bottom:8px;font-size:95%;}#toc,.toc{width:200px;border:1px solid #aaa;background-color:#f9f9f9;padding:5px;font-size:95%;float:right;clear:right;}#toc h2,.toc h2{display:inline;border:none;padding:0;font-size:100%;font-weight:bold;}.toc #toclist{width:auto;border:none;}#toc #toctitle,.toc #toctitle,#toc .toctitle,.toc .toctitle{text-align:center;}#toc ul,.toc ul{list-style-type:none;list-style-image:none;margin-left:0;padding-left:0;text-align:left;}#toc ul ul,.toc ul ul{margin:0 0 0 2em;}#toc .toctoggle,.toc .toctoggle{font-size:94%;}.mw-warning{margin-left:50px;margin-right:50px;text-align:center;}div.floatright,table.floatright{clear:right;float:right;position:relative;margin:0 0 .5em .5em;border:0;}div.floatright p{font-style:italic;}div.floatleft,table.floatleft{float:left;position:relative;margin:0 .5em .5em 0;border:0;}div.floatleft p{font-style:italic;}div.thumb{margin-bottom:.5em;border-style:solid;border-color:white;width:auto;}div.thumb div{border:1px solid #ccc;padding:3px!important;background-color:#f9f9f9;font-size:94%;text-align:center;overflow:hidden;}div.thumb div a img{border:1px solid #ccc;}div.thumb div div.thumbcaption{border:none;text-align:left;line-height:1.4em;padding:.3em 0 .1em 0;}div.magnify{float:right;border:none!important;background:none!important;}div.magnify a,div.magnify img{display:block;border:none!important;background:none!important;}div.tright{clear:right;float:right;border-width:.5em 0 .8em 1.4em;}div.tleft{float:left;margin-right:.5em;border-width:.5em 1.4em .8em 0;}.hiddenStructure{display:none;speak:none;}img.tex{vertical-align:middle;}span.texhtml{font-family:serif;}table.rimage{float:right;position:relative;margin-left:1em;margin-bottom:1em;text-align:center;}.toccolours{border:1px solid #aaa;background-color:#f9f9f9;padding:5px;font-size:95%;}div.townBox{position:relative;float:right;background:white;margin-left:1em;border:1px solid gray;padding:.3em;width:200px;overflow:hidden;clear:right;}div.townBox dl{padding:0;margin:0 0 .3em;font-size:96%;}div.townBox dl dt{background:none;margin:.4em 0 0;}div.townBox dl dd{margin:.1em 0 0 1.1em;background-color:#f3f3f3;}.special li{line-height:1.4em;margin:0;padding:0;}.autocomment{color:gray;}#pagehistory span.user{margin-left:1.4em;margin-right:.4em;}#pagehistory span.minor{font-weight:bold;}#pagehistory li{border:1px solid white;}#pagehistory li.selected{background-color:#f9f9f9;border:1px dashed #aaa;}table.diff,td.diff-otitle,td.diff-ntitle{background-color:white;}td.diff-addedline{background:#cfc;font-size:smaller;}td.diff-deletedline{background:#ffa;font-size:smaller;}td.diff-context{background:#eee;font-size:smaller;}span.diffchange{color:red;font-weight:bold;}.diff{margin-top:1ex;margin-bottom:.5ex;background:white;border:1px #ccc solid;color:black;border-top:1px solid #494f5d;border-left:1px solid #494f5d;border-bottom:1px solid #c6d2de;border-right:1px solid #c6d2de;padding-top:1px;padding-bottom:1px;padding-left:.125em;padding-right:.125em;padding:0;clear:both;}.diff .block{background:#ddd;padding-left:1em;}.diff .context{background:white;border:none;}.difftext{margin-top:0;margin-bottom:0;background:white;border:1px black solid;border-top:1px #e8e6df solid;border-left:1px #e8e6df solid;border-bottom:1px #d2d2d2 solid;border-right:1px #b2b2b2 solid;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;clear:both;}.diff .block tt{font-weight:normal;font-family:monospace;color:black;margin-left:0;border:none;}.diff del,.diff ins{font-weight:bold;text-decoration:none;}.diff .original,.diff .deleted,.diff .final,.diff .added{background:white;}.diff .original,.diff .deleted{background:#fcc;border:none;}.diff .final,.diff .added{background:#cfc;border:none;}.diff del{background:#f99;}.diff ins{background:#9f9;}td.pageinfo{font-weight:bold;}.pageinfo-minoredit,.pageinfo-authorid{font-size:smaller;font-style:oblique;}table.cal{border:1px outset gray;background:white;margin:.5ex .5em;padding:1px;empty-cells:hide;}table.cal td{background:white;text-align:right;}table.cal-header{font-size:larger;}table.cal-header tr,table.cal-header td{text-align:center;}.cal-arrow{font-weight:bold;text-decoration:none;}.cal-dayname td{text-align:center;font-size:smaller;text-decoration:underline;}a.cal-hide{text-decoration:none;}table.cal td.cal-today{margin:1px;border:1px solid gray;}#bodyContent a.external,#bodyContent a[href ^="gopher://"]{background:url("images/url.png") center right no-repeat;padding-right:13px;}#bodyContent a[href ^="https://"],.link-https{background:url("images/lock_icon.png") center right no-repeat;padding-right:16px;}#bodyContent a[href ^="mailto:"],.link-mailto{background:url("images/mail_icon.png") center right no-repeat;padding-right:18px;}#bodyContent a[href ^="news://"]{background:url("images/news_icon.png") center right no-repeat;padding-right:18px;}#bodyContent a[href ^="ftp://"],.link-ftp{background:url("images/file_icon.png") center right no-repeat;padding-right:18px;}#bodyContent a[href ^="irc://"],.link-irc{background:url("images/discussionitem_icon.png") center right no-repeat;padding-right:18px;}#bodyContent a.extiw,#bodyContent a.extiw:active{color:#36b;background:none;padding:0;}#bodyContent a.external{color:#36b;}#bodyContent .plainlinks a{background:none!important;padding:0!important;}.portlet{border:none;margin:0 0 .5em;padding:0;float:none;width:11.6em;overflow:hidden;}.portlet h4{font-size:95%;font-weight:normal;white-space:nowrap;}.portlet h5{background:transparent;padding:0 1em 0 .5em;display:inline;font-size:91%;height:16px;width:11.6em;font-weight:bold;white-space:nowrap;}.portlet h5 img{padding:0;margin:0;top:0;right:0;height:15px;width:15px;border:0;}.portlet h6{background:#ffae2e;border:1px solid #2f6fab;border-style:solid solid none solid;padding:0 1em 0 1em;display:block;font-size:1em;height:1.2em;font-weight:normal;white-space:nowrap;}.pBody{font-size:95%;background-color:white;color:black;border-collapse:collapse;border:1px solid #aaa;padding:0 .8em .3em .5em;}.portlet h1,.portlet h2,.portlet h3,.portlet h4{margin:0;padding:0;}.portlet ul{line-height:1.5em;list-style-type:square;list-style-image:url("images/bullet.png");font-size:95%;}.portlet li{padding:0;margin:0;margin-bottom:0;}#p-logo{z-index:1;position:absolute;top:0;left:0;height:42px;width:100%;overflow:visible;background:#005A99;}#p-logo h5{display:none;}#p-logo a,#p-logo a:hover{display:block;height:42px;background-repeat:no-repeat;background-position:35% 50%!important;}span.logo{z-index:1;position:absolute;white-space:nowrap;left:18px;top:3px;color:#fff;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:24pt;font-weight:bolder;text-decoration:none;vertical-align:middle;}#img-logo-right{position:absolute;z-index:3;top:0;right:40px;}#img-logo-band{position:absolute;z-index:3;top:0;right:40px;height:45px;}#p-navigation{position:relative;z-index:3;}#p-navigation .pBody{padding-right:0;}#p-nav1{position:relative;z-index:3;}#p-navigation a{display:block;}#p-navigation li.active a,#p-navigation li.active a:hover{text-decoration:none;display:inline;font-weight:bold;}#logo-search{position:absolute;z-index:4;top:5px;left:340px;height:25px;overflow:visible;}#p-search{position:relative;z-index:3;}div.pBody>button,#searchButton{margin:0;padding:0;}#p-search .pBody{margin:0;padding:.5em 0 .4em .4em;}#searchholder form.searchform{margin:0;padding:0;display:inline;}button.searchButton{margin:0;padding:0;cursor:pointer;width:18px;height:18px;border:1px solid buttonshadow;}input.searchButton{margin-top:1px;font-size:8pt;cursor:pointer;width:64px;padding-left:1px;background-color:White;border:1px solid #2f6fab;text-transform:capitalize;}#searchInput{width:120px;height:18px;margin:0;font-size:95%;border-width:1px;border-style:solid;border-color:#aaa #eee #eee #aaa;-moz-box-sizing:border-box;}#p-personal{width:100%;white-space:nowrap;padding:0;margin:0;position:absolute;right:140px;top:15px;z-index:4;border:none;overflow:visible;color:black;line-height:1.2em;}#p-personal h5{display:none;}#p-personal .portlet,#p-personal .pBody{padding:0;margin:0;border:none;z-index:0;overflow:visible;background:none;}#p-personal ul{border:none;line-height:1.5em;color:#2f6fab;padding:0 1.5em 0 2em;margin:0;text-align:right;list-style:none;z-index:0;background:none;cursor:default;}#p-personal li{z-index:0;border:none;padding:0;display:inline;color:#2f6fab;margin-left:.8em;line-height:1.2em;background:none;}#p-personal li a{text-decoration:none;color:white;padding-left:.5em;padding-bottom:.2em;}#p-personal li a:hover{color:white;background:#005A99;padding-bottom:.2em;font-weight:bold;text-decoration:none;}li#pt-mypages,li#pt-mychanges,li#pt-userpage,li#pt-anonuserpage,li#pt-login{background:url('images/wikiuser.png') top left no-repeat;background-repeat:no-repeat;padding-left:10px;text-transform:none;}#p-personal a.new{color:#ba0000;}#p-cactions{position:absolute;top:40px;left:13.2em;margin:0;white-space:nowrap;width:76%;line-height:1.1em;overflow:visible;background:none;border-collapse:collapse;padding-left:1em;list-style:none;font-size:95%;}#p-cactions .hiddenStructure{display:none;}#p-cactions ul{list-style:none;}#p-cactions li{display:inline;border:1px solid #aaa;border-bottom:none;padding:0 0 .1em 0;margin:0 .3em 0 0;overflow:visible;background:white;}#p-cactions li.selected{border-color:#fabd23;padding:0 0 .2em 0;}#p-cactions li a{background-color:#fbfbfb;color:#002bb8;border:none;padding:0 .8em .3em;text-decoration:none;position:relative;z-index:0;margin:0;}#p-cactions li.selected a{z-index:3;background-color:#fff;padding:0 1em .2em;}#p-cactions .new a{color:#ba0000;}#p-cactions li a:hover{z-index:3;text-decoration:none;background-color:#fff;padding-bottom:.3em;}#p-cactions li a#btn-edit{background:url('images/Edit-chalk-10gs.png') top left no-repeat;background-repeat:no-repeat;padding-left:20px!important;text-transform:none;}#p-cactions li a#btn-edit:hover{z-index:3;text-decoration:none;background-color:#fff;}#p-cactions h5{display:none;}#p-cactions li.istalk{margin-right:0;}#p-cactions li.istalk a{padding-right:.5em;}#p-cactions #ca-addsection a{padding-left:.4em;padding-right:.4em;}li#ca-talk{margin-right:1.6em;}li#ca-watch,li#ca-unwatch,li#ca-varlang-0,li#ca-print{margin-left:1.6em;}#p-tbx,#p-lang{position:relative;z-index:3;}#footer,#bottom{background-color:white;border:1px solid #fabd23;margin:.6em .5em 1em 13.6em;padding:.4em 0 1.2em 0;text-align:center;font-size:90%;}#footer li{display:inline;margin:0 1.3em;}#bottom{border:none;text-align:left;}head:first-child+body #footer li{white-space:nowrap;}#f-poweredbyico,#f-copyrightico{margin:0 8px;height:31px;position:relative;top:-31px;}#f-poweredbyico{float:right;}#f-copyrightico{float:left;}#preftoc{float:left;margin:1em 1em 1em 1em;width:13em;}#preftoc li{border:1px solid White;}#preftoc li.selected{background-color:#f9f9f9;border:1px dashed #aaa;}#preftoc a,#preftoc a:active{display:block;color:#0014a6;}#prefcontrol{clear:both;float:left;margin-top:1em;}div.prefsectiontip{font-size:95%;margin-top:1em;}fieldset.operaprefsection{margin-left:15em;}*>html #p-cactions li{border:none;}*>html #p-cactions li a{border:1px solid #aaa;border-bottom:none;}*>html #p-cactions li.selected a{border-color:#fabd23;}*>html #f-poweredbyico,*>html #f-copyrightico{width:88px;}*>html #bodyContent,*>html #bodyContent pre{overflow-x:auto;width:100%;padding-bottom:25px;}* html #footer{margin-top:0;}* html #column-content{display:inline;margin-bottom:0;}* html div.editsection{font-size:smaller;}#pagehistory li.selected{position:relative;}*>html #column-content{float:none;}*>html #column-one{position:absolute;left:0;top:0;}*>html #footer{margin-left:13.2em;}.redirectText{font-size:150%;margin:5px;}.printfooter{display:none;}.not-patrolled{background-color:#ffa;}div.patrollink{font-size:75%;text-align:right;}span.newpage,span.minor,span.searchmatch,span.bot{font-weight:bold;}span.unpatrolled{font-weight:bold;color:red;}span.searchmatch{color:red;}.sharedUploadNotice{font-style:italic;}span.updatedmarker{color:black;background-color:#0f0;}span.newpageletter{font-weight:bold;color:black;background-color:yellow;}span.minoreditletter{color:black;background-color:#c5ffe6;}table.gallery{border:1px solid #ccc;margin:2px;padding:2px;background-color:white;}table.gallery tr{vertical-align:top;}table.gallery td{vertical-align:top;background-color:#f9f9f9;border:solid 2px white;}table.gallery td.galleryheader{text-align:center;font-weight:bold;}div.gallerybox{margin:2px;width:150px;}div.gallerybox div.thumb{text-align:center;border:1px solid #ccc;margin:2px;}div.gallerytext{font-size:94%;padding:2px 4px;}span.comment{font-style:italic;}span.changedby{font-size:95%;}.previewnote{text-indent:3em;color:#c00;border-bottom:1px solid #aaa;padding-bottom:1em;margin-bottom:1em;}.previewnote p{margin:0;padding:0;}.editExternally{border:1px solid gray;background-color:#fff;padding:3px;margin-top:.5em;float:left;font-size:small;text-align:center;}.editExternallyHelp{font-style:italic;color:gray;}li span.deleted,span.history-deleted{text-decoration:line-through;color:#888;font-style:italic;}.toggle{margin-left:2em;text-indent:-2em;}table.mw_metadata{font-size:.8em;margin-left:.5em;margin-bottom:.5em;width:300px;}table.mw_metadata caption{font-weight:bold;}table.mw_metadata th{font-weight:normal;}table.mw_metadata td{padding:.1em;}table.mw_metadata{border:none;border-collapse:collapse;}table.mw_metadata td,table.mw_metadata th{text-align:center;border:1px solid #aaa;padding-left:.1em;padding-right:.1em;}table.mw_metadata th{background-color:#f9f9f9;}table.mw_metadata td{background-color:#fcfcfc;}table.collapsed tr.collapsable{display:none;}ul#filetoc{text-align:center;border:1px solid #aaa;background-color:#f9f9f9;padding:5px;font-size:95%;margin-bottom:.5em;margin-left:0;margin-right:0;}#filetoc li{display:inline;list-style-type:none;padding-right:2em;}input#wpSave,input#wpDiff{margin-right:.33em;}#editform .editOptions{display:inline;}#wpSave{font-weight:bold;}table.revisionform_default{border:1px solid #000;}table.revisionform_focus{border:1px solid #000;background-color:#0BF;}tr.revision_tr_default{background-color:#EEE;}tr.revision_tr_first{background-color:#DDD;}p.revision_saved{color:green;font-weight:bold;}#mw_trackbacks{border:solid 1px #bbf;background-color:#eef;padding:.2em;}#allmessagestable th{background-color:#b2b2ff;}#allmessagestable tr.orig{background-color:#ffe2e2;}#allmessagestable tr.new{background-color:#e2ffe2;}#allmessagestable tr.def{background-color:#f0f0ff;}div.noarticletext{border:1px solid #ccc;background:#fff;padding:.2em 1em;color:#000;}div#searchTargetContainer{left:10px;top:10px;width:90%;background:white;}div#searchTarget{padding:3px;margin:5px;background:#F0F0F0;border:solid 1px blue;}div#searchTarget ul li{list-style:none;}div#searchTarget ul li:before{color:orange;content:"\00BB \0020";}div.multipageimagenavbox{border:solid 1px silver;padding:4px;margin:1em;-moz-border-radius:6px;background:#f0f0f0;}div.multipageimagenavbox div.thumb{border:none;margin-left:2em;margin-right:2em;}div.multipageimagenavbox hr{margin:6px;}table.multipageimage td{text-align:center;}.TablePager_nav a{text-decoration:none;}.TablePager{border-collapse:collapse;}.TablePager,.TablePager td,.TablePager th{border:.15em solid #777;padding:0 .15em 0 .15em;}.TablePager th{background-color:#eef;}.TablePager td{background-color:#fff;}.TablePager tr:hover td{background-color:#eef;}.imagelist td,.imagelist th{white-space:nowrap;}.imagelist .TablePager_col_links{background-color:#eef;}.imagelist .TablePager_col_img_description{white-space:normal;}.imagelist th.TablePager_sort{background-color:#ccf;}.pagelist thead td{background:#e8e8e8;text-decoration:none;font-weight:bold;font-size... [truncated message content] |
From: <ru...@us...> - 2010-06-08 06:01:42
|
Revision: 7487 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7487&view=rev Author: rurban Date: 2010-06-08 06:01:36 +0000 (Tue, 08 Jun 2010) Log Message: ----------- one more check to stop cycles Modified Paths: -------------- trunk/lib/WikiUserNew.php Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2010-06-07 14:12:27 UTC (rev 7486) +++ trunk/lib/WikiUserNew.php 2010-06-08 06:01:36 UTC (rev 7487) @@ -1460,6 +1460,7 @@ $user = UpgradeUser($this, $user); return true; } + if ($class == "_ForbiddenPassUser") return false; $class = $this->nextClass(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 14:12:33
|
Revision: 7486 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7486&view=rev Author: rurban Date: 2010-06-07 14:12:27 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Remove the rest of the require_once('lib/HtmlElement.php') lines, as it is already loaded by prepend => ErrorManager 4 vs. 5. Modified Paths: -------------- trunk/lib/BlockParser.php trunk/lib/diff.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2010-06-07 14:05:29 UTC (rev 7485) +++ trunk/lib/BlockParser.php 2010-06-07 14:12:27 UTC (rev 7486) @@ -19,7 +19,7 @@ * along with PhpWiki; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -require_once('lib/HtmlElement.php'); +//require_once('lib/HtmlElement.php'); require_once('lib/CachedMarkup.php'); require_once('lib/InlineParser.php'); Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2010-06-07 14:05:29 UTC (rev 7485) +++ trunk/lib/diff.php 2010-06-07 14:12:27 UTC (rev 7486) @@ -9,7 +9,6 @@ // require_once('lib/difflib.php'); -require_once('lib/HtmlElement.php'); class _HWLDF_WordAccumulator { function _HWLDF_WordAccumulator () { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 14:05:39
|
Revision: 7485 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7485&view=rev Author: rurban Date: 2010-06-07 14:05:29 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Add mssqlnative support by chrisdpucci, patch 2910309 This patch adds native support for MS SQL Server 2005+ to phpWiki 1.3.14 using the Native SQL Server Driver for PHP. More information regarding the Native SQL Server Driver for PHP can be found here: http://www.microsoft.com/downloads/details.aspx?FamilyId=61BF87E0-D031-466B-B09A-6597C21A2E2A&displaylang=en whitespace reformatted Modified Paths: -------------- trunk/configurator.php Added Paths: ----------- trunk/doc/INSTALL.mssqlnative trunk/lib/WikiDB/adodb/drivers/adodb-mssqlnative.inc.php trunk/lib/WikiDB/backend/ADODB_mssqlnative.php trunk/schemas/sqlsrv-destroy.sql trunk/schemas/sqlsrv-initialize.sql Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2010-06-07 13:50:12 UTC (rev 7484) +++ trunk/configurator.php 2010-06-07 14:05:29 UTC (rev 7485) @@ -1,6 +1,6 @@ <?php // -*-php-*- $Id$ /* - * Copyright 2002,2003,2005 $ThePhpWikiProgrammingTeam + * Copyright 2002,2003,2005,2008-2010 $ThePhpWikiProgrammingTeam * Copyright 2002 Martin Geisler <gim...@gi...> * Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * @@ -173,7 +173,7 @@ pre { font-size: 120%; } td { border: thin solid black } tr { border: none } -div.hint { background-color: #eeeeee; } +div.hint { border: thin solid red, background-color: #eeeeee; } tr.hidden { border: none; display: none; } td.part { background-color: #eeeeee; color: inherit; } td.instructions { background-color: #ffffee; width: <?php echo $tdwidth ?>px; color: inherit; } @@ -634,12 +634,14 @@ array('mysql' => "MySQL", 'pgsql' => "PostgreSQL", '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)", 'firebird' => "Firebird (only PDO)", - 'oracle' => "Oracle (only PDO)"), " + 'oracle' => "Oracle (only PDO)", +), " SQL DB types. The DSN hosttype."); $properties["SQL User"] = @@ -2233,6 +2235,29 @@ } } +/* +class _ini_set +extends _variable { + function value() { + global $HTTP_POST_VARS; + if ($v = $HTTP_POST_VARS[$this->config_item_name]) + return $v; + else { + return ini_get($this->get_config_item_name); + } + } + function _config_format($value) { + return sprintf("ini_set('%s', '%s');", $this->get_config_item_name(), $value); + } + function _get_config_line($posted_value) { + if ($posted_value && ! $posted_value == $this->default_value) + return "\n" . $this->_config_format($posted_value); + else + return "\n;" . $this->_config_format($this->default_value); + } +} +*/ + class boolean_define extends _define { @@ -2487,7 +2512,7 @@ } if ($fp) { - fputs($fp, utf8_encode($config)); + fputs($fp, $config); fclose($fp); echo "<p>The configuration was written to <code><b>$config_file</b></code>.</p>\n"; if ($new_filename) { Added: trunk/doc/INSTALL.mssqlnative =================================================================== --- trunk/doc/INSTALL.mssqlnative (rev 0) +++ trunk/doc/INSTALL.mssqlnative 2010-06-07 14:05:29 UTC (rev 7485) @@ -0,0 +1,50 @@ +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. + d) USE_SAFE_DBSESSION should be set to 'true' + + Note: DATABASE_DIRECTORY and DATABASE_DBA_HANDLER are ignored for mssql. + +That's it. phpWiki should work now. Added: trunk/lib/WikiDB/adodb/drivers/adodb-mssqlnative.inc.php =================================================================== --- trunk/lib/WikiDB/adodb/drivers/adodb-mssqlnative.inc.php (rev 0) +++ trunk/lib/WikiDB/adodb/drivers/adodb-mssqlnative.inc.php 2010-06-07 14:05:29 UTC (rev 7485) @@ -0,0 +1,921 @@ +<?php +/* +V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + Released under both BSD license and Lesser GPL library license. + Whenever there is any discrepancy between the two licenses, + the BSD license will take precedence. +Set tabs to 4 for best viewing. + + Latest version is available at http://adodb.sourceforge.net + + Native mssql driver. Requires mssql client. Works on Windows. + http://www.microsoft.com/sql/technologies/php/default.mspx + To configure for Unix, see + http://phpbuilder.com/columns/alberto20000919.php3 + + $stream = sqlsrv_get_field($stmt, $index, SQLSRV_SQLTYPE_STREAM(SQLSRV_ENC_BINARY)); + stream_filter_append($stream, "convert.iconv.ucs-2/utf-8"); // Voila, UTF-8 can be read directly from $stream + +*/ +// security - hide paths +if (!defined('ADODB_DIR')) die(); + +if (!function_exists('sqlsrv_configure')) { + die("mssqlnative extension not installed"); +} + +if (!function_exists('sqlsrv_set_error_handling')) { + function sqlsrv_set_error_handling($constant) { + sqlsrv_configure("WarningsReturnAsErrors", $constant); + } +} +if (!function_exists('sqlsrv_log_set_severity')) { + function sqlsrv_log_set_severity($constant) { + sqlsrv_configure("LogSeverity", $constant); + } +} +if (!function_exists('sqlsrv_log_set_subsystems')) { + function sqlsrv_log_set_subsystems($constant) { + sqlsrv_configure("LogSubsystems", $constant); + } +} + + +//---------------------------------------------------------------- +// MSSQL returns dates with the format Oct 13 2002 or 13 Oct 2002 +// and this causes tons of problems because localized versions of +// MSSQL will return the dates in dmy or mdy order; and also the +// month strings depends on what language has been configured. The +// following two variables allow you to control the localization +// settings - Ugh. +// +// MORE LOCALIZATION INFO +// ---------------------- +// To configure datetime, look for and modify sqlcommn.loc, +// typically found in c:\mssql\install +// Also read : +// http://support.microsoft.com/default.aspx?scid=kb;EN-US;q220918 +// Alternatively use: +// CONVERT(char(12),datecol,120) +// +// Also if your month is showing as month-1, +// e.g. Jan 13, 2002 is showing as 13/0/2002, then see +// http://phplens.com/lens/lensforum/msgs.php?id=7048&x=1 +// it's a localisation problem. +//---------------------------------------------------------------- + + +// has datetime converstion to YYYY-MM-DD format, and also mssql_fetch_assoc +if (ADODB_PHPVER >= 0x4300) { +// docs say 4.2.0, but testing shows only since 4.3.0 does it work! + ini_set('mssql.datetimeconvert',0); +} else { + global $ADODB_mssql_mths; // array, months must be upper-case + $ADODB_mssql_date_order = 'mdy'; + $ADODB_mssql_mths = array( + 'JAN'=>1,'FEB'=>2,'MAR'=>3,'APR'=>4,'MAY'=>5,'JUN'=>6, + 'JUL'=>7,'AUG'=>8,'SEP'=>9,'OCT'=>10,'NOV'=>11,'DEC'=>12); +} + +//--------------------------------------------------------------------------- +// Call this to autoset $ADODB_mssql_date_order at the beginning of your code, +// just after you connect to the database. Supports mdy and dmy only. +// Not required for PHP 4.2.0 and above. +function AutoDetect_MSSQL_Date_Order($conn) +{ + global $ADODB_mssql_date_order; + $adate = $conn->GetOne('select getdate()'); + if ($adate) { + $anum = (int) $adate; + if ($anum > 0) { + if ($anum > 31) { + //ADOConnection::outp( "MSSQL: YYYY-MM-DD date format not supported currently"); + } else + $ADODB_mssql_date_order = 'dmy'; + } else + $ADODB_mssql_date_order = 'mdy'; + } +} + +class ADODB_mssqlnative extends ADOConnection { + var $databaseType = "mssqlnative"; + var $dataProvider = "mssqlnative"; + var $replaceQuote = "''"; // string to use to replace quotes + var $fmtDate = "'Y-m-d'"; + var $fmtTimeStamp = "'Y-m-d H:i:s'"; + var $hasInsertID = true; + var $substr = "substring"; + var $length = 'len'; + var $hasAffectedRows = true; + var $poorAffectedRows = false; + var $metaDatabasesSQL = "select name from sys.sysdatabases where name <> 'master'"; + var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"; + var $metaColumnsSQL = # xtype==61 is datetime + "select c.name,t.name,c.length, + (case when c.xusertype=61 then 0 else c.xprec end), + (case when c.xusertype=61 then 0 else c.xscale end) + from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; + var $hasTop = 'top'; // support mssql SELECT TOP 10 * FROM TABLE + var $hasGenID = true; + var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'; + var $sysTimeStamp = 'GetDate()'; + var $maxParameterLen = 4000; + var $arrayClass = 'ADORecordSet_array_mssqlnative'; + var $uniqueSort = true; + var $leftOuter = '*='; + var $rightOuter = '=*'; + var $ansiOuter = true; // for mssql7 or later + var $identitySQL = 'select SCOPE_IDENTITY()'; // 'select SCOPE_IDENTITY'; # for mssql 2000 + var $uniqueOrderBy = true; + var $_bindInputArray = true; + var $_dropSeqSQL = "drop table %s"; + + function ADODB_mssqlnative() + { + if ($this->debug) { + error_log("<pre>"); + sqlsrv_set_error_handling( SQLSRV_ERRORS_LOG_ALL ); + sqlsrv_log_set_severity( SQLSRV_LOG_SEVERITY_ALL ); + sqlsrv_log_set_subsystems(SQLSRV_LOG_SYSTEM_ALL); + sqlsrv_configure('warnings_return_as_errors', 0); + } else { + sqlsrv_set_error_handling(0); + sqlsrv_log_set_severity(0); + sqlsrv_log_set_subsystems(SQLSRV_LOG_SYSTEM_ALL); + sqlsrv_configure('warnings_return_as_errors', 0); + } + } + + function ServerInfo() + { + global $ADODB_FETCH_MODE; + if ($this->fetchMode === false) { + $savem = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + } else + $savem = $this->SetFetchMode(ADODB_FETCH_NUM); + $arrServerInfo = sqlsrv_server_info($this->_connectionID); + $arr['description'] = $arrServerInfo['SQLServerName'].' connected to '.$arrServerInfo['CurrentDatabase']; + $arr['version'] = $arrServerInfo['SQLServerVersion'];//ADOConnection::_findvers($arr['description']); + return $arr; + } + + function IfNull( $field, $ifNull ) + { + return " ISNULL($field, $ifNull) "; // if MS SQL Server + } + + function _insertid() + { + // SCOPE_IDENTITY() + // Returns the last IDENTITY value inserted into an IDENTITY column in + // the same scope. A scope is a module -- a stored procedure, trigger, + // function, or batch. Thus, two statements are in the same scope if + // they are in the same stored procedure, function, or batch. + return $this->GetOne($this->identitySQL); + } + + function _affectedrows() + { + return sqlsrv_rows_affected($this->_queryID); + } + + function CreateSequence($seq='adodbseq',$start=1) + { + if($this->debug) error_log("<hr>CreateSequence($seq,$start)"); + sqlsrv_begin_transaction($this->_connectionID); + $start -= 1; + $this->Execute("create table $seq (id int)");//was float(53) + $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); + if (!$ok) { + if($this->debug) error_log("<hr>Error: ROLLBACK"); + sqlsrv_rollback($this->_connectionID); + return false; + } + sqlsrv_commit($this->_connectionID); + return true; + } + + function GenID($seq='adodbseq',$start=1) + { + if($this->debug) error_log("<hr>GenID($seq,$start)"); + sqlsrv_begin_transaction($this->_connectionID); + $ok = $this->Execute("update $seq with (tablock,holdlock) set id = id + 1"); + if (!$ok) { + $this->Execute("create table $seq (id int)"); + $ok = $this->Execute("insert into $seq with (tablock,holdlock) values($start)"); + if (!$ok) { + if($this->debug) error_log("<hr>Error: ROLLBACK"); + sqlsrv_rollback($this->_connectionID); + return false; + } + sqlsrv_commit($this->_connectionID); + return $start; + } + $num = $this->GetOne("select id from $seq"); + sqlsrv_commit($this->_connectionID); + if($this->debug) error_log(" Returning: $num"); + return $num; + } + + // Format date column in sql string given an input format that understands Y M D + function SQLDate($fmt, $col=false) + { + if (!$col) $col = $this->sysTimeStamp; + $s = ''; + + $len = strlen($fmt); + for ($i=0; $i < $len; $i++) { + if ($s) $s .= '+'; + $ch = $fmt[$i]; + switch($ch) { + case 'Y': + case 'y': + $s .= "datename(yyyy,$col)"; + break; + case 'M': + $s .= "convert(char(3),$col,0)"; + break; + case 'm': + $s .= "replace(str(month($col),2),' ','0')"; + break; + case 'Q': + case 'q': + $s .= "datename(quarter,$col)"; + break; + case 'D': + case 'd': + $s .= "replace(str(day($col),2),' ','0')"; + break; + case 'h': + $s .= "substring(convert(char(14),$col,0),13,2)"; + break; + + case 'H': + $s .= "replace(str(datepart(hh,$col),2),' ','0')"; + break; + + case 'i': + $s .= "replace(str(datepart(mi,$col),2),' ','0')"; + break; + case 's': + $s .= "replace(str(datepart(ss,$col),2),' ','0')"; + break; + case 'a': + case 'A': + $s .= "substring(convert(char(19),$col,0),18,2)"; + break; + + default: + if ($ch == '\\') { + $i++; + $ch = substr($fmt,$i,1); + } + $s .= $this->qstr($ch); + break; + } + } + return $s; + } + + + function BeginTrans() + { + if ($this->transOff) return true; + $this->transCnt += 1; + if ($this->debug) error_log('<hr>begin transaction'); + sqlsrv_begin_transaction($this->_connectionID); + return true; + } + + function CommitTrans($ok=true) + { + if ($this->transOff) return true; + if ($this->debug) error_log('<hr>commit transaction'); + if (!$ok) return $this->RollbackTrans(); + if ($this->transCnt) $this->transCnt -= 1; + sqlsrv_commit($this->_connectionID); + return true; + } + function RollbackTrans() + { + if ($this->transOff) return true; + if ($this->debug) error_log('<hr>rollback transaction'); + if ($this->transCnt) $this->transCnt -= 1; + sqlsrv_rollback($this->_connectionID); + return true; + } + + function SetTransactionMode( $transaction_mode ) + { + $this->_transmode = $transaction_mode; + if (empty($transaction_mode)) { + $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); + return; + } + if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode; + $this->Execute("SET TRANSACTION ".$transaction_mode); + } + + /* + Usage: + + $this->BeginTrans(); + $this->RowLock('table1,table2','table1.id=33 and table2.id=table1.id'); # lock row 33 for both tables + + # some operation on both tables table1 and table2 + + $this->CommitTrans(); + + See http://www.swynk.com/friends/achigrik/SQL70Locks.asp + */ + function RowLock($tables,$where,$col='top 1 null as ignore') + { + if (!$this->transCnt) $this->BeginTrans(); + return $this->GetOne("select $col from $tables with (ROWLOCK,HOLDLOCK) where $where"); + } + + function SelectDB($dbName) + { + $this->database = $dbName; + $this->databaseName = $dbName; # obsolete, retained for compat with older adodb versions + if ($this->_connectionID) { + $rs = $this->Execute('USE '.$dbName); + if($rs) { + return true; + } else return false; + } + else return false; + } + + function ErrorMsg() + { + $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL); + if($retErrors != null) { + foreach($retErrors as $arrError) { + $this->_errorMsg .= "SQLState: ".$arrError[ 'SQLSTATE']."\n"; + $this->_errorMsg .= "Error Code: ".$arrError[ 'code']."\n"; + $this->_errorMsg .= "Message: ".$arrError[ 'message']."\n"; + } + } else { + $this->_errorMsg = "No errors found"; + } + return $this->_errorMsg; + } + + function ErrorNo() + { + if ($this->_logsql && $this->_errorCode !== false) return $this->_errorCode; + $err = sqlsrv_errors(SQLSRV_ERR_ALL); + if($err[0]) return $err[0]['code']; + else return -1; + } + + // returns true or false + function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) + { + if (!function_exists('sqlsrv_connect')) return null; + $connectionInfo = array("Database"=>$argDatabasename,'UID'=>$argUsername,'PWD'=>$argPassword); + if ($this->debug) error_log("<hr>connecting... hostname: $argHostname params: ".var_export($connectionInfo,true)); + //if ($this->debug) error_log("<hr>_connectionID before: ".serialize($this->_connectionID)); + if(!($this->_connectionID = sqlsrv_connect($argHostname,$connectionInfo))) { + if ($this->debug) error_log( "<hr><b>errors</b>: ".print_r( sqlsrv_errors(), true)); + return false; + } + //if ($this->debug) error_log(" _connectionID after: ".serialize($this->_connectionID)); + //if ($this->debug) error_log("<hr>defined functions: <pre>".var_export(get_defined_functions(),true)."</pre>"); + return true; + } + + // returns true or false + function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) + { + //return null;//not implemented. NOTE: Persistent connections have no effect if PHP is used as a CGI program. (FastCGI!) + return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); + } + + function Prepare($sql) + { + $stmt = sqlsrv_prepare( $this->_connectionID, $sql); + if (!$stmt) return $sql; + return array($sql,$stmt); + } + + // returns concatenated string + // MSSQL requires integers to be cast as strings + // automatically cast every datatype to VARCHAR(255) + // @author David Rogers (introspectshun) + function Concat() + { + $s = ""; + $arr = func_get_args(); + + // Split single record on commas, if possible + if (sizeof($arr) == 1) { + foreach ($arr as $arg) { + $args = explode(',', $arg); + } + $arr = $args; + } + + array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";')); + $s = implode('+',$arr); + if (sizeof($arr) > 0) return "$s"; + + return ''; + } + + /* + Unfortunately, it appears that mssql cannot handle varbinary > 255 chars + So all your blobs must be of type "image". + + Remember to set in php.ini the following... + + ; Valid range 0 - 2147483647. Default = 4096. + mssql.textlimit = 0 ; zero to pass through + + ; Valid range 0 - 2147483647. Default = 4096. + mssql.textsize = 0 ; zero to pass through + */ + function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB') + { + + if (strtoupper($blobtype) == 'CLOB') { + $sql = "UPDATE $table SET $column='" . $val . "' WHERE $where"; + return $this->Execute($sql) != false; + } + $sql = "UPDATE $table SET $column=0x".bin2hex($val)." WHERE $where"; + return $this->Execute($sql) != false; + } + + // returns query ID if successful, otherwise false + function _query($sql,$inputarr=false) + { + $this->_errorMsg = false; + if (is_array($inputarr)) { + $rez = sqlsrv_query($this->_connectionID,$sql,$inputarr); + } else if (is_array($sql)) { + $rez = sqlsrv_query($this->_connectionID,$sql[1],$inputarr); + } else { + $rez = sqlsrv_query($this->_connectionID,$sql); + } + if ($this->debug) error_log("<hr>running query: ".var_export($sql,true)."<hr>input array: ".var_export($inputarr,true)."<hr>result: ".var_export($rez,true));//"<hr>connection: ".serialize($this->_connectionID) + //fix for returning true on anything besides select statements + if (is_array($sql)) $sql = $sql[1]; + $sql = ltrim($sql); + if(stripos($sql, 'SELECT') !== 0 && $rez !== false) { + if ($this->debug) error_log(" isn't a select query, returning boolean true"); + return true; + } + //end fix + if(!$rez) $rez = false; + return $rez; + } + + // returns true or false + function _close() + { + if ($this->transCnt) $this->RollbackTrans(); + $rez = @sqlsrv_close($this->_connectionID); + $this->_connectionID = false; + return $rez; + } + + // mssql uses a default date like Dec 30 2000 12:00AM + function UnixDate($v) + { + return ADORecordSet_array_mssql::UnixDate($v); + } + + function UnixTimeStamp($v) + { + return ADORecordSet_array_mssql::UnixTimeStamp($v); + } + + function &MetaIndexes($table,$primary=false) + { + $table = $this->qstr($table); + + $sql = "SELECT i.name AS ind_name, C.name AS col_name, USER_NAME(O.uid) AS Owner, c.colid, k.Keyno, + CASE WHEN I.indid BETWEEN 1 AND 254 AND (I.status & 2048 = 2048 OR I.Status = 16402 AND O.XType = 'V') THEN 1 ELSE 0 END AS IsPK, + CASE WHEN I.status & 2 = 2 THEN 1 ELSE 0 END AS IsUnique + FROM dbo.sysobjects o INNER JOIN dbo.sysindexes I ON o.id = i.id + INNER JOIN dbo.sysindexkeys K ON I.id = K.id AND I.Indid = K.Indid + INNER JOIN dbo.syscolumns c ON K.id = C.id AND K.colid = C.Colid + WHERE LEFT(i.name, 8) <> '_WA_Sys_' AND o.status >= 0 AND O.Name LIKE $table + ORDER BY O.name, I.Name, K.keyno"; + + global $ADODB_FETCH_MODE; + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + if ($this->fetchMode !== FALSE) { + $savem = $this->SetFetchMode(FALSE); + } + + $rs = $this->Execute($sql); + if (isset($savem)) { + $this->SetFetchMode($savem); + } + $ADODB_FETCH_MODE = $save; + + if (!is_object($rs)) { + return FALSE; + } + + $indexes = array(); + while ($row = $rs->FetchRow()) { + if (!$primary && $row[5]) continue; + + $indexes[$row[0]]['unique'] = $row[6]; + $indexes[$row[0]]['columns'][] = $row[1]; + } + return $indexes; + } + + function MetaForeignKeys($table, $owner=false, $upper=false) + { + global $ADODB_FETCH_MODE; + + $save = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + $table = $this->qstr(strtoupper($table)); + + $sql = + "select object_name(constid) as constraint_name, + col_name(fkeyid, fkey) as column_name, + object_name(rkeyid) as referenced_table_name, + col_name(rkeyid, rkey) as referenced_column_name + from sysforeignkeys + where upper(object_name(fkeyid)) = $table + order by constraint_name, referenced_table_name, keyno"; + + $constraints =& $this->GetArray($sql); + + $ADODB_FETCH_MODE = $save; + + $arr = false; + foreach($constraints as $constr) { + //print_r($constr); + $arr[$constr[0]][$constr[2]][] = $constr[1].'='.$constr[3]; + } + if (!$arr) return false; + + $arr2 = false; + + foreach($arr as $k => $v) { + foreach($v as $a => $b) { + if ($upper) $a = strtoupper($a); + $arr2[$a] = $b; + } + } + return $arr2; + } + + //From: Fernando Moreira <FMo...@im...> + function MetaDatabases() + { + $this->SelectDB("master"); + $rs =& $this->Execute($this->metaDatabasesSQL); + $rows = $rs->GetRows(); + $ret = array(); + for($i=0;$i<count($rows);$i++) { + $ret[] = $rows[$i][0]; + } + $this->SelectDB($this->database); + if($ret) + return $ret; + else + return false; + } + + // "Stein-Aksel Basma" <ba...@ac...> + // tested with MSSQL 2000 + function &MetaPrimaryKeys($table) + { + global $ADODB_FETCH_MODE; + + $schema = ''; + $this->_findschema($table,$schema); + if (!$schema) $schema = $this->database; + if ($schema) $schema = "and k.table_catalog like '$schema%'"; + + $sql = "select distinct k.column_name,ordinal_position from information_schema.key_column_usage k, + information_schema.table_constraints tc + where tc.constraint_name = k.constraint_name and tc.constraint_type = + 'PRIMARY KEY' and k.table_name = '$table' $schema order by ordinal_position "; + + $savem = $ADODB_FETCH_MODE; + $ADODB_FETCH_MODE = ADODB_FETCH_NUM; + $a = $this->GetCol($sql); + $ADODB_FETCH_MODE = $savem; + + if ($a && sizeof($a)>0) return $a; + $false = false; + return $false; + } + + + function &MetaTables($ttype=false,$showSchema=false,$mask=false) + { + if ($mask) { + $save = $this->metaTablesSQL; + $mask = $this->qstr(($mask)); + $this->metaTablesSQL .= " AND name like $mask"; + } + $ret =& ADOConnection::MetaTables($ttype,$showSchema); + + if ($mask) { + $this->metaTablesSQL = $save; + } + return $ret; + } +} + +/*-------------------------------------------------------------------------------------- + Class Name: Recordset +--------------------------------------------------------------------------------------*/ + +class ADORecordset_mssqlnative extends ADORecordSet { + + var $databaseType = "mssqlnative"; + var $canSeek = false; + var $fieldOffset = 0; + // _mths works only in non-localised system + + function ADORecordset_mssqlnative($id,$mode=false) + { + if ($mode === false) { + global $ADODB_FETCH_MODE; + $mode = $ADODB_FETCH_MODE; + + } + $this->fetchMode = $mode; + return $this->ADORecordSet($id,$mode); + } + + + function _initrs() + { + global $ADODB_COUNTRECS; + if ($this->connection->debug) error_log("(before) ADODB_COUNTRECS: {$ADODB_COUNTRECS} _numOfRows: {$this->_numOfRows} _numOfFields: {$this->_numOfFields}"); + /*$retRowsAff = sqlsrv_rows_affected($this->_queryID);//"If you need to determine the number of rows a query will return before retrieving the actual results, appending a SELECT COUNT ... query would let you get that information, and then a call to next_result would move you to the "real" results." + error_log("rowsaff: ".serialize($retRowsAff)); + $this->_numOfRows = ($ADODB_COUNTRECS)? $retRowsAff:-1;*/ + $this->_numOfRows = -1;//not supported + $fieldmeta = sqlsrv_field_metadata($this->_queryID); + $this->_numOfFields = ($fieldmeta)? count($fieldmeta):-1; + if ($this->connection->debug) error_log("(after) _numOfRows: {$this->_numOfRows} _numOfFields: {$this->_numOfFields}"); + } + + + //Contributed by "Sven Axelsson" <sve...@bo...> + // get next resultset - requires PHP 4.0.5 or later + function NextRecordSet() + { + if (!sqlsrv_next_result($this->_queryID)) return false; + $this->_inited = false; + $this->bind = false; + $this->_currentRow = -1; + $this->Init(); + return true; + } + + /* Use associative array to get fields array */ + function Fields($colname) + { + if ($this->fetchMode != ADODB_FETCH_NUM) return $this->fields[$colname]; + if (!$this->bind) { + $this->bind = array(); + for ($i=0; $i < $this->_numOfFields; $i++) { + $o = $this->FetchField($i); + $this->bind[strtoupper($o->name)] = $i; + } + } + + return $this->fields[$this->bind[strtoupper($colname)]]; + } + + /* Returns: an object containing field information. + Get column information in the Recordset object. fetchField() can be used in order to obtain information about + fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by + fetchField() is retrieved. */ + + function &FetchField($fieldOffset = -1) + { + if ($this->connection->debug) error_log("<hr>fetchfield: $fieldOffset, fetch array: <pre>".print_r($this->fields,true)."</pre> backtrace: ".adodb_backtrace(false)); + if ($fieldOffset != -1) $this->fieldOffset = $fieldOffset; + $arrKeys = array_keys($this->fields); + if(array_key_exists($this->fieldOffset,$arrKeys) && !array_key_exists($arrKeys[$this->fieldOffset],$this->fields)) { + $f = false; + } else { + $f = $this->fields[ $arrKeys[$this->fieldOffset] ]; + if($fieldOffset == -1) $this->fieldOffset++; + } + + if (empty($f)) { + $f = false;//PHP Notice: Only variable references should be returned by reference + } + return $f; + } + + function _seek($row) + { + return false;//There is no support for cursors in the driver at this time. All data is returned via forward-only streams. + } + + // speedup + function MoveNext() + { + if ($this->connection->debug) error_log("movenext()"); + //if ($this->connection->debug) error_log("eof (beginning): ".$this->EOF); + if ($this->EOF) return false; + + $this->_currentRow++; + if ($this->connection->debug) error_log("_currentRow: ".$this->_currentRow); + + if ($this->_fetch()) return true; + $this->EOF = true; + //if ($this->connection->debug) error_log("eof (end): ".$this->EOF); + + return false; + } + + + // INSERT UPDATE DELETE returns false even if no error occurs in 4.0.4 + // also the date format has been changed from YYYY-mm-dd to dd MMM YYYY in 4.0.4. Idiot! + function _fetch($ignore_fields=false) + { + if ($this->connection->debug) error_log("_fetch()"); + if ($this->fetchMode & ADODB_FETCH_ASSOC) { + if ($this->fetchMode & ADODB_FETCH_NUM) { + if ($this->connection->debug) error_log("fetch mode: both"); + $this->fields = @sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_BOTH); + } else { + if ($this->connection->debug) error_log("fetch mode: assoc"); + $this->fields = @sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_ASSOC); + } + + if (ADODB_ASSOC_CASE == 0) { + foreach($this->fields as $k=>$v) { + $this->fields[strtolower($k)] = $v; + } + } else if (ADODB_ASSOC_CASE == 1) { + foreach($this->fields as $k=>$v) { + $this->fields[strtoupper($k)] = $v; + } + } + } else { + if ($this->connection->debug) error_log("fetch mode: num"); + $this->fields = @sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_NUMERIC); + } + if(is_array($this->fields) && array_key_exists(1,$this->fields) && !array_key_exists(0,$this->fields)) {//fix fetch numeric keys since they're not 0 based + $arrFixed = array(); + foreach($this->fields as $key=>$value) { + if(is_numeric($key)) { + $arrFixed[$key-1] = $value; + } else { + $arrFixed[$key] = $value; + } + } + //if($this->connection->debug) error_log("<hr>fixing non 0 based return array, old: ".print_r($this->fields,true)." new: ".print_r($arrFixed,true)); + $this->fields = $arrFixed; + } + if(is_array($this->fields)) { + foreach($this->fields as $key=>$value) { + if (is_object($value) && method_exists($value, 'format')) {//is DateTime object + $this->fields[$key] = $value->format("Y-m-d\TH:i:s\Z"); + } + } + } + if($this->fields === null) $this->fields = false; + if ($this->connection->debug) error_log("<hr>after _fetch, fields: <pre>".print_r($this->fields,true)." backtrace: ".adodb_backtrace(false)); + return $this->fields; + } + + /* close() only needs to be called if you are worried about using too much memory while your script + is running. All associated result memory for the specified result identifier will automatically be freed. */ + function _close() + { + $rez = sqlsrv_free_stmt($this->_queryID); + $this->_queryID = false; + return $rez; + } + + // mssql uses a default date like Dec 30 2000 12:00AM + function UnixDate($v) + { + return ADORecordSet_array_mssqlnative::UnixDate($v); + } + + function UnixTimeStamp($v) + { + return ADORecordSet_array_mssqlnative::UnixTimeStamp($v); + } +} + + +class ADORecordSet_array_mssqlnative extends ADORecordSet_array { + function ADORecordSet_array_mssqlnative($id=-1,$mode=false) + { + $this->ADORecordSet_array($id,$mode); + } + + // mssql uses a default date like Dec 30 2000 12:00AM + function UnixDate($v) + { + + if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixDate($v); + + global $ADODB_mssql_mths,$ADODB_mssql_date_order; + + //Dec 30 2000 12:00AM + if ($ADODB_mssql_date_order == 'dmy') { + if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { + return parent::UnixDate($v); + } + if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; + + $theday = $rr[1]; + $themth = substr(strtoupper($rr[2]),0,3); + } else { + if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})|" ,$v, $rr)) { + return parent::UnixDate($v); + } + if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; + + $theday = $rr[2]; + $themth = substr(strtoupper($rr[1]),0,3); + } + $themth = $ADODB_mssql_mths[$themth]; + if ($themth <= 0) return false; + // h-m-s-MM-DD-YY + return mktime(0,0,0,$themth,$theday,$rr[3]); + } + + function UnixTimeStamp($v) + { + + if (is_numeric(substr($v,0,1)) && ADODB_PHPVER >= 0x4200) return parent::UnixTimeStamp($v); + + global $ADODB_mssql_mths,$ADODB_mssql_date_order; + + //Dec 30 2000 12:00AM + if ($ADODB_mssql_date_order == 'dmy') { + if (!preg_match( "|^([0-9]{1,2})[-/\. ]+([A-Za-z]{3})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" + ,$v, $rr)) return parent::UnixTimeStamp($v); + if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; + + $theday = $rr[1]; + $themth = substr(strtoupper($rr[2]),0,3); + } else { + if (!preg_match( "|^([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})|" + ,$v, $rr)) return parent::UnixTimeStamp($v); + if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; + + $theday = $rr[2]; + $themth = substr(strtoupper($rr[1]),0,3); + } + + $themth = $ADODB_mssql_mths[$themth]; + if ($themth <= 0) return false; + + switch (strtoupper($rr[6])) { + case 'P': + if ($rr[4]<12) $rr[4] += 12; + break; + case 'A': + if ($rr[4]==12) $rr[4] = 0; + break; + default: + break; + } + // h-m-s-MM-DD-YY + return mktime($rr[4],$rr[5],0,$themth,$theday,$rr[3]); + } +} + +/* +Code Example 1: + +select object_name(constid) as constraint_name, + object_name(fkeyid) as table_name, + col_name(fkeyid, fkey) as column_name, + object_name(rkeyid) as referenced_table_name, + col_name(rkeyid, rkey) as referenced_column_name +from sysforeignkeys +where object_name(fkeyid) = x +order by constraint_name, table_name, referenced_table_name, keyno + +Code Example 2: +select constraint_name, + column_name, + ordinal_position +from information_schema.key_column_usage +where constraint_catalog = db_name() +and table_name = x +order by constraint_name, ordinal_position + +http://www.databasejournal.com/scripts/article.php/1440551 +*/ + +?> \ No newline at end of file Added: trunk/lib/WikiDB/backend/ADODB_mssqlnative.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_mssqlnative.php (rev 0) +++ trunk/lib/WikiDB/backend/ADODB_mssqlnative.php 2010-06-07 14:05:29 UTC (rev 7485) @@ -0,0 +1,249 @@ +<?php // -*-php-*- +// rcs_id('$Id: ADODB_mssql.php,v 1.2 2005/10/10 19:42:15 rurban Exp $'); + +/** + * MS SQL extensions for the ADODB DB backend. + */ +require_once('lib/WikiDB/backend/ADODB.php'); + +class WikiDB_backend_ADODB_mssqlnative +extends WikiDB_backend_ADODB +{ + /** + * Constructor. + */ + function WikiDB_backend_ADODB_mssqlnative($dbparams) { + // Lowercase Assoc arrays + define('ADODB_ASSOC_CASE',0); + + // Backend constructor + $this->WikiDB_backend_ADODB($dbparams); + + // Empty strings in MSSQL? NULLS? + $this->_expressions['notempty'] = "NOT LIKE ''"; + //doesn't work if content is of the "text" type http://msdn2.microsoft.com/en-us/library/ms188074.aspx + $this->_expressions['iscontent'] = "dbo.hasContent({$this->_table_names['version_tbl']}.content)"; + + $this->_prefix = isset($dbparams['prefix']) ? $dbparams['prefix'] : ''; + + } + + /** + * Pack tables. + */ + function optimize() { + // Do nothing here -- Leave that for the DB + // Cost Based Optimizer tuning vary from version to version + return 1; + } + + // Search callabcks + // Page name + function _sql_match_clause($word) { + $word = preg_replace('/(?=[%_\\\\])/', "\\", $word); + $word = $this->_dbh->qstr("%$word%"); + return "LOWER(pagename) LIKE $word"; + } + + // Fulltext -- case sensitive :-\ + function _fullsearch_sql_match_clause($word) { + $word = preg_replace('/(?=[%_\\\\])/', "\\", $word); + $wordq = $this->_dbh->qstr("%$word%"); + return "LOWER(pagename) LIKE $wordq " + . "OR CHARINDEX(content, '$word') > 0"; + } + + /** + * Serialize data + */ + function _serialize($data) { + if (empty($data)) + return ''; + assert(is_array($data)); + return addslashes(serialize($data)); + } + + /** + * Unserialize data + */ + function _unserialize($data) { + return empty($data) ? array() : unserialize(stripslashes($data)); + } + + /* + * Update link table. + * on DEBUG: delete old, deleted links from page + */ + function set_links($pagename, $links) { + // 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 ($link['relation']) + $relation = $this->_get_pageid($link['relation'], true); + else + $relation = 0; + if ($linkto === "") { // ignore attributes + continue; + } + // 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]); + } + } + } + // purge page table: delete all non-referenced pages + // for all previously linked pages, which have no other linkto links + if (DEBUG and $oldlinks) { + // trigger_error("purge page table: delete all non-referenced pages...", E_USER_NOTICE); + foreach ($oldlinks as $id => $name) { + // ...check if the page is empty and has no version + if($id != '') { + $result = $dbh->getRow("SELECT $page_tbl.id FROM $page_tbl" + . " LEFT JOIN $nonempty_tbl ON ($nonempty_tbl.id = $page_tbl.id)"//'"id" is not a recognized table hints option' + . " LEFT JOIN $version_tbl ON ($version_tbl.id = $page_tbl.id)"//'"id" is not a recognized table hints option' + . " WHERE $nonempty_tbl.id is NULL" + . " AND $version_tbl.id is NULL" + . " AND $page_tbl.id=$id"); + $linkto = $dbh->getRow("SELECT linkfrom FROM $link_tbl WHERE linkto=$id"); + if ($result and empty($linkto)) { + trigger_error("delete empty and non-referenced link $name ($id)", E_USER_NOTICE); + $dbh->Execute("DELETE FROM $recent_tbl WHERE id=$id"); // may fail + $dbh->Execute("DELETE FROM $link_tbl WHERE linkto=$id"); + $dbh->Execute("DELETE FROM $page_tbl WHERE id=$id"); // this purges the link + } + } + } + } + $this->unlock(array('link')); + return true; + } + + /* get all oldlinks in hash => id, relation + check for all new links + */ + function set_links1($pagename, $links) { + + $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 linkto, $link_tbl.relation, page.pagename" + ." FROM $link_tbl" + ." JOIN page ON ($link_tbl.linkto = page.id)" + ." WHERE linkfrom=$pageid"); + /* old new + * X => [1,0 2,0 1,1] X => [1,1 3,0] + * => delete 1,0 2,0 + insert 3,0 + */ + if ($links) { + foreach ($links as $link) { + $linkto = $link['linkto']; + if ($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); + $skip = 0; + // find linkfrom,linkto,relation triple in oldlinks + foreach ($oldlinks as $l) { + if ($relation) { // relation NOT NULL + if ($l['linkto'] == $linkid and $l['relation'] == $relation) { + // found and skip + $skip = 1; + } + } + } + if (! $skip ) { + if ($update) { + } + 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 (array_key_exists($linkid, $oldlinks)) { + // This was also in the previous page + unset($oldlinks[$linkid]); + } + } + } + // purge page table: delete all non-referenced pages + // for all previously linked pages... + if (DEBUG and $oldlinks) { + // trigger_error("purge page table: delete all non-referenced pages...", E_USER_NOTICE); + foreach ($oldlinks as $id => $name) { + // ...check if the page is empty and has no version + if($id != '') { + if ($dbh->getRow("SELECT $page_tbl.id FROM $page_tbl" + . " LEFT JOIN $nonempty_tbl ON ($nonempty_tbl.id = $page_tbl.id)"//'"id" is not a recognized table hints option' + . " LEFT JOIN $version_tbl ON ($version_tbl.id = $page_tbl.id)"//'"id" is not a recognized table hints option' + . " WHERE $nonempty_tbl.id is NULL" + . " AND $version_tbl.id is NULL" + . " AND $page_tbl.id=$id")) + { + trigger_error("delete empty and non-referenced link $name ($id)", E_USER_NOTICE); + $dbh->Execute("DELETE FROM $page_tbl WHERE id=$id"); // this purges the link + $dbh->Execute("DELETE FROM $recent_tbl WHERE id=$id"); // may fail + } + } + } + } + $this->unlock(array('link')); + return true; + } + +}; + +// (c-file-style: "gnu") +// Local Variables: +// mode: php +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: +?> Added: trunk/schemas/sqlsrv-destroy.sql =================================================================== --- trunk/schemas/sqlsrv-destroy.sql (rev 0) +++ trunk/schemas/sqlsrv-destroy.sql 2010-06-07 14:05:29 UTC (rev 7485) @@ -0,0 +1,17 @@ +-- $Id: mssql-destroy.sql,v 1.3 2005/09/28 19:27:23 rurban Exp $ + +DROP TABLE page; +DROP TABLE version; +DROP TABLE recent; +DROP TABLE nonempty; +DROP TABLE link; +DROP TABLE session; + +DROP TABLE pref; +--DROP TABLE user; +DROP TABLE member; + +-- wikilens theme +DROP TABLE rating; + +DROP TABLE accesslog; Added: trunk/schemas/sqlsrv-initialize.sql =================================================================== --- trunk/schemas/sqlsrv-initialize.sql (rev 0) +++ trunk/schemas/sqlsrv-initialize.sql 2010-06-07 14:05:29 UTC (rev 7485) @@ -0,0 +1,144 @@ +-- $Id: sqlsrv-initialize.sql,v 1.5 2006/12/08 08:04:10 rurban Exp $ +-- UNTESTED! + +-- the CREATE FUNCTION section must be run as a seperate query. cut/paste run before executing the remainder +-- of the contents of this file +CREATE FUNCTION hasContent + (@ContentField varchar(max)) +RETURNS bit +AS +BEGIN + +IF @ContentField NOT LIKE '' + RETURN 1 +RETURN 0 + +END +-- end seperate section + + +CREATE TABLE page ( + id INT NOT NULL , + pagename VARCHAR(100) NOT NULL, + hits INT NOT NULL DEFAULT 0, + pagedata TEXT NOT NULL DEFAULT '', + cached_html TEXT NOT NULL DEFAULT '', -- added with 1.3.11 + PRIMARY KEY (id), + UNIQUE (pagename) +); +--SET IDENTITY_INSERT page ON; + +CREATE TABLE version ( + id INT NOT NULL, + version INT NOT NULL, + mtime INT NOT NULL, + minor_edit TINYINT DEFAULT 0, + content varchar(max) NOT NULL DEFAULT '',--can't be text + versiondata TEXT NOT NULL DEFAULT '', + PRIMARY KEY (id,version) +); +CREATE INDEX version_mtime ON version (mtime); + +CREATE TABLE recent ( + id INT NOT NULL, + latestversion INT, + latestmajor INT, + latestminor INT, + PRIMARY KEY (id) +); + +CREATE TABLE nonempty ( + id INT NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE link ( + linkfrom INT NOT NULL, + linkto INT NOT NULL, + relation INT +); +CREATE INDEX linkfrom ON link (linkfrom); +CREATE INDEX linkto ON link (linkto); + +CREATE TABLE session ( + sess_id CHAR(32) NOT NULL DEFAULT '', + sess_data IMAGE NOT NULL, + sess_date BIGINT NOT NULL, + sess_ip CHAR(40) NOT NULL, + PRIMARY KEY (sess_id) +); +CREATE INDEX sessdate_index ON session (sess_date); +CREATE INDEX sessip_index ON session (sess_ip); + +-- Optional DB Auth and Prefs +-- For these tables below the default table prefix must be used +-- in the DBAuthParam SQL statements also. + +CREATE TABLE pref ( + userid CHAR(48) NOT NULL, + prefs TEXT NULL DEFAULT '', + passwd CHAR(48) DEFAULT '', + groupname CHAR(48) DEFAULT 'users', + PRIMARY KEY (userid) +); + +-- update to 1.3.12: (see lib/upgrade.php) +-- ALTER TABLE pref ADD passwd CHAR(48) BINARY DEFAULT ''; +-- ALTER TABLE pref ADD groupname CHAR(48) BINARY DEFAULT 'users'; + +-- deprecated since 1.3.12. only useful for seperate databases. +-- better use the extra pref table where such users can be created easily +-- without password. +--CREATE TABLE user ( +-- userid CHAR(48) NOT NULL, +-- passwd CHAR(48) DEFAULT '', +-- prefs TEXT NULL DEFAULT '', +-- groupname CHAR(48) DEFAULT 'users' +--); + +-- Use the member table, if you need it for n:m user-group relations, +-- and adjust your DBAUTH_AUTH_ SQL statements. +CREATE TABLE member ( + userid CHAR(48) NOT NULL, + groupname CHAR(48) NOT NULL DEFAULT 'users' +); +CREATE INDEX member_userid ON member (userid); +CREATE INDEX member_groupname ON member (groupname); + +-- only if you plan to use the wikilens theme +CREATE TABLE rating ( + dimension smallINT NOT NULL, + raterpage INT NOT NULL, + rateepage INT NOT NULL, + ratingvalue FLOAT NOT NULL, + rateeversion INT NOT NULL, + tstamp bigint NOT NULL, + PRIMARY KEY (dimension, raterpage, rateepage) +); +CREATE INDEX rating_dimension ON rating (dimension); +CREATE INDEX rating_raterpage ON rating (raterpage); +CREATE INDEX rating_rateepage ON rating (rateepage); + +-- if ACCESS_LOG_SQL > 0 +-- only if you need fast log-analysis (spam prevention, recent referrers) +-- see http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/#id2756178 +CREATE TABLE accesslog ( + time_stamp BIGINT, + remote_host VARCHAR(255), + remote_user VARCHAR(50), + request_method VARCHAR(10), + request_line text, + request_args text, + request_file text, + request_uri text, + request_time CHAR(28), + status INT, + bytes_sent INT, + referer text, + agent text, + request_duration FLOAT +); +CREATE INDEX log_time ON accesslog (time_stamp); +CREATE INDEX log_host ON accesslog (remote_host); +-- create extra indices on demand (usually referer. see plugin/AccessLogSql) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 13:50:18
|
Revision: 7484 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7484&view=rev Author: rurban Date: 2010-06-07 13:50:12 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Add tabindex Patch 3003506 by S?\195?\169bastien Le Callonnec old: userid -> openid -> password new: userid -> password -> openid Modified Paths: -------------- trunk/themes/default/templates/login.tmpl Modified: trunk/themes/default/templates/login.tmpl =================================================================== --- trunk/themes/default/templates/login.tmpl 2010-06-07 13:32:07 UTC (rev 7483) +++ trunk/themes/default/templates/login.tmpl 2010-06-07 13:50:12 UTC (rev 7484) @@ -73,15 +73,15 @@ <table cellspacing="4"> <tr> <td align="right"><?= _("UserId:") ?></td> - <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /> + <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" tabindex="1" /> <?php if (ENABLE_AUTH_OPENID) { ?> - <?= _("or")?> <a href="http://openid.net/"><?= _("OpenID") ?></a>:<input type="text" id="inp-openid" name="openid_url" size="32" maxlength="256" value="<?=$userid?>" /> + <?= _("or")?> <a href="http://openid.net/"><?= _("OpenID") ?></a>:<input type="text" id="inp-openid" name="openid_url" size="32" maxlength="256" value="<?=$userid?>" tabindex="3" /> <?php } ?> </td> </tr> <tr> <td align="right"><?= _("Password:") ?></td> - <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td> + <td><input type="password" name="auth[passwd]" size="12" maxlength="256" tabindex="2" /></td> </tr> <tr><td></td><td align="left"> <?=Button("submit:", _("Sign In"), 'wikiaction')?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 13:32:16
|
Revision: 7483 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7483&view=rev Author: rurban Date: 2010-06-07 13:32:07 +0000 (Mon, 07 Jun 2010) Log Message: ----------- fix nasty / escape in regexp Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2010-06-07 13:31:38 UTC (rev 7482) +++ trunk/lib/InlineParser.php 2010-06-07 13:32:07 UTC (rev 7483) @@ -947,10 +947,9 @@ global $PLUGIN_MARKUP_MAP; static $_start_regexp; if ($_start_regexp) return $_start_regexp; - if (empty($PLUGIN_MARKUP_MAP)) - return ''; - //"<(?: html|dot|toc|amath|richtable|include|tex )(?: \s[^>]*)>" - $_start_regexp = "<(?: ".join('|',array_keys($PLUGIN_MARKUP_MAP))." )(?: \s[^>]* | / )>"; + if (empty($PLUGIN_MARKUP_MAP)) return ''; + //"<(?: html|search|extsearch|dot|toc|math|richtable|include|tex )(?: \s[^>]*)>" + $_start_regexp = "<(?: ".join('|',array_keys($PLUGIN_MARKUP_MAP))." )(?: \s[^>]*|\\/ )>"; return $_start_regexp; } function getEndRegexp ($match) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 13:31:47
|
Revision: 7482 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7482&view=rev Author: rurban Date: 2010-06-07 13:31:38 +0000 (Mon, 07 Jun 2010) Log Message: ----------- fix nasty / escape in regexp Modified Paths: -------------- trunk/lib/FileFinder.php trunk/lib/InlineParser.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-07 12:14:25 UTC (rev 7481) +++ trunk/lib/FileFinder.php 2010-06-07 13:31:38 UTC (rev 7482) @@ -158,7 +158,9 @@ function _is_abs($path) { if (substr($path,0,1) == '/') { return true; - } elseif (isWindows() and (preg_match('#^[a-z]:[/\\]#i', $path))) { + } elseif (isWindows() and preg_match("/^[a-z]:/i", $path) + and (substr($path,3,1) == "/" or substr($path,3,1) == "\\")) + { return true; } else { return false; Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2010-06-07 12:14:25 UTC (rev 7481) +++ trunk/lib/InlineParser.php 2010-06-07 13:31:38 UTC (rev 7482) @@ -1,7 +1,7 @@ <?php // rcs_id('$Id$'); /* Copyright (C) 2002 Geoffrey T. Dairiki <da...@da...> - * Copyright (C) 2004-2009 Reini Urban + * Copyright (C) 2004-2010 Reini Urban * Copyright (C) 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent * * This file is part of PhpWiki. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:16:23
|
Revision: 7481 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7481&view=rev Author: rurban Date: 2010-06-07 12:14:25 +0000 (Mon, 07 Jun 2010) Log Message: ----------- enable windows check again Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-07 12:12:17 UTC (rev 7480) +++ trunk/lib/FileFinder.php 2010-06-07 12:14:25 UTC (rev 7481) @@ -156,7 +156,7 @@ * @return bool True if path is absolute. */ function _is_abs($path) { - if (preg_match('#^/#', $path)) { + if (substr($path,0,1) == '/') { return true; } elseif (isWindows() and (preg_match('#^[a-z]:[/\\]#i', $path))) { return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:16:01
|
Revision: 7480 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7480&view=rev Author: rurban Date: 2010-06-07 12:12:17 +0000 (Mon, 07 Jun 2010) Log Message: ----------- increase windows dba timeout Modified Paths: -------------- trunk/lib/DbaDatabase.php Modified: trunk/lib/DbaDatabase.php =================================================================== --- trunk/lib/DbaDatabase.php 2010-06-07 12:11:30 UTC (rev 7479) +++ trunk/lib/DbaDatabase.php 2010-06-07 12:12:17 UTC (rev 7480) @@ -2,7 +2,10 @@ require_once('lib/ErrorManager.php'); -define('DBA_DATABASE_DEFAULT_TIMEOUT', 5); +if (isWindows()) + define('DBA_DATABASE_DEFAULT_TIMEOUT', 60); +else + define('DBA_DATABASE_DEFAULT_TIMEOUT', 5); class DbaDatabase { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:11:36
|
Revision: 7479 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7479&view=rev Author: rurban Date: 2010-06-07 12:11:30 +0000 (Mon, 07 Jun 2010) Log Message: ----------- bump version Modified Paths: -------------- trunk/lib/prepend.php Modified: trunk/lib/prepend.php =================================================================== --- trunk/lib/prepend.php 2010-06-07 12:11:13 UTC (rev 7478) +++ trunk/lib/prepend.php 2010-06-07 12:11:30 UTC (rev 7479) @@ -6,7 +6,7 @@ // rcs_id('$Id$'); // see lib/stdlib.php: phpwiki_version() -define('PHPWIKI_VERSION', '1.4.0RC-20100415'); +define('PHPWIKI_VERSION', '1.4.0RC-20100607'); /** * Returns true if current php version is at mimimum a.b.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:11:19
|
Revision: 7478 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7478&view=rev Author: rurban Date: 2010-06-07 12:11:13 +0000 (Mon, 07 Jun 2010) Log Message: ----------- we force 4.2 Modified Paths: -------------- trunk/lib/XmlElement.php Modified: trunk/lib/XmlElement.php =================================================================== --- trunk/lib/XmlElement.php 2010-06-07 12:10:14 UTC (rev 7477) +++ trunk/lib/XmlElement.php 2010-06-07 12:11:13 UTC (rev 7478) @@ -191,11 +191,7 @@ function _quote ($string) { if (!$string) return $string; - if (check_php_version(4,1) and isset($GLOBALS['charset'])) { - return htmlspecialchars($string, ENT_COMPAT, $GLOBALS['charset']); - } else { - return htmlspecialchars($string); - } + return htmlspecialchars($string, ENT_COMPAT, $GLOBALS['charset']); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:10:20
|
Revision: 7477 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7477&view=rev Author: rurban Date: 2010-06-07 12:10:14 +0000 (Mon, 07 Jun 2010) Log Message: ----------- use the method Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2010-06-07 12:08:07 UTC (rev 7476) +++ trunk/lib/WikiTheme.php 2010-06-07 12:10:14 UTC (rev 7477) @@ -23,7 +23,7 @@ * and more formatting. */ -require_once(dirname(__FILE__).'/HtmlElement.php'); +//require_once(dirname(__FILE__).'/HtmlElement.php'); /** * Make a link to a wiki page (in this wiki). @@ -1247,7 +1247,7 @@ //$out = "<!-- More Headers -->\n"; foreach ($request->_MoreHeaders as $h) { if (is_object($h)) - $out .= printXML($h); + $out .= $h->printXML(); else $out .= "$h\n"; } @@ -1277,7 +1277,7 @@ $out = ''; foreach ($request->_MoreAttr[$tag] as $name => $element) { if (is_object($element)) - $out .= printXML($element); + $out .= $element->printXML(); else $out .= "$element"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 12:08:13
|
Revision: 7476 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7476&view=rev Author: rurban Date: 2010-06-07 12:08:07 +0000 (Mon, 07 Jun 2010) Log Message: ----------- simplify if GFORGE Modified Paths: -------------- trunk/lib/IniConfig.php trunk/lib/PagePerm.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2010-06-07 11:42:44 UTC (rev 7475) +++ trunk/lib/IniConfig.php 2010-06-07 12:08:07 UTC (rev 7476) @@ -194,6 +194,7 @@ 'DISABLE_HTTP_REDIRECT', 'PLUGIN_CACHED_USECACHE', 'PLUGIN_CACHED_FORCE_SYNCMAP', 'BLOG_DEFAULT_EMPTY_PREFIX', 'DATABASE_PERSISTENT', + 'GFORGE', 'ENABLE_DISCUSSION_LINK', 'ENABLE_CAPTCHA', 'ENABLE_WYSIWYG', 'WYSIWYG_DEFAULT_PAGETYPE_HTML', 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR', 'ENABLE_MARKUP_TEMPLATE', @@ -203,7 +204,7 @@ 'ENABLE_AUTH_OPENID', 'INSECURE_ACTIONS_LOCALHOST_ONLY', 'ENABLE_MAILNOTIFY', 'ENABLE_RECENTCHANGESBOX', 'ENABLE_PAGE_PUBLIC', 'ENABLE_AJAX', 'ENABLE_EXTERNAL_PAGES', - 'READONLY', 'GFORGE' + 'READONLY' ); $rs = @parse_ini_file($file); Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2010-06-07 11:42:44 UTC (rev 7475) +++ trunk/lib/PagePerm.php 2010-06-07 12:08:07 UTC (rev 7476) @@ -236,7 +236,7 @@ $page = $request->getPage($pagename); // Exceptions: - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { if ($pagename != '.' && isset($request->_user->_is_external) && $request->_user->_is_external && ! $page->get('external')) { $permcache[$pagename][$access] = 0; return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 11:42:51
|
Revision: 7475 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7475&view=rev Author: rurban Date: 2010-06-07 11:42:44 +0000 (Mon, 07 Jun 2010) Log Message: ----------- READONLY might be deferred Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2010-06-07 11:00:26 UTC (rev 7474) +++ trunk/lib/main.php 2010-06-07 11:42:44 UTC (rev 7475) @@ -79,7 +79,7 @@ if (USE_DB_SESSION) { include_once('lib/DbSession.php'); $dbi =& $this->_dbi; - if (!READONLY) + if (defined('READONLY') and !READONLY) // READONLY might be set later $this->_dbsession = new DbSession($dbi, $dbi->getParam('prefix') . $dbi->getParam('db_session_table')); } @@ -201,7 +201,8 @@ } if (empty($WikiTheme) and $user_theme) { if (strcspn($user_theme,"./\x00]") != strlen($user_theme)) { - trigger_error(sprintf("invalid theme '%s': Invalid characters detected", $user_theme), + trigger_error(sprintf("invalid theme '%s': Invalid characters detected", + $user_theme), E_USER_WARNING); $user_theme = "default"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 11:00:33
|
Revision: 7474 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7474&view=rev Author: rurban Date: 2010-06-07 11:00:26 +0000 (Mon, 07 Jun 2010) Log Message: ----------- get userdir images simplify if GFORGE Modified Paths: -------------- trunk/lib/loadsave.php Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2010-06-07 10:59:48 UTC (rev 7473) +++ trunk/lib/loadsave.php 2010-06-07 11:00:26 UTC (rev 7474) @@ -1515,7 +1515,7 @@ // Ensure that all mandatory pages are loaded $finder = new FileFinder; - if (! defined('GFORGE') or !GFORGE) { + if (!GFORGE) { $mandatory = explode(':','SandBox:Template/Category:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/OldTextFormattingRules:Help/TextFormattingRules:PhpWikiAdministration'); } else if (WIKI_NAME == "help") { $mandatory = explode(':','SandBox:Template/Category:TemplateTalk:SpecialPages:CategoryCategory:CategoryActionPage:Help/TextFormattingRules:PhpWikiAdministration'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 10:59:55
|
Revision: 7473 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7473&view=rev Author: rurban Date: 2010-06-07 10:59:48 +0000 (Mon, 07 Jun 2010) Log Message: ----------- simplify if GFORGE Modified Paths: -------------- trunk/lib/EditToolbar.php trunk/lib/MailNotify.php Modified: trunk/lib/EditToolbar.php =================================================================== --- trunk/lib/EditToolbar.php 2010-06-07 10:55:52 UTC (rev 7472) +++ trunk/lib/EditToolbar.php 2010-06-07 10:59:48 UTC (rev 7473) @@ -68,12 +68,13 @@ } if (ENABLE_EDIT_TOOLBAR) { - $js = JavaScript('',array('src' => $WikiTheme->_findData("toolbar.js"))); - if (empty($WikiTheme->_headers_printed)) - $WikiTheme->addMoreHeaders($js); + $js = JavaScript('',array('src' => $WikiTheme->_findData("toolbar.js"))); + if (empty($WikiTheme->_headers_printed)) { + $WikiTheme->addMoreHeaders($js); + } else { // from an actionpage: WikiBlog, AddComment, WikiForum - printXML($js); - printXML(JavaScript('define_f()')); + printXML($js); + printXML(JavaScript('define_f()')); } } @@ -96,8 +97,8 @@ $this->tokens['EDIT_TOOLBAR'] =& $content; } else { $content = $this->_generate(); - // regenerate buttons every 3600 seconds - $cache->save($id, $content, '+3600', 'toolbarcache'); + // regenerate buttons every 1 hr/6 hrs + $cache->save($id, $content, DEBUG ? '+3600' : '+21600', 'toolbarcache'); $this->tokens['EDIT_TOOLBAR'] =& $content; } } @@ -113,10 +114,8 @@ if (ENABLE_EDIT_TOOLBAR) { $username = $request->_user->UserName(); - if (defined('GFORGE') and GFORGE) { + if (GFORGE or DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { $username = '[['.$username.']]'; - } else if (DISABLE_MARKUP_WIKIWORD or (!isWikiWord($username))) { - $username = '['.$username.']'; } $signature = " ––".$username." ".CTime(); $toolarray = array( @@ -303,7 +302,7 @@ $categories = array(); while ($p = $pages->next()) { $page = $p->getName(); - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { $categories[] = "['$page', '%0A----%0A%5B%5B".$page."%5D%5D']"; } else if (DISABLE_MARKUP_WIKIWORD or (!isWikiWord($page))) { $categories[] = "['$page', '%0A%5B".$page."%5D']"; @@ -383,7 +382,7 @@ require_once('lib/TextSearchQuery.php'); $dbi =& $GLOBALS['request']->_dbi; $page_iter = $dbi->titleSearch(new TextSearchQuery($query, $case_exact, $regex)); - if ($page_iter->count()) { + if ($page_iter->count() > 0) { global $WikiTheme; $pages = array(); while ($p = $page_iter->next()) { @@ -415,6 +414,12 @@ $pd = new fileSet($image_dir, '*'); $images = $pd->getFiles(); unset($pd); + if (UPLOAD_USERDIR) { + $image_dir .= "/" . $request->_user->_userid; + $pd = new fileSet($image_dir, '*'); + $images = array_merge($images, $pd->getFiles()); + unset($pd); + } sort($images); if (!empty($images)) { $image_js = ''; Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2010-06-07 10:55:52 UTC (rev 7472) +++ trunk/lib/MailNotify.php 2010-06-07 10:59:48 UTC (rev 7473) @@ -61,7 +61,7 @@ function fromId() { global $request; - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { return $request->_user->getId(); } else { return $request->_user->getId() . '@' . $request->get('REMOTE_HOST'); @@ -72,7 +72,7 @@ global $request; // Disable verification of emails for corporate env. - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { $doverify = false; } @@ -188,10 +188,8 @@ $emails = $this->emails; $from = $this->from; // Do not send if modification is from Gforge admin - if (defined('GFORGE') and GFORGE) { - if ($from == ADMIN_USER) { - return; - } + if (GFORGE and $from == ADMIN_USER) { + return; } if (!$notice) $notice = _("PageChange Notification of %s"); $headers = "From: $from\r\n" . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 10:55:58
|
Revision: 7472 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7472&view=rev Author: rurban Date: 2010-06-07 10:55:52 +0000 (Mon, 07 Jun 2010) Log Message: ----------- enable Markup_xml_plugin allow undefining ENABLE_MARKUP_TEMPLATE add link to LinkImage allow image attributes (again) Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2010-06-07 10:37:33 UTC (rev 7471) +++ trunk/lib/InlineParser.php 2010-06-07 10:55:52 UTC (rev 7472) @@ -34,7 +34,6 @@ */ define('ESCAPE_CHAR', '~'); -require_once(dirname(__FILE__).'/HtmlElement.php'); require_once('lib/CachedMarkup.php'); require_once(dirname(__FILE__).'/stdlib.php'); @@ -319,7 +318,8 @@ function isImageLink($link) { if (!$link) return false; assert(defined('INLINE_IMAGES')); - return preg_match("/\\.(" . INLINE_IMAGES . ")/i", $link); + return preg_match("/\\.(" . INLINE_IMAGES . ")$/i", $link) + or preg_match("/\\.(" . INLINE_IMAGES . ")\s+(size|border|align|hspace|vspace|type|data|width|height|title|lang|id|alt)=/i", $link); } function LinkBracketLink($bracketlink) { @@ -470,7 +470,7 @@ if (empty($label) and isImageLink($link)) { // if without label => inlined image [File:xx.gif] $imgurl = $intermap->link($link); - return LinkImage($imgurl->getAttr('href')); + return LinkImage($imgurl->getAttr('href'), $link); } return new Cached_InterwikiLink($link, $label); } else { @@ -936,6 +936,43 @@ } } +// Special version for plugins in xml syntax, mediawiki-style +// <name arg=value>body</name> or <name /> => < ? plugin pluginname arg=value body ? > +// PLUGIN_MARKUP_MAP = "html:RawHtml dot:GraphViz toc:CreateToc amath:AsciiMath richtable:RichTable include:IncludePage tex:TexToPng" +class Markup_xml_plugin extends BalancedMarkup +{ + //var $_start_regexp = "<(?: ".join('|',PLUGIN_MARKUP_MAP)." )(?: \s[^>]*)>"; + + function getStartRegexp () { + global $PLUGIN_MARKUP_MAP; + static $_start_regexp; + if ($_start_regexp) return $_start_regexp; + if (empty($PLUGIN_MARKUP_MAP)) + return ''; + //"<(?: html|dot|toc|amath|richtable|include|tex )(?: \s[^>]*)>" + $_start_regexp = "<(?: ".join('|',array_keys($PLUGIN_MARKUP_MAP))." )(?: \s[^>]* | / )>"; + return $_start_regexp; + } + function getEndRegexp ($match) { + return "<\\/" . $match . '>'; + } + function markup ($match, $body) { + global $PLUGIN_MARKUP_MAP; + $name = substr($match,2,-2); + $vars = ''; + if (preg_match('/^(\S+)\|(.*)$/', $name, $_m)) { + $name = $_m[1]; + $vars = $_m[2]; //str_replace(' ', '&', $_m[2]); + } + if (!isset($PLUGIN_MARKUP_MAP[$name])) { + trigger_error("No plugin for $name $vars defined.", E_USER_WARNING); + return ""; + } + $plugin = $PLUGIN_MARKUP_MAP[$name]; + return new Cached_PluginInvocation("<"."?plugin $plugin $vars $body ?".">"); + } +} + /** * Mediawiki <nowiki> * <nowiki>...</nowiki> @@ -965,7 +1002,7 @@ } } -/** +/** ENABLE_MARKUP_TEMPLATE * Template syntax similar to Mediawiki * {{template}} * => < ? plugin Template page=template ? > @@ -1157,7 +1194,11 @@ $this->_addMarkup(new Markup_color); // Markup_wikicreole_preformatted must be before Markup_template_plugin $this->_addMarkup(new Markup_wikicreole_preformatted); - $this->_addMarkup(new Markup_template_plugin); + if (ENABLE_MARKUP_TEMPLATE and !$non_default) + $this->_addMarkup(new Markup_template_plugin); + // This does not work yet + if (PLUGIN_MARKUP_MAP and !$non_default) + $this->_addMarkup(new Markup_xml_plugin); } function _addMarkup ($markup) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 10:37:39
|
Revision: 7471 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7471&view=rev Author: rurban Date: 2010-06-07 10:37:33 +0000 (Mon, 07 Jun 2010) Log Message: ----------- use special HtmlElement5.php with php-4 unparsable public static declaration Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2010-06-07 10:36:03 UTC (rev 7470) +++ trunk/lib/ErrorManager.php 2010-06-07 10:37:33 UTC (rev 7471) @@ -649,7 +649,11 @@ } } -require_once(dirname(__FILE__).'/HtmlElement.php'); +if (check_php_version(5,2)) { + require_once(dirname(__FILE__).'/HtmlElement5.php'); +} else { + require_once(dirname(__FILE__).'/HtmlElement.php'); +} if (!isset($GLOBALS['ErrorManager'])) { $GLOBALS['ErrorManager'] = new ErrorManager; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 10:36:09
|
Revision: 7470 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7470&view=rev Author: rurban Date: 2010-06-07 10:36:03 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Always define GFORGE true or false Do not fail if config/config.php is not writable. This is optional only. Modified Paths: -------------- trunk/lib/IniConfig.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2010-06-07 09:47:12 UTC (rev 7469) +++ trunk/lib/IniConfig.php 2010-06-07 10:36:03 UTC (rev 7470) @@ -109,7 +109,7 @@ function IniConfig($file) { - // check config/config.php dump for faster startup + // Optionally check config/config.php dump for faster startup $dump = substr($file, 0, -3)."php"; if (isWindows($dump)) $dump = str_replace("/","\\",$dump); if (file_exists($dump) and is_readable($dump) and filesize($dump) > 0 and sort_file_mtime($dump, $file) < 0) { @@ -203,7 +203,7 @@ 'ENABLE_AUTH_OPENID', 'INSECURE_ACTIONS_LOCALHOST_ONLY', 'ENABLE_MAILNOTIFY', 'ENABLE_RECENTCHANGESBOX', 'ENABLE_PAGE_PUBLIC', 'ENABLE_AJAX', 'ENABLE_EXTERNAL_PAGES', - 'READONLY' + 'READONLY', 'GFORGE' ); $rs = @parse_ini_file($file); @@ -553,10 +553,6 @@ // The question is if reading this is faster then doing IniConfig() + fixup_static_configs() if (is_writable($dump)) { save_dump($dump); - } else { - if (! defined('GFORGE') or !GFORGE) { - die($dump . " is not writable"); - } } // store locale[] in config.php? This is too problematic. fixup_dynamic_configs($file); // [100ms] @@ -624,9 +620,9 @@ .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect'); // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Add some some action pages depending on configuration - if (defined('DEBUG') and DEBUG) { + if (DEBUG) { $ActionPages[] = 'DebugInfo'; $ActionPages[] = 'EditMetaData'; $ActionPages[] = 'SpellCheck'; // SpellCheck does not work @@ -710,7 +706,7 @@ $AllAllowedPlugins[] = 'YouTube'; // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { $AllAllowedPlugins[] = 'AddComment'; $AllAllowedPlugins[] = 'AnalyseAccessLogSql'; $AllAllowedPlugins[] = 'AsciiMath'; @@ -770,16 +766,16 @@ $AllActionPages[] = 'UserContribs'; // The GFORGE theme omits them - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Add some some action pages depending on configuration - if (defined('DEBUG') and DEBUG) { + if (DEBUG) { $AllActionPages[] = 'PhpWikiAdministration/Chmod'; } $AllActionPages[] = 'PhpWikiAdministration/Markup'; } - if (defined('GFORGE') and GFORGE) { - if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES) { + if (GFORGE) { + if (ENABLE_EXTERNAL_PAGES) { $AllAllowedPlugins[] = 'WikiAdminSetExternal'; $AllActionPages[] = 'ExternalPages'; } @@ -915,7 +911,7 @@ define('DEFAULT_LANGUAGE', ''); // detect from client // Gforge hack - if (!defined('GFORGE') or !GFORGE) { + if (!GFORGE) { // Disable update_locale because Zend Debugger crash if(! extension_loaded('Zend Debugger')) { update_locale(isset($LANG) ? $LANG : DEFAULT_LANGUAGE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 09:47:18
|
Revision: 7469 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7469&view=rev Author: rurban Date: 2010-06-07 09:47:12 +0000 (Mon, 07 Jun 2010) Log Message: ----------- unbreak whitespace garbage defined('GFORGE') is never needed as it is set by IniConfig to true or false fix important login recursion bug, i.e. php crash: new user => false does not return false, but the _userid is empty then Modified Paths: -------------- trunk/lib/WikiUserNew.php Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2010-06-07 09:11:29 UTC (rev 7468) +++ trunk/lib/WikiUserNew.php 2010-06-07 09:47:12 UTC (rev 7469) @@ -1,25 +1,25 @@ <?php //-*-php-*- -// rcs_id('$Id$'); -/* Copyright (C) 2004,2005,2006,2007,2009 $ThePhpWikiProgrammingTeam - * Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent - * Copyright (C) 2009-2010 Roger Guignard, Alcatel-Lucent - * - * This file is part of PhpWiki. - * - * PhpWiki is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * PhpWiki is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PhpWiki; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ +//rcs_id('$Id$'); +/* Copyright (C) 2004,2005,2006,2007,2009,2010 $ThePhpWikiProgrammingTeam +* Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent +* Copyright (C) 2009-2010 Roger Guignard, Alcatel-Lucent +* +* This file is part of PhpWiki. +* +* PhpWiki is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* PhpWiki is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with PhpWiki; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ /** * This is a complete OOP rewrite of the old WikiUser code with various * configurable external authentication methods. @@ -92,6 +92,10 @@ * but storage must be extended to the Get/SetPreferences methods. * <theme>/themeinfo.php must provide CustomUserPreferences: * A list of name => _UserPreference class pairs. + * 2010-06-07 rurban + * Fixed a nasty recursion bug (i.e. php crash), when user = new class + * which returned false, did not return false on php-4.4.7. Check for + * a object member now. */ define('WIKIAUTH_FORBIDDEN', -1); // Completely not allowed. @@ -353,7 +357,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/** +/** * Base WikiUser class. */ class _WikiUser @@ -425,17 +429,16 @@ return false; } - // function createHomePage() { global $request; $versiondata = array('author' => ADMIN_USER); $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences."). - "\n{{Template/UserPage}}", + "\n{{Template/UserPage}}", 1, $versiondata); - $request->_dbi->touch(); + $request->_dbi->touch(); $this->_HomePagehandle = $request->getPage($this->_userid); } - + // innocent helper: case-insensitive position in _auth_methods function array_position ($string, $array) { $string = strtolower($string); @@ -559,7 +562,7 @@ function isValidName ($userid = false) { if (!$userid) $userid = $this->_userid; if (!$userid) return false; - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { return true; } return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32; @@ -850,7 +853,7 @@ } -/** +/** * Helper class to finish the PassUser auth loop. * This is added automatically to USER_AUTH_ORDER. */ @@ -1080,7 +1083,7 @@ $dbh = $request->getDbh(); // use phpwiki database } elseif ($dbh->getAuthParam('auth_dsn') == $dbh->getParam('dsn')) { $dbh = $request->getDbh(); // same phpwiki database - } else { // use another external database handle. + } else { // use another external database handle. needs PHP >= 4.1 $local_params = array_merge($GLOBALS['DBParams'],$GLOBALS['DBAuthParams']); $local_params['dsn'] = $local_params['auth_dsn']; $dbh = WikiDB::open($local_params); @@ -1176,15 +1179,33 @@ // FIXME: strange why this should be needed... include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/AdoDb.php"); - return _AdoDbPassUser::getPreferences(); + if (check_php_version(5)) { + $user = new _AdoDbPassUser($this->_userid, $this->_prefs); + return $user->getPreferences(); + } else { + _AdoDbPassUser::_AdoDbPassUser($this->_userid, $this->_prefs); + return _AdoDbPassUser::getPreferences(); + } } elseif ($this->_prefs->_method == 'SQL') { include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/PearDb.php"); - return _PearDbPassUser::getPreferences(); + if (check_php_version(5)) { + $user = new _PearDbPassUser($this->_userid, $this->_prefs); + return $user->getPreferences(); + } else { + _PearDbPassUser::_PearDbPassUser($this->_userid, $this->_prefs); + return _PearDbPassUser::getPreferences(); + } } elseif ($this->_prefs->_method == 'PDO') { include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/PdoDb.php"); - return _PdoDbPassUser::getPreferences(); + if (check_php_version(5)) { + $user = new _PdoDbPassUser($this->_userid, $this->_prefs); + return $user->getPreferences(); + } else { + _PdoDbPassUser::_PdoDbPassUser($this->_userid, $this->_prefs); + return _PdoDbPassUser::getPreferences(); + } } } @@ -1211,17 +1232,35 @@ // FIXME: strange why this should be needed... include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/AdoDb.php"); - return _AdoDbPassUser::setPreferences($prefs, $id_only); + if (check_php_version(5)) { + $user = new _AdoDbPassUser($this->_userid, $prefs); + return $user->setPreferences($prefs, $id_only); + } else { + _AdoDbPassUser::_AdoDbPassUser($this->_userid, $prefs); + return _AdoDbPassUser::setPreferences($prefs, $id_only); + } } elseif ($this->_prefs->_method == 'SQL') { include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/PearDb.php"); - return _PearDbPassUser::setPreferences($prefs, $id_only); + if (check_php_version(5)) { + $user = new _PearDbPassUser($this->_userid, $prefs); + return $user->setPreferences($prefs, $id_only); + } else { + _PearDbPassUser::_PearDbPassUser($this->_userid, $prefs); + return _PearDbPassUser::setPreferences($prefs, $id_only); + } } elseif ($this->_prefs->_method == 'PDO') { include_once("lib/WikiUser/Db.php"); include_once("lib/WikiUser/PdoDb.php"); - return _PdoDbPassUser::setPreferences($prefs, $id_only); + if (check_php_version(5)) { + $user = new _PdoDbPassUser($this->_userid, $prefs); + return $user->setPreferences($prefs, $id_only); + } else { + _PdoDbPassUser::_PdoDbPassUser($this->_userid, $prefs); + return _PdoDbPassUser::setPreferences($prefs, $id_only); + } } } if ($updated = _AnonUser::setPreferences($prefs, $id_only)) { @@ -1254,7 +1293,8 @@ } else { $user = $this; } - while ($user) { + /* new user => false does not return false, but the _userid is empty then */ + while ($user and $user->_userid) { if (!check_php_version(5)) eval("\$this = \$user;"); $user = UpgradeUser($this, $user); @@ -1730,12 +1770,19 @@ class _UserPreference_email extends _UserPreference { + function get($name) { + // get email address from Gforge + if (GFORGE && session_loggedin()) { + $user = session_get_user(); + return $user->getEmail(); + } else { + parent::get($name); + } + } + function sanify($value) { - // email address is already checked by Gforge - if (defined('GFORGE') and GFORGE) { - return $value; - } + if (GFORGE) return $value; // check for valid email address if ($this->get('email') == $value and $this->getraw('emailVerified')) return $value; @@ -1757,9 +1804,7 @@ */ function update($value) { // email address is already checked by Gforge - if (defined('GFORGE') and GFORGE) { - return; - } + if (GFORGE) return $value; if (!empty($this->_init)) return; $verified = $this->getraw('emailVerified'); // hack! @@ -1776,17 +1821,6 @@ } } } - - function get($name) { - // get email address from Gforge - if (defined('GFORGE') && GFORGE && session_loggedin()) { - $user = session_get_user(); - return $user->getEmail(); - } else { - parent::get($name); - } - } - } /** Check for valid email address @@ -1945,7 +1979,7 @@ // This should be probably be done with $customUserPreferenceColumns // For now, we use GFORGE define - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { $gforgeprefs = array( 'pageTrail' => new _UserPreference_bool(), 'diffMenuItem' => new _UserPreference_bool(), @@ -2123,7 +2157,7 @@ } } - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { // Merge current notifyPages with notifyPagesAll // notifyPages are pages to notify in the current project // while $notifyPagesAll is used to store all the monitored pages. @@ -2172,7 +2206,7 @@ } } - if (defined('GFORGE') and GFORGE) { + if (GFORGE) { // Restore notifyPages from notifyPagesAll // notifyPages are pages to notify in the current project // while $notifyPagesAll is used to store all the monitored pages. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 09:11:35
|
Revision: 7468 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7468&view=rev Author: rurban Date: 2010-06-07 09:11:29 +0000 (Mon, 07 Jun 2010) Log Message: ----------- Move helper script away Modified Paths: -------------- trunk/lib/HtmlElement.php trunk/lib/HtmlElement5.php Added Paths: ----------- trunk/admin/mkfuncs Added: trunk/admin/mkfuncs =================================================================== --- trunk/admin/mkfuncs (rev 0) +++ trunk/admin/mkfuncs 2010-06-07 09:11:29 UTC (rev 7468) @@ -0,0 +1,45 @@ +#!/bin/sh +mkfuncs4() { + for tag in "$@" + do + echo " function $tag (/*...*/) {" + echo " \$el = new HtmlElement('$tag');" + echo " return \$el->_init2(func_get_args());" + echo " }" + done +} +mkfuncs5 () { + for tag in "$@" + do + echo " public static function $tag (/*...*/) {" + echo " \$el = new HtmlElement('$tag');" + echo " return \$el->_init2(func_get_args());" + echo " }" + done +} +alias mkfuncs=mkfuncs4 +#alias mkfuncs=mkfuncs5 + +d=' + /****************************************/' +mkfuncs link meta style script noscript +echo "$d" +mkfuncs a img br span +echo "$d" +mkfuncs h1 h2 h3 h4 h5 h6 +echo "$d" +mkfuncs hr div p pre blockquote +echo "$d" +mkfuncs em strong small +echo "$d" +mkfuncs tt u sup sub +echo "$d" +mkfuncs ul ol dl li dt dd +echo "$d" +mkfuncs table caption thead tbody tfoot tr td th colgroup col +echo "$d" +mkfuncs form input option select textarea label fieldset legend +echo "$d" +mkfuncs area map frame frameset iframe nobody object embed param +echo "$d" +mkfuncs video Property changes on: trunk/admin/mkfuncs ___________________________________________________________________ Added: svn:executable + * Modified: trunk/lib/HtmlElement.php =================================================================== --- trunk/lib/HtmlElement.php 2010-06-07 08:15:50 UTC (rev 7467) +++ trunk/lib/HtmlElement.php 2010-06-07 09:11:29 UTC (rev 7468) @@ -145,45 +145,8 @@ } } - // - // Shell script to generate the following static methods: -/* + // See admin/mkfuncs shell script to generate the following static methods -#!/bin/sh -mkfuncs () { - for tag in "$@" - do - echo " public static function $tag (/*...*/) {" - echo " \$el = new HtmlElement('$tag');" - echo " return \$el->_init2(func_get_args());" - echo " }" - done -} -d=' - /****************************************/' -mkfuncs link meta style script noscript -echo "$d" -mkfuncs a img br span -echo "$d" -mkfuncs h1 h2 h3 h4 h5 h6 -echo "$d" -mkfuncs hr div p pre blockquote -echo "$d" -mkfuncs em strong small -echo "$d" -mkfuncs tt u sup sub -echo "$d" -mkfuncs ul ol dl li dt dd -echo "$d" -mkfuncs table caption thead tbody tfoot tr td th colgroup col -echo "$d" -mkfuncs form input option select textarea label fieldset legend -echo "$d" -mkfuncs area map frame frameset iframe nobody object embed param -echo "$d" -mkfuncs video -*/ - function link (/*...*/) { $el = new HtmlElement('link'); return $el->_init2(func_get_args()); Modified: trunk/lib/HtmlElement5.php =================================================================== --- trunk/lib/HtmlElement5.php 2010-06-07 08:15:50 UTC (rev 7467) +++ trunk/lib/HtmlElement5.php 2010-06-07 09:11:29 UTC (rev 7468) @@ -146,45 +146,8 @@ } } - // - // Shell script to generate the following static methods: -/* + // See admin/mkfuncs shell script to generate the following static methods -#!/bin/sh -mkfuncs () { - for tag in "$@" - do - echo " public static function $tag (/*...*/) {" - echo " \$el = new HtmlElement('$tag');" - echo " return \$el->_init2(func_get_args());" - echo " }" - done -} -d=' - /****************************************/' -mkfuncs link meta style script noscript -echo "$d" -mkfuncs a img br span -echo "$d" -mkfuncs h1 h2 h3 h4 h5 h6 -echo "$d" -mkfuncs hr div p pre blockquote -echo "$d" -mkfuncs em strong small -echo "$d" -mkfuncs tt u sup sub -echo "$d" -mkfuncs ul ol dl li dt dd -echo "$d" -mkfuncs table caption thead tbody tfoot tr td th colgroup col -echo "$d" -mkfuncs form input option select textarea label fieldset legend -echo "$d" -mkfuncs area map frame frameset iframe nobody object embed param -echo "$d" -mkfuncs video -*/ - public static function link (/*...*/) { $el = new HtmlElement('link'); return $el->_init2(func_get_args()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 08:15:56
|
Revision: 7467 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7467&view=rev Author: rurban Date: 2010-06-07 08:15:50 +0000 (Mon, 07 Jun 2010) Log Message: ----------- make helper Added Paths: ----------- trunk/admin/dump-version.pl Added: trunk/admin/dump-version.pl =================================================================== --- trunk/admin/dump-version.pl (rev 0) +++ trunk/admin/dump-version.pl 2010-06-07 08:15:50 UTC (rev 7467) @@ -0,0 +1,10 @@ +#!/usr/bin/perl -l + +open F, "<", "lib/prepend.php" or exit 1; +while (<F>) { + if (/PHPWIKI_VERSION., .(.+).\);/) { + print $1; + exit + } +} +close F; Property changes on: trunk/admin/dump-version.pl ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |