From d478370b945f00da28bafa6b5e01494cdb54cac4 Mon Sep 17 00:00:00 2001 From: vargenau Date: Fri, 27 Feb 2015 17:54:34 +0000 Subject: [PATCH] Remove CVS backend git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9574 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- config/config-dist.ini | 1 - configurator.php | 4 +- lib/IniConfig.php | 2 +- lib/TextSearchQuery.php | 1 - lib/WikiDB.php | 4 +- lib/WikiDB/backend/cvs.php | 1031 -------------------- lib/WikiDB/cvs.php | 27 - lib/WikiTheme.php | 4 - lib/WikiUser/Db.php | 2 +- lib/interwiki.map | 1 - lib/plugin/PageDump.php | 8 +- lib/plugin/SystemInfo.php | 8 +- lib/stdlib.php | 9 +- locale/Makefile | 2 - locale/README.de.txt | 4 +- locale/de/LC_MESSAGES/phpwiki.mo | Bin 99087 -> 99087 bytes locale/es/LC_MESSAGES/phpwiki.mo | Bin 41660 -> 41660 bytes locale/fr/LC_MESSAGES/phpwiki.mo | Bin 113546 -> 113546 bytes locale/fr/pgsrc/Aide%2FPluginRessourcesRss | 6 +- locale/it/LC_MESSAGES/phpwiki.mo | Bin 17318 -> 17318 bytes locale/ja/LC_MESSAGES/phpwiki.mo | Bin 13782 -> 13782 bytes locale/nl/LC_MESSAGES/phpwiki.mo | Bin 8156 -> 8156 bytes locale/po/de.po | 2 +- locale/po/es.po | 2 +- locale/po/fr.po | 2 +- locale/po/it.po | 2 +- locale/po/ja.po | 2 +- locale/po/nl.po | 2 +- locale/po/phpwiki.pot | 2 +- locale/po/sv.po | 2 +- locale/po/zh.po | 5 +- locale/sv/LC_MESSAGES/phpwiki.mo | Bin 8299 -> 8299 bytes locale/zh/LC_MESSAGES/phpwiki.mo | Bin 48603 -> 48603 bytes pgsrc/Help%2FPageDumpPlugin | 6 +- pgsrc/ReleaseNotes | 3 +- tests/unit_test_backend_cvs.php | 115 --- themes/Sidebar/themeinfo.php | 3 +- themes/fusionforge/interwiki.map | 1 - themes/fusionforge/wikilens.js | 8 - themes/wikilens/wikilens.js | 22 - 40 files changed, 30 insertions(+), 1263 deletions(-) delete mode 100644 lib/WikiDB/backend/cvs.php delete mode 100644 lib/WikiDB/cvs.php delete mode 100644 tests/unit_test_backend_cvs.php diff --git a/config/config-dist.ini b/config/config-dist.ini index 5ecc1fc38..fb09a9d9c 100644 --- a/config/config-dist.ini +++ b/config/config-dist.ini @@ -400,7 +400,6 @@ COOKIE_EXPIRATION_DAYS = 365 ; 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 diff --git a/configurator.php b/configurator.php index 3114179a0..d469606de 100644 --- a/configurator.php +++ b/configurator.php @@ -638,14 +638,12 @@ $properties["Database Type"] = '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"] = diff --git a/lib/IniConfig.php b/lib/IniConfig.php index f3f2d355e..de7d14771 100644 --- a/lib/IniConfig.php +++ b/lib/IniConfig.php @@ -318,7 +318,7 @@ function IniConfig($file) 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)), diff --git a/lib/TextSearchQuery.php b/lib/TextSearchQuery.php index 078a7115a..a6d7ede95 100644 --- a/lib/TextSearchQuery.php +++ b/lib/TextSearchQuery.php @@ -403,7 +403,6 @@ class NumericSearchQuery * 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) { diff --git a/lib/WikiDB.php b/lib/WikiDB.php index d5c270375..45386a99c 100644 --- a/lib/WikiDB.php +++ b/lib/WikiDB.php @@ -95,8 +95,6 @@ class WikiDB *
Another generic SQL backend. (More current features are tested here. Much faster) *
dba *
Dba based backend. The default and by far the fastest. - *
cvs - *
*
file *
flat files * @@ -1929,7 +1927,7 @@ class WikiDB_PageIterator } // 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 diff --git a/lib/WikiDB/backend/cvs.php b/lib/WikiDB/backend/cvs.php deleted file mode 100644 index 6d77f5dc4..000000000 --- a/lib/WikiDB/backend/cvs.php +++ /dev/null @@ -1,1031 +0,0 @@ - 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: diff --git a/lib/WikiDB/cvs.php b/lib/WikiDB/cvs.php deleted file mode 100644 index 789481e3b..000000000 --- a/lib/WikiDB/cvs.php +++ /dev/null @@ -1,27 +0,0 @@ -_backend = new WikiDB_backend_cvsclient($dbparams); - else - $this->_backend = new WikiDB_backend_cvs($dbparams); - } -} diff --git a/lib/WikiTheme.php b/lib/WikiTheme.php index 2ef05ce60..840f484b6 100644 --- a/lib/WikiTheme.php +++ b/lib/WikiTheme.php @@ -926,8 +926,6 @@ class WikiTheme 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 @@ class WikiTheme while (($subdir = $dir->read()) !== false) { if ($subdir[0] == '.') continue; - if ($subdir == 'CVS') - continue; if (is_dir("$path_dir/$subdir")) $path[] = "themes/default/buttons/$subdir"; } diff --git a/lib/WikiUser/Db.php b/lib/WikiUser/Db.php index 9197f28c0..640b59e22 100644 --- a/lib/WikiUser/Db.php +++ b/lib/WikiUser/Db.php @@ -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 diff --git a/lib/interwiki.map b/lib/interwiki.map index eb6d7d21b..9e831ead3 100644 --- a/lib/interwiki.map +++ b/lib/interwiki.map @@ -89,7 +89,6 @@ PersonalTelco http://www.personaltelco.net/index.cgi/ 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/ diff --git a/lib/plugin/PageDump.php b/lib/plugin/PageDump.php index 00172fc97..cd3ff024d 100644 --- a/lib/plugin/PageDump.php +++ b/lib/plugin/PageDump.php @@ -63,7 +63,7 @@ class WikiPlugin_PageDump 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 @@ class WikiPlugin_PageDump // // 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); diff --git a/lib/plugin/SystemInfo.php b/lib/plugin/SystemInfo.php index d4e2a04cb..6801897cf 100644 --- a/lib/plugin/SystemInfo.php +++ b/lib/plugin/SystemInfo.php @@ -125,10 +125,6 @@ class WikiPlugin_SystemInfo $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 @@ class WikiPlugin_SystemInfo 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 @@ class WikiPlugin_SystemInfo $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; diff --git a/lib/stdlib.php b/lib/stdlib.php index 952a230da..d0f54e66a 100644 --- a/lib/stdlib.php +++ b/lib/stdlib.php @@ -928,7 +928,7 @@ class WikiPageName $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 @@ class WikiPageName $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 @@ function isExternalReferrer(&$request) } /** - * Useful for PECL overrides: cvsclient, ldap, soap, xmlrpc, pdo, pdo_ + * Useful for PECL overrides: ldap, soap, xmlrpc, pdo, pdo_ */ function loadPhpExtension($extension) { diff --git a/locale/Makefile b/locale/Makefile index 7d5ee153c..f80ef15fd 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -322,7 +322,6 @@ ${POT_FILE}: .././lib/WikiDB/backend/ADODB_oci8po.php ${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_pgsql.php ${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 diff --git a/locale/README.de.txt b/locale/README.de.txt index 5be0c142a..4a85d5b77 100644 --- a/locale/README.de.txt +++ b/locale/README.de.txt @@ -11,7 +11,7 @@ Für diejenigen, die daran mitwirken wollen, sind hier ein paar 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 @@ schicken oder den Bug Tracker eintragen. 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 diff --git a/locale/de/LC_MESSAGES/phpwiki.mo b/locale/de/LC_MESSAGES/phpwiki.mo index 9308f50d6b95a4ceb35a81745f84022048bb17a0..f74dbd3f03d8d2046f8d0b63a396a28c428aef23 100644 GIT binary patch delta 19 bcmeBgW9x5Y+wk!@i-nb`@#e43rDg*FRW%6V delta 19 bcmeBgW9x5Y+wk!@i@BAl>E^G`rDg*FRX7OZ diff --git a/locale/es/LC_MESSAGES/phpwiki.mo b/locale/es/LC_MESSAGES/phpwiki.mo index 886a893ebef06398fdb40e17b764583642eefe95..ec05936621ae5f705874f2eeac1c844cab926a31 100644 GIT binary patch delta 19 acmdmUlxfdVrVUj|EEZO##+&Ps>>L18HV1+L delta 19 acmdmUlxfdVrVUj|Eaq0Grkm@M>>L18IR}FP diff --git a/locale/fr/LC_MESSAGES/phpwiki.mo b/locale/fr/LC_MESSAGES/phpwiki.mo index 3c61e2fa2022436851078c82a3a350c9c1cda1d6..c62a37b4bf28d19244581d26bdd1fe312cce71dc 100644 GIT binary patch delta 22 dcmeDB&ervvtzipe4I7Jvm8tRe1~x{ntpH^H2cZA} delta 22 dcmeDB&ervvtzipe4I7KOm8t3W1~x{ntpH^L2ciG~ diff --git a/locale/fr/pgsrc/Aide%2FPluginRessourcesRss b/locale/fr/pgsrc/Aide%2FPluginRessourcesRss index 2e9bf1d5f..44f8d3b15 100644 --- a/locale/fr/pgsrc/Aide%2FPluginRessourcesRss +++ b/locale/fr/pgsrc/Aide%2FPluginRessourcesRss @@ -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 @@ maxitem| 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 diff --git a/locale/it/LC_MESSAGES/phpwiki.mo b/locale/it/LC_MESSAGES/phpwiki.mo index 64524a7f1771ba508859e35b9d8dee4b4c73fcbd..c01d634a5bf4be6a38ff5b6550d5f20a237a1a7c 100644 GIT binary patch delta 19 acmZ41&bX|daYLszi-nb`@#bD_NeKW(lLk8g delta 19 acmZ41&bX|daYLszi@BAl>E>Q-NeKW(mIgck diff --git a/locale/ja/LC_MESSAGES/phpwiki.mo b/locale/ja/LC_MESSAGES/phpwiki.mo index 0f5a127b1182ebe452f13230ae17076ac08ab160..45576f00f4ac2ad0569ca32aba854589d7f676c7 100644 GIT binary patch delta 17 YcmcbXeJy)~k^+l`m8tP&HH8hL06)YA5dZ)H delta 17 YcmcbXeJy)~k^+mlm8t1wHH8hL06)hD5&!@I diff --git a/locale/nl/LC_MESSAGES/phpwiki.mo b/locale/nl/LC_MESSAGES/phpwiki.mo index 766747a87770bbd55bc2fcdd8698b2aeb196454f..9624ec33afffd773a66a9ebd97ed1869302d69ea 100644 GIT binary patch delta 16 Xcmca(f5(2q9}yM{D^uf5qIb9eKNtpr delta 16 Xcmca(f5(2q9}yOFD^t@=qIb9eKN<#u diff --git a/locale/po/de.po b/locale/po/de.po index 0fa8ae704..443326f11 100644 --- a/locale/po/de.po +++ b/locale/po/de.po @@ -6,7 +6,7 @@ msgid "" 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 , Carsten Klapp " ", Helmer Pardun \n" "Language-Team: \n" diff --git a/locale/po/fr.po b/locale/po/fr.po index a73cb124c..5c644d470 100644 --- a/locale/po/fr.po +++ b/locale/po/fr.po @@ -6,7 +6,7 @@ msgid "" 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 , Roland " "Trique , Stéphane Gourichon \n" "Language-Team: LANGUAGE \n" diff --git a/locale/po/nl.po b/locale/po/nl.po index bb192dc2d..53a3517b7 100644 --- a/locale/po/nl.po +++ b/locale/po/nl.po @@ -8,7 +8,7 @@ msgid "" 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 \n" "Language-Team: Dutch \n" diff --git a/locale/po/phpwiki.pot b/locale/po/phpwiki.pot index d43df8845..62943426c 100644 --- a/locale/po/phpwiki.pot +++ b/locale/po/phpwiki.pot @@ -6,7 +6,7 @@ msgid "" 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 \n" "Language-Team: LANGUAGE \n" diff --git a/locale/po/sv.po b/locale/po/sv.po index faddb146b..865a45af9 100644 --- a/locale/po/sv.po +++ b/locale/po/sv.po @@ -7,7 +7,7 @@ msgid "" 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 \n" "Language-Team: \n" diff --git a/locale/po/zh.po b/locale/po/zh.po index a2986bd1c..2f181c2aa 100644 --- a/locale/po/zh.po +++ b/locale/po/zh.po @@ -6,7 +6,7 @@ msgid "" 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 \n" "Language-Team: DruryL \n" @@ -2042,9 +2042,8 @@ msgstr "在此 wiki 中所有遺漏的頁面 (共 %d):" msgid "View a single page dump online." msgstr "" -#, fuzzy msgid "Download for Subversion" -msgstr "給 CVS 的下載" +msgstr "" msgid "Download for backup" msgstr "給備份用的下載" diff --git a/locale/sv/LC_MESSAGES/phpwiki.mo b/locale/sv/LC_MESSAGES/phpwiki.mo index d19627970e909b2e14b538c56886974fd96b533f..a958cd16326901bec5ff83ace92ab2db01bc478f 100644 GIT binary patch delta 17 ZcmaFu@Y-R+Y*7{qD^ugm^F_~a0RTjO2GRfk delta 17 ZcmaFu@Y-R+Y*7|-D^t_W^F_~a0RTjR2Gall diff --git a/locale/zh/LC_MESSAGES/phpwiki.mo b/locale/zh/LC_MESSAGES/phpwiki.mo index f58591339bf9ab9f2fb91d3b5ac08d35e41f2f63..0472058cc21f67c2ea453b14067433b715bf40e7 100644 GIT binary patch delta 19 bcmccpo9Xs%rVYJSEEZO##+xTrc{u|BVgv}0 delta 19 bcmccpo9Xs%rVYJSEaq0Grkf{Lc{u|BVh0G4 diff --git a/pgsrc/Help%2FPageDumpPlugin b/pgsrc/Help%2FPageDumpPlugin index bb5ed3d08..722b0476d 100644 --- a/pgsrc/Help%2FPageDumpPlugin +++ b/pgsrc/Help%2FPageDumpPlugin @@ -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 @@ The **~PageDump** [[Help:WikiPlugin|plugin]] allows to view a single page dump o | pagename |- | **format** -| 'normal', 'forsvn', 'forcvs', 'backup' +| 'normal', 'forsvn', 'backup' | none |- | **download** @@ -34,8 +34,6 @@ The **~PageDump** [[Help:WikiPlugin|plugin]] allows to view a single page dump o | false |} -Note: 'forsvn' and 'forcvs' are the same. - == Example == {{{ diff --git a/pgsrc/ReleaseNotes b/pgsrc/ReleaseNotes index 2238962c5..37090c0b0 100644 --- a/pgsrc/ReleaseNotes +++ b/pgsrc/ReleaseNotes @@ -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 @@ Content-Transfer-Encoding: binary * 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 == diff --git a/tests/unit_test_backend_cvs.php b/tests/unit_test_backend_cvs.php deleted file mode 100644 index 7a1e13faf..000000000 --- a/tests/unit_test_backend_cvs.php +++ /dev/null @@ -1,115 +0,0 @@ -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 != " - . $pageHash[CMD_VERSION] ."\n" ); - $REMOVE_DEBUG = false; - } -} -array_walk( $allPageNames, 'get_pagedata', $cvsdb ); - -// -// test the add and delete pages -// -$new_page_data = array(); -$pname = "Hello_World_Fubar"; - -$new_page_data[CMD_CONTENT] = "hello world\nPlease to meet you\n\n"; -$cvsdb->update_pagedata( $pname, $new_page_data ); -if ( $cvsdb->get_latest_version( $pname ) != "1" ) { - print( "***Error Line " . __LINE__ . ": expecting version number 1\n"); - $REMOVE_DEBUG=false; -} - -$new_page_data[CMD_CONTENT] = "goodbye cruel world\nbye bye....\n"; -$cvsdb->update_pagedata( $pname, $new_page_data ); -if ( $cvsdb->get_latest_version( $pname ) != "2" ) { - print( "***Error Line " . __LINE__ . ": expecting version number 2\n"); - $REMOVE_DEBUG=false; -} - -// -// clean up after ourselves -// -if ( $REMOVE_DEBUG ) { - exec( "rm -fr " . $db_params[CVS_DOC_DIR], $cmdout, $retval ); - exec( "rm -fr " . $db_params[CVS_REPOSITORY], $cmdout, $retval ); - exec( "rm -f " . $db_params[CVS_DEBUG_FILE], $cmdout, $retval ); - print "Test was succesful\n"; -} else { - print "It appears something went wrong, nothing being removed\n"; -} diff --git a/themes/Sidebar/themeinfo.php b/themes/Sidebar/themeinfo.php index 66581b41b..8a2de75b5 100644 --- a/themes/Sidebar/themeinfo.php +++ b/themes/Sidebar/themeinfo.php @@ -98,10 +98,9 @@ class WikiTheme_Sidebar extends WikiTheme_MonoBook } } - function findTemplate($name) { - // hack for navbar.tmpl to hide the buttonseparator + // hack for navbar.tmpl to hide the button separator if ($name == "navbar") { $this->setButtonSeparator(HTML::raw("
\n · ")); } diff --git a/themes/fusionforge/interwiki.map b/themes/fusionforge/interwiki.map index 14b2964b5..863c6f405 100644 --- a/themes/fusionforge/interwiki.map +++ b/themes/fusionforge/interwiki.map @@ -20,7 +20,6 @@ MoinMoin http://moinmoin.wikiwikiweb.de/ 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/ SourceForge http://sourceforge.net/ TWiki http://twiki.org/cgi-bin/view/ diff --git a/themes/fusionforge/wikilens.js b/themes/fusionforge/wikilens.js index 9e05996e4..7443121e5 100644 --- a/themes/fusionforge/wikilens.js +++ b/themes/fusionforge/wikilens.js @@ -2,13 +2,6 @@ // Globals: -/* -var data_path = '/phpwiki-cvs'; -var pagename = 'HomePage'; -var script_url= '/wikicvs'; -var stylepath = data_path+'/themes/MonoBook/'; -*/ - var rating = new Array; var prediction = new Array; var avg = new Array; var numusers = new Array; var canRate = new Array; @@ -21,7 +14,6 @@ var msg_add_rating = "Add your rating: "; var msg_thanks = "Thanks!"; var msg_rating_deleted = "Rating deleted!"; -//var rateit_imgsrc = '/phpwiki-cvs/themes/MonoBook/images/RateIt'; var rateit_imgsrc = '/wiki/themes/fusionforge/images/RateIt'; var rateit_action = 'RateIt'; var idTop = ''; diff --git a/themes/wikilens/wikilens.js b/themes/wikilens/wikilens.js index a9939602b..7ca6261f7 100644 --- a/themes/wikilens/wikilens.js +++ b/themes/wikilens/wikilens.js @@ -1,27 +1,5 @@ // Wikilens Javascript functions. -/* Globals: - -var data_path = '/phpwiki-cvs'; -var pagename = 'HomePage'; -var script_url= '/wikicvs'; -var stylepath = data_path+'/themes/MonoBook/'; - -var rating = new Array; var prediction = new Array; -var avg = new Array; var numusers = new Array; -var msg_rating_votes = "Rating: %.1f (%d votes)"; -var msg_curr_rating = "Your current rating: "; -var msg_curr_prediction = "Your current prediction: "; -var msg_chg_rating = "Change your rating from "; -var msg_to = " to "; -var msg_add_rating = "Add your rating: "; -var msg_thanks = "Thanks!"; -var msg_rating_deleted = "Rating deleted!"; - -var rating_imgsrc = '/phpwiki-cvs/themes/MonoBook/images/RateIt'; -var rateit_action = 'RateIt'; -*/ - function displayRating(imgId, imgPrefix, ratingvalue, pred, init) { var ratings = new Array('Not Rated','Awful','Very Poor','Poor','Below Average', 'Average','Above Average','Good','Very Good','Excellent','Outstanding'); -- 2.45.0