cvs: doc-editor /install firstRun.php /js main.js /php BugReader.php ExtJsController.php class.php
| From: | Yannick Torres | Date: | Sat, 18 Apr 2009 13:27:47 +0000 |
| Subject: | cvs: doc-editor /install firstRun.php /js main.js /php BugReader.php ExtJsController.php class.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-3787@lists.php.net to get a copy of this message | ||
yannick Sat Apr 18 13:27:47 2009 UTC
Modified files:
/doc-editor/install firstRun.php
/doc-editor/js main.js
/doc-editor/php BugReader.php class.php ExtJsController.php
Log:
- Modify method name
http://cvs.php.net/viewvc.cgi/doc-editor/install/firstRun.php?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/install/firstRun.php diff -u doc-editor/install/firstRun.php:1.2 doc-editor/install/firstRun.php:1.3 --- doc-editor/install/firstRun.php:1.2 Thu Apr 16 17:41:14 2009 +++ doc-editor/install/firstRun.php Sat Apr 18 13:27:47 2009 @@ -32,7 +32,7 @@ } flush(); //We apply all tools for all language -$phpDoc->rev_start(); +$phpDoc->revStart(); if ($isCLI) { echo "\n * Parsing translation data..."; @@ -42,10 +42,10 @@ flush(); // Parse translators -$phpDoc->rev_parse_translation(); +$phpDoc->revParseTranslation(); // We update the last update date/time into DB -$phpDoc->set_last_update(); +$phpDoc->setLastUpdate(); if ($isCLI) { http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.41&r2=1.42&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.41 doc-editor/js/main.js:1.42 --- doc-editor/js/main.js:1.41 Sat Apr 18 09:18:45 2009 +++ doc-editor/js/main.js Sat Apr 18 13:27:47 2009 @@ -82,7 +82,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-conf' + task: 'getConf' }, success: function(action){ var o = Ext.util.JSON.decode(action.responseText); @@ -250,7 +250,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-commit-log-message' + task: 'getCommitLogMessage' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -272,7 +272,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesError' + task: 'getFilesError' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -322,7 +322,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesNeedUpdate' + task: 'getFilesNeedUpdate' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -372,7 +372,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesNeedReviewed' + task: 'getFilesNeedReviewed' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -417,7 +417,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesPendingCommit' + task: 'getFilesPendingCommit' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -463,7 +463,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesPendingPatch' + task: 'getFilesPendingPatch' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -512,7 +512,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-last-news' + task: 'getLastNews' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -545,7 +545,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-open-bugs' + task: 'getOpenBugs' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -572,7 +572,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-translator-info' + task: 'getTranslatorInfo' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -619,7 +619,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-summary-info' + task: 'getSummaryInfo' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -687,7 +687,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-check-doc-data' + task: 'getCheckDocData' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -845,7 +845,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-check-doc-files', + task: 'getCheckDocFiles', path: path, errorType: errorType }, @@ -1035,7 +1035,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'after-patch-reject', + task: 'afterPatchReject', PatchUniqID: FileUniqID }, success: function(action){ @@ -1088,7 +1088,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'all', @@ -1112,7 +1112,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'after-patch-accept', + task: 'afterPatchAccept', PatchUniqID: FileUniqID } }); @@ -1158,7 +1158,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'en', @@ -1279,7 +1279,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: FileLang, @@ -1341,7 +1341,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: this.userLang, @@ -1404,7 +1404,7 @@ scope: this, url: './php/controller.php', params: { - task: 'check-file-error', + task: 'checkFileError', FilePath: FilePath, FileName: FileName, FileLang: this.userLang, @@ -1449,7 +1449,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: this.userLang, @@ -1518,7 +1518,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-file', + task: 'getFile', FilePath: FilePath, FileName: FileName }, @@ -1681,7 +1681,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff2', + task: 'getDiff2', FilePath: FilePath, FileName: FileName, Rev1: rev1, @@ -1884,7 +1884,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-LogMessage', + task: 'saveLogMessage', messID: messID, mess: newValue }, @@ -1942,7 +1942,7 @@ scope: this, url: './php/controller.php', params: { - task: 'delete-LogMessage', + task: 'deleteLogMessage', messID: this.storeCommitLogMessage.getAt(rowIndex).data.id }, success: function(action, form){ @@ -2161,7 +2161,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'cvs-commit', + task: 'cvsCommit', nodes: Ext.util.JSON.encode(nodes), logMessage: LogMessage }, @@ -2197,7 +2197,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'on-succes-commit', + task: 'onSuccesCommit', nodes: Ext.util.JSON.encode(nodes), logMessage: LogMessage }, @@ -2244,7 +2244,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'update-repository' + task: 'updateRepository' }, success: function(action){ // Normally, this never succes ! ;) @@ -2268,7 +2268,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_update_repository' }, success: function(action){ @@ -2308,7 +2308,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'apply-tools' + task: 'applyTools' }, success: function(action){ var o = Ext.util.JSON.decode(action.responseText); @@ -2327,7 +2327,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_apply_tools' }, success: function(action){ @@ -2432,7 +2432,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-last-update' + task: 'getLastUpdate' }, success: function(r){ @@ -2469,7 +2469,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'get-logfile', + task: 'getLogFile', file: 'log_check_build' }, success: function(action){ @@ -2534,7 +2534,7 @@ scope: this, url: './php/controller.php', params: { - task: 'check-build', + task: 'checkBuild', xmlDetails: choice }, success: function(action){ @@ -2559,7 +2559,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_check_build' }, success: function(action){ @@ -2976,7 +2976,7 @@ scope: this, url: './php/controller.php', params: { - task: 'conf-update', + task: 'confUpdate', item: item, value: v }, @@ -3126,7 +3126,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'send-email', + task: 'sendEmail', to: v.to, subject: v.subject, msg: v.msg @@ -3266,7 +3266,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -3301,7 +3301,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -3828,7 +3828,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -3971,7 +3971,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -4029,7 +4029,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -4064,7 +4064,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -4321,7 +4321,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff2', + task: 'getDiff2', FilePath: 'en' + FilePath, FileName: FileName, Rev2: revision, @@ -4687,7 +4687,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: FilePath, File: FileName }, @@ -4841,7 +4841,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: FilePath, FileName: FileName, type: 'patch', @@ -5115,7 +5115,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: FilePath, FileName: FileName }, @@ -5170,7 +5170,7 @@ scope: this, url: './php/controller.php', params: { - task: 'clear-local-change', + task: 'clearLocalChange', FilePath: FilePath, FileName: FileName }, @@ -5364,7 +5364,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -5403,7 +5403,7 @@ scope: this, url: './php/controller.php', params: { - task: 'all-files-about-extension', + task: 'getAllFilesAboutExtension', ExtName: group[2] }, success: function(action, form){ @@ -5467,7 +5467,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -5502,7 +5502,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -6370,6 +6370,19 @@ enableDD: false, containerScroll: true, bodyBorder: false, + tbar:[ + 'Search: ', ' ', + new Ext.form.TwinTriggerField({ + validationEvent:false, + validateOnBlur:false, + trigger1Class:'x-form-clear-trigger', + trigger2Class:'x-form-search-trigger', + hideTrigger1:true, + width:180, + hasSearch : false, + paramName : 'query', + }) + ], listeners: { scope: this, contextmenu: function(node, e){ @@ -6495,7 +6508,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: FilePath, File: FileName }, @@ -6729,7 +6742,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'all', @@ -6879,7 +6892,7 @@ scope: this, url: './php/controller.php', params: { - task: 'erase-personal-data' + task: 'erasePersonalData' }, success: function(action){ http://cvs.php.net/viewvc.cgi/doc-editor/php/BugReader.php?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/php/BugReader.php diff -u doc-editor/php/BugReader.php:1.1 doc-editor/php/BugReader.php:1.2 --- doc-editor/php/BugReader.php:1.1 Sat Apr 18 08:15:43 2009 +++ doc-editor/php/BugReader.php Sat Apr 18 13:27:47 2009 @@ -28,7 +28,7 @@ * * @return An indexed array (id, title, description, link, pubDate) readable by ExtJs */ - function getLastBugs() { + function getOpenBugs() { $url = 'http://bugs.php.net/rss/search.php?cmd=display&bug_type[]=Translation+problem&status=Open&search_for=&php_os=&php_os_not=0&boolean=1&author_email=&bug_age=0&by=&order_by=id&direction=DESC&phpver=&limit=All&assign=&format=rss'; http://cvs.php.net/viewvc.cgi/doc-editor/php/class.php?r1=1.34&r2=1.35&diff_format=u Index: doc-editor/php/class.php diff -u doc-editor/php/class.php:1.34 doc-editor/php/class.php:1.35 --- doc-editor/php/class.php:1.34 Sat Apr 18 09:18:45 2009 +++ doc-editor/php/class.php Sat Apr 18 13:27:47 2009 @@ -250,7 +250,7 @@ * Part of the revcheck tools. Start the Revcheck tools. * @return Nothing. */ - function rev_start() { + function revStart() { $this->db->query("INSERT INTO dirs (parentDir, name) VALUES (0, '/');"); $firstDir = $this->db->insert_id; @@ -604,7 +604,7 @@ * @param $tags_attrs The string to parse. * @return An associated array who key are the name of the attribut, and value, the value of the attribut. */ - function rev_parse_attr_string($tags_attrs) { + function revParseAttrString($tags_attrs) { $tag_attrs_processed = array(); // Go through the tag attributes @@ -626,7 +626,7 @@ return $tag_attrs_processed; } - function rev_check_old_files($dir = '') { + function revCheckOldFiles($dir = '') { if ($dh = opendir(DOC_EDITOR_CVS_PATH . $this->cvsLang . $dir)) { @@ -674,7 +674,7 @@ // Directories.. if (!empty($entriesDir)) { foreach ($entriesDir as $Edir) { - $this->rev_check_old_files($dir . '/' . $Edir); + $this->revCheckOldFiles($dir . '/' . $Edir); } } } @@ -685,7 +685,7 @@ * Part of the revcheck tools. Parse the translation's file witch hold all informations about all translators and put it into database. * @return Nothing. */ - function rev_parse_translation() { + function revParseTranslation() { reset($this->availableLanguage); while (list(, $lang) = each($this->availableLanguage)) { @@ -706,7 +706,7 @@ $matches = array(); if (preg_match_all('!<person (.+)/\\s?>!U', $txml, $matches)) { $default = array('cvs' => 'n/a', 'nick' => 'n/a', 'editor' => 'n/a', 'email' => 'n/a', 'name' => 'n/a'); - $persons = $this->rev_parse_attr_string($matches[1]); + $persons = $this->revParseAttrString($matches[1]); $charset = $this->getFileEncoding($txml, 'content'); @@ -731,7 +731,7 @@ * Get all modified files. * @return An associated array containing all informations about modified files. */ - function get_modified_files() { + function getModifiedFiles() { // Get Modified Files $s = sprintf('SELECT `id`, `lang`, `path`, `name`, CONCAT("1.", `revision`) AS `revision`, @@ -754,10 +754,10 @@ * Get all files witch need to be updated. * @return An associated array containing all informations about files witch need to be updated. */ - function get_files_need_update() { + function getFilesNeedUpdate() { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); $s = 'SELECT * FROM `files` WHERE `lang` = \''.$this->cvsLang.'\' AND `revision` != `en_revision`'; $r = $this->db->query($s); @@ -811,10 +811,10 @@ * Get all files witch need to be reviewed. * @return An associated array containing all informations about files witch need to be reviewed. */ - function get_files_need_reviewed() { + function getFilesNeedReviewed() { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); $s = 'SELECT * FROM `files` WHERE `lang` = \''.$this->cvsLang.'\' AND `revision` = `en_revision` AND reviewed != \'yes\' LIMIT 100'; $r = $this->db->query($s); @@ -859,7 +859,7 @@ * Get all pending patch. * @return An associated array containing all informations about pending patch. */ - function get_files_pending_patch() { + function getFilesPendingPatch() { $s = 'SELECT `id`, CONCAT(`lang`, `path`) AS path, `name`, `posted_by` AS \'by\', `uniqID`, `date` FROM `pendingPatch` WHERE `lang`=\''.$this->cvsLang.'\' OR `lang`=\'en\''; @@ -879,7 +879,7 @@ * Get all files pending for commit. * @return An associated array containing all informations about files pending for commit. */ - function get_files_pending_commit() { + function getFilesPendingCommit() { $s = 'SELECT * FROM `pendingCommit` WHERE `lang`=\''.$this->cvsLang.'\' OR `lang`=\'en\''; $r = $this->db->query($s) or die($this->db->error); @@ -923,7 +923,7 @@ * Get all statistiques about translators. * @return An indexed array containing all statistiques about translators (nb uptodate files, nb old files, etc...) */ - function get_translators_info() { + function getTranslatorsInfo() { $translators = $this->get_translators(); $uptodate = $this->translator_get_uptodate(); @@ -947,17 +947,17 @@ * Get summary of all statistiques. * @return An indexed array containing all statistiques for the summary */ - function get_summary_info() { + function getSummaryInfo() { - $nbFiles = $this->get_nb_files(); + $nbFiles = $this->getNbFiles(); - $uptodate = $this->get_nb_files_Translated(); - $old = $this->get_stats_old(); - $critical = $this->get_stats_critical(); + $uptodate = $this->getNbFilesTranslated(); + $old = $this->getStatsOld(); + $critical = $this->getStatsCritical(); - $missFiles = $this->get_stats_notrans(); + $missFiles = $this->getStatsNoTrans(); - $withoutRevTag = $this->get_stats_notag(); + $withoutRevTag = $this->getStatsNoTag(); $nbFiles[1] = $uptodate[1]+$old[1]+$critical[1]+$withoutRevTag[1]+$missFiles[1]; @@ -1110,7 +1110,7 @@ * Get number of files. * @return An indexed array. */ - function get_nb_files() { + function getNbFiles() { $sql = ' SELECT COUNT(*) AS total, @@ -1131,7 +1131,7 @@ * Get number of translated files. * @return Number of translated files. */ - function get_nb_files_Translated() { + function getNbFilesTranslated() { $sql = 'SELECT COUNT(name) AS total, @@ -1154,7 +1154,7 @@ * Get statistic about critical files witch need to be updated. * @return An associated array (total=>nb files, total_size=>size of this files). */ - function get_stats_critical() { + function getStatsCritical() { $sql = 'SELECT COUNT(name) AS total, SUM(size) AS total_size @@ -1182,7 +1182,7 @@ * Get statistic about old files witch need to be deleted from LANG tree. * @return An associated array (total=>nb files, total_size=>size of this files). */ - function get_stats_old() + function getStatsOld() { $sql = 'SELECT COUNT(name) AS total, @@ -1214,7 +1214,7 @@ * Get statistic about files witch need to be translated. * @return An associated array (total=>nb files, size=>size of this files). */ - function get_stats_notrans() + function getStatsNoTrans() { $sql = 'SELECT COUNT(a.name) as total, @@ -1249,7 +1249,7 @@ * Get statistic about missed files witch need to be added to LANG tree. * @return An array of missed files (size=>size of the file, file=>name of the file). */ - function get_missfiles() + function getMissFiles() { $sql = 'SELECT b.size as size, @@ -1290,7 +1290,7 @@ * Get statistic about files witch haven't revcheck's tags. * @return An associated array (total=>nb files, size=>size of this files). */ - function get_stats_notag() + function getStatsNoTag() { $sql = 'SELECT COUNT(a.name) as total, @@ -1338,7 +1338,7 @@ $match = array(); preg_match('!<\?xml(.+)\?>!U', $txml, $match); - $xmlinfo = $this->rev_parse_attr_string($match); + $xmlinfo = $this->revParseAttrString($match); $charset = (isset($xmlinfo[1]['encoding'])) ? strtolower($xmlinfo[1]['encoding']) : 'iso-8859-1'; @@ -1360,7 +1360,7 @@ $file = $FilePath.$FileName; // Is this file modified ? - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); if (isset($ModifiedFiles[$file])) { $extension = '.new'; } else { $extension = ''; } @@ -1994,7 +1994,7 @@ function getAllFiles($node) { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); // Security $node = str_replace('..', '', $node); @@ -2052,7 +2052,7 @@ $this->db->query($s) or die($this->db->error); } - function allFilesExtension($ExtName) { + function getAllFilesAboutExtension($ExtName) { $s = 'SELECT `path`, `name` FROM `files` WHERE `path` LIKE \'/reference/'.$ExtName.'/%\' AND lang=\''.$this->cvsLang.'\' ORDER BY `path`, `name`'; $r = $this->db->query($s) or die($this->db->error); @@ -2333,7 +2333,7 @@ } // check_doc - function get_Check_Doc_Data() { + function getCheckDocData() { $node = array(); @@ -2388,9 +2388,9 @@ return array('nb' => $nb, 'node' => $node); - } //get_Check_Doc_Data + } //getCheckDocData - function get_Check_Doc_Files($path, $errorType) + function getCheckDocFiles($path, $errorType) { $s = sprintf('SELECT name FROM `files` WHERE `lang`="en" AND `path`="%s" AND `%s`=1', $path, $errorType); $r = $this->db->query($s); @@ -2406,7 +2406,7 @@ * Get the last update datetime * @return The last update datetime or "in_progress" if the update is in progress */ - function get_last_update() + function getLastUpdate() { // Test is there is an update in progress $lock_update = new LockFile('lock_update_repository'); @@ -2430,7 +2430,7 @@ * Set the last update datetime into DB * @return Nothing */ - function set_last_update() + function setLastUpdate() { $s = 'SELECT lastupdate, `by` FROM `project` WHERE `name`="php"'; @@ -2446,6 +2446,6 @@ return; - } // get_last_update + } // } // End of class http://cvs.php.net/viewvc.cgi/doc-editor/php/ExtJsController.php?r1=1.16&r2=1.17&diff_format=u Index: doc-editor/php/ExtJsController.php diff -u doc-editor/php/ExtJsController.php:1.16 doc-editor/php/ExtJsController.php:1.17 --- doc-editor/php/ExtJsController.php:1.16 Sat Apr 18 09:21:16 2009 +++ doc-editor/php/ExtJsController.php Sat Apr 18 13:27:47 2009 @@ -126,7 +126,7 @@ } - public function update_repository() + public function updateRepository() { $this->phpDoc->isLogged(); @@ -138,7 +138,7 @@ return $this->getSuccess(); } - public function check_lock_file() + public function checkLockFile() { $lockFile = $this->getRequestVariable('lockFile'); @@ -148,7 +148,7 @@ return $lock->isLocked() ? $this->getSuccess() : $this->getFailure(); } - public function apply_tools() + public function applyTools() { $this->phpDoc->isLogged(); @@ -159,13 +159,13 @@ if ($lock->lock()) { // Start Revcheck - $this->phpDoc->rev_start(); + $this->phpDoc->revStart(); // Parse translators - $this->phpDoc->rev_parse_translation(); + $this->phpDoc->revParseTranslation(); // Set lastUpdate date/time - $this->phpDoc->set_last_update(); + $this->phpDoc->setLastUpdate(); // Check errors in files // $tool = new ToolsError($_SESSION['lang']); @@ -199,24 +199,6 @@ } } - /* - public function wizard_createworkspace() { - $cvsLogin = $this->getRequestVariable('cvsLogin'); - $cvsPasswd = $this->getRequestVariable('cvsPasswd'); - $cvsLang = $this->getRequestVariable('cvsLang'); - $this->phpDoc->register_user($cvsLogin, $cvsPasswd, $cvsLang); - $this->phpDoc->createWorkSpace(); - return $this->getSuccess(); - } - */ - - public function wizard_checkout() - { - $this->phpDoc->isLogged(); - $this->phpDoc->checkoutRepository(); - return $this->getSuccess(); - } - /** * Pings the server and user session * @@ -225,7 +207,7 @@ public function ping() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_last_update(); + $r = $this->phpDoc->getLastUpdate(); $response = !isset($_SESSION['userID']) ? 'false' : 'pong'; @@ -234,67 +216,69 @@ } //NEW - public function GetFilesNeedUpdate() { + public function getFilesNeedUpdate() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_need_update(); + $r = $this->phpDoc->getFilesNeedUpdate(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesNeedReviewed() { + public function getFilesNeedReviewed() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_need_reviewed(); + $r = $this->phpDoc->getFilesNeedReviewed(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesError() { + public function getFilesError() { $this->phpDoc->isLogged(); - $errorTools = new ToolsError($this->phpDoc->db); $errorTools->setParams('', '', $this->phpDoc->cvsLang, '', '', ''); - $r = $errorTools->getFilesError($this->phpDoc->get_modified_files()); - - //$r = $this->phpDoc->get_files_error(); - + $r = $errorTools->getFilesError($this->phpDoc->getModifiedFiles()); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesPendingCommit() { + public function getFilesPendingCommit() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_pending_commit(); + + $r = $this->phpDoc->getFilesPendingCommit(); + return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesPendingPatch() { + public function getFilesPendingPatch() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_pending_patch(); + + $r = $this->phpDoc->getFilesPendingPatch(); + return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } //NEW - public function get_translator_info() { + public function getTranslatorInfo() { $this->phpDoc->isLogged(); - $translators = $this->phpDoc->get_translators_info(); + $translators = $this->phpDoc->getTranslatorsInfo(); + return $this->getResponse(array('nbItems' => count($translators), 'Items' => $translators)); } //NEW - public function get_summary_info() { + public function getSummaryInfo() { $this->phpDoc->isLogged(); - $summary = $this->phpDoc->get_summary_info(); + $summary = $this->phpDoc->getSummaryInfo(); + return $this->getResponse(array('nbItems' => count($summary), 'Items' => $summary)); } - public function get_last_news() { + public function getLastNews() { $this->phpDoc->isLogged(); @@ -304,17 +288,17 @@ return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_open_bugs() { + public function getOpenBugs() { $this->phpDoc->isLogged(); $bugs = new BugReader($this->phpDoc->cvsLang); - $r = $bugs->getLastBugs(); + $r = $bugs->getOpenBugs(); return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_file() { + public function getFile() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -337,7 +321,7 @@ // NEW - public function check_file_error() { + public function checkFileError() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -379,7 +363,7 @@ } // NEW - public function save_file() { + public function saveFile() { $this->phpDoc->isLogged(); @@ -450,7 +434,7 @@ } // NEW - public function get_log() { + public function getLog() { $this->phpDoc->isLogged(); $Path = $this->getRequestVariable('Path'); @@ -460,7 +444,7 @@ return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_diff() { + public function getDiff() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -477,7 +461,7 @@ } //NEW - public function get_diff2() { + public function getDiff2() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -494,7 +478,7 @@ } - public function erase_personal_data() { + public function erasePersonalData() { $this->phpDoc->isLogged(); @@ -507,33 +491,15 @@ } - public function get_commit_log_message() { + public function getCommitLogMessage() { $this->phpDoc->isLogged(); $r = $this->phpDoc->getCommitLogMessage(); return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function update_single_file() { - - $file = $this->getRequestVariable('file'); - $path = $this->getRequestVariable('path'); - - $this->phpDoc->isLogged(); - // Reel Update EN - $this->phpDoc->cvsUpdateSingleFile($file, $path); - // Reel Update Lang - $this->phpDoc->cvsUpdateSingleFile($file, $path, 'lang'); - - // Do revcheck for just this file - $this->phpDoc->rev_on_oneFile($file, $path); - - // Need return EN_revision for translated file and revision of EN file - - } - //NEW - public function clear_local_change() { + public function clearLocalChange() { $this->phpDoc->isLogged(); if ($this->phpDoc->cvsLogin == 'cvsread') { @@ -553,7 +519,7 @@ return $this->getResponse($return); } - public function get_logfile() + public function getLogFile() { $this->phpDoc->isLogged(); @@ -566,7 +532,7 @@ } - public function check_build() + public function checkBuild() { $this->phpDoc->isLogged(); @@ -590,7 +556,7 @@ return $this->getSuccess(); } - public function cvs_commit() { + public function cvsCommit() { $this->phpDoc->isLogged(); if ($this->phpDoc->cvsLogin == 'cvsread') { @@ -607,7 +573,7 @@ return $this->getResponse(array('success' => true, 'mess' => $r)); } - public function on_succes_commit() { + public function onSuccesCommit() { $this->phpDoc->isLogged(); @@ -647,8 +613,6 @@ $errorTools = new ToolsError($this->phpDoc->db); $errorTools->updateFilesError($anode); - //$this->phpDoc->updateFilesError($anode); - // Remove all this files in needcommit $this->phpDoc->removeNeedCommit($anode); @@ -658,7 +622,7 @@ } - public function get_conf() { + public function getConf() { $this->phpDoc->isLogged(); $r['userLang'] = $this->phpDoc->cvsLang; @@ -668,7 +632,7 @@ return $this->getResponse(array('success' => true, 'mess' => $r)); } - public function send_email() { + public function sendEmail() { $this->phpDoc->isLogged(); @@ -680,7 +644,7 @@ return $this->getSuccess(); } - public function conf_update() { + public function confUpdate() { $this->phpDoc->isLogged(); @@ -702,7 +666,7 @@ return $this->getResponse($files); } - public function save_LogMessage() { + public function saveLogMessage() { $this->phpDoc->isLogged(); @@ -717,7 +681,7 @@ return $this->getSuccess(); } - public function delete_LogMessage() { + public function deleteLogMessage() { $this->phpDoc->isLogged(); @@ -731,18 +695,18 @@ return $this->getSuccess(); } - public function all_files_about_extension() { + public function getAllFilesAboutExtension() { $this->phpDoc->isLogged(); $ExtName = $this->getRequestVariable('ExtName'); - $r = $this->phpDoc->allFilesExtension($ExtName); + $r = $this->phpDoc->getAllFilesAboutExtension($ExtName); return $this->getResponse(array('success' => true, 'files' => $r)); } - public function after_patch_accept() { + public function afterPatchAccept() { $this->phpDoc->isLogged(); @@ -752,7 +716,7 @@ return $this->getSuccess(); } - public function after_patch_reject() { + public function afterPatchReject() { $this->phpDoc->isLogged(); @@ -767,23 +731,23 @@ return $this->getSuccess(); } - public function get_check_doc_data() { + public function getCheckDocData() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_Check_Doc_Data(); + $r = $this->phpDoc->getCheckDocData(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } - public function get_check_doc_files() { + public function getCheckDocFiles() { $this->phpDoc->isLogged(); $path = $this->getRequestVariable('path'); $errorType = $this->getRequestVariable('errorType'); - $r = $this->phpDoc->get_Check_Doc_Files($path, $errorType); + $r = $this->phpDoc->getCheckDocFiles($path, $errorType); return $this->getResponse(array('success' => true, 'files' => $r)); } @@ -828,21 +792,21 @@ $this->phpDoc->isLogged(); - $Total_files_lang = $this->phpDoc->get_nb_files(); + $Total_files_lang = $this->phpDoc->getNbFiles(); $Total_files_lang = $Total_files_lang[0]; // - $up_to_date = $this->phpDoc->get_nb_files_Translated(); + $up_to_date = $this->phpDoc->getNbFilesTranslated(); $up_to_date = $up_to_date[0]; // - $critical = $this->phpDoc->get_stats_critical(); + $critical = $this->phpDoc->getStatsCritical(); $critical = $critical[0]; // - $old = $this->phpDoc->get_stats_old(); + $old = $this->phpDoc->getStatsOld(); $old = $old[0]; // - $missing = sizeof($this->phpDoc->get_missfiles()); + $missing = sizeof($this->phpDoc->getMissFiles()); // - $no_tag = $this->phpDoc->get_stats_notag(); + $no_tag = $this->phpDoc->getStatsNoTag(); $no_tag = $no_tag[0]; // $data = array($up_to_date,$critical,$old,$missing,$no_tag); @@ -902,7 +866,7 @@ return ''; } - public function get_last_update() { + public function getLastUpdate() { $this->phpDoc->isLogged(); $r = $this->phpDoc->get_last_update();
http://cvs.php.net/viewvc.cgi/doc-editor/install/firstRun.php?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/install/firstRun.php diff -u doc-editor/install/firstRun.php:1.2 doc-editor/install/firstRun.php:1.3 --- doc-editor/install/firstRun.php:1.2 Thu Apr 16 17:41:14 2009 +++ doc-editor/install/firstRun.php Sat Apr 18 13:27:47 2009 @@ -32,7 +32,7 @@ } flush(); //We apply all tools for all language -$phpDoc->rev_start(); +$phpDoc->revStart(); if ($isCLI) { echo "\n * Parsing translation data..."; @@ -42,10 +42,10 @@ flush(); // Parse translators -$phpDoc->rev_parse_translation(); +$phpDoc->revParseTranslation(); // We update the last update date/time into DB -$phpDoc->set_last_update(); +$phpDoc->setLastUpdate(); if ($isCLI) { http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.41&r2=1.42&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.41 doc-editor/js/main.js:1.42 --- doc-editor/js/main.js:1.41 Sat Apr 18 09:18:45 2009 +++ doc-editor/js/main.js Sat Apr 18 13:27:47 2009 @@ -82,7 +82,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-conf' + task: 'getConf' }, success: function(action){ var o = Ext.util.JSON.decode(action.responseText); @@ -250,7 +250,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-commit-log-message' + task: 'getCommitLogMessage' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -272,7 +272,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesError' + task: 'getFilesError' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -322,7 +322,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesNeedUpdate' + task: 'getFilesNeedUpdate' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -372,7 +372,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesNeedReviewed' + task: 'getFilesNeedReviewed' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -417,7 +417,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesPendingCommit' + task: 'getFilesPendingCommit' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -463,7 +463,7 @@ url: './php/controller.php' }), baseParams: { - task: 'GetFilesPendingPatch' + task: 'getFilesPendingPatch' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -512,7 +512,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-last-news' + task: 'getLastNews' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -545,7 +545,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-open-bugs' + task: 'getOpenBugs' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -572,7 +572,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-translator-info' + task: 'getTranslatorInfo' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -619,7 +619,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-summary-info' + task: 'getSummaryInfo' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -687,7 +687,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-check-doc-data' + task: 'getCheckDocData' }, reader: new Ext.data.JsonReader({ root: 'Items', @@ -845,7 +845,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-check-doc-files', + task: 'getCheckDocFiles', path: path, errorType: errorType }, @@ -1035,7 +1035,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'after-patch-reject', + task: 'afterPatchReject', PatchUniqID: FileUniqID }, success: function(action){ @@ -1088,7 +1088,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'all', @@ -1112,7 +1112,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'after-patch-accept', + task: 'afterPatchAccept', PatchUniqID: FileUniqID } }); @@ -1158,7 +1158,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'en', @@ -1279,7 +1279,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: FileLang, @@ -1341,7 +1341,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: this.userLang, @@ -1404,7 +1404,7 @@ scope: this, url: './php/controller.php', params: { - task: 'check-file-error', + task: 'checkFileError', FilePath: FilePath, FileName: FileName, FileLang: this.userLang, @@ -1449,7 +1449,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: this.userLang, @@ -1518,7 +1518,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-file', + task: 'getFile', FilePath: FilePath, FileName: FileName }, @@ -1681,7 +1681,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff2', + task: 'getDiff2', FilePath: FilePath, FileName: FileName, Rev1: rev1, @@ -1884,7 +1884,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-LogMessage', + task: 'saveLogMessage', messID: messID, mess: newValue }, @@ -1942,7 +1942,7 @@ scope: this, url: './php/controller.php', params: { - task: 'delete-LogMessage', + task: 'deleteLogMessage', messID: this.storeCommitLogMessage.getAt(rowIndex).data.id }, success: function(action, form){ @@ -2161,7 +2161,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'cvs-commit', + task: 'cvsCommit', nodes: Ext.util.JSON.encode(nodes), logMessage: LogMessage }, @@ -2197,7 +2197,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'on-succes-commit', + task: 'onSuccesCommit', nodes: Ext.util.JSON.encode(nodes), logMessage: LogMessage }, @@ -2244,7 +2244,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'update-repository' + task: 'updateRepository' }, success: function(action){ // Normally, this never succes ! ;) @@ -2268,7 +2268,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_update_repository' }, success: function(action){ @@ -2308,7 +2308,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'apply-tools' + task: 'applyTools' }, success: function(action){ var o = Ext.util.JSON.decode(action.responseText); @@ -2327,7 +2327,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_apply_tools' }, success: function(action){ @@ -2432,7 +2432,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-last-update' + task: 'getLastUpdate' }, success: function(r){ @@ -2469,7 +2469,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'get-logfile', + task: 'getLogFile', file: 'log_check_build' }, success: function(action){ @@ -2534,7 +2534,7 @@ scope: this, url: './php/controller.php', params: { - task: 'check-build', + task: 'checkBuild', xmlDetails: choice }, success: function(action){ @@ -2559,7 +2559,7 @@ scope: scope, url: './php/controller.php', params: { - task: 'check-lock-file', + task: 'checkLockFile', lockFile: 'lock_check_build' }, success: function(action){ @@ -2976,7 +2976,7 @@ scope: this, url: './php/controller.php', params: { - task: 'conf-update', + task: 'confUpdate', item: item, value: v }, @@ -3126,7 +3126,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'send-email', + task: 'sendEmail', to: v.to, subject: v.subject, msg: v.msg @@ -3266,7 +3266,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -3301,7 +3301,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -3828,7 +3828,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -3971,7 +3971,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -4029,7 +4029,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -4064,7 +4064,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -4321,7 +4321,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff2', + task: 'getDiff2', FilePath: 'en' + FilePath, FileName: FileName, Rev2: revision, @@ -4687,7 +4687,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: FilePath, File: FileName }, @@ -4841,7 +4841,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: FilePath, FileName: FileName, type: 'patch', @@ -5115,7 +5115,7 @@ Ext.Ajax.request({ url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: FilePath, FileName: FileName }, @@ -5170,7 +5170,7 @@ scope: this, url: './php/controller.php', params: { - task: 'clear-local-change', + task: 'clearLocalChange', FilePath: FilePath, FileName: FileName }, @@ -5364,7 +5364,7 @@ scope: this, url: './php/controller.php', params: { - task: 'get-diff', + task: 'getDiff', FilePath: this.userLang + FilePath, FileName: FileName }, @@ -5403,7 +5403,7 @@ scope: this, url: './php/controller.php', params: { - task: 'all-files-about-extension', + task: 'getAllFilesAboutExtension', ExtName: group[2] }, success: function(action, form){ @@ -5467,7 +5467,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: this.userLang + FilePath, File: FileName }, @@ -5502,7 +5502,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: 'en' + FilePath, File: FileName }, @@ -6370,6 +6370,19 @@ enableDD: false, containerScroll: true, bodyBorder: false, + tbar:[ + 'Search: ', ' ', + new Ext.form.TwinTriggerField({ + validationEvent:false, + validateOnBlur:false, + trigger1Class:'x-form-clear-trigger', + trigger2Class:'x-form-search-trigger', + hideTrigger1:true, + width:180, + hasSearch : false, + paramName : 'query', + }) + ], listeners: { scope: this, contextmenu: function(node, e){ @@ -6495,7 +6508,7 @@ url: './php/controller.php' }), baseParams: { - task: 'get-log', + task: 'getLog', Path: FilePath, File: FileName }, @@ -6729,7 +6742,7 @@ scope: this, url: './php/controller.php', params: { - task: 'save-file', + task: 'saveFile', filePath: FilePath, fileName: FileName, fileLang: 'all', @@ -6879,7 +6892,7 @@ scope: this, url: './php/controller.php', params: { - task: 'erase-personal-data' + task: 'erasePersonalData' }, success: function(action){ http://cvs.php.net/viewvc.cgi/doc-editor/php/BugReader.php?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/php/BugReader.php diff -u doc-editor/php/BugReader.php:1.1 doc-editor/php/BugReader.php:1.2 --- doc-editor/php/BugReader.php:1.1 Sat Apr 18 08:15:43 2009 +++ doc-editor/php/BugReader.php Sat Apr 18 13:27:47 2009 @@ -28,7 +28,7 @@ * * @return An indexed array (id, title, description, link, pubDate) readable by ExtJs */ - function getLastBugs() { + function getOpenBugs() { $url = 'http://bugs.php.net/rss/search.php?cmd=display&bug_type[]=Translation+problem&status=Open&search_for=&php_os=&php_os_not=0&boolean=1&author_email=&bug_age=0&by=&order_by=id&direction=DESC&phpver=&limit=All&assign=&format=rss'; http://cvs.php.net/viewvc.cgi/doc-editor/php/class.php?r1=1.34&r2=1.35&diff_format=u Index: doc-editor/php/class.php diff -u doc-editor/php/class.php:1.34 doc-editor/php/class.php:1.35 --- doc-editor/php/class.php:1.34 Sat Apr 18 09:18:45 2009 +++ doc-editor/php/class.php Sat Apr 18 13:27:47 2009 @@ -250,7 +250,7 @@ * Part of the revcheck tools. Start the Revcheck tools. * @return Nothing. */ - function rev_start() { + function revStart() { $this->db->query("INSERT INTO dirs (parentDir, name) VALUES (0, '/');"); $firstDir = $this->db->insert_id; @@ -604,7 +604,7 @@ * @param $tags_attrs The string to parse. * @return An associated array who key are the name of the attribut, and value, the value of the attribut. */ - function rev_parse_attr_string($tags_attrs) { + function revParseAttrString($tags_attrs) { $tag_attrs_processed = array(); // Go through the tag attributes @@ -626,7 +626,7 @@ return $tag_attrs_processed; } - function rev_check_old_files($dir = '') { + function revCheckOldFiles($dir = '') { if ($dh = opendir(DOC_EDITOR_CVS_PATH . $this->cvsLang . $dir)) { @@ -674,7 +674,7 @@ // Directories.. if (!empty($entriesDir)) { foreach ($entriesDir as $Edir) { - $this->rev_check_old_files($dir . '/' . $Edir); + $this->revCheckOldFiles($dir . '/' . $Edir); } } } @@ -685,7 +685,7 @@ * Part of the revcheck tools. Parse the translation's file witch hold all informations about all translators and put it into database. * @return Nothing. */ - function rev_parse_translation() { + function revParseTranslation() { reset($this->availableLanguage); while (list(, $lang) = each($this->availableLanguage)) { @@ -706,7 +706,7 @@ $matches = array(); if (preg_match_all('!<person (.+)/\\s?>!U', $txml, $matches)) { $default = array('cvs' => 'n/a', 'nick' => 'n/a', 'editor' => 'n/a', 'email' => 'n/a', 'name' => 'n/a'); - $persons = $this->rev_parse_attr_string($matches[1]); + $persons = $this->revParseAttrString($matches[1]); $charset = $this->getFileEncoding($txml, 'content'); @@ -731,7 +731,7 @@ * Get all modified files. * @return An associated array containing all informations about modified files. */ - function get_modified_files() { + function getModifiedFiles() { // Get Modified Files $s = sprintf('SELECT `id`, `lang`, `path`, `name`, CONCAT("1.", `revision`) AS `revision`, @@ -754,10 +754,10 @@ * Get all files witch need to be updated. * @return An associated array containing all informations about files witch need to be updated. */ - function get_files_need_update() { + function getFilesNeedUpdate() { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); $s = 'SELECT * FROM `files` WHERE `lang` = \''.$this->cvsLang.'\' AND `revision` != `en_revision`'; $r = $this->db->query($s); @@ -811,10 +811,10 @@ * Get all files witch need to be reviewed. * @return An associated array containing all informations about files witch need to be reviewed. */ - function get_files_need_reviewed() { + function getFilesNeedReviewed() { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); $s = 'SELECT * FROM `files` WHERE `lang` = \''.$this->cvsLang.'\' AND `revision` = `en_revision` AND reviewed != \'yes\' LIMIT 100'; $r = $this->db->query($s); @@ -859,7 +859,7 @@ * Get all pending patch. * @return An associated array containing all informations about pending patch. */ - function get_files_pending_patch() { + function getFilesPendingPatch() { $s = 'SELECT `id`, CONCAT(`lang`, `path`) AS path, `name`, `posted_by` AS \'by\', `uniqID`, `date` FROM `pendingPatch` WHERE `lang`=\''.$this->cvsLang.'\' OR `lang`=\'en\''; @@ -879,7 +879,7 @@ * Get all files pending for commit. * @return An associated array containing all informations about files pending for commit. */ - function get_files_pending_commit() { + function getFilesPendingCommit() { $s = 'SELECT * FROM `pendingCommit` WHERE `lang`=\''.$this->cvsLang.'\' OR `lang`=\'en\''; $r = $this->db->query($s) or die($this->db->error); @@ -923,7 +923,7 @@ * Get all statistiques about translators. * @return An indexed array containing all statistiques about translators (nb uptodate files, nb old files, etc...) */ - function get_translators_info() { + function getTranslatorsInfo() { $translators = $this->get_translators(); $uptodate = $this->translator_get_uptodate(); @@ -947,17 +947,17 @@ * Get summary of all statistiques. * @return An indexed array containing all statistiques for the summary */ - function get_summary_info() { + function getSummaryInfo() { - $nbFiles = $this->get_nb_files(); + $nbFiles = $this->getNbFiles(); - $uptodate = $this->get_nb_files_Translated(); - $old = $this->get_stats_old(); - $critical = $this->get_stats_critical(); + $uptodate = $this->getNbFilesTranslated(); + $old = $this->getStatsOld(); + $critical = $this->getStatsCritical(); - $missFiles = $this->get_stats_notrans(); + $missFiles = $this->getStatsNoTrans(); - $withoutRevTag = $this->get_stats_notag(); + $withoutRevTag = $this->getStatsNoTag(); $nbFiles[1] = $uptodate[1]+$old[1]+$critical[1]+$withoutRevTag[1]+$missFiles[1]; @@ -1110,7 +1110,7 @@ * Get number of files. * @return An indexed array. */ - function get_nb_files() { + function getNbFiles() { $sql = ' SELECT COUNT(*) AS total, @@ -1131,7 +1131,7 @@ * Get number of translated files. * @return Number of translated files. */ - function get_nb_files_Translated() { + function getNbFilesTranslated() { $sql = 'SELECT COUNT(name) AS total, @@ -1154,7 +1154,7 @@ * Get statistic about critical files witch need to be updated. * @return An associated array (total=>nb files, total_size=>size of this files). */ - function get_stats_critical() { + function getStatsCritical() { $sql = 'SELECT COUNT(name) AS total, SUM(size) AS total_size @@ -1182,7 +1182,7 @@ * Get statistic about old files witch need to be deleted from LANG tree. * @return An associated array (total=>nb files, total_size=>size of this files). */ - function get_stats_old() + function getStatsOld() { $sql = 'SELECT COUNT(name) AS total, @@ -1214,7 +1214,7 @@ * Get statistic about files witch need to be translated. * @return An associated array (total=>nb files, size=>size of this files). */ - function get_stats_notrans() + function getStatsNoTrans() { $sql = 'SELECT COUNT(a.name) as total, @@ -1249,7 +1249,7 @@ * Get statistic about missed files witch need to be added to LANG tree. * @return An array of missed files (size=>size of the file, file=>name of the file). */ - function get_missfiles() + function getMissFiles() { $sql = 'SELECT b.size as size, @@ -1290,7 +1290,7 @@ * Get statistic about files witch haven't revcheck's tags. * @return An associated array (total=>nb files, size=>size of this files). */ - function get_stats_notag() + function getStatsNoTag() { $sql = 'SELECT COUNT(a.name) as total, @@ -1338,7 +1338,7 @@ $match = array(); preg_match('!<\?xml(.+)\?>!U', $txml, $match); - $xmlinfo = $this->rev_parse_attr_string($match); + $xmlinfo = $this->revParseAttrString($match); $charset = (isset($xmlinfo[1]['encoding'])) ? strtolower($xmlinfo[1]['encoding']) : 'iso-8859-1'; @@ -1360,7 +1360,7 @@ $file = $FilePath.$FileName; // Is this file modified ? - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); if (isset($ModifiedFiles[$file])) { $extension = '.new'; } else { $extension = ''; } @@ -1994,7 +1994,7 @@ function getAllFiles($node) { // Get Files Need Commit - $ModifiedFiles = $this->get_modified_files(); + $ModifiedFiles = $this->getModifiedFiles(); // Security $node = str_replace('..', '', $node); @@ -2052,7 +2052,7 @@ $this->db->query($s) or die($this->db->error); } - function allFilesExtension($ExtName) { + function getAllFilesAboutExtension($ExtName) { $s = 'SELECT `path`, `name` FROM `files` WHERE `path` LIKE \'/reference/'.$ExtName.'/%\' AND lang=\''.$this->cvsLang.'\' ORDER BY `path`, `name`'; $r = $this->db->query($s) or die($this->db->error); @@ -2333,7 +2333,7 @@ } // check_doc - function get_Check_Doc_Data() { + function getCheckDocData() { $node = array(); @@ -2388,9 +2388,9 @@ return array('nb' => $nb, 'node' => $node); - } //get_Check_Doc_Data + } //getCheckDocData - function get_Check_Doc_Files($path, $errorType) + function getCheckDocFiles($path, $errorType) { $s = sprintf('SELECT name FROM `files` WHERE `lang`="en" AND `path`="%s" AND `%s`=1', $path, $errorType); $r = $this->db->query($s); @@ -2406,7 +2406,7 @@ * Get the last update datetime * @return The last update datetime or "in_progress" if the update is in progress */ - function get_last_update() + function getLastUpdate() { // Test is there is an update in progress $lock_update = new LockFile('lock_update_repository'); @@ -2430,7 +2430,7 @@ * Set the last update datetime into DB * @return Nothing */ - function set_last_update() + function setLastUpdate() { $s = 'SELECT lastupdate, `by` FROM `project` WHERE `name`="php"'; @@ -2446,6 +2446,6 @@ return; - } // get_last_update + } // } // End of class http://cvs.php.net/viewvc.cgi/doc-editor/php/ExtJsController.php?r1=1.16&r2=1.17&diff_format=u Index: doc-editor/php/ExtJsController.php diff -u doc-editor/php/ExtJsController.php:1.16 doc-editor/php/ExtJsController.php:1.17 --- doc-editor/php/ExtJsController.php:1.16 Sat Apr 18 09:21:16 2009 +++ doc-editor/php/ExtJsController.php Sat Apr 18 13:27:47 2009 @@ -126,7 +126,7 @@ } - public function update_repository() + public function updateRepository() { $this->phpDoc->isLogged(); @@ -138,7 +138,7 @@ return $this->getSuccess(); } - public function check_lock_file() + public function checkLockFile() { $lockFile = $this->getRequestVariable('lockFile'); @@ -148,7 +148,7 @@ return $lock->isLocked() ? $this->getSuccess() : $this->getFailure(); } - public function apply_tools() + public function applyTools() { $this->phpDoc->isLogged(); @@ -159,13 +159,13 @@ if ($lock->lock()) { // Start Revcheck - $this->phpDoc->rev_start(); + $this->phpDoc->revStart(); // Parse translators - $this->phpDoc->rev_parse_translation(); + $this->phpDoc->revParseTranslation(); // Set lastUpdate date/time - $this->phpDoc->set_last_update(); + $this->phpDoc->setLastUpdate(); // Check errors in files // $tool = new ToolsError($_SESSION['lang']); @@ -199,24 +199,6 @@ } } - /* - public function wizard_createworkspace() { - $cvsLogin = $this->getRequestVariable('cvsLogin'); - $cvsPasswd = $this->getRequestVariable('cvsPasswd'); - $cvsLang = $this->getRequestVariable('cvsLang'); - $this->phpDoc->register_user($cvsLogin, $cvsPasswd, $cvsLang); - $this->phpDoc->createWorkSpace(); - return $this->getSuccess(); - } - */ - - public function wizard_checkout() - { - $this->phpDoc->isLogged(); - $this->phpDoc->checkoutRepository(); - return $this->getSuccess(); - } - /** * Pings the server and user session * @@ -225,7 +207,7 @@ public function ping() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_last_update(); + $r = $this->phpDoc->getLastUpdate(); $response = !isset($_SESSION['userID']) ? 'false' : 'pong'; @@ -234,67 +216,69 @@ } //NEW - public function GetFilesNeedUpdate() { + public function getFilesNeedUpdate() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_need_update(); + $r = $this->phpDoc->getFilesNeedUpdate(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesNeedReviewed() { + public function getFilesNeedReviewed() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_need_reviewed(); + $r = $this->phpDoc->getFilesNeedReviewed(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesError() { + public function getFilesError() { $this->phpDoc->isLogged(); - $errorTools = new ToolsError($this->phpDoc->db); $errorTools->setParams('', '', $this->phpDoc->cvsLang, '', '', ''); - $r = $errorTools->getFilesError($this->phpDoc->get_modified_files()); - - //$r = $this->phpDoc->get_files_error(); - + $r = $errorTools->getFilesError($this->phpDoc->getModifiedFiles()); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesPendingCommit() { + public function getFilesPendingCommit() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_pending_commit(); + + $r = $this->phpDoc->getFilesPendingCommit(); + return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } // NEW - public function GetFilesPendingPatch() { + public function getFilesPendingPatch() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_files_pending_patch(); + + $r = $this->phpDoc->getFilesPendingPatch(); + return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } //NEW - public function get_translator_info() { + public function getTranslatorInfo() { $this->phpDoc->isLogged(); - $translators = $this->phpDoc->get_translators_info(); + $translators = $this->phpDoc->getTranslatorsInfo(); + return $this->getResponse(array('nbItems' => count($translators), 'Items' => $translators)); } //NEW - public function get_summary_info() { + public function getSummaryInfo() { $this->phpDoc->isLogged(); - $summary = $this->phpDoc->get_summary_info(); + $summary = $this->phpDoc->getSummaryInfo(); + return $this->getResponse(array('nbItems' => count($summary), 'Items' => $summary)); } - public function get_last_news() { + public function getLastNews() { $this->phpDoc->isLogged(); @@ -304,17 +288,17 @@ return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_open_bugs() { + public function getOpenBugs() { $this->phpDoc->isLogged(); $bugs = new BugReader($this->phpDoc->cvsLang); - $r = $bugs->getLastBugs(); + $r = $bugs->getOpenBugs(); return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_file() { + public function getFile() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -337,7 +321,7 @@ // NEW - public function check_file_error() { + public function checkFileError() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -379,7 +363,7 @@ } // NEW - public function save_file() { + public function saveFile() { $this->phpDoc->isLogged(); @@ -450,7 +434,7 @@ } // NEW - public function get_log() { + public function getLog() { $this->phpDoc->isLogged(); $Path = $this->getRequestVariable('Path'); @@ -460,7 +444,7 @@ return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function get_diff() { + public function getDiff() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -477,7 +461,7 @@ } //NEW - public function get_diff2() { + public function getDiff2() { $this->phpDoc->isLogged(); $FilePath = $this->getRequestVariable('FilePath'); @@ -494,7 +478,7 @@ } - public function erase_personal_data() { + public function erasePersonalData() { $this->phpDoc->isLogged(); @@ -507,33 +491,15 @@ } - public function get_commit_log_message() { + public function getCommitLogMessage() { $this->phpDoc->isLogged(); $r = $this->phpDoc->getCommitLogMessage(); return $this->getResponse(array('nbItems' => count($r), 'Items' => $r)); } - public function update_single_file() { - - $file = $this->getRequestVariable('file'); - $path = $this->getRequestVariable('path'); - - $this->phpDoc->isLogged(); - // Reel Update EN - $this->phpDoc->cvsUpdateSingleFile($file, $path); - // Reel Update Lang - $this->phpDoc->cvsUpdateSingleFile($file, $path, 'lang'); - - // Do revcheck for just this file - $this->phpDoc->rev_on_oneFile($file, $path); - - // Need return EN_revision for translated file and revision of EN file - - } - //NEW - public function clear_local_change() { + public function clearLocalChange() { $this->phpDoc->isLogged(); if ($this->phpDoc->cvsLogin == 'cvsread') { @@ -553,7 +519,7 @@ return $this->getResponse($return); } - public function get_logfile() + public function getLogFile() { $this->phpDoc->isLogged(); @@ -566,7 +532,7 @@ } - public function check_build() + public function checkBuild() { $this->phpDoc->isLogged(); @@ -590,7 +556,7 @@ return $this->getSuccess(); } - public function cvs_commit() { + public function cvsCommit() { $this->phpDoc->isLogged(); if ($this->phpDoc->cvsLogin == 'cvsread') { @@ -607,7 +573,7 @@ return $this->getResponse(array('success' => true, 'mess' => $r)); } - public function on_succes_commit() { + public function onSuccesCommit() { $this->phpDoc->isLogged(); @@ -647,8 +613,6 @@ $errorTools = new ToolsError($this->phpDoc->db); $errorTools->updateFilesError($anode); - //$this->phpDoc->updateFilesError($anode); - // Remove all this files in needcommit $this->phpDoc->removeNeedCommit($anode); @@ -658,7 +622,7 @@ } - public function get_conf() { + public function getConf() { $this->phpDoc->isLogged(); $r['userLang'] = $this->phpDoc->cvsLang; @@ -668,7 +632,7 @@ return $this->getResponse(array('success' => true, 'mess' => $r)); } - public function send_email() { + public function sendEmail() { $this->phpDoc->isLogged(); @@ -680,7 +644,7 @@ return $this->getSuccess(); } - public function conf_update() { + public function confUpdate() { $this->phpDoc->isLogged(); @@ -702,7 +666,7 @@ return $this->getResponse($files); } - public function save_LogMessage() { + public function saveLogMessage() { $this->phpDoc->isLogged(); @@ -717,7 +681,7 @@ return $this->getSuccess(); } - public function delete_LogMessage() { + public function deleteLogMessage() { $this->phpDoc->isLogged(); @@ -731,18 +695,18 @@ return $this->getSuccess(); } - public function all_files_about_extension() { + public function getAllFilesAboutExtension() { $this->phpDoc->isLogged(); $ExtName = $this->getRequestVariable('ExtName'); - $r = $this->phpDoc->allFilesExtension($ExtName); + $r = $this->phpDoc->getAllFilesAboutExtension($ExtName); return $this->getResponse(array('success' => true, 'files' => $r)); } - public function after_patch_accept() { + public function afterPatchAccept() { $this->phpDoc->isLogged(); @@ -752,7 +716,7 @@ return $this->getSuccess(); } - public function after_patch_reject() { + public function afterPatchReject() { $this->phpDoc->isLogged(); @@ -767,23 +731,23 @@ return $this->getSuccess(); } - public function get_check_doc_data() { + public function getCheckDocData() { $this->phpDoc->isLogged(); - $r = $this->phpDoc->get_Check_Doc_Data(); + $r = $this->phpDoc->getCheckDocData(); return $this->getResponse(array('nbItems' => $r['nb'], 'Items' => $r['node'])); } - public function get_check_doc_files() { + public function getCheckDocFiles() { $this->phpDoc->isLogged(); $path = $this->getRequestVariable('path'); $errorType = $this->getRequestVariable('errorType'); - $r = $this->phpDoc->get_Check_Doc_Files($path, $errorType); + $r = $this->phpDoc->getCheckDocFiles($path, $errorType); return $this->getResponse(array('success' => true, 'files' => $r)); } @@ -828,21 +792,21 @@ $this->phpDoc->isLogged(); - $Total_files_lang = $this->phpDoc->get_nb_files(); + $Total_files_lang = $this->phpDoc->getNbFiles(); $Total_files_lang = $Total_files_lang[0]; // - $up_to_date = $this->phpDoc->get_nb_files_Translated(); + $up_to_date = $this->phpDoc->getNbFilesTranslated(); $up_to_date = $up_to_date[0]; // - $critical = $this->phpDoc->get_stats_critical(); + $critical = $this->phpDoc->getStatsCritical(); $critical = $critical[0]; // - $old = $this->phpDoc->get_stats_old(); + $old = $this->phpDoc->getStatsOld(); $old = $old[0]; // - $missing = sizeof($this->phpDoc->get_missfiles()); + $missing = sizeof($this->phpDoc->getMissFiles()); // - $no_tag = $this->phpDoc->get_stats_notag(); + $no_tag = $this->phpDoc->getStatsNoTag(); $no_tag = $no_tag[0]; // $data = array($up_to_date,$critical,$old,$missing,$no_tag); @@ -902,7 +866,7 @@ return ''; } - public function get_last_update() { + public function getLastUpdate() { $this->phpDoc->isLogged(); $r = $this->phpDoc->get_last_update();