From: <var...@us...> - 2015-02-27 17:54:45
|
Revision: 9574 http://sourceforge.net/p/phpwiki/code/9574 Author: vargenau Date: 2015-02-27 17:54:34 +0000 (Fri, 27 Feb 2015) Log Message: ----------- Remove CVS backend Modified Paths: -------------- trunk/config/config-dist.ini trunk/configurator.php trunk/lib/IniConfig.php trunk/lib/TextSearchQuery.php trunk/lib/WikiDB.php trunk/lib/WikiTheme.php trunk/lib/WikiUser/Db.php trunk/lib/interwiki.map trunk/lib/plugin/PageDump.php trunk/lib/plugin/SystemInfo.php trunk/lib/stdlib.php trunk/locale/Makefile trunk/locale/README.de.txt trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/fr/pgsrc/Aide%2FPluginRessourcesRss trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo trunk/pgsrc/Help%2FPageDumpPlugin trunk/pgsrc/ReleaseNotes trunk/themes/Sidebar/themeinfo.php trunk/themes/fusionforge/interwiki.map trunk/themes/fusionforge/wikilens.js trunk/themes/wikilens/wikilens.js Removed Paths: ------------- trunk/lib/WikiDB/backend/cvs.php trunk/lib/WikiDB/cvs.php trunk/tests/unit_test_backend_cvs.php Modified: trunk/config/config-dist.ini =================================================================== --- trunk/config/config-dist.ini 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/config/config-dist.ini 2015-02-27 17:54:34 UTC (rev 9574) @@ -400,7 +400,6 @@ ; dba: use one of the standard UNIX dbm libraries. Use BerkeleyDB (db3,4) (fastest) ; file: use a serialized file database. (easiest) ; flatfile: use a flat file database. (experimental, readable, slow) -; cvs: use a CVS server to store everything. (experimental, slowest, not recommended) DATABASE_TYPE = dba ; Prefix for filenames or table names Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/configurator.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -638,14 +638,12 @@ 'SQL' => "SQL PEAR", 'ADODB' => "SQL ADODB", 'PDO' => "PDO (php5 only)", - 'file' => "flatfile", - 'cvs' => "CVS File handler")/*, " + 'file' => "flatfile")/*, " Select the database backend type: Choose dba (default) to use one of the standard UNIX dba libraries. This is the fastest. Choose ADODB or SQL to use an SQL database with ADODB or PEAR. Choose PDO on php5 to use an SQL database. (experimental, no paging yet) flatfile is simple and slow. -CVS is highly experimental and slow. Recommended is dba or SQL: PEAR or ADODB."*/); $properties["SQL DSN Setup"] = Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/IniConfig.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -318,7 +318,7 @@ unset($rsdef[$item]); } } - $valid_database_types = array('SQL', 'ADODB', 'PDO', 'dba', 'file', 'flatfile', 'cvs', 'cvsclient'); + $valid_database_types = array('SQL', 'ADODB', 'PDO', 'dba', 'file', 'flatfile'); if (!in_array(DATABASE_TYPE, $valid_database_types)) trigger_error(sprintf("Invalid DATABASE_TYPE=%s. Choose one of %s", DATABASE_TYPE, join(",", $valid_database_types)), Modified: trunk/lib/TextSearchQuery.php =================================================================== --- trunk/lib/TextSearchQuery.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/TextSearchQuery.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -403,7 +403,6 @@ * Check the symbolic definition query against unwanted functions and characters. * "population < 20000 and area > 1000000" vs * "area > 1000000 and mail($me,file("/etc/passwd"),...)" - * http://localhost/wikicvs/SemanticSearch?attribute=*&attr_op=<0 and find(1)>&s=-0.01&start_debug=1 */ function check_query($query) { Deleted: trunk/lib/WikiDB/backend/cvs.php =================================================================== --- trunk/lib/WikiDB/backend/cvs.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/WikiDB/backend/cvs.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,1031 +0,0 @@ -<?php - -/** - * Backend for handling CVS repository. - * - * ASSUMES: that the shell commands 'cvs', 'grep', 'rm', are all located - * ASSUMES: in the path of the server calling this script. - * - * Author: Gerrit Riessen, ger...@op... - */ - -require_once 'lib/WikiDB/backend.php'; -require_once 'lib/ErrorManager.php'; - -/** - * Constants used by the CVS backend - **/ -// these are the parameters defined in db_params -define('CVS_DOC_DIR', 'doc_dir'); -define('CVS_REPOSITORY', 'repository'); -define('CVS_CHECK_FOR_REPOSITORY', 'check_for_repository'); -define('CVS_DEBUG_FILE', 'debug_file'); -define('CVS_PAGE_SOURCE', 'pgsrc'); -define('CVS_MODULE_NAME', 'module_name'); - -// these are the things that are defined in the page hash -// CMD == Cvs Meta Data -define('CMD_LAST_MODIFIED', 'lastmodified'); -define('CMD_CONTENT', '%content'); -define('CMD_CREATED', 'created'); -define('CMD_VERSION', 'version'); -define('CMD_AUTHOR', 'author'); -define('CMD_LINK_ATT', '_links_'); - -// file names used to store specific information -define('CVS_MP_FILE', '.most_popular'); -define('CVS_MR_FILE', '.most_recent'); - -class WikiDB_backend_cvs - extends WikiDB_backend -{ - public $_docDir; - public $_repository; - public $_module_name; - public $_debug_file; - - /** - * In the following parameters should be defined in dbparam: - * . wiki ==> directory where the pages should be stored - * this is not the CVS repository location - * . repository ==> local directory where the repository should be - * created. This can also be a :pserver: but then - * set check_for_repository to false and checkout - * the documents beforehand. (This is basically CVSROOT) - * . check_for_repository ==> boolean flag to indicate whether the - * repository should be created, this only - * applies to local directories, for pserver - * set this to false and check out the - * document base beforehand - * . debug_file ==> file name where debug information should be sent. - * If file doesn't exist then it's created, if this - * is empty, then debugging is turned off. - * . pgsrc ==> directory name where the default wiki pages are stored. - * This is only required if the backend is to create a - * new CVS repository. - * - * The class also adds a parameter 'module_name' to indicate the name - * of the cvs module that is being used to version the documents. The - * module_name is assumed to be the base name of directory given in - * wiki, e.g. if wiki == '/some/path/to/documents' then module_name - * becomes 'documents' and this module will be created in the CVS - * repository or assumed to exist. If on the other hand the parameter - * already exists, then it is not overwritten. - */ - function __construct($dbparam) - { - // setup all the instance values. - $this->_docDir = $dbparam{CVS_DOC_DIR}; - $this->_repository = $dbparam{CVS_REPOSITORY}; - if (!$dbparam{CVS_MODULE_NAME}) { - $this->_module_name = basename($this->_docDir); - $dbparam{CVS_MODULE_NAME} = $this->_module_name; - } else { - $this->_module_name = $dbparam{CVS_MODULE_NAME}; - } - $this->_debug_file = $dbparam{CVS_DEBUG_FILE}; - - if ($dbparam{CVS_CHECK_FOR_REPOSITORY} - && !(is_dir($this->_repository) - && is_dir($this->_repository . "/CVSROOT") - && is_dir($this->_repository . "/" . $this->_module_name)) - ) { - - $this->_cvsDebug(sprintf("Creating new repository [%s]", $this->_repository)); - - // doesn't exist, need to create it and the replace the wiki - // document directory. - $this->_mkdir($this->_repository, 0775); - - // assume that the repository is a local directory, prefix :local: - if (!ereg("^:local:", $this->_repository)) { - $this->_repository = ":local:" . $this->_repository; - } - - $cmdLine = sprintf("cvs -d \"%s\" init", $this->_repository); - $this->_execCommand($cmdLine, $cmdOutput, true); - - $this->_mkdir($this->_docDir, 0775); - $cmdLine = sprintf("cd %s; cvs -d \"%s\" import -m no_message " - . "%s V R", $this->_docDir, $this->_repository, - $this->_module_name); - $this->_execCommand($cmdLine, $cmdOutput, true); - - // remove the wiki directory and check it out from the - // CVS repository - $cmdLine = sprintf("rm -fr %s; cd %s; cvs -d \"%s\" co %s", - $this->_docDir, dirname($this->_docDir), - $this->_repository, $this->_module_name); - $this->_execCommand($cmdLine, $cmdOutput, true); - - // add the default pages using the update_pagedata - $metaData = array(); - $metaData[$AUTHOR] = "PhpWiki -- CVS Backend"; - - if (is_dir($dbparam[CVS_PAGE_SOURCE])) { - $d = opendir($dbparam[CVS_PAGE_SOURCE]); - while ($entry = readdir($d)) { - $filename = $dbparam[CVS_PAGE_SOURCE] . "/" . $entry; - $this->_cvsDebug(sprintf("Found [%s] in [%s]", $entry, $dbparam[CVS_PAGE_SOURCE])); - - if (is_file($filename)) { - $metaData[CMD_CONTENT] = join('', file($filename)); - $this->update_pagedata($entry, $metaData); - } - } - closedir($d); - } - - // ensure that the results of the is_dir are cleared - clearstatcache(); - } - } - - /** - * Return: metadata about page - */ - function get_pagedata($pagename) - { - // the metadata information about a page is stored in the - // CVS directory of the document root in serialized form. The - // file always has the name, i.e. '_$pagename'. - $metaFile = $this->_docDir . "/CVS/_" . $pagename; - - if (file_exists($metaFile)) { - - $megaHash = - unserialize(join('', $this->_readFileWithPath($metaFile))); - - $filename = $this->_docDir . "/" . $pagename; - if (file_exists($filename)) { - $megaHash[CMD_CONTENT] = $this->_readFileWithPath($filename); - } else { - $megaHash[CMD_CONTENT] = ""; - } - - $this->_updateMostRecent($pagename); - $this->_updateMostPopular($pagename); - - return $megaHash; - } else { - return false; - } - } - - /** - * This will create a new page if page being requested does not - * exist. - */ - function update_pagedata($pagename, $newdata = array()) - { - // check argument - if (!is_array($newdata)) { - trigger_error("update_pagedata: Argument 'newdata' was not array", - E_USER_WARNING); - } - - // retrieve the meta data - $metaData = $this->get_pagedata($pagename); - - if (!$metaData) { - $this->_cvsDebug("update_pagedata: no meta data found"); - // this means that the page does not exist, we need to create - // it. - $metaData = array(); - - $metaData[CMD_CREATED] = time(); - $metaData[CMD_VERSION] = "1"; - - if (!isset($newdata[CMD_CONTENT])) { - $metaData[CMD_CONTENT] = ""; - } else { - $metaData[CMD_CONTENT] = $newdata[CMD_CONTENT]; - } - - // create an empty page ... - $this->_writePage($pagename, $metaData[CMD_CONTENT]); - $this->_addPage($pagename); - - // make sure that the page is written and committed a second time - unset($newdata[CMD_CONTENT]); - unset($metaData[CMD_CONTENT]); - } - - // change any meta data information - foreach ($newdata as $key => $value) { - if ($value == false || empty($value)) { - unset($metaData[$key]); - } else { - $metaData[$key] = $value; - } - } - - // update the page data, if required. Use newdata because it could - // be empty and thus unset($metaData[CMD_CONTENT]). - if (isset($newdata[CMD_CONTENT])) { - $this->_writePage($pagename, $newdata[CMD_CONTENT]); - } - - // remove any content from the meta data before storing it - unset($metaData[CMD_CONTENT]); - $metaData[CMD_LAST_MODIFIED] = time(); - - $metaData[CMD_VERSION] = $this->_commitPage($pagename, $metaData); - $this->_writeMetaInfo($pagename, $metaData); - } - - function get_latest_version($pagename) - { - $metaData = $this->get_pagedata($pagename); - if ($metaData) { - // the version number is everything after the '1.' - return $metaData[CMD_VERSION]; - } else { - $this->_cvsDebug(sprintf("get_latest_versioned FAILED for [%s]", $pagename)); - return 0; - } - } - - function get_previous_version($pagename, $version) - { - // cvs increments the version numbers, so this is real easy ;-) - return ($version > 0 ? $version - 1 : 0); - } - - /** - * the version parameter is assumed to be everything after the '1.' - * in the CVS versioning system. - */ - function get_versiondata($pagename, $version, $want_content = false) - { - $this->_cvsDebug("get_versiondata: [$pagename] [$version] [$want_content]"); - - $filedata = ""; - if ($want_content) { - // retrieve the version from the repository - $cmdLine = sprintf("cvs -d \"%s\" co -p -r 1.%d %s/%s 2>&1", - $this->_repository, $version, - $this->_module_name, $pagename); - $this->_execCommand($cmdLine, $filedata, true); - - // TODO: DEBUG: 5 is a magic number here, depending on the - // TODO: DEBUG: version of cvs used here, 5 might have to - // TODO: DEBUG: change. Basically find a more reliable way of - // TODO: DEBUG: doing this. - // the first 5 lines contain various bits of - // administrative information that can be ignored. - for ($i = 0; $i < 5; $i++) { - array_shift($filedata); - } - } - - /** - * Now obtain the rest of the pagehash information, this is contained - * in the log message for the revision in serialized form. - */ - $cmdLine = sprintf("cd %s; cvs log -r1.%d %s", $this->_docDir, - $version, $pagename); - $this->_execCommand($cmdLine, $logdata, true); - - // shift log data until we get to the 'revision X.X' line - // FIXME: ensure that we don't enter an endless loop here - while (!ereg("^revision 1.([0-9]+)$", $logdata[0], $revInfo)) { - array_shift($logdata); - } - - // serialized hash information now stored in position 2 - $rVal = unserialize(_unescape($logdata[2])); - - // version information is incorrect - $rVal[CMD_VERSION] = $revInfo[1]; - $rVal[CMD_CONTENT] = $filedata; - - foreach ($rVal as $key => $value) { - $this->_cvsDebug("$key == [$value]"); - } - - return $rVal; - } - - /** - * See ADODB for a better delete_page(), which can be undone and is seen in RecentChanges. - * See backend.php - */ - //function delete_page($pagename) { $this->purge_page($pagename); } - - /** - * This returns false if page was not deleted or could not be deleted - * else return true. - */ - function purge_page($pagename) - { - $this->_cvsDebug("delete_page [$pagename]"); - $filename = $this->_docDir . "/" . $pagename; - $metaFile = $this->_docDir . "/CVS/_" . $pagename; - - // obtain a write block before deleting the file - if ($this->_deleteFile($filename) == false) { - return false; - } - - $this->_deleteFile($metaFile); - - $this->_removePage($pagename); - - return true; - } - - /** - * For now delete and create a new one. - * - * This returns false if page was not renamed, - * else return true. - */ - function rename_page($pagename, $to) - { - $this->_cvsDebug("rename_page [$pagename,$to]"); - $data = get_pagedata($pagename); - if (isset($data['pagename'])) - $data['pagename'] = $to; - //$version = $this->get_latest_version($pagename); - //$vdata = get_versiondata($pagename, $version, 1); - //$data[CMD_CONTENT] = $vdata[CMD_CONTENT]; - $this->delete_page($pagename); - $this->update_pagedata($to, $data); - return true; - } - - function delete_versiondata($pagename, $version) - { - // TODO: Not Implemented. - // TODO: This is, for CVS, difficult because it implies removing a - // TODO: revision somewhere in the middle of a revision tree, and - // TODO: this is basically not possible! - trigger_error("delete_versiondata: Not Implemented", E_USER_WARNING); - } - - function set_versiondata($pagename, $version, $data) - { - // TODO: Not Implemented. - // TODO: requires changing the log(commit) message for a particular - // TODO: version and this can't be done??? (You can edit the repository - // TODO: file directly but i don't know of a way of doing it via - // TODO: the cvs tools). - trigger_error("set_versiondata: Not Implemented", E_USER_WARNING); - } - - function update_versiondata($pagename, $version, $newdata) - { - // TODO: same problem as set_versiondata - trigger_error("set_versiondata: Not Implemented", E_USER_WARNING); - } - - function set_links($pagename, $links) - { - // TODO: needs to be tested .... - $megaHash = get_pagedata($pagename); - $megaHash[CMD_LINK_ATT] = $links; - $this->_writeMetaInfo($pagename, $megaHash); - } - - function get_links($pagename, $reversed = true, $include_empty = false, - $sortby = '', $limit = '', $exclude = '') - { - // TODO: ignores the $reversed argument and returns - // TODO: the value of _links_ attribute of the meta information - // TODO: to implement a reversed version, i guess, we going to - // TODO: need to do a grep on all files for the pagename in - // TODO: in question and return all those page names that contained - // TODO: the required pagename! - $megaHash = get_pagedata($pagename); - return $megaHash[CMD_LINK_ATT]; - } - - /* function get_all_revisions($pagename) { - // TODO: should replace this with something more efficient - include_once 'lib/WikiDB/backend/dumb/AllRevisionsIter.php'; - return new WikiDB_backend_dumb_AllRevisionsIter($this, $pagename); - } */ - - public function get_all_pages($include_empty = false, - $sortby = '', $limit = '', $exclude = '') - { - // FIXME: this ignores the parameters. - return new Cvs_Backend_Array_Iterator( - $this->_getAllFileNamesInDir($this->_docDir)); - } - - public function text_search($search, $fulltext = false, - $sortby = '', $limit = '', $exclude = '') - { - if ($fulltext) { - $iter = new Cvs_Backend_Full_Search_Iterator( - $this->_getAllFileNamesInDir($this->_docDir), - $search, - $this->_docDir); - $iter->stoplisted =& $search->stoplisted; - return $iter; - } else { - return new Cvs_Backend_Title_Search_Iterator( - $this->_getAllFileNamesInDir($this->_docDir), - $search); - } - } - - public function most_popular($limit = 20, $sortby = '') - { - // TODO: needs to be tested ... - $mp = $this->_getMostPopular(); - if ($limit < 0) { - asort($mp, SORT_NUMERIC); - $limit = -$limit; - } else { - arsort($mp, SORT_NUMERIC); - } - $returnVal = array(); - - while ((list($key, $val) = each($a)) && $limit > 0) { - $returnVal[] = $key; - $limit--; - } - return $returnVal; - } - - /** - * This only accepts the 'since' and 'limit' attributes, everything - * else is ignored. - */ - public function most_recent($params) - { - // TODO: needs to be tested ... - // most recent are those pages with the highest time value ... - $mr = $this->_getMostRecent(); - $rev = false; - $returnVal = array(); - if (isset($params['limit'])) { - $limit = $params['limit']; - $rev = $limit < 0; - } - if ($rev) { - arsort($mr, SORT_NUMERIC); - } else { - asort($mr, SORT_NUMERIC); - } - if (isset($limit)) { - while ((list($key, $val) = each($a)) && $limit > 0) { - $returnVal[] = $key; - $limit--; - } - } elseif (isset($params['since'])) { - while ((list($key, $val) = each($a))) { - - if ($val > $params['since']) { - $returnVal[] = $key; - } - } - } - - return new Cvs_Backend_Array_Iterator($returnVal); - } - - function lock($tables = array(), $write_lock = true) - { - // TODO: to be implemented - trigger_error("lock: Not Implemented", E_USER_WARNING); - } - - function unlock($tables = array(), $force = false) - { - // TODO: to be implemented - trigger_error("unlock: Not Implemented", E_USER_WARNING); - } - - function close() - { - } - - function sync() - { - } - - function optimize() - { - return true; - } - - /** - * What we do here is take a listing of the documents directory and - * check that each page has metadata file. If not, then a metadata - * file is created for the page. - * - * This can happen if rebuild() was called and someone has added - * files to the CVS repository not via PhpWiki. These files are - * added to the document directory but without any metadata files. - */ - function check() - { - // TODO: - // TODO: test this .... i.e. add test to unit test file. - // TODO: - $page_names = $this->_getAllFileNamesInDir($this->_docDir); - $meta_names = $this->_getAllFileNamesInDir($this->_docDir . "/CVS"); - - array_walk($meta_names, '_strip_leading_underscore'); - reset($meta_names); - $no_meta_files = array_diff($page_names, $meta_names); - - array_walk($no_meta_files, '_create_meta_file', $this); - - return true; - } - - /** - * Do an update of the CVS repository - */ - function rebuild() - { - // TODO: - // TODO: test this .... i.e. add test to unit test file. - // TODO: - $cmdLine = sprintf("cd %s; cvs update -d 2>&1", $this->_docDir); - $this->_execCommand($cmdLine, $cmdOutput, true); - return true; - } - - // - // ..-.-..-.-..-.-.. .--..-......-.--. --.-....----..... - // The rest are all internal methods, not to be used - // directly. - // ..-.-..-.-..-.-.. .--..-......-.--. --.-....----..... - // - function _create_meta_file($page_name, $key, &$backend) - { - // this is used as part of an array walk and therefore takes - // the backend argument - $backend->_cvsDebug(sprintf("Creating meta file for [%s]", $page_name)); - $backend->update_pagedata($page_name, array()); - } - - function _strip_leading_underscore(&$item) - { - $item = ereg_replace("^_", "", $item); - } - - /** - * update the most popular information by incrementing the count - * for the following page. If the page was not defined, it is entered - * with a value of 1. - */ - function _updateMostPopular($pagename) - { - $mp = $this->_getMostPopular(); - if (isset($mp[$pagename])) { - $mp[$pagename]++; - } else { - $mp[$pagename] = 1; - } - $this->_writeFileWithPath($this->_docDir . "/CVS/" . CVS_MP_FILE, - serialize($mp)); - } - - /** - * Returns an array containing the most popular information. This - * creates the most popular file if it does not exist. - */ - function _getMostPopular() - { - $mostPopular = $this->_docDir . "/CVS/" . CVS_MP_FILE; - if (!file_exists($mostPopular)) { - $this->_writeFileWithPath($mostPopular, serialize(array())); - } - return unserialize(join('', $this->_readFileWithPath($mostPopular))); - } - - function _getMostRecent() - { - $mostRecent = $this->_docDir . "/CVS/" . CVS_MR_FILE; - if (!file_exists($mostRecent)) { - $this->_writeFileWithPath($mostRecent, serialize(array())); - } - return unserialize(join('', $this->_readFileWithPath($mostRecent))); - } - - function _updateMostRecent($pagename) - { - $mr = $this->_getMostRecent(); - $mr[$pagename] = time(); - $this->_writeFileWithPath($this->_docDir . "/CVS/" . CVS_MR_FILE, - serialize($mr)); - } - - function _writeMetaInfo($pagename, $hashInfo) - { - $this->_writeFileWithPath($this->_docDir . "/CVS/_" . $pagename, - serialize($hashInfo)); - } - - function _writePage($pagename, $content) - { - $this->_writeFileWithPath($this->_docDir . "/" . $pagename, $content); - } - - function _removePage($pagename) - { - $cmdLine = sprintf("cd %s; cvs remove %s 2>&1; cvs commit -m '%s' " - . "%s 2>&1", $this->_docDir, $pagename, - "remove page", $pagename); - - $this->_execCommand($cmdLine, $cmdRemoveOutput, true); - } - - /** - * this returns the new version number of the file. - */ - function _commitPage($pagename, &$meta_data) - { - $cmdLine = sprintf("cd %s; cvs commit -m \"%s\" %s 2>&1", - $this->_docDir, - escapeshellcmd(serialize($meta_data)), - $pagename); - $this->_execCommand($cmdLine, $cmdOutput, true); - - $cmdOutput = implode("\n", $cmdOutput); - $revInfo = array(); - ereg("\nnew revision: 1[.]([0-9]+); previous revision: ", $cmdOutput, - $revInfo); - - $this->_cvsDebug("CP: revInfo 0: $revInfo[0]"); - $this->_cvsDebug("CP: $cmdOutput"); - if (isset($revInfo[1])) { - $this->_cvsDebug("CP: got revision information"); - return $revInfo[1]; - } else { - ereg("\ninitial revision: 1[.]([0-9]+)", $cmdOutput, $revInfo); - if (isset($revInfo[1])) { - $this->_cvsDebug("CP: is initial release"); - return 1; - } - $this->_cvsDebug("CP: returning old version"); - return $meta_data[CMD_VERSION]; - } - } - - function _addPage($pagename) - { - // TODO: need to add a check for the mimetype so that binary - // TODO: files are added as binary files - $cmdLine = sprintf("cd %s; cvs add %s 2>&1", $this->_docDir, - $pagename); - $this->_execCommand($cmdLine, $cmdAddOutput, true); - } - - /** - * Returns an array containing all the names of files contained - * in a particular directory. The list is sorted according the - * string representation of the filenames. - */ - function _getAllFileNamesInDir($dirName) - { - $namelist = array(); - $d = opendir($dirName); - while ($entry = readdir($d)) { - $namelist[] = $entry; - } - closedir($d); - sort($namelist, SORT_STRING); - return $namelist; - } - - /** - * Recursively create all directories. - */ - function _mkdir($path, $mode) - { - $directoryName = dirname($path); - if ($directoryName != "/" && $directoryName != "\\" - && !is_dir($directoryName) && $directoryName != "" - ) { - $rVal = $this->_mkdir($directoryName, $mode); - } else { - $rVal = true; - } - - return ($rVal && @mkdir($path, $mode)); - } - - /** - * Recursively create all directories and then the file. - */ - function _createFile($path, $mode) - { - $this->_mkdir(dirname($path), $mode); - touch($path); - chmod($path, $mode); - } - - /** - * The lord giveth, and the lord taketh. - */ - function _deleteFile($filename) - { - if ($fd = fopen($filename, 'a')) { - - $locked = flock($fd, 2); // Exclusive blocking lock - - if (!$locked) { - $this->_cvsError("Unable to delete file, lock was not obtained.", - __LINE__, $filename, EM_NOTICE_ERRORS); - } - - if (($rVal = unlink($filename)) != 0) { - $this->_cvsDebug("[$filename] --> Unlink returned [$rVal]"); - } - - return $rVal; - } else { - $this->_cvsError("deleteFile: Unable to open file", - __LINE__, $filename, EM_NOTICE_ERRORS); - return false; - } - } - - /** - * Called when something happened that causes the CVS backend to - * fail. - */ - function _cvsError($msg = "no message", - $errline = 0, - $errfile = "lib/WikiDB/backend/cvs.php", - $errno = EM_FATAL_ERRORS) - { - $err = new PhpError($errno, "[CVS(be)]: " . $msg, $errfile, $errline); - // send error to the debug routine - $this->_cvsDebug($err->asXML()); - // send the error to the error manager - $GLOBALS['ErrorManager']->handleError($err); - } - - /** - * Debug function specifically for the CVS database functions. - * Can be deactived by setting the WikiDB['debug_file'] to "" - */ - function _cvsDebug($msg) - { - if ($this->_debug_file == "") { - return; - } - - if (!file_exists($this->_debug_file)) { - $this->_createFile($this->_debug_file, 0755); - } - - if ($fdlock = @fopen($this->_debug_file, 'a')) { - $locked = flock($fdlock, 2); - if (!$locked) { - fclose($fdlock); - return; - } - - $fdappend = @fopen($this->_debug_file, 'a'); - fwrite($fdappend, ($msg . "\n")); - fclose($fdappend); - fclose($fdlock); - } else { - // TODO: this should be replaced ... - printf("unable to locate/open [%s], turning debug off\n", $filename); - $this->_debug_file = ""; - } - } - - /** - * Execute a command and potentially exit if the flag exitOnNonZero is - * set to true and the return value was nonZero - */ - function _execCommand($cmdLine, &$cmdOutput, $exitOnNonZero) - { - $this->_cvsDebug(sprintf("Preparing to execute [%s]", $cmdLine)); - exec($cmdLine, $cmdOutput, $cmdReturnVal); - if ($exitOnNonZero && ($cmdReturnVal != 0)) { - $this->_cvsDebug(sprintf("Command failed [%s], Output: ", $cmdLine) . "[" . - join("\n", $cmdOutput) . "]"); - $this->_cvsError(sprintf("Command failed [%s], Return value: %s", $cmdLine, $cmdReturnVal), - __LINE__); - } - $this->_cvsDebug("Done execution [" . join("\n", $cmdOutput) . "]"); - - return $cmdReturnVal; - } - - /** - * Read locks a file, reads it, and returns it contents - */ - function _readFileWithPath($filename) - { - if ($fd = @fopen($filename, "r")) { - $locked = flock($fd, 1); // read lock - if (!$locked) { - fclose($fd); - $this->_cvsError("Unable to obtain read lock.", __LINE__); - } - - $content = file($filename); - fclose($fd); - return $content; - } else { - $this->_cvsError(sprintf("Unable to open file '%s' for reading", $filename), - __LINE__); - return false; - } - } - - /** - * Either replace the contents of an existing file or create a - * new file in the particular store using the page name as the - * file name. - * - * Nothing is returned, might be useful to return something ;-) - */ - function _writeFileWithPath($filename, $contents) - { - // TODO: $contents should probably be a reference parameter ... - if ($fd = fopen($filename, 'a')) { - $locked = flock($fd, 2); // Exclusive blocking lock - if (!$locked) { - $this->_cvsError("Timeout while obtaining lock.", __LINE__); - } - - // Second filehandle -- we use this to write the contents - $fdsafe = fopen($filename, 'w'); - fwrite($fdsafe, $contents); - fclose($fdsafe); - fclose($fd); - } else { - $this->_cvsError(sprintf("Could not open file '%s' for writing", $filename), - __LINE__); - } - } - - /** - * Copy the contents of the source directory to the destination directory. - */ - function _copyFilesFromDirectory($src, $dest) - { - $this->_cvsDebug(sprintf("Copying from [%s] to [%s]", $src, $dest)); - - if (is_dir($src) && is_dir($dest)) { - $this->_cvsDebug("Copying "); - $d = opendir($src); - while ($entry = readdir($d)) { - if (is_file($src . "/" . $entry) - && copy($src . "/" . $entry, $dest . "/" . $entry) - ) { - $this->_cvsDebug(sprintf("Copied to [%s]", "$dest/$entry")); - } else { - $this->_cvsDebug(sprintf("Failed to copy [%s]", "$src/$entry")); - } - } - closedir($d); - return true; - } else { - $this->_cvsDebug("Not copying"); - return false; - } - } - - /** - * Unescape a string value. Normally this comes from doing an - * escapeshellcmd. This converts the following: - * \{ --> { - * \} --> } - * \; --> ; - * \" --> " - */ - function _unescape($val) - { - $val = str_replace("\\{", "{", $val); - $val = str_replace("\\}", "}", $val); - $val = str_replace("\\;", ";", $val); - $val = str_replace("\\\"", "\"", $val); - - return $val; - } - - /** - * Function for removing the newlines from the ends of the - * file data returned from file(..). This is used in retrievePage - */ - function _strip_newlines(&$item, $key) - { - $item = ereg_replace("\n$", "", $item); - } - -} /* End of WikiDB_backend_cvs class */ - -/** - * Generic iterator for stepping through an array of values. - */ -class Cvs_Backend_Array_Iterator - extends WikiDB_backend_iterator -{ - public $_array; - - function Cvs_Backend_Iterator($arrayValue = Array()) - { - $this->_array = $arrayValue; - } - - function next() - { - while (($rVal = array_pop($this->_array)) != NULL) { - return $rVal; - } - return false; - } - - function count() - { - return count($this->_array); - } - - function free() - { - unset($this->_array); - } -} - -class Cvs_Backend_Full_Search_Iterator - extends Cvs_Backend_Array_Iterator -{ - public $_searchString = ''; - public $_docDir = ""; - - function __construct($arrayValue = array(), - $searchString = "", - $documentDir = ".") - { - $this->Cvs_Backend_Array_Iterator($arrayValue); - $this->_searchString = $searchString; - $this->_docDir = $documentDir; - } - - function next() - { - do { - $pageName = Cvs_Backend_Array_Iterator::next(); - } while (!$this->_searchFile($this->_searchString, - $this->_docDir . "/" . $pageName)); - - return $pageName; - } - - /** - * Does nothing more than a grep and search the entire contents - * of the given file. Returns TRUE of the searchstring was found, - * false if the search string wasn't find or the file was a directory - * or could not be read. - */ - function _searchFile($searchString, $fileName) - { - // TODO: using grep here, it might make more sense to use - // TODO: some sort of inbuilt/language specific method for - // TODO: searching files. - $cmdLine = sprintf("grep -E -i '%s' %s > /dev/null 2>&1", - $searchString, $fileName); - - return (WikiDB_backend_cvs::_execCommand($cmdLine, $cmdOutput, - false) == 0); - } -} - -/** - * Iterator used for doing a title search. - */ -class Cvs_Backend_Title_Search_Iterator - extends Cvs_Backend_Array_Iterator -{ - public $_searchString = ''; - - function __construct($arrayValue = array(), - $searchString = "") - { - parent::__construct($arrayValue); - $this->_searchString = $searchString; - } - - function next() - { - do { - $pageName = Cvs_Backend_Array_Iterator::next(); - } while (!eregi($this->_searchString, $pageName)); - - return $pageName; - } -} - -// Local Variables: -// mode: php -// tab-width: 8 -// c-basic-offset: 4 -// c-hanging-comment-ender-p: nil -// indent-tabs-mode: nil -// End: Deleted: trunk/lib/WikiDB/cvs.php =================================================================== --- trunk/lib/WikiDB/cvs.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/WikiDB/cvs.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,27 +0,0 @@ -<?php - -require_once 'lib/WikiDB.php'; -require_once 'lib/WikiDB/backend/cvs.php'; - -/** - * Wrapper class for the cvs backend. - * - * @Author: Gerrit Riessen, ger...@op... - * - * Use the new cvsclient PECL extension, if available - * http://pecl.php.net/package/cvsclient - * - */ -class WikiDB_cvs - extends WikiDB -{ - public $_backend; - - function __construct($dbparams) - { - if (loadPhpExtension('cvsclient')) - $this->_backend = new WikiDB_backend_cvsclient($dbparams); - else - $this->_backend = new WikiDB_backend_cvs($dbparams); - } -} Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/WikiDB.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -95,8 +95,6 @@ * <dd> Another generic SQL backend. (More current features are tested here. Much faster) * <dt> dba * <dd> Dba based backend. The default and by far the fastest. - * <dt> cvs - * <dd> * <dt> file * <dd> flat files * </dl> @@ -1929,7 +1927,7 @@ } // There's always hits, but we cache only if more - // (well not with file, cvs and dba) + // (well not with file and dba) if (isset($next['pagedata']) and count($next['pagedata']) > 1) { $this->_wikidb->_cache->cache_data($next); // cache existing page id's since we iterate over all links in GleanDescription Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/WikiTheme.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -926,8 +926,6 @@ while (($subdir = $dir->read()) !== false) { if ($subdir[0] == '.') continue; - if ($subdir == 'CVS') - continue; if (is_dir("$path_dir/$subdir")) $path[] = "$button_dir/$subdir"; } @@ -939,8 +937,6 @@ while (($subdir = $dir->read()) !== false) { if ($subdir[0] == '.') continue; - if ($subdir == 'CVS') - continue; if (is_dir("$path_dir/$subdir")) $path[] = "themes/default/buttons/$subdir"; } Modified: trunk/lib/WikiUser/Db.php =================================================================== --- trunk/lib/WikiUser/Db.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/WikiUser/Db.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -29,7 +29,7 @@ * libnss-mysql. * * We support only the SQL and ADODB backends. - * The other WikiDB backends (flat, cvs, dba, ...) should be used for pages, + * The other WikiDB backends (flat, dba, ...) should be used for pages, * not for auth stuff. If one would like to use e.g. dba for auth, he should * use PearDB (SQL) with the right $DBAuthParam['auth_dsn']. * (Not supported yet, since we require SQL. SQLite would make since when Modified: trunk/lib/interwiki.map =================================================================== --- trunk/lib/interwiki.map 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/interwiki.map 2015-02-27 17:54:34 UTC (rev 9574) @@ -89,7 +89,6 @@ php-function http://www.php.net/%s php-lookup http://www.php.net/manual-lookup.php?pattern= PhpWiki http://phpwiki.fr/ -PhpWikiCvs https://sourceforge.net/p/phpwiki/code/HEAD/tree/trunk/ PhpWikiSvn https://sourceforge.net/p/phpwiki/code/HEAD/tree/trunk/ Pikie http://pikie.darktech.org/cgi/pikie? PlWikiPedia http://pl.wikipedia.org/wiki/ Modified: trunk/lib/plugin/PageDump.php =================================================================== --- trunk/lib/plugin/PageDump.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/plugin/PageDump.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -63,7 +63,7 @@ return array('s' => false, 'page' => '[pagename]', //'encoding' => 'binary', // 'binary', 'quoted-printable' - 'format' => false, // 'normal', 'forsvn', 'forcvs', 'backup' + 'format' => false, // 'normal', 'forsvn', 'backup' // display within WikiPage or give a downloadable // raw pgsrc? 'download' => false); @@ -98,14 +98,10 @@ // // Normal: add unique Message-Id, don't // strip any fields from Content-Type. - // - // ForCVS: strip attributes from - // Content-Type field: "author", "version", "lastmodified", - // "author_id", "hits". $this->pagename = $page; $this->generateMessageId($mailified); - if (($format == 'forsvn') || ($format == 'forcvs')) + if ($format == 'forsvn') $this->fixup_headers_forsvn($mailified); else // backup or normal $this->fixup_headers($mailified); Modified: trunk/lib/plugin/SystemInfo.php =================================================================== --- trunk/lib/plugin/SystemInfo.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/plugin/SystemInfo.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -125,10 +125,6 @@ $s .= "DATABASE_DBA_HANDLER: " . DATABASE_DBA_HANDLER . ", "; $s .= "DATABASE_DIRECTORY: \"" . DATABASE_DIRECTORY . "\", "; break; - case 'cvs': - $s .= "DATABASE_DIRECTORY: \"" . DATABASE_DIRECTORY . "\", "; - // $s .= "cvs stuff: , "; - break; case 'flatfile': $s .= "DATABASE_DIRECTORY: " . DATABASE_DIRECTORY . ", "; break; @@ -391,7 +387,7 @@ return $content; } - // Size of databases/files/cvs are possible plus the known size of the app. + // Size of databases/files are possible plus the known size of the app. // Cache this costly operation. // Even if the whole plugin call is stored internally, we cache this // separately with a separate key. @@ -420,7 +416,7 @@ $pagesize = filesize($DBParams['directory'] . "/wiki_pagedb.db3") / 1024; // if issubdirof($dbdir, $dir) $appsize -= $pagesize; - } else { // flatfile, cvs + } else { // flatfile $dbdir = $DBParams['directory']; $pagesize = `du -s $dbdir`; // if issubdirof($dbdir, $dir) $appsize -= $pagesize; Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/lib/stdlib.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -928,7 +928,7 @@ $this->_warnings[] = _("White space converted to single space"); // Delete any control characters. - if (DATABASE_TYPE == 'cvs' or DATABASE_TYPE == 'file' or DATABASE_TYPE == 'flatfile') { + if (DATABASE_TYPE == 'file' or DATABASE_TYPE == 'flatfile') { $pagename = preg_replace('/[\x00-\x1f\x7f\x80-\x9f]/', '', $orig = $pagename); if ($pagename != $orig) $this->_errors[] = _("Control characters not allowed"); @@ -949,9 +949,8 @@ $this->_errors[] = _("Page name too long"); } - // disallow some chars only on file and cvs - if ((DATABASE_TYPE == 'cvs' - or DATABASE_TYPE == 'file' + // disallow some chars only on file + if ((DATABASE_TYPE == 'file' or DATABASE_TYPE == 'flatfile') and preg_match('/(:|\.\.)/', $pagename, $m) ) { @@ -1869,7 +1868,7 @@ } /** - * Useful for PECL overrides: cvsclient, ldap, soap, xmlrpc, pdo, pdo_<driver> + * Useful for PECL overrides: ldap, soap, xmlrpc, pdo, pdo_<driver> */ function loadPhpExtension($extension) { Modified: trunk/locale/Makefile =================================================================== --- trunk/locale/Makefile 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/Makefile 2015-02-27 17:54:34 UTC (rev 9574) @@ -322,7 +322,6 @@ ${POT_FILE}: .././lib/WikiDB/backend/ADODB.php ${POT_FILE}: .././lib/WikiDB/backend/ADODB_postgres7.php ${POT_FILE}: .././lib/WikiDB/backend/ADODB_sqlite.php -${POT_FILE}: .././lib/WikiDB/backend/cvs.php ${POT_FILE}: .././lib/WikiDB/backend/dbaBase.php ${POT_FILE}: .././lib/WikiDB/backend/dba.php ${POT_FILE}: .././lib/WikiDB/backend/dumb/AllRevisionsIter.php @@ -345,7 +344,6 @@ ${POT_FILE}: .././lib/WikiDB/backend/PearDB.php ${POT_FILE}: .././lib/WikiDB/backend/PearDB_sqlite.php ${POT_FILE}: .././lib/WikiDB/backend.php -${POT_FILE}: .././lib/WikiDB/cvs.php ${POT_FILE}: .././lib/WikiDB/dba.php ${POT_FILE}: .././lib/WikiDB/file.php ${POT_FILE}: .././lib/WikiDB/flatfile.php Modified: trunk/locale/README.de.txt =================================================================== --- trunk/locale/README.de.txt 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/README.de.txt 2015-02-27 17:54:34 UTC (rev 9574) @@ -11,7 +11,7 @@ sachdienliche Vorschläge: Bitte laden Sie sich zunächst die neueste PhpWiki-Version auf Ihren Rechner von: -Nightly CVS snapshot: +Nightly snapshot: http://phpwiki.sf.net/nightly/phpwiki.nightly.tar.gz Achten Sie auch darauf, diese Datei mit UTF-8 abzuspeichern (nicht mit ISO-8859-1, @@ -34,7 +34,7 @@ Alle Ihre Korrekturen werden dann von einem der Entwickler, sobald ein entsprechender Umfang erreicht ist, bei geeigneter Gelegenheit in -ihrer Gesamtheit ins PhpWiki-CVS (auf Sourceforge) eingesetzt und +ihrer Gesamtheit ins PhpWiki (auf Sourceforge) eingesetzt und damit dann für alle PhpWiki-Benutzer zugänglich und wirksam. -- CarstenKlapp <car...@us...> Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/pgsrc/Aide%2FPluginRessourcesRss =================================================================== --- trunk/locale/fr/pgsrc/Aide%2FPluginRessourcesRss 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/fr/pgsrc/Aide%2FPluginRessourcesRss 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,4 +1,4 @@ -Date: Thu, 20 Nov 2014 14:25:52 +0000 +Date: Fri, 27 Feb 2015 18:41:28 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Aide%2FPluginRessourcesRss; @@ -43,10 +43,6 @@ 0| nombre maximum d'entrées (0 = illimitée) -=== Code source (depuis v1.3.8): -* [PhpWikiCvs:lib/plugin/RssFeed.php] -* [PhpWikiCvs:lib/RssParser.php] _révisé pour allow_url_fopen=Off_ - === Exemples * sources ~PhpWikiRss Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/de.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/es.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/fr.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/it.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/ja.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/nl.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/phpwiki.pot 2015-02-27 17:54:34 UTC (rev 9574) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/sv.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/locale/po/zh.po 2015-02-27 17:54:34 UTC (rev 9574) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-27 17:55+0100\n" +"POT-Creation-Date: 2015-02-27 18:53+0100\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -2042,9 +2042,8 @@ msgid "View a single page dump online." msgstr "" -#, fuzzy msgid "Download for Subversion" -msgstr "給 CVS 的下載" +msgstr "" msgid "Download for backup" msgstr "給備份用的下載" Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/pgsrc/Help%2FPageDumpPlugin =================================================================== --- trunk/pgsrc/Help%2FPageDumpPlugin 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/pgsrc/Help%2FPageDumpPlugin 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,4 +1,4 @@ -Date: Tue, 7 Oct 2014 19:05:57 +0000 +Date: Fri, 27 Feb 2015 18:40:24 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=Help%2FPageDumpPlugin; @@ -26,7 +26,7 @@ | pagename |- | **format** -| 'normal', 'forsvn', 'forcvs', 'backup' +| 'normal', 'forsvn', 'backup' | none |- | **download** @@ -34,8 +34,6 @@ | false |} -Note: 'forsvn' and 'forcvs' are the same. - == Example == {{{ Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/pgsrc/ReleaseNotes 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,4 +1,4 @@ -Date: Fri, 27 Feb 2015 17:55:50 +0000 +Date: Fri, 27 Feb 2015 18:40:24 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.2) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -24,6 +24,7 @@ * SUBPAGE_SEPARATOR removed, it must be '/' * RateIt plugin for Fusionforge * remove acdropdown and livesearch +* remove CVS backend == 1.5.2 2014-10-10 Marc-Etienne Vargenau == Deleted: trunk/tests/unit_test_backend_cvs.php =================================================================== --- trunk/tests/unit_test_backend_cvs.php 2015-02-27 17:18:07 UTC (rev 9573) +++ trunk/tests/unit_test_backend_cvs.php 2015-02-27 17:54:34 UTC (rev 9574) @@ -1,115 +0,0 @@ -<?php -/** - * Unit tests the 'lib/WikiDB/backend/cvs.php' file and with it - * the class WikiDB_backend_cvs. This isn't based on the PhpUnit, and - * is designed to be run directly using the php4 command. - * - * Author: Gerrit Riessen, ger...@op... - */ - -// assume that the we've cd'ed to the tests directory -ini_set('include_path', '..' ); - -if ( $USER == "root" ) { - // root user can't check in to a CVS repository - print( "can not be run as root\n" ); - exit(); -} - -// set to false if something went wrong -$REMOVE_DEBUG = true; - -require_once 'lib/WikiDB/backend/cvs.php'; - -$db_params = array(); -/** - * These are the parameters required by the backend. - */ -$db_params[CVS_PAGE_SOURCE] = "../pgsrc"; -$db_params[CVS_CHECK_FOR_REPOSITORY] = true; -// the following three are removed if the test succeeds. -$db_params[CVS_DOC_DIR] = "/tmp/wiki_docs"; -$db_params[CVS_REPOSITORY] = "/tmp/wiki_repository"; -$db_params[CVS_DEBUG_FILE] = "/tmp/php_cvs.log"; - -// -// Check the creation of a new CVS repository and the importing of -// the default pages. -// -$cvsdb = new WikiDB_backend_cvs( $db_params ); -// check that all files contained in page source where checked in. -$allPageNames = array(); -$d = opendir( $db_params[CVS_PAGE_SOURCE] ); -while ( $entry = readdir( $d ) ) { - exec( "grep 'Checking in $entry' " . $db_params[CVS_DEBUG_FILE], - $cmdOutput, $cmdRetval ); - - if ( !is_dir( $db_params[CVS_PAGE_SOURCE] . "/" . $entry )) { - $allPageNames[] = $entry; - - if ( $cmdRetval ) { - print "*** Error: [$entry] was not checked in -- view " - . $db_params[CVS_DEBUG_FILE] . " for details\n"; - $REMOVE_DEBUG = false; - } - } -} -closedir( $d ); - -// -// Check that the meta data files were created -// -function get_pagedata( $page_name, $key, &$cvsdb ) -{ - global $REMOVE_DEBUG; - $pageHash = $cvsdb->get_pagedata( $page_name ); - if ( $pageHash[CMD_VERSION] != "1" ) { - print ( "*** Error: [$page_name] version wrong 1 != " - . $pageHash[CMD_VERSION] ."\n" ); - $REMOVE_DEBUG = false; - } - - $new_data = array(); - $new_data[CMD_CONTENT] = ""; - $cvsdb->update_pagedata( $page_name, $new_data ); - - $pageHash = $cvsdb->get_pagedata( $page_name ); - if ( $pageHash[CMD_VERSION] != "2" ) { - print ( "*** Error: [$page_name] version wrong 2 != " - . $pageHa... [truncated message content] |