diff --git a/extension/lite/story/ext/view/review.lite.html.hook.php b/extension/lite/story/ext/view/review.lite.html.hook.php index 13d0ce6107..7de8f83c33 100644 --- a/extension/lite/story/ext/view/review.lite.html.hook.php +++ b/extension/lite/story/ext/view/review.lite.html.hook.php @@ -1,4 +1,4 @@ diff --git a/framework/base/control.class.php b/framework/base/control.class.php index cd96ce19ec..e9e92cde0c 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -782,12 +782,9 @@ class baseControl */ $file2Included = $moduleControlFile; - $commonActionExtFile = $actionExtPath['custom'] . strtolower($methodName) . '.php'; - if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile; - - if(!empty($actionExtPath['vision'])) + if(!empty($actionExtPath['common'])) { - $commonActionExtFile = $actionExtPath['vision'] . strtolower($methodName) . '.php'; + $commonActionExtFile = $actionExtPath['common'] . strtolower($methodName) . '.php'; if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile; } @@ -797,12 +794,15 @@ class baseControl if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile; } - if(!empty($actionExtPath['common'])) + if(!empty($actionExtPath['vision'])) { - $commonActionExtFile = $actionExtPath['common'] . strtolower($methodName) . '.php'; + $commonActionExtFile = $actionExtPath['vision'] . strtolower($methodName) . '.php'; if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile; } + $commonActionExtFile = $actionExtPath['custom'] . strtolower($methodName) . '.php'; + if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile; + if(!empty($actionExtPath['site'])) { /** diff --git a/module/dept/model.php b/module/dept/model.php index a7dae8c5af..c258bab7f8 100644 --- a/module/dept/model.php +++ b/module/dept/model.php @@ -383,8 +383,7 @@ class deptModel extends model ->beginIF($browseType == 'inside')->andWhere('type')->eq('inside')->fi() ->beginIF($browseType == 'outside')->andWhere('type')->eq('outside')->fi() ->beginIF($deptID)->andWhere('dept')->in($deptID)->fi() - ->beginIF($this->config->vision == 'lite')->andWhere('visions')->eq('lite')->fi() - ->beginIF($this->config->vision != 'lite')->andWhere('visions')->ne('lite')->fi() + ->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll(); diff --git a/module/programplan/control.php b/module/programplan/control.php index 176d4b3567..59391e5e23 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -184,6 +184,7 @@ class programplan extends control public function edit($planID = 0, $projectID = 0) { $this->app->loadLang('project'); + $this->app->loadLang('execution'); $plan = $this->programplan->getByID($planID); if($_POST) { diff --git a/module/programplan/view/edit.html.php b/module/programplan/view/edit.html.php index f56732e852..e9141ff653 100644 --- a/module/programplan/view/edit.html.php +++ b/module/programplan/view/edit.html.php @@ -55,7 +55,7 @@ project->acl;?> grade == 2 ? "disabled='disabled'" : '';?> - project->aclList, $plan->acl, "class='form-control' $class");?> + execution->aclList, $plan->acl, "class='form-control' $class");?> programplan->planDateRange;?> diff --git a/module/project/css/browse.css b/module/project/css/browse.css index 649f43322e..d9404c9f53 100644 --- a/module/project/css/browse.css +++ b/module/project/css/browse.css @@ -18,3 +18,5 @@ th.c-name {min-width: 240px;} th.c-name {width: auto;} } [lang^='en'] .project-name > .label-warning {width: 55px !important;} + +.table-responsive {overflow: auto !important;} diff --git a/module/project/js/browse.js b/module/project/js/browse.js index 1bdb8ed328..9146638034 100644 --- a/module/project/js/browse.js +++ b/module/project/js/browse.js @@ -13,8 +13,21 @@ $(function() $.cookie('projectType', projectType, {expires:config.cookieLife, path:config.webRoot}); window.location.reload(); }); + + if(!useDatatable) resetNameWidth(); }); +function resetNameWidth() +{ + $name = $('#projectForm thead th.c-name'); + if($name.width() < 350) $name.width(350); +} + +$('#mainContent .sidebar-toggle').click(function() +{ + if(!useDatatable) setTimeout("resetNameWidth()", 100); +}) + /** * Change program. * diff --git a/module/project/view/browse.html.php b/module/project/view/browse.html.php index 5d619ac9f6..03552f0b13 100644 --- a/module/project/view/browse.html.php +++ b/module/project/view/browse.html.php @@ -21,6 +21,7 @@ js::set('orderBy', $orderBy); js::set('recTotal', $recTotal); js::set('recPerPage', $recPerPage); js::set('pageID', $pageID); +js::set('useDatatable', false); ?> + diff --git a/module/report/model.php b/module/report/model.php index 39f38c9610..1bd18c1b63 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -391,6 +391,7 @@ class reportModel extends model $workload[$user]['total']['manhour'] = isset($workload[$user]['total']['manhour']) ? $workload[$user]['total']['manhour'] + $task->left : $task->left; } + if(empty($project)) continue; $workload[$user]['task']['project'] = $project; } } diff --git a/module/upgrade/model.php b/module/upgrade/model.php index e7fd93185e..3789bcc6c6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -67,7 +67,8 @@ class upgradeModel extends model } /* If the 'current openVersion' is not equal the 'from openVersion', must update structure. */ - $updateStructure = $openVersion != $this->config->upgrade->{$this->config->edition . 'Version'}[$this->config->version]; + $currentVersion = str_replace('.', '_', $this->config->version); + $updateStructure = $openVersion != $this->config->upgrade->{$this->config->edition . 'Version'}[$currentVersion]; /* Execute. */ foreach($versions as $openVersion => $chargedVersions) @@ -106,7 +107,7 @@ class upgradeModel extends model } /* Means open source upgrade to biz or max. */ - if($fromEdtion == 'open' and $this->config->edition != 'open') + if($fromEdition == 'open' and $this->config->edition != 'open') { $this->loadModel('effort')->convertEstToEffort(); $this->importBuildinModules(); @@ -5839,6 +5840,27 @@ class upgradeModel extends model return $pluginFiles; } + /** + * Get custom modules. + * + * @param array $allModules + * @access public + * @return array + */ + public function getCustomModules($allModules) + { + $customModules = array(); + $systemFiles = file_get_contents('systemfiles.txt'); + $systemFiles = str_replace('/', DS, $systemFiles); + foreach($allModules as $modulePath) + { + $customFiles = array(); + $module = basename($modulePath); + if(!in_array($module, $this->config->upgrade->openModules) and !preg_match("#$module(/[a-z]*)*(/[a-z]+.[a-z]+)+#", $systemFiles)) $customModules[$module] = $module; + } + return $customModules; + } + /** * Move extension files. * @@ -5883,12 +5905,14 @@ class upgradeModel extends model */ public function removeEncryptedDir() { - $allModules = glob($this->app->moduleRoot . '*'); - $skipModules = $this->getEncryptedModules($allModules); - $zfile = $this->app->loadClass('zfile'); - $response = array('result' => 'success'); - $command = array(); - foreach($skipModules as $module) + $allModules = glob($this->app->moduleRoot . '*'); + $skipModules = $this->getEncryptedModules($allModules); + $customModules = $this->getCustomModules($allModules); + $modules = $skipModules + $customModules; + $zfile = $this->app->loadClass('zfile'); + $response = array('result' => 'success'); + $command = array(); + foreach($modules as $module) { if(in_array($module, $this->config->upgrade->openModules)) continue; diff --git a/www/index.php b/www/index.php index 83483484e2..50a89c7afb 100644 --- a/www/index.php +++ b/www/index.php @@ -38,7 +38,7 @@ if(!isset($config->installed) or !$config->installed) die(header('location: inst /* Check for need upgrade. */ $config->installedVersion = $app->getInstalledVersion(); -if(((is_numeric($config->version[0]) and is_numeric($config->installedVersion[0])) or $config->version[0] == $config->installedVersion[0]) and version_compare($config->version, $config->installedVersion, '>')) die(header('location: upgrade.php')); +if($config->version != $config->installedVersion) die(header('location: upgrade.php')); /* Run the app. */ $common = $app->loadCommon();