diff --git a/module/repo/control.php b/module/repo/control.php index 7b2ee1892e..8e90a7331a 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -641,7 +641,7 @@ class repo extends control $this->view->path = urldecode($path); $this->view->logType = $logType; $this->view->cloneUrl = $this->repo->getCloneUrl($repo); - $this->view->cacheTime = date('m-d H:i', strtotime($lastRevision->time)); + $this->view->cacheTime = isset($lastRevision->time) ? date('m-d H:i', strtotime($lastRevision->time)) : date('m-d H:i'); $this->view->branchOrTag = $branchOrTag; $this->view->syncedRF = strpos(",{$this->config->repo->synced},", ",$repoID,") !== false; //Check has synced rename files. diff --git a/module/repo/model.php b/module/repo/model.php index 29e3b8e167..5c7a1fd93e 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -2281,7 +2281,7 @@ class repoModel extends model ->where('t1.repo')->eq($repo->id) ->andWhere('left(t2.comment, 12)')->ne('Merge branch') ->beginIF($repo->SCM != 'Subversion' and $branch)->andWhere('t3.branch')->eq($branch)->fi() - ->andWhere('t1.parent')->like("$parent%")->fi() + ->andWhere('t1.parent')->eq("$parent") ->orderBy('t2.`time` asc') ->fetchAll('path'); @@ -2360,9 +2360,29 @@ class repoModel extends model ->orderBy('t2.`time` asc') ->fetchPairs(); + $removedDirs = array(); + if($repo->SCM == 'Subversion') + { + $removedDirs = $this->dao->select('id, path')->from(TABLE_REPOFILES) + ->where('repo')->eq($repo->id) + ->andWhere('type')->eq('dir') + ->andWhere('action')->eq('D') + ->fetchPairs(); + } foreach($files as $file => $action) { - if($action != 'D') $allFiles[] = $file; + foreach($removedDirs as $dir) + { + if(strpos($file, $dir) === 0) + { + $action = 'D'; + break; + } + } + if($action != 'D') + { + $allFiles[] = $file; + } } } else diff --git a/module/report/zen.php b/module/report/zen.php index df91d9e8a4..5016628b36 100644 --- a/module/report/zen.php +++ b/module/report/zen.php @@ -21,7 +21,7 @@ class reportZen extends report if(!$module || !$method) list($module, $method, $params) = $this->getDefaultMethod($dimension, $group); if(!empty($module) && !empty($method) && !common::hasPriv($module, $method)) common::deny('report', $method); - + $this->view->sidebar = $this->getSidebar($dimension, $group, $module, $method, $params); $this->view->dimension = $dimension; $this->view->group = $group;