* Fix bug #17263.
This commit is contained in:
@@ -201,13 +201,19 @@ class doc extends control
|
||||
$actionID = $this->action->create('docLib', $libID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$docLib = $this->doc->getLibById($libID);
|
||||
$docLib = $this->doc->getLibById($libID);
|
||||
$objectID = 0;
|
||||
if(strpos('product,project,execution', $docLib->type) !== false)
|
||||
{
|
||||
$libType = $docLib->type;
|
||||
$objectID = $docLib->$libType;
|
||||
}
|
||||
$hasLibPriv = $this->doc->checkPrivLib($docLib) ? 1 : 0;
|
||||
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
$response['result'] = 'success';
|
||||
$response['closeModal'] = true;
|
||||
$response['callback'] = "redirectParentWindow($hasLibPriv, $libID)";
|
||||
$response['callback'] = "redirectParentWindow($hasLibPriv, $libID, $objectID)";
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ $(function()
|
||||
*
|
||||
* @param int hasLibPriv
|
||||
* @param int libID
|
||||
* @param int objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function redirectParentWindow(hasLibPriv, libID)
|
||||
function redirectParentWindow(hasLibPriv, libID, objectID)
|
||||
{
|
||||
var link = hasLibPriv ? createLink('doc', 'tableContents', 'type=' + libType + '&objectID=0&libID=' + libID) : createLink('doc', 'tableContents', 'type=' + libType);
|
||||
var link = hasLibPriv ? createLink('doc', 'tableContents', 'type=' + libType + '&objectID=' + objectID + '&libID=' + libID) : createLink('doc', 'tableContents', 'type=' + libType);
|
||||
parent.location.href = link;
|
||||
}
|
||||
|
||||
@@ -2562,6 +2562,7 @@ EOT;
|
||||
if($this->app->tab == 'doc') $this->app->rawMethod = $type;
|
||||
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
if(empty($object)) die(js::locate(helper::createLink($type, 'create')));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user