diff --git a/lib/scm/subversion.class.php b/lib/scm/subversion.class.php
index 31ba586ca7..1bddd6baa1 100644
--- a/lib/scm/subversion.class.php
+++ b/lib/scm/subversion.class.php
@@ -11,13 +11,13 @@ class Subversion
public $svnVersion;
/**
- * Construct
- *
- * @param string $client
- * @param string $root
- * @param string $account
- * @param string $password
- * @param string $encoding
+ * Construct
+ *
+ * @param string $client
+ * @param string $root
+ * @param string $account
+ * @param string $password
+ * @param string $encoding
* @access public
* @return void
*/
@@ -37,10 +37,10 @@ class Subversion
}
/**
- * List files.
- *
- * @param string $path
- * @param string $revision
+ * List files.
+ *
+ * @param string $path
+ * @param string $revision
* @access public
* @return array
*/
@@ -91,10 +91,10 @@ class Subversion
/**
* Get tags.
- *
- * @param string $path
- * @param string $revision
- * @param bool $onlyDir
+ *
+ * @param string $path
+ * @param string $revision
+ * @param bool $onlyDir
* @access public
* @return array
*/
@@ -129,7 +129,7 @@ class Subversion
/**
* Get branch.
- *
+ *
* @access public
* @return array
*/
@@ -140,9 +140,9 @@ class Subversion
/**
* Get last log.
- *
- * @param string $path
- * @param int $count
+ *
+ * @param string $path
+ * @param int $count
* @access public
* @return array
*/
@@ -170,8 +170,8 @@ class Subversion
foreach($parsedComments->logentry as $entry)
{
$log = new stdclass();
- $log->committer = (string)$entry->author;
- $log->revision = (int)$entry['revision'];
+ $log->committer = (string)$entry->author;
+ $log->revision = (int)$entry['revision'];
$log->comment = trim((string)$entry->msg);
$log->time = date('Y-m-d H:i:s', strtotime($entry->date));
$log->change = array();
@@ -188,12 +188,12 @@ class Subversion
/**
* Get log.
- *
- * @param string $path
- * @param int $fromRevision
- * @param string $toRevision
- * @param int $count
- * @param bool $quiet
+ *
+ * @param string $path
+ * @param int $fromRevision
+ * @param string $toRevision
+ * @param int $count
+ * @param bool $quiet
* @access public
* @return array
*/
@@ -229,17 +229,17 @@ class Subversion
foreach($parsedComments->logentry as $entry)
{
$log = new stdclass();
- $log->committer = (string)$entry->author;
- $log->revision = (int)$entry['revision'];
+ $log->committer = (string)$entry->author;
+ $log->revision = (int)$entry['revision'];
$log->comment = trim((string)$entry->msg);
$log->time = date('Y-m-d H:i:s', strtotime($entry->date));
$log->change = array();
if(!empty($entry->paths))
{
- foreach($entry->paths->path as $path)
+ foreach($entry->paths->path as $path)
{
$pathInfo = array();
- foreach($path->attributes() as $attr => $value) $pathInfo[$attr] = (string)$value;
+ foreach($path->attributes() as $attr => $value) $pathInfo[$attr] = (string)$value;
$log->change[(string)$path] = $pathInfo;
}
}
@@ -257,9 +257,9 @@ class Subversion
/**
* Blame file.
- *
- * @param string $path
- * @param int $revision
+ *
+ * @param string $path
+ * @param int $revision
* @access public
* @return array
*/
@@ -298,7 +298,7 @@ class Subversion
{
foreach($parsedResult->target->entry as $line)
{
- if($line->commit['revision'] != $revision)
+ if($line->commit['revision'] != $revision)
{
$blame = array();
$blame['revision'] = (int)$line->commit['revision'];
@@ -327,10 +327,10 @@ class Subversion
/**
* Diff file.
- *
- * @param string $path
- * @param int $fromRevision
- * @param int $toRevision
+ *
+ * @param string $path
+ * @param int $fromRevision
+ * @param int $toRevision
* @access public
* @return array
*/
@@ -355,9 +355,9 @@ class Subversion
/**
* Cat file.
- *
- * @param string $entry
- * @param string $revision
+ *
+ * @param string $entry
+ * @param string $revision
* @access public
* @return string
*/
@@ -380,9 +380,9 @@ class Subversion
/**
* Get info.
- *
- * @param string $entry
- * @param string $revision
+ *
+ * @param string $entry
+ * @param string $revision
* @access public
* @return object
*/
@@ -421,8 +421,8 @@ class Subversion
/**
* Exec svn cmd.
- *
- * @param string $cmd
+ *
+ * @param string $cmd
* @access public
* @return array
*/
@@ -434,8 +434,8 @@ class Subversion
/**
* Parse diff.
- *
- * @param array $lines
+ *
+ * @param array $lines
* @access public
* @return array
*/
@@ -514,9 +514,9 @@ class Subversion
/**
* Get commit count.
- *
- * @param int $commits
- * @param int $lastVersion
+ *
+ * @param int $commits
+ * @param int $lastVersion
* @access public
* @return int
*/
@@ -547,7 +547,7 @@ class Subversion
/**
* Get first revision.
- *
+ *
* @access public
* @return int
*/
@@ -561,7 +561,7 @@ class Subversion
/**
* Get latest revision.
- *
+ *
* @access public
* @return int
*/
@@ -573,9 +573,9 @@ class Subversion
/**
* Get commits.
- *
- * @param string $version
- * @param int $count
+ *
+ * @param string $version
+ * @param int $count
* @access public
* @return array
*/
@@ -608,8 +608,8 @@ class Subversion
foreach($parsedComments->logentry as $entry)
{
$parsedLog = new stdClass();
- $parsedLog->committer = (string)$entry->author;
- $parsedLog->revision = (int)$entry['revision'];
+ $parsedLog->committer = (string)$entry->author;
+ $parsedLog->revision = (int)$entry['revision'];
$parsedLog->comment = trim((string)$entry->msg);
$parsedLog->time = date('Y-m-d H:i:s', strtotime($entry->date));
$logs['commits'][$parsedLog->revision] = $parsedLog;
@@ -632,8 +632,8 @@ class Subversion
/**
* Replace svn auth.
- *
- * @param string $cmd
+ *
+ * @param string $cmd
* @access public
* @return string
*/
@@ -643,11 +643,11 @@ class Subversion
}
/**
- * Build command.
- *
- * @param string $path
- * @param string $action
- * @param string $param
+ * Build command.
+ *
+ * @param string $path
+ * @param string $action
+ * @param string $param
* @access public
* @return string
*/
@@ -668,8 +668,8 @@ class Subversion
/**
* Get SVN version.
- *
- * @param string $client
+ *
+ * @param string $client
* @access public
* @return string
*/
diff --git a/module/action/control.php b/module/action/control.php
index 6eec09e57f..f1808d22eb 100755
--- a/module/action/control.php
+++ b/module/action/control.php
@@ -138,10 +138,11 @@ class action extends control
* Undelete an object.
*
* @param int $actionID
+ * @param string $browseType
* @access public
* @return void
*/
- public function undelete($actionID)
+ public function undelete($actionID, $browseType = 'all')
{
$oldAction = $this->action->getById($actionID);
$extra = $oldAction->extra == ACTIONMODEL::BE_HIDDEN ? 'hidden' : 'all';
@@ -149,7 +150,7 @@ class action extends control
$this->action->undelete($actionID);
$sameTypeObjects = $this->action->getTrashes($oldAction->objectType, $extra, 'id_desc', null);
- $browseType = $sameTypeObjects ? $oldAction->objectType : 'all';
+ $browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all';
return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType&type=$extra"), 'parent'));
}
@@ -158,17 +159,18 @@ class action extends control
* Hide an deleted object.
*
* @param int $actionID
+ * @param string $browseType
* @access public
* @return void
*/
- public function hideOne($actionID)
+ public function hideOne($actionID, $browseType = 'all')
{
$oldAction = $this->action->getById($actionID);
$this->action->hideOne($actionID);
$sameTypeObjects = $this->action->getTrashes($oldAction->objectType, 'all', 'id_desc', null);
- $browseType = $sameTypeObjects ? $oldAction->objectType : 'all';
+ $browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all';
return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType"), 'parent'));
}
diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php
index e99797970d..03352675bb 100755
--- a/module/action/view/trash.html.php
+++ b/module/action/view/trash.html.php
@@ -139,8 +139,8 @@
date;?> |
id", $lang->action->undelete, 'hiddenwin');
- if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id", $lang->action->hideOne, 'hiddenwin');
+ common::printLink('action', 'undelete', "actionid=$action->id&browseType=$currentObjectType", $lang->action->undelete, 'hiddenwin');
+ if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id&browseType=$currentObjectType", $lang->action->hideOne, 'hiddenwin');
?>
|
diff --git a/module/bug/control.php b/module/bug/control.php
index 506e470b9a..478ce03b7d 100755
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -997,13 +997,26 @@ class bug extends control
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
- if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
+ if($this->app->tab == 'execution')
{
+ $execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
+ $execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
- $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all', 'id_desc', 0, $kanbanGroup, $rdSearchValue);
- $kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ if(isset($execution->type) and $execution->type == 'kanban')
+ {
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', 0, $kanbanGroup, $rdSearchValue);
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
+ }
+ else
+ {
+ $kanbanData = $this->loadModel('kanban')->getExecutionKanban($bug->execution, $execLaneType, $execGroupBy, $rdSearchValue);
+ $kanbanType = $execLaneType == 'all' ? 'bug' : key($kanbanData);
+ $kanbanData = $kanbanData[$kanbanType];
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"bug\", $kanbanData)"));
+ }
}
else
{
@@ -1621,16 +1634,27 @@ class bug extends control
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
- if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
+ if($this->app->tab == 'execution')
{
- $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
- $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
- $kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ if(isset($execution->type) and $execution->type == 'kanban')
+ {
+ $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ $kanbanData = $this->loadModel('kanban')->getExecutionKanban($bug->execution, $execLaneType, $execGroupBy, $rdSearchValue);
+ $kanbanType = $execLaneType == 'all' ? 'bug' : key($kanbanData);
+ $kanbanData = $kanbanData[$kanbanType];
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"bug\", $kanbanData)"));
+ }
}
else
{
@@ -1716,16 +1740,27 @@ class bug extends control
parse_str($extra, $output);
if(isonlybody())
{
- if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
+ if($this->app->tab == 'execution')
{
- $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
- $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
- $kanbanData = json_encode($kanbanData);
+ if(isset($execution->type) and $execution->type == 'kanban')
+ {
+ $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
+ $kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ $kanbanData = $this->loadModel('kanban')->getExecutionKanban($bug->execution, $execLaneType, $execGroupBy, $rdSearchValue);
+ $kanbanType = $execLaneType == 'all' ? 'bug' : key($kanbanData);
+ $kanbanData = $kanbanData[$kanbanType];
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"bug\", $kanbanData)"));
+ }
}
else
{
@@ -1879,16 +1914,27 @@ class bug extends control
if(isonlybody())
{
$execution = $this->loadModel('execution')->getByID($bug->execution);
- if(isset($execution->type) and $execution->type == 'kanban' and $this->app->tab == 'execution')
+ if($this->app->tab == 'execution')
{
- $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
$execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
$execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
$rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
- $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
- $kanbanData = json_encode($kanbanData);
+ if(isset($execution->type) and $execution->type == 'kanban')
+ {
+ $regionID = !empty($output['regionID']) ? $output['regionID'] : 0;
+ $kanbanData = $this->loadModel('kanban')->getRDKanban($bug->execution, $execLaneType, 'id_desc', $regionID, $execGroupBy, $rdSearchValue);
+ $kanbanData = json_encode($kanbanData);
- return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData, $regionID)"));
+ }
+ else
+ {
+ $kanbanData = $this->loadModel('kanban')->getExecutionKanban($bug->execution, $execLaneType, $execGroupBy, $rdSearchValue);
+ $kanbanType = $execLaneType == 'all' ? 'bug' : key($kanbanData);
+ $kanbanData = $kanbanData[$kanbanType];
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"bug\", $kanbanData)"));
+ }
}
else
{
@@ -2086,7 +2132,18 @@ class bug extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
if(isonlybody()) return print(js::reload('parent.parent'));
- if($from == 'taskkanban') return print(js::reload('parent'));
+
+ if($from == 'taskkanban')
+ {
+ $execLaneType = $this->session->execLaneType ? $this->session->execLaneType : 'all';
+ $execGroupBy = $this->session->execGroupBy ? $this->session->execGroupBy : 'default';
+ $rdSearchValue = $this->session->rdSearchValue ? $this->session->rdSearchValue : '';
+ $kanbanData = $this->loadModel('kanban')->getExecutionKanban($bug->execution, $execLaneType, $execGroupBy, $rdSearchValue);
+ $kanbanType = $execLaneType == 'all' ? 'bug' : key($kanbanData);
+ $kanbanData = $kanbanData[$kanbanType];
+ $kanbanData = json_encode($kanbanData);
+ return print(js::closeModal('parent', '', "parent.updateKanban(\"bug\", $kanbanData)"));
+ }
$locateLink = $this->session->bugList ? $this->session->bugList : inlink('browse', "productID={$bug->product}");
return print(js::locate($locateLink, 'parent'));
diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php
index 7632bd4b30..441e988884 100755
--- a/module/bug/view/batchcreate.html.php
+++ b/module/bug/view/batchcreate.html.php
@@ -119,7 +119,7 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field)
|