*
* array('action' => 'diff', 'previous' => 'author') *
false
.
*/
function addImageAlias ($alias, $image_name) {
// fall back to the PhpWiki-supplied image if not found
if ($this->_findFile("images/$image_name", true))
$this->_imageAliases[$alias] = $image_name;
}
function addImageAlt ($alias, $alt_text) {
$this->_imageAlt[$alias] = $alt_text;
}
function getImageAlt ($alias) {
return $this->_imageAlt[$alias];
}
function getImageURL ($image) {
$aliases = &$this->_imageAliases;
if (isset($aliases[$image])) {
$image = $aliases[$image];
if (!$image)
return false;
}
// If not extension, default to .png.
if (!preg_match('/\.\w+$/', $image))
$image .= '.png';
// FIXME: this should probably be made to fall back
// automatically to .gif, .jpg.
// Also try .gif before .png if browser doesn't like png.
$path = $this->_findData("images/$image", 'missing okay');
if (!$path) // search explicit images/ or button/ links also
$path = $this->_findData("$image", 'missing okay');
if ($this->DUMP_MODE) {
if (empty($this->dumped_images)) $this->dumped_images = array();
$path = "images/". basename($path);
if (!in_array($path,$this->dumped_images)) $this->dumped_images[] = $path;
}
return $path;
}
function setLinkIcon($proto, $image = false) {
if (!$image)
$image = $proto;
$this->_linkIcons[$proto] = $image;
}
function getLinkIconURL ($proto) {
$icons = &$this->_linkIcons;
if (!empty($icons[$proto]))
return $this->getImageURL($icons[$proto]);
elseif (!empty($icons['*']))
return $this->getImageURL($icons['*']);
return false;
}
function addButtonAlias ($text, $alias = false) {
$aliases = &$this->_buttonAliases;
if (is_array($text))
$aliases = array_merge($aliases, $text);
elseif ($alias === false)
unset($aliases[$text]);
else
$aliases[$text] = $alias;
}
function getButtonURL ($text) {
$aliases = &$this->_buttonAliases;
if (isset($aliases[$text]))
$text = $aliases[$text];
$qtext = urlencode($text);
$url = $this->_findButton("$qtext.png");
if ($url && strstr($url, '%')) {
$url = preg_replace('|([^/]+)$|e', 'urlencode("\\1")', $url);
}
if (!$url) {// Jeff complained about png not supported everywhere. This is not PC
$url = $this->_findButton("$qtext.gif");
if ($url && strstr($url, '%')) {
$url = preg_replace('|([^/]+)$|e', 'urlencode("\\1")', $url);
}
}
return $url;
}
function _findButton ($button_file) {
if (empty($this->_button_path))
$this->_button_path = $this->_getButtonPath();
foreach ($this->_button_path as $dir) {
if ($path = $this->_findData("$dir/$button_file", 1))
return $path;
}
return false;
}
function _getButtonPath () {
$button_dir = $this->_findFile("buttons");
$path_dir = $this->_path . $button_dir;
if (!file_exists($path_dir) || !is_dir($path_dir))
return array();
$path = array($button_dir);
$dir = dir($path_dir);
while (($subdir = $dir->read()) !== false) {
if ($subdir[0] == '.')
continue;
if ($subdir == 'CVS')
continue;
if (is_dir("$path_dir/$subdir"))
$path[] = "$button_dir/$subdir";
}
$dir->close();
// add default buttons
$path[] = "themes/default/buttons";
$path_dir = $this->_path . "themes/default/buttons";
$dir = dir($path_dir);
while (($subdir = $dir->read()) !== false) {
if ($subdir[0] == '.')
continue;
if ($subdir == 'CVS')
continue;
if (is_dir("$path_dir/$subdir"))
$path[] = "themes/default/buttons/$subdir";
}
$dir->close();
return $path;
}
////////////////////////////////////////////////////////////////
//
// Button style
//
////////////////////////////////////////////////////////////////
function makeButton ($text, $url, $class = false) {
// FIXME: don't always try for image button?
// Special case: URLs like 'submit:preview' generate form
// submission buttons.
if (preg_match('/^submit:(.*)$/', $url, $m))
return $this->makeSubmitButton($text, $m[1], $class);
$imgurl = $this->getButtonURL($text);
if ($imgurl)
return new ImageButton($text, $url, $class, $imgurl);
else
return new Button($this->maybeSplitWikiWord($text), $url, $class);
}
function makeSubmitButton ($text, $name, $class = false) {
$imgurl = $this->getButtonURL($text);
if ($imgurl)
return new SubmitImageButton($text, $name, $class, $imgurl);
else
return new SubmitButton($text, $name, $class);
}
/**
* Make button to perform action.
*
* This constructs a button which performs an action on the
* currently selected version of the current page.
* (Or anotherpage or version, if you want...)
*
* @param $action string The action to perform (e.g. 'edit', 'lock').
* This can also be the name of an "action page" like 'LikePages'.
* Alternatively you can give a hash of query args to be applied
* to the page.
*
* @param $label string Textual label for the button. If left empty,
* a suitable name will be guessed.
*
* @param $page_or_rev mixed The page to link to. This can be
* given as a string (the page name), a WikiDB_Page object, or as
* WikiDB_PageRevision object. If given as a WikiDB_PageRevision
* object, the button will link to a specific version of the
* designated page, otherwise the button links to the most recent
* version of the page.
*
* @return object A Button object.
*/
function makeActionButton ($action, $label = false, $page_or_rev = false) {
extract($this->_get_name_and_rev($page_or_rev));
if (is_array($action)) {
$attr = $action;
$action = isset($attr['action']) ? $attr['action'] : 'browse';
}
else
$attr['action'] = $action;
$class = is_safe_action($action) ? 'wikiaction' : 'wikiadmin';
if (!$label)
$label = $this->_labelForAction($action);
if ($version)
$attr['version'] = $version;
if ($action == 'browse')
unset($attr['action']);
return $this->makeButton($label, WikiURL($pagename, $attr), $class);
}
/**
* Make a "button" which links to a wiki-page.
*
* These are really just regular WikiLinks, possibly
* disguised (e.g. behind an image button) by the theme.
*
* This method should probably only be used for links
* which appear in page navigation bars, or similar places.
*
* Use linkExistingWikiWord, or LinkWikiWord for normal links.
*
* @param $page_or_rev mixed The page to link to. This can be
* given as a string (the page name), a WikiDB_Page object, or as
* WikiDB_PageRevision object. If given as a WikiDB_PageRevision
* object, the button will link to a specific version of the
* designated page, otherwise the button links to the most recent
* version of the page.
*
* @return object A Button object.
*/
function makeLinkButton ($page_or_rev, $label = false, $action = false) {
extract($this->_get_name_and_rev($page_or_rev));
$args = $version ? array('version' => $version) : false;
if ($action) $args['action'] = $action;
return $this->makeButton($label ? $label : $pagename,
WikiURL($pagename, $args), 'wiki');
}
function _get_name_and_rev ($page_or_rev) {
$version = false;
if (empty($page_or_rev)) {
global $request;
$pagename = $request->getArg("pagename");
$version = $request->getArg("version");
}
elseif (is_object($page_or_rev)) {
if (isa($page_or_rev, 'WikiDB_PageRevision')) {
$rev = $page_or_rev;
$page = $rev->getPage();
if (!$rev->isCurrent()) $version = $rev->getVersion();
}
else {
$page = $page_or_rev;
}
$pagename = $page->getName();
}
else {
$pagename = (string) $page_or_rev;
}
return compact('pagename', 'version');
}
function _labelForAction ($action) {
switch ($action) {
case 'edit': return _("Edit");
case 'diff': return _("Diff");
case 'logout': return _("Sign Out");
case 'login': return _("Sign In");
case 'lock': return _("Lock Page");
case 'unlock': return _("Unlock Page");
case 'remove': return _("Remove Page");
default:
// I don't think the rest of these actually get used.
// 'setprefs'
// 'upload' 'dumpserial' 'loadfile' 'zip'
// 'save' 'browse'
return gettext(ucfirst($action));
}
}
//----------------------------------------------------------------
var $_buttonSeparator = "\n | ";
function setButtonSeparator($separator) {
$this->_buttonSeparator = $separator;
}
function getButtonSeparator() {
return $this->_buttonSeparator;
}
////////////////////////////////////////////////////////////////
//
// CSS
//
// Notes:
//
// Based on testing with Galeon 1.2.7 (Mozilla 1.2):
// Automatic media-based style selection (via tags) only
// seems to work for the default style, not for alternate styles.
//
// Doing
//
//
//
//
// works to make it so that the printer style sheet get used
// automatically when printing (or print-previewing) a page
// (but when only when the default style is selected.)
//
// Attempts like:
//
//
//
//
// Result in two "Modern" choices when trying to select alternate style.
// If one selects the first of those choices, one gets phpwiki-modern
// both when browsing and printing. If one selects the second "Modern",
// one gets no CSS when browsing, and phpwiki-printer when printing.
//
// The Real Fix?
// =============
//
// We should probably move to doing the media based style
// switching in the CSS files themselves using, e.g.:
//
// @import url(print.css) print;
//
////////////////////////////////////////////////////////////////
function _CSSlink($title, $css_file, $media, $is_alt = false) {
// Don't set title on default style. This makes it clear to
// the user which is the default (i.e. most supported) style.
if ($is_alt and isBrowserKonqueror())
return HTML();
$link = HTML::link(array('rel' => $is_alt ? 'alternate stylesheet' : 'stylesheet',
'type' => 'text/css',
'charset' => $GLOBALS['charset'],
'href' => $this->_findData($css_file)));
if ($is_alt)
$link->setAttr('title', $title);
if ($media)
$link->setAttr('media', $media);
if ($this->DUMP_MODE) {
if (empty($this->dumped_css)) $this->dumped_css = array();
if (!in_array($css_file,$this->dumped_css)) $this->dumped_css[] = $css_file;
$link->setAttr('href', basename($link->getAttr('href')));
}
return $link;
}
/** Set default CSS source for this theme.
*
* To set styles to be used for different media, pass a
* hash for the second argument, e.g.
*
* $theme->setDefaultCSS('default', array('' => 'normal.css',
* 'print' => 'printer.css'));
*
* If you call this more than once, the last one called takes
* precedence as the default style.
*
* @param string $title Name of style (currently ignored, unless
* you call this more than once, in which case, some of the style
* will become alternate (rather than default) styles, and then their
* titles will be used.
*
* @param mixed $css_files Name of CSS file, or hash containing a mapping
* between media types and CSS file names. Use a key of '' (the empty string)
* to set the default CSS for non-specified media. (See above for an example.)
*/
function setDefaultCSS ($title, $css_files) {
if (!is_array($css_files))
$css_files = array('' => $css_files);
// Add to the front of $this->_css
unset($this->_css[$title]);
$this->_css = array_merge(array($title => $css_files), $this->_css);
}
/** Set alternate CSS source for this theme.
*
* @param string $title Name of style.
* @param string $css_files Name of CSS file.
*/
function addAlternateCSS ($title, $css_files) {
if (!is_array($css_files))
$css_files = array('' => $css_files);
$this->_css[$title] = $css_files;
}
/**
* @return string HTML for CSS.
*/
function getCSS () {
$css = array();
$is_alt = false;
foreach ($this->_css as $title => $css_files) {
ksort($css_files); // move $css_files[''] to front.
foreach ($css_files as $media => $css_file) {
$css[] = $this->_CSSlink($title, $css_file, $media, $is_alt);
if ($is_alt) break;
}
$is_alt = true;
}
return HTML($css);
}
function findTemplate ($name) {
return $this->_path . $this->_findFile("templates/$name.tmpl");
}
var $_MoreHeaders = array();
function addMoreHeaders ($element) {
array_push($this->_MoreHeaders,$element);
}
function getMoreHeaders () {
if (empty($this->_MoreHeaders))
return '';
$out = '';
//$out = "\n";
foreach ($this->_MoreHeaders as $h) {
if (is_object($h))
$out .= printXML($h);
else
$out .= "$h\n";
}
return $out;
}
var $_MoreAttr = array();
function addMoreAttr ($id,$element) {
if (empty($this->_MoreAttr) or !is_array($this->_MoreAttr[$id]))
$this->_MoreAttr[$id] = array($element);
else
array_push($this->_MoreAttr[$id],$element);
}
function getMoreAttr ($id) {
if (empty($this->_MoreAttr[$id]))
return '';
$out = '';
foreach ($this->_MoreAttr[$id] as $h) {
if (is_object($h))
$out .= printXML($h);
else
$out .= "$h";
}
return $out;
}
/**
* Custom UserPreferences:
* A list of name => _UserPreference class pairs.
* Rationale: Certain themes should be able to extend the predefined list
* of preferences. Display/editing is done in the theme specific userprefs.tmpl
* but storage/sanification/update/... must be extended to the Get/SetPreferences methods.
* These values are just ignored if another theme is used.
*/
function customUserPreferences($array) {
global $customUserPreferenceColumns; // FIXME: really a global?
if (empty($customUserPreferenceColumns)) $customUserPreferenceColumns = array();
//array('wikilens' => new _UserPreference_wikilens());
foreach ($array as $field => $prefobj) {
$customUserPreferenceColumns[$field] = $prefobj;
}
}
/** addPageListColumn(array('rating' => new _PageList_Column_rating('rating', _("Rate"))))
* Register custom PageList types for special themes, like
* 'rating' for wikilens
*/
function addPageListColumn ($array) {
global $customPageListColumns;
if (empty($customPageListColumns)) $customPageListColumns = array();
foreach ($array as $column => $obj) {
$customPageListColumns[$column] = $obj;
}
}
};
/**
* A class representing a clickable "button".
*
* In it's simplest (default) form, a "button" is just a link associated
* with some sort of wiki-action.
*/
class Button extends HtmlElement {
/** Constructor
*
* @param $text string The text for the button.
* @param $url string The url (href) for the button.
* @param $class string The CSS class for the button.
*/
function Button ($text, $url, $class = false) {
global $request;
//php5 workaround
if (check_php_version(5)) {
$this->_init('a', array('href' => $url));
} else {
$this->HtmlElement('a', array('href' => $url));
}
if ($class)
$this->setAttr('class', $class);
if ($request->getArg('frame'))
$this->setAttr('target', '_top');
$this->pushContent($GLOBALS['Theme']->maybeSplitWikiWord($text));
}
};
/**
* A clickable image button.
*/
class ImageButton extends Button {
/** Constructor
*
* @param $text string The text for the button.
* @param $url string The url (href) for the button.
* @param $class string The CSS class for the button.
* @param $img_url string URL for button's image.
* @param $img_attr array Additional attributes for the <img> tag.
*/
function ImageButton ($text, $url, $class, $img_url, $img_attr = false) {
$this->HtmlElement('a', array('href' => $url));
if ($class)
$this->setAttr('class', $class);
if (!is_array($img_attr))
$img_attr = array();
$img_attr['src'] = $img_url;
$img_attr['alt'] = $text;
$img_attr['class'] = 'wiki-button';
$img_attr['border'] = 0;
$this->pushContent(HTML::img($img_attr));
}
};
/**
* A class representing a form submit button.
*/
class SubmitButton extends HtmlElement {
/** Constructor
*
* @param $text string The text for the button.
* @param $name string The name of the form field.
* @param $class string The CSS class for the button.
*/
function SubmitButton ($text, $name = false, $class = false) {
$this->HtmlElement('input', array('type' => 'submit',
'value' => $text));
if ($name)
$this->setAttr('name', $name);
if ($class)
$this->setAttr('class', $class);
}
};
/**
* A class representing an image form submit button.
*/
class SubmitImageButton extends SubmitButton {
/** Constructor
*
* @param $text string The text for the button.
* @param $name string The name of the form field.
* @param $class string The CSS class for the button.
* @param $img_url string URL for button's image.
* @param $img_attr array Additional attributes for the <img> tag.
*/
function SubmitImageButton ($text, $name = false, $class = false, $img_url) {
$this->HtmlElement('input', array('type' => 'image',
'src' => $img_url,
'value' => $text,
'alt' => $text));
if ($name)
$this->setAttr('name', $name);
if ($class)
$this->setAttr('class', $class);
}
};
/**
* A sidebar box with title and body, narrow fixed-width.
* To represent abbrevated content of plugins, links or forms,
* like "Getting Started", "Search", "Sarch Pagename",
* "Login", "Menu", "Recent Changes", "Last comments", "Last Blogs"
* "Calendar"
* ... See http://tikiwiki.org/
*
* Usage:
* sidebar.tmpl:
* $menu = SidebarBox("Menu",HTML::dl(HTML::dt(...))); $menu->format();
* $menu = PluginSidebarBox("RecentChanges",array('limit'=>10)); $menu->format();
*/
class SidebarBox {
function SidebarBox($title, $body) {
$this->title = $title;
$this->body = $body;
}
function format() {
return WikiPlugin::makeBox($this->title, $this->body);
}
}
/**
* A sidebar box for plugins.
* Any plugin may provide a box($args=false, $request=false, $basepage=false)
* method, with the help of WikiPlugin::makeBox()
*/
class PluginSidebarBox extends SidebarBox {
var $_plugin, $_args = false, $_basepage = false;
function PluginSidebarBox($name, $args = false, $basepage = false) {
$loader = new WikiPluginLoader();
$plugin = $loader->getPlugin($name);
if (!method_exists($plugin,'box')) {
return $loader->error(sprintf(_("%s: has no box method"),
get_class($plugin)));
}
$this->_plugin =& $plugin;
$this->_args = $args ? $args : array();
$this->_basepage = $basepage;
}
function format($args = false) {
return $this->_plugin->box($args ? array_merge($this->_args,$args) : $this->_args,
$GLOBALS['request'],
$this->_basepage);
}
}
// Various boxes which are no plugins
class RelatedLinksBox extends SidebarBox {
function RelatedLinksBox($title = false, $body = '', $limit = 20) {
global $request;
$this->title = $title ? $title : _("Related Links");
$this->body = HTML($body);
$page = $request->getPage($request->getArg('pagename'));
$revision = $page->getCurrentRevision();
$page_content = $revision->getTransformedContent();
//$cache = &$page->_wikidb->_cache;
$counter = 0;
$sp = HTML::Raw('· ');
foreach ($page_content->getWikiPageLinks() as $link) {
if (!$request->_dbi->isWikiPage($link)) continue;
$this->body->pushContent($sp, WikiLink($link), HTML::br());
$counter++;
if ($limit and $counter > $limit) continue;
}
}
}
class RelatedExternalLinksBox extends SidebarBox {
function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) {
global $request;
$this->title = $title ? $title : _("External Links");
$this->body = HTML($body);
$page = $request->getPage($request->getArg('pagename'));
$cache = &$page->_wikidb->_cache;
$counter = 0;
$sp = HTML::Raw('· ');
foreach ($cache->getWikiPageLinks() as $link) {
if ($link) {
$this->body->pushContent($sp, WikiLink($link), HTML::br());
$counter++;
if ($limit and $counter > $limit) continue;
}
}
}
}
function listAvailableThemes() {
$available_themes = array();
$dir_root = 'themes';
if (defined('PHPWIKI_DIR'))
$dir_root = PHPWIKI_DIR . "/$dir_root";
$dir = dir($dir_root);
if ($dir) {
while($entry = $dir->read()) {
if (is_dir($dir_root.'/'.$entry)
&& (substr($entry,0,1) != '.')
&& $entry != 'CVS') {
array_push($available_themes, $entry);
}
}
$dir->close();
}
return $available_themes;
}
function listAvailableLanguages() {
$available_languages = array('en');
$dir_root = 'locale';
if (defined('PHPWIKI_DIR'))
$dir_root = PHPWIKI_DIR . "/$dir_root";
if ($dir = dir($dir_root)) {
while($entry = $dir->read()) {
if (is_dir($dir_root."/".$entry)
&& (substr($entry,0,1) != '.')
&& $entry != 'po'
&& $entry != 'CVS')
{
array_push($available_languages, $entry);
}
}
$dir->close();
}
return $available_languages;
}
// $Log: not supported by cvs2svn $
// Revision 1.100 2004/06/03 10:18:19 rurban
// fix FileUser locking issues, new config ENABLE_PAGEPERM
//
// Revision 1.99 2004/06/01 15:27:59 rurban
// AdminUser only ADMIN_USER not member of Administrators
// some RateIt improvements by dfrankow
// edit_toolbar buttons
//
// Revision 1.98 2004/05/27 17:49:05 rurban
// renamed DB_Session to DbSession (in CVS also)
// added WikiDB->getParam and WikiDB->getAuthParam method to get rid of globals
// remove leading slash in error message
// added force_unlock parameter to File_Passwd (no return on stale locks)
// fixed adodb session AffectedRows
// added FileFinder helpers to unify local filenames and DATA_PATH names
// editpage.php: new edit toolbar javascript on ENABLE_EDIT_TOOLBAR
//
// Revision 1.97 2004/05/18 16:23:39 rurban
// rename split_pagename to SplitPagename
//
// Revision 1.96 2004/05/13 13:48:34 rurban
// doc update for the new 1.3.10 release
//
// Revision 1.94 2004/05/13 11:52:34 rurban
// search also default buttons
//
// Revision 1.93 2004/05/12 10:49:55 rurban
// require_once fix for those libs which are loaded before FileFinder and
// its automatic include_path fix, and where require_once doesn't grok
// dirname(__FILE__) != './lib'
// upgrade fix with PearDB
// navbar.tmpl: remove spaces for IE button alignment
//
// Revision 1.92 2004/05/03 21:57:47 rurban
// locale updates: we previously lost some words because of wrong strings in
// PhotoAlbum, german rewording.
// fixed $_SESSION registering (lost session vars, esp. prefs)
// fixed ending slash in listAvailableLanguages/Themes
//
// Revision 1.91 2004/05/03 11:40:42 rurban
// put listAvailableLanguages() and listAvailableThemes() from SystemInfo and
// UserPreferences into Themes.php
//
// Revision 1.90 2004/05/02 19:12:14 rurban
// fix sf.net bug #945154 Konqueror alt css
//
// Revision 1.89 2004/04/29 21:25:45 rurban
// default theme navbar consistency: linkButtons instead of action buttons
// 3rd makeLinkButtin arg for action support
//
// Revision 1.88 2004/04/19 18:27:45 rurban
// Prevent from some PHP5 warnings (ref args, no :: object init)
// php5 runs now through, just one wrong XmlElement object init missing
// Removed unneccesary UpgradeUser lines
// Changed WikiLink to omit version if current (RecentChanges)
//
// Revision 1.87 2004/04/19 09:13:23 rurban
// new pref: googleLink
//
// Revision 1.86 2004/04/18 01:11:51 rurban
// more numeric pagename fixes.
// fixed action=upload with merge conflict warnings.
// charset changed from constant to global (dynamic utf-8 switching)
//
// Revision 1.85 2004/04/12 13:04:50 rurban
// added auth_create: self-registering Db users
// fixed IMAP auth
// removed rating recommendations
// ziplib reformatting
//
// Revision 1.84 2004/04/10 02:30:49 rurban
// Fixed gettext problem with VIRTUAL_PATH scripts (Windows only probably)
// Fixed "cannot setlocale..." (sf.net problem)
//
// Revision 1.83 2004/04/09 17:49:03 rurban
// Added PhpWiki RssFeed to Sidebar
// sidebar formatting
// some browser dependant fixes (old-browser support)
//
// Revision 1.82 2004/04/06 20:00:10 rurban
// Cleanup of special PageList column types
// Added support of plugin and theme specific Pagelist Types
// Added support for theme specific UserPreferences
// Added session support for ip-based throttling
// sql table schema change: ALTER TABLE session ADD sess_ip CHAR(15);
// Enhanced postgres schema
// Added DB_Session_dba support
//
// Revision 1.81 2004/04/01 15:57:10 rurban
// simplified Sidebar theme: table, not absolute css positioning
// added the new box methods.
// remaining problems: large left margin, how to override _autosplitWikiWords in Template only
//
// Revision 1.80 2004/03/30 02:14:03 rurban
// fixed yet another Prefs bug
// added generic PearDb_iter
// $request->appendValidators no so strict as before
// added some box plugin methods
// PageList commalist for condensed output
//
// Revision 1.79 2004/03/24 19:39:02 rurban
// php5 workaround code (plus some interim debugging code in XmlElement)
// php5 doesn't work yet with the current XmlElement class constructors,
// WikiUserNew does work better than php4.
// rewrote WikiUserNew user upgrading to ease php5 update
// fixed pref handling in WikiUserNew
// added Email Notification
// added simple Email verification
// removed emailVerify userpref subclass: just a email property
// changed pref binary storage layout: numarray => hash of non default values
// print optimize message only if really done.
// forced new cookie policy: delete pref cookies, use only WIKI_ID as plain string.
// prefs should be stored in db or homepage, besides the current session.
//
// Revision 1.78 2004/03/18 22:32:33 rurban
// work to make it php5 compatible
//
// Revision 1.77 2004/03/08 19:30:01 rurban
// fixed Theme->getButtonURL
// AllUsers uses now WikiGroup (also DB User and DB Pref users)
// PageList fix for empty pagenames
//
// Revision 1.76 2004/03/08 18:17:09 rurban
// added more WikiGroup::getMembersOf methods, esp. for special groups
// fixed $LDAP_SET_OPTIONS
// fixed _AuthInfo group methods
//
// Revision 1.75 2004/03/01 09:34:37 rurban
// fixed button path logic: now fallback to default also
//
// Revision 1.74 2004/02/28 21:14:08 rurban
// generally more PHPDOC docs
// see http://xarch.tu-graz.ac.at/home/rurban/phpwiki/xref/
// fxied WikiUserNew pref handling: empty theme not stored, save only
// changed prefs, sql prefs improved, fixed password update,
// removed REPLACE sql (dangerous)
// moved gettext init after the locale was guessed
// + some minor changes
//
// Revision 1.73 2004/02/26 03:22:05 rurban
// also copy css and images with XHTML Dump
//
// Revision 1.72 2004/02/26 02:25:53 rurban
// fix empty and #-anchored links in XHTML Dumps
//
// Revision 1.71 2004/02/15 21:34:37 rurban
// PageList enhanced and improved.
// fixed new WikiAdmin... plugins
// editpage, Theme with exp. htmlarea framework
// (htmlarea yet committed, this is really questionable)
// WikiUser... code with better session handling for prefs
// enhanced UserPreferences (again)
// RecentChanges for show_deleted: how should pages be deleted then?
//
// Revision 1.70 2004/01/26 09:17:48 rurban
// * changed stored pref representation as before.
// the array of objects is 1) bigger and 2)
// less portable. If we would import packed pref
// objects and the object definition was changed, PHP would fail.
// This doesn't happen with an simple array of non-default values.
// * use $prefs->retrieve and $prefs->store methods, where retrieve
// understands the interim format of array of objects also.
// * simplified $prefs->get() and fixed $prefs->set()
// * added $user->_userid and class '_WikiUser' portability functions
// * fixed $user object ->_level upgrading, mostly using sessions.
// this fixes yesterdays problems with loosing authorization level.
// * fixed WikiUserNew::checkPass to return the _level
// * fixed WikiUserNew::isSignedIn
// * added explodePageList to class PageList, support sortby arg
// * fixed UserPreferences for WikiUserNew
// * fixed WikiPlugin for empty defaults array
// * UnfoldSubpages: added pagename arg, renamed pages arg,
// removed sort arg, support sortby arg
//
// Revision 1.69 2003/12/05 01:32:28 carstenklapp
// New feature: Easier to run multiple wiks off of one set of code. Name
// your logo and signature image files "YourWikiNameLogo.png" and
// "YourWikiNameSignature.png" and put them all into
// themes/default/images. YourWikiName should match what is defined as
// WIKI_NAME in index.php. In case the image is not found, the default
// shipped with PhpWiki will be used.
//
// Revision 1.68 2003/03/04 01:53:30 dairiki
// Inconsequential decrufting.
//
// Revision 1.67 2003/02/26 03:40:22 dairiki
// New action=create. Essentially the same as action=edit, except that if the
// page already exists, it falls back to action=browse.
//
// This is for use in the "question mark" links for unknown wiki words
// to avoid problems and confusion when following links from stale pages.
// (If the "unknown page" has been created in the interim, the user probably
// wants to view the page before editing it.)
//
// Revision 1.66 2003/02/26 00:10:26 dairiki
// More/better/different checks for bad page names.
//
// Revision 1.65 2003/02/24 22:41:57 dairiki
// Fix stupid typo.
//
// Revision 1.64 2003/02/24 22:06:14 dairiki
// Attempts to fix auto-selection of printer CSS when printing.
// See new comments lib/Theme.php for more details.
// Also see SF patch #669563.
//
// Revision 1.63 2003/02/23 03:37:05 dairiki
// Stupid typo/bug fix.
//
// Revision 1.62 2003/02/21 04:14:52 dairiki
// New WikiLink type 'if_known'. This gives linkified name if page
// exists, otherwise, just plain text.
//
// Revision 1.61 2003/02/18 21:52:05 dairiki
// Fix so that one can still link to wiki pages with # in their names.
// (This was made difficult by the introduction of named tags, since
// '[Page #1]' is now a link to anchor '1' in page 'Page'.
//
// Now the ~ escape for page names should work: [Page ~#1].
//
// Revision 1.60 2003/02/15 01:59:47 dairiki
// Theme::getCSS(): Add Default-Style HTTP(-eqiv) header in attempt
// to fix default stylesheet selection on some browsers.
// For details on the Default-Style header, see:
// http://home.dairiki.org/docs/html4/present/styles.html#h-14.3.2
//
// Revision 1.59 2003/01/04 22:30:16 carstenklapp
// New: display a "Never edited." message instead of an invalid epoch date.
//
// (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:
?>