From: Reini U. <ru...@us...> - 2004-04-06 20:13:04
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30337/lib/plugin Modified Files: RateIt.php UserPreferences.php WikiAdminRename.php Log Message: 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 Index: RateIt.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/RateIt.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -2 -b -p -d -r1.3 -r1.4 --- RateIt.php 1 Apr 2004 06:29:51 -0000 1.3 +++ RateIt.php 6 Apr 2004 20:00:11 -0000 1.4 @@ -60,4 +60,14 @@ define('RATING_STORAGE','SQL'); * metadata (default). * + * Recommender Engines: + * Recommendation/Prediction is a special field of "Data Mining" + * For a list of (also free) software see + * http://www.the-data-mine.com/bin/view/Software/WebIndex + * - movielens: (Java Server) will be gpl'd in summer 2004 (weighted) + * - suggest: is free for non-commercial use, available as compiled library + * (non-weighted) + * - Autoclass: simple public domain C library + * - MLC++: C++ library http://www.sgi.com/tech/mlc/ + * * Usage: <?plugin RateIt ?> to enable rating on this page * Note: The wikilens theme must be enabled, to enable this plugin! @@ -737,4 +747,13 @@ function deleteRating(actionImg, page, d // $Log$ +// Revision 1.4 2004/04/06 20:00:11 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.3 2004/04/01 06:29:51 rurban // better wording Index: UserPreferences.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/UserPreferences.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -2 -b -p -d -r1.23 -r1.24 --- UserPreferences.php 2 Apr 2004 15:06:56 -0000 1.23 +++ UserPreferences.php 6 Apr 2004 20:00:11 -0000 1.24 @@ -25,4 +25,7 @@ rcs_id('$Id$'); * This must be used in the page "UserPreferences". * Prefs are stored in metadata within the user's home page or in a cookie. + * + * TODO: + * Certain themes should be able to extend the predefined list of preferences. */ class WikiPlugin_UserPreferences @@ -114,4 +117,5 @@ extends WikiPlugin $errmsg .= " " ._("No changes."); } else { + $request->_setUser($user); $pref = $user->_prefs; $errmsg .= sprintf(_("%d UserPreferences fields successfully updated."), $num); @@ -167,4 +171,13 @@ extends WikiPlugin // $Log$ +// Revision 1.24 2004/04/06 20:00:11 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.23 2004/04/02 15:06:56 rurban // fixed a nasty ADODB_mysql session update bug Index: WikiAdminRename.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/WikiAdminRename.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -2 -b -p -d -r1.9 -r1.10 --- WikiAdminRename.php 12 Mar 2004 13:31:43 -0000 1.9 +++ WikiAdminRename.php 6 Apr 2004 20:00:11 -0000 1.10 @@ -23,5 +23,5 @@ rcs_id('$Id$'); /** * Usage: <?plugin WikiAdminRename ?> or called via WikiAdminSelect - * Author: Reini Urban <ru...@x-...> + * @author: Reini Urban <ru...@x-...> * * KNOWN ISSUES: @@ -137,5 +137,11 @@ extends WikiPlugin_WikiAdminSelect $args['info'] = "checkbox,pagename,renamed_pagename"; } - $pagelist = new PageList_Selectable($args['info'], $exclude); + $pagelist = new PageList_Selectable + ( + $args['info'], $exclude, + array('types' => + array('renamed_pagename' + => new _PageList_Column_renamed_pagename('rename', _("Rename to")), + ))); $pagelist->addPageList($pages); @@ -191,8 +197,33 @@ extends WikiPlugin_WikiAdminSelect return $header; } - } +// moved from lib/PageList.php +class _PageList_Column_renamed_pagename extends _PageList_Column { + function _getValue ($page_handle, &$revision_handle) { + $post_args = $GLOBALS['request']->getArg('admin_rename'); + $value = str_replace($post_args['from'], $post_args['to'],$page_handle->getName()); + $div = HTML::div(" => ",HTML::input(array('type' => 'text', + 'name' => 'rename[]', + 'value' => $value))); + $new_page = $GLOBALS['request']->getPage($value); + if ($new_page->exists()) { + $div->setAttr('class','error'); + $div->setAttr('title',_("This page already exists")); + } + return $div; + } +}; + // $Log$ +// Revision 1.10 2004/04/06 20:00:11 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.9 2004/03/12 13:31:43 rurban // enforce PagePermissions, errormsg if not Admin |