From 7ba0c35e35ad235e3588c3847336a56e0f50e18f Mon Sep 17 00:00:00 2001 From: dingguodong Date: Mon, 13 Sep 2021 10:45:02 +0800 Subject: [PATCH 1/5] * Correct the misspelled word. --- bin/php/crond.php | 2 +- doc/CHANGELOG | 2 +- framework/base/control.class.php | 6 +- framework/base/model.class.php | 2 +- framework/base/router.class.php | 24 ++-- framework/control.class.php | 2 +- module/extension/config.php | 2 +- module/extension/control.php | 74 ++++++------ module/extension/model.php | 188 +++++++++++++++---------------- module/upgrade/model.php | 2 +- www/js/jquery/form/zentao.js | 4 +- 11 files changed, 154 insertions(+), 154 deletions(-) diff --git a/bin/php/crond.php b/bin/php/crond.php index fe0f598700..8397d114e1 100755 --- a/bin/php/crond.php +++ b/bin/php/crond.php @@ -10,7 +10,7 @@ * @version $Id$ * @link http://www.zentao.net */ -/* Set pathes and timezone. */ +/* Set paths and timezone. */ $zentaoPath = dirname(dirname(dirname(__FILE__))) . "/"; $cronPath = $zentaoPath . 'bin/cron'; include $zentaoPath . 'config/config.php'; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 95121bb27d..5803e6f947 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3432,7 +3432,7 @@ Bug影响版本为多个时,统计报表无法统计。 1174 将todo/view/footer.html.php移到todo/common.js 1171 删除的用户名字上没有加横线 1087 调整代码高亮的展示形式 -947 将pathFix变量改用DIRECTORY_SEPERATOR的缩写DS +947 将pathFix变量改用DIRECTORY_SEPARATOR的缩写DS 945 处理common和commonmodel的关系和逻辑 722 清除没有使用的语言条目 441 将统计报表程序移至model层 diff --git a/framework/base/control.class.php b/framework/base/control.class.php index 086d748364..ddc4864630 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -177,7 +177,7 @@ class baseControl * The construct function. * * 1. global the global vars, refer them by the class member such as $this->app. - * 2. set the pathes of current module, and load it's model class. + * 2. set the paths of current module, and load it's model class. * 3. auto assign the $lang and $config to the view. * * @param string $moduleName @@ -708,7 +708,7 @@ class baseControl /** * 切换到视图文件所在的目录,以保证视图文件里面的include语句能够正常运行。 - * Change the dir to the view file to keep the relative pathes work. + * Change the dir to the view file to keep the relative paths work. */ $currentPWD = getcwd(); chdir(dirname($viewFile)); @@ -778,7 +778,7 @@ class baseControl /** * 设置引用的文件和路径。 - * Set the pathes and files to included. + * Set the paths and files to included. */ $modulePath = $this->app->getModulePath($appName, $moduleName); $moduleControlFile = $modulePath . 'control.php'; diff --git a/framework/base/model.class.php b/framework/base/model.class.php index 0ce7ba892f..d66e9fca80 100644 --- a/framework/base/model.class.php +++ b/framework/base/model.class.php @@ -129,7 +129,7 @@ class baseModel * * The construct function. * 1. global the global vars, refer them by the class member such as $this->app. - * 2. set the pathes, config, lang of current module + * 2. set the paths, config, lang of current module * * @param string $appName * @access public diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 998053506b..122d219b6a 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1025,7 +1025,7 @@ class baseRouter /** * 设置站点代号,可以针对不同的站点来加载不同的扩展。 - * Set the code of current site, thus can load diffrent extension of diffrent site. + * Set the code of current site, thus can load different extension of different site. * * @access public * @return void @@ -1075,7 +1075,7 @@ class baseRouter /** * 解析本次请求的入口方法,根据请求的类型(PATH_INFO GET),调用相应的方法。 - * The entrance of parseing request. According to the requestType, call related methods. + * The entrance of parsing request. According to the requestType, call related methods. * * @access public * @return void @@ -1215,7 +1215,7 @@ class baseRouter } /** - * 获取$vewType变量。 + * 获取$viewType变量。 * Get the $viewType var. * * @access public @@ -1237,8 +1237,8 @@ class baseRouter * * Load the common module * - * The common module is a special module, which can be used to do some common things. For examle: - * start session, check priviledge and so on. + * The common module is a special module, which can be used to do some common things. For example: + * start session, check privilege and so on. * This method should called manually in the router file(www/index.php) after the $lang, $config, $dbh loaded. * * @access public @@ -1393,7 +1393,7 @@ class baseRouter { $moduleExtPaths = $this->getModuleExtPath('', $this->moduleName, 'control'); - /* 如果扩展目录为空,不包含任何扩展文件。If there's no ext pathes return false.*/ + /* 如果扩展目录为空,不包含任何扩展文件。If there's no ext paths return false.*/ if(empty($moduleExtPaths)) return false; /* 如果extensionLevel == 2,且扩展文件存在,返回该站点扩展文件。If extensionLevel == 2 and site extensionFile exists, return it. */ @@ -1633,7 +1633,7 @@ class baseRouter { /* * 根据$requestFix分割符,分割网址。 - * There's the request seperator, split the URI by it. + * There's the request separator, split the URI by it. **/ if(strpos($this->URI, $this->config->requestFix) !== false) { @@ -1643,7 +1643,7 @@ class baseRouter } /* * 如果网址中没有分隔符,使用默认的方法。 - * No reqeust seperator, use the default method name. + * No request separator, use the default method name. **/ else { @@ -1966,7 +1966,7 @@ class baseRouter $classFile .= '.class.php'; if(!helper::import($classFile)) $this->triggerError("class file $classFile not found", __FILE__, __LINE__, $exit = true); - /* 如果是静态调用,则返回(If staitc, return) */ + /* 如果是静态调用,则返回(If static, return) */ if($static) return true; /* 实例化该类(Instance it) */ @@ -2267,7 +2267,7 @@ class baseRouter /* * 发现错误,保存到日志中。 - * If any error occers, save it. + * If any error occurs, save it. * */ if(!function_exists('error_get_last')) return; $error = error_get_last(); @@ -2279,8 +2279,8 @@ class baseRouter * Trigger an error. * * @param string $message 错误信息 error message - * @param string $file 所在文件 the file error occers - * @param int $line 错误行 the line error occers + * @param string $file 所在文件 the file error occurs + * @param int $line 错误行 the line error occurs * @param bool $exit 是否停止程序 exit the program or not * @access public * @return void diff --git a/framework/control.class.php b/framework/control.class.php index eb79ef2e00..3554707ffd 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -230,7 +230,7 @@ class control extends baseControl /** * 切换到视图文件所在的目录,以保证视图文件里面的include语句能够正常运行。 - * Change the dir to the view file to keep the relative pathes work. + * Change the dir to the view file to keep the relative paths work. */ $currentPWD = getcwd(); chdir(dirname($viewFile)); diff --git a/module/extension/config.php b/module/extension/config.php index 8ffd0ccfcf..101ccbe5ef 100644 --- a/module/extension/config.php +++ b/module/extension/config.php @@ -1,4 +1,4 @@ extension = new stdclass(); $config->extension->apiRoot = 'https://api.zentao.net/extension-'; -$config->extension->extPathes = array('module', 'bin', 'www', 'library', 'config'); +$config->extension->extPaths = array('module', 'bin', 'www', 'library', 'config'); diff --git a/module/extension/control.php b/module/extension/control.php index f2d0587761..36d63875d6 100644 --- a/module/extension/control.php +++ b/module/extension/control.php @@ -13,9 +13,9 @@ class extension extends control { /** * Construct function. - * - * @param string $moduleName - * @param string $methodName + * + * @param string $moduleName + * @param string $methodName * @access public * @return void */ @@ -79,9 +79,9 @@ class extension extends control /** * Obtain extensions from the community. - * - * @param string $type - * @param string $param + * + * @param string $type + * @param string $param * @access public * @return void */ @@ -119,16 +119,16 @@ class extension extends control /** * Install a extension - * - * @param string $extension - * @param string $downLink - * @param string $md5 - * @param string $type - * @param string $overridePackage - * @param string $ignoreCompatible - * @param string $overrideFile - * @param string $agreeLicense - * @param int $upgrade + * + * @param string $extension + * @param string $downLink + * @param string $md5 + * @param string $type + * @param string $overridePackage + * @param string $ignoreCompatible + * @param string $overrideFile + * @param string $agreeLicense + * @param int $upgrade * @access public * @return void */ @@ -138,12 +138,12 @@ class extension extends control $this->view->error = ''; $installTitle = $upgrade == 'no' ? $this->lang->extension->install : $this->lang->extension->upgrade; - $installType = $upgrade == 'no' ? $this->lang->extension->installExt : $this->lang->extension->upgradeExt; + $installType = $upgrade == 'no' ? $this->lang->extension->installExt : $this->lang->extension->upgradeExt; $this->view->installType = $installType; $this->view->upgrade = $upgrade; $this->view->title = $installTitle . $extension; - + $statusFile = $this->loadModel('common')->checkSafeFile(); if($statusFile) { @@ -154,14 +154,14 @@ class extension extends control $packageFile = $this->extension->getPackageFile($extension); /* Check the package file exists or not. */ - if(!file_exists($packageFile)) + if(!file_exists($packageFile)) { $this->view->error = sprintf($this->lang->extension->errorPackageNotFound, $packageFile); die($this->display()); } - /* Checking the extension pathes. */ - $return = $this->extension->checkExtensionPathes($extension); + /* Checking the extension paths. */ + $return = $this->extension->checkExtensionPaths($extension); if($this->session->dirs2Created == false) $this->session->set('dirs2Created', $return->dirs2Created, 'admin'); // Save the dirs to be created. if($return->result != 'ok') { @@ -328,8 +328,8 @@ class extension extends control /** * Uninstall an extension. - * - * @param string $extension + * + * @param string $extension * @access public * @return void */ @@ -367,8 +367,8 @@ class extension extends control /** * Activate an extension; - * - * @param string $extension + * + * @param string $extension * @access public * @return void */ @@ -395,8 +395,8 @@ class extension extends control /** * Deactivate an extension - * - * @param string $extension + * + * @param string $extension * @access public * @return void */ @@ -411,7 +411,7 @@ class extension extends control /** * Upload an extension - * + * * @access public * @return void */ @@ -461,8 +461,8 @@ class extension extends control /** * Erase an extension. - * - * @param string $extension + * + * @param string $extension * @access public * @return void */ @@ -476,11 +476,11 @@ class extension extends control /** * Update extension. - * - * @param string $extension - * @param string $downLink - * @param string $md5 - * @param string $type + * + * @param string $extension + * @param string $downLink + * @param string $md5 + * @param string $type * @access public * @return void */ @@ -492,8 +492,8 @@ class extension extends control /** * Browse the structure of extension. - * - * @param int $extension + * + * @param int $extension * @access public * @return void */ diff --git a/module/extension/model.php b/module/extension/model.php index 1090d433db..3bbe421a71 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -12,13 +12,13 @@ class extensionModel extends model { /** - * The extension manager version. Don't change it. + * The extension manager version. Don't change it. */ const EXT_MANAGER_VERSION = '1.3'; /** * The api root. - * + * * @var string * @access public */ @@ -26,7 +26,7 @@ class extensionModel extends model /** * The construct function. - * + * * @access public * @return void */ @@ -39,7 +39,7 @@ class extensionModel extends model /** * Set the apiRoot. - * + * * @access public * @return void */ @@ -50,8 +50,8 @@ class extensionModel extends model /** * Fetch data from an api. - * - * @param string $url + * + * @param string $url * @access public * @return mixed */ @@ -83,7 +83,7 @@ class extensionModel extends model /** * Get extension modules from the api. - * + * * @access public * @return string|bool */ @@ -99,9 +99,9 @@ class extensionModel extends model /** * Get extensions by some condition. - * - * @param string $type - * @param mixed $param + * + * @param string $type + * @param mixed $param * @access public * @return array|bool */ @@ -123,8 +123,8 @@ class extensionModel extends model /** * Get versions for some extensions. - * - * @param string $extensions + * + * @param string $extensions * @access public * @return array|bool */ @@ -139,8 +139,8 @@ class extensionModel extends model /** * Check incompatible extension - * - * @param array $versions + * + * @param array $versions * @access public * @return array */ @@ -155,8 +155,8 @@ class extensionModel extends model /** * Get extensions by status. - * - * @param string $status + * + * @param string $status * @access public * @return array */ @@ -172,8 +172,8 @@ class extensionModel extends model /** * Get extension info from database. - * - * @param string $extension + * + * @param string $extension * @access public * @return object */ @@ -184,8 +184,8 @@ class extensionModel extends model /** * Get info of an extension from the package file. - * - * @param string $extension + * + * @param string $extension * @access public * @return object */ @@ -215,8 +215,8 @@ class extensionModel extends model /** * Parse extension's config file. - * - * @param string $extension + * + * @param string $extension * @access public * @return object */ @@ -229,7 +229,7 @@ class extensionModel extends model if(file_exists($infoFile)) return (object)parse_ini_file($infoFile); /** - * Then try parse yaml file. since 2.5 version. + * Then try parse yaml file. since 2.5 version. */ /* Try the yaml of current lang, then try en. */ @@ -255,9 +255,9 @@ class extensionModel extends model } /** - * Get the full path of the zip file of a extension. - * - * @param string $extension + * Get the full path of the zip file of a extension. + * + * @param string $extension * @access public * @return string */ @@ -267,15 +267,15 @@ class extensionModel extends model } /** - * Get pathes from an extension package. - * - * @param string $extension + * Get paths from an extension package. + * + * @param string $extension * @access public * @return array */ - public function getPathesFromPackage($extension) + public function getPathsFromPackage($extension) { - $pathes = array(); + $paths = array(); $packageFile = $this->getPackageFile($extension); /* Get files from the package file. */ @@ -289,20 +289,20 @@ class extensionModel extends model $file = (object)$file; if($file->folder) continue; $file->filename = substr($file->filename, strpos($file->filename, '/') + 1); - $pathes[] = dirname($file->filename); + $paths[] = dirname($file->filename); } } - /* Append the pathes to stored the extracted files. */ - $pathes[] = "module/extension/ext/"; + /* Append the paths to stored the extracted files. */ + $paths[] = "module/extension/ext/"; - return array_unique($pathes); + return array_unique($paths); } /** * Get all files from a package. - * - * @param string $extension + * + * @param string $extension * @access public * @return array */ @@ -314,9 +314,9 @@ class extensionModel extends model } /** - * Get the extension's condition. - * - * @param string $extenstion + * Get the extension's condition. + * + * @param string $extenstion * @access public * @return object */ @@ -341,8 +341,8 @@ class extensionModel extends model /** * Process license. If is opensource return the full text of it. - * - * @param string $license + * + * @param string $license * @access public * @return string */ @@ -358,9 +358,9 @@ class extensionModel extends model /** * Get hook file for install or uninstall. - * - * @param string $extension - * @param string $hook preinstall|postinstall|preuninstall|postuninstall + * + * @param string $extension + * @param string $hook preinstall|postinstall|preuninstall|postuninstall * @access public * @return string|bool */ @@ -373,9 +373,9 @@ class extensionModel extends model /** * Get the install db file. - * - * @param string $extension - * @param string $method + * + * @param string $extension + * @param string $method * @access public * @return string */ @@ -386,7 +386,7 @@ class extensionModel extends model /** * Check the download path. - * + * * @access public * @return object the check result. */ @@ -422,12 +422,12 @@ class extensionModel extends model /** * Check extension files. - * - * @param string $extension + * + * @param string $extension * @access public * @return object the check result. */ - public function checkExtensionPathes($extension) + public function checkExtensionPaths($extension) { $return = new stdclass(); $return->result = 'ok'; @@ -437,8 +437,8 @@ class extensionModel extends model $return->dirs2Created = array(); $appRoot = $this->app->getAppRoot(); - $pathes = $this->getPathesFromPackage($extension); - foreach($pathes as $path) + $paths = $this->getPathsFromPackage($extension); + foreach($paths as $path) { if($path == 'db' or $path == 'doc' or $path == 'hook') continue; $path = $appRoot . $path; @@ -471,8 +471,8 @@ class extensionModel extends model /** * Check the extension's version is compatibility for zentao version - * - * @param string $version + * + * @param string $version * @access public * @return bool */ @@ -486,8 +486,8 @@ class extensionModel extends model /** * Check files in the package conflicts with exists files or not. - * - * @param string $extension + * + * @param string $extension * @param string $type * @param bool $isCheck * @access public @@ -514,12 +514,12 @@ class extensionModel extends model /** * Extract an extension. - * - * @param string $extension + * + * @param string $extension * @access public * @return object */ - public function extractPackage($extension) + public function extractPackage($extension) { $return = new stdclass(); $return->result = 'ok'; @@ -545,9 +545,9 @@ class extensionModel extends model } /** - * Copy package files. - * - * @param int $extension + * Copy package files. + * + * @param int $extension * @access public * @return array */ @@ -555,10 +555,10 @@ class extensionModel extends model { $appRoot = $this->app->getAppRoot(); $extensionDir = "ext/$extension/"; - $pathes = scandir($extensionDir); + $paths = scandir($extensionDir); $copiedFiles = array(); - foreach($pathes as $path) + foreach($paths as $path) { if($path == 'db' or $path == 'doc' or $path == 'hook' or $path == '..' or $path == '.') continue; @@ -576,8 +576,8 @@ class extensionModel extends model /** * Remove an extension. - * - * @param string $extension + * + * @param string $extension * @access public * @return array the remove commands need executed manually. */ @@ -628,7 +628,7 @@ class extensionModel extends model /** * Clean model cache files. - * + * * @access public * @return void */ @@ -640,8 +640,8 @@ class extensionModel extends model /** * Erase an extension's package file. - * - * @param string $extension + * + * @param string $extension * @access public * @return array the remove commands need executed manually. */ @@ -671,9 +671,9 @@ class extensionModel extends model /** * Judge need execute db install or not. - * - * @param string $extension - * @param string $method + * + * @param string $extension + * @param string $method * @access public * @return bool */ @@ -684,8 +684,8 @@ class extensionModel extends model /** * Install the db. - * - * @param int $extension + * + * @param int $extension * @access public * @return object */ @@ -712,7 +712,7 @@ class extensionModel extends model { $this->dbh->query($sql); } - catch(PDOException $e) + catch(PDOException $e) { $errorInfo = $e->errorInfo; $errorCode = $errorInfo[1]; @@ -724,9 +724,9 @@ class extensionModel extends model } /** - * Backup db when uninstall extension. - * - * @param string $extension + * Backup db when uninstall extension. + * + * @param string $extension * @access public * @return bool|string */ @@ -755,14 +755,14 @@ class extensionModel extends model $backupFile = $this->app->getTmpRoot() . $extension . '.' . date('Ymd') . '.sql'; $result = $zdb->dump($backupFile, $backupTables); if($result->result) return $backupFile; - return false; + return false; } - return false; + return false; } /** * Save the extension to database. - * + * * @param string $extension the extension code * @param string $type the extension type * @access public @@ -781,10 +781,10 @@ class extensionModel extends model /** * Update an extension. - * - * @param string $extension - * @param string $status - * @param array $files + * + * @param string $extension + * @param string $status + * @param array $files * @access public * @return void */ @@ -820,8 +820,8 @@ class extensionModel extends model /** * Check depends extension. - * - * @param string $extension + * + * @param string $extension * @access public * @return array */ @@ -843,10 +843,10 @@ class extensionModel extends model /** * Compare for limit data. - * - * @param string $version - * @param array $limit - * @param string $type + * + * @param string $version + * @param array $limit + * @param string $type * @access public * @return void */ @@ -873,7 +873,7 @@ class extensionModel extends model /** * Get extension expire date. * - * @param int $extension + * @param int $extension * @access public * @return string */ diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 8e7af491cf..cdf346fddd 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -2826,7 +2826,7 @@ class upgradeModel extends model } /** - * Judge any error occers. + * Judge any error occurs. * * @access public * @return bool diff --git a/www/js/jquery/form/zentao.js b/www/js/jquery/form/zentao.js index 65fb8f6b5c..34249373ec 100644 --- a/www/js/jquery/form/zentao.js +++ b/www/js/jquery/form/zentao.js @@ -39,7 +39,7 @@ $.extend( /* try parse to json when response is json's string. */ try{if(typeof(response) == 'string') response = JSON.parse(response);}catch(e){} - /* The response is not an object, some error occers, alert it. */ + /* The response is not an object, some error occurs, alert it. */ if(typeof(response) != 'object') { if(response) return alert(response); @@ -176,7 +176,7 @@ $.extend( } }, - /* When error occers, alert the response text, status and error. */ + /* When error occurs, alert the response text, status and error. */ error:function(jqXHR, textStatus, errorThrown) { $.enableForm(formID); From 21ca95f7be2044a98873069dccc5f73ea4162354 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 13 Sep 2021 13:56:36 +0800 Subject: [PATCH 2/5] * Fix bug#15090. --- module/product/control.php | 2 +- module/product/view/kanban.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index dd8414c6d9..e250013ccc 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -31,7 +31,7 @@ class product extends control /* Get all products, if no, goto the create page. */ $this->products = $this->product->getPairs('nocode|all'); - if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); $this->view->products = $this->products; } diff --git a/module/product/view/kanban.html.php b/module/product/view/kanban.html.php index baf29cf299..7fc219f1b2 100644 --- a/module/product/view/kanban.html.php +++ b/module/product/view/kanban.html.php @@ -13,7 +13,7 @@
-

noData;?>

+

product->noProduct;?>

From ebda4e7a4e85870979f652a2bdb595f79c5464f9 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Mon, 13 Sep 2021 14:12:25 +0800 Subject: [PATCH 3/5] * change features modal type to "iframe". --- module/index/js/index.js | 6 ------ module/my/js/index.js | 17 +++++------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index dfde92a2da..251de06f99 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -852,9 +852,3 @@ function getLatestVersion() $('#globalSearchInput').click(); $('#upgradeContent').toggle(); } - -/** Show features dialog */ -function showFeaturesDialog() -{ - new $.zui.ModalTrigger({url: $.createLink('misc', 'features'), type: 'ajax', width: 900, showHeader: false, backdrop: 'static'}).show(); -} diff --git a/module/my/js/index.js b/module/my/js/index.js index 22b1e76c8d..36b676a8eb 100644 --- a/module/my/js/index.js +++ b/module/my/js/index.js @@ -1,6 +1,10 @@ $(function() { - if(showFeatures) showFeaturesDialog(); + if(showFeatures) + { + /** Show features dialog */ + new $.zui.ModalTrigger({url: $.createLink('misc', 'features'), type: 'iframe', width: 900, showHeader: false, backdrop: 'static'}).show(); + } /* Set the heights of every block to keep them same height. */ projectBoxHeight = $('#projectbox').height(); @@ -37,14 +41,3 @@ $(function() $(this).find('.fixedHead').css('top',$(this).scrollTop()); }); }); - -/** - * Show features dialog. - * - * @access public - * @return void - */ -function showFeaturesDialog() -{ - $.zui.modalTrigger.show({url: $.createLink('misc', 'features'), type: 'ajax', width: 900, showHeader: false}) -} From 3c75a3e024609e03ad126a9cfddd9d52522036a9 Mon Sep 17 00:00:00 2001 From: lichengjun Date: Mon, 13 Sep 2021 06:29:21 +0000 Subject: [PATCH 4/5] * Fix bug #15012 --- module/mr/view/browse.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/mr/view/browse.html.php b/module/mr/view/browse.html.php index bdc6ae9441..1a42dfae53 100644 --- a/module/mr/view/browse.html.php +++ b/module/mr/view/browse.html.php @@ -37,7 +37,7 @@ mr->targetProject); ?> mr->targetBranch); ?> mr->mergeStatus); ?> - actions; ?> + actions; ?> @@ -50,7 +50,7 @@ loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->targetProject)->name_with_namespace; ?> targetBranch;?> status == 'merged') ? zget($lang->mr->statusList, $MR->status) : zget($lang->mr->mergeStatusList, $MR->mergeStatus); ?> - + id}", '', '', "title='{$lang->mr->view}' class='btn btn-info'"); common::printLink('mr', 'edit', "mr={$MR->id}", '', '', "title='{$lang->mr->edit}' class='btn btn-info'"); From 33e183958323f3ba2e3e8c48b79b4075670930ff Mon Sep 17 00:00:00 2001 From: liyuchun Date: Mon, 13 Sep 2021 15:01:40 +0800 Subject: [PATCH 5/5] * Fix bug #15121. --- module/index/control.php | 12 ++++++++++-- module/index/js/index.js | 6 ++++++ module/index/view/index.html.php | 1 + module/misc/css/features.css | 3 ++- module/my/control.php | 10 +--------- module/my/js/index.js | 6 ------ module/my/view/index.html.php | 1 - 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/module/index/control.php b/module/index/control.php index e7180bb106..889aab0ef8 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -38,10 +38,18 @@ class index extends control $latestVersionList = array(); if(isset($this->config->global->latestVersionList)) $latestVersionList = json_decode($this->config->global->latestVersionList); - $this->view->open = helper::safe64Decode($open); - $this->view->title = $this->lang->index->common; + $showFeatures = false; + foreach($this->config->newFeatures as $feature) + { + $accounts = zget($this->config->global, 'skip' . ucfirst($feature), ''); + if(strpos(",$accounts,", $this->app->user->account) === false) $showFeatures = true; + } + $this->view->title = $this->lang->index->common; + $this->view->open = helper::safe64Decode($open); + $this->view->showFeatures = $showFeatures; $this->view->latestVersionList = $latestVersionList; + $this->display(); } diff --git a/module/index/js/index.js b/module/index/js/index.js index 251de06f99..0fb76f5ac5 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -1,5 +1,11 @@ (function() { + if(showFeatures) + { + /* Show features dialog. */ + new $.zui.ModalTrigger({url: $.createLink('misc', 'features'), type: 'iframe', width: 900, showHeader: false, backdrop: 'static'}).show(); + } + /* Init variables */ var openedApps = {}; // Key-value to save appCode-app pairs var appsMap = {}; // Key-value to save opened appCode-app pairs diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index bd5ddc5019..a7c864100c 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -20,6 +20,7 @@ js::set('appsMenuItems', commonModel::getMainNavList($app->rawModule)); js::set('defaultOpen', $open); js::set('manualText', $lang->manual); js::set('manualUrl', ((!empty($config->isINT)) ? $config->manualUrl['int'] : $config->manualUrl['home']) . '&theme=' . $_COOKIE['theme']); +js::set('showFeatures', $showFeatures); ?>