BUG 7920 The "Not in folder" folder shouldn't be created by default
removed "Not in Folder" and all documents that hadn't a defined folder is showed in ROOT now
This commit is contained in:
@@ -178,7 +178,12 @@ if($limit != 0){
|
||||
$fields ['FOLDER_CREATE_DATE'] = "";
|
||||
$fields ['FOLDER_UPDATE_DATE'] = "";
|
||||
} else {
|
||||
$fields = array ();
|
||||
// $fields = array ();
|
||||
$fields ['FOLDER_UID'] = "/";
|
||||
$fields ['FOLDER_PARENT_UID'] = "";
|
||||
$fields ['FOLDER_NAME'] = "root";
|
||||
$fields ['FOLDER_CREATE_DATE'] = "";
|
||||
$fields ['FOLDER_UPDATE_DATE'] = "";
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
@@ -211,10 +216,15 @@ if($limit != 0){
|
||||
|
||||
$oAppDocument = new AppDocument ( );
|
||||
$oCriteria = new Criteria ( );
|
||||
|
||||
if ((is_array ( $docIdFilter )) && (count ( $docIdFilter ) > 0)) { //Search by App Doc UID no matter what Folder it is
|
||||
$oCriteria->add ( AppDocumentPeer::APP_DOC_UID, $docIdFilter, CRITERIA::IN );
|
||||
} elseif ($folderID != NULL) {
|
||||
if($folderID=="/"){
|
||||
$oCriteria->add ( AppDocumentPeer::FOLDER_UID, array('root','',NULL), CRITERIA::IN );
|
||||
}else{
|
||||
$oCriteria->add ( AppDocumentPeer::FOLDER_UID, $folderID );
|
||||
}
|
||||
} elseif ($searchType == "TAG") {
|
||||
$oCriteria->add ( AppDocumentPeer::APP_DOC_TAGS, "%" . $keyword . "%", CRITERIA::LIKE );
|
||||
}
|
||||
@@ -234,7 +244,9 @@ if($limit != 0){
|
||||
$oCriteria->setLimit($limit);
|
||||
$oCriteria->setOffset($start);
|
||||
|
||||
|
||||
$rs = AppDocumentPeer::doSelectRS ( $oCriteria );
|
||||
|
||||
$rs->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next ();
|
||||
$filesResult = array ();
|
||||
@@ -459,4 +471,4 @@ if($limit != 0){
|
||||
$oCriteria->add ( AppFolderPeer::FOLDER_UID, $FolderUid );
|
||||
AppFolderPeer::doDelete($oCriteria);
|
||||
}
|
||||
} // AppFolder
|
||||
} // AppFolder
|
||||
|
||||
@@ -90,10 +90,6 @@ function expandNode(){
|
||||
$tempTree ['is_readable'] =true;
|
||||
$tempTree ['is_deletable'] =true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if((isset($_POST['option']))&&($_POST['option']=="gridDocuments")){
|
||||
$tempTree ['icon'] = "/images/documents/extension/folder.png";
|
||||
}
|
||||
@@ -113,7 +109,7 @@ function expandNode(){
|
||||
$tempTree=array();
|
||||
}
|
||||
|
||||
if($_POST ['node'] == '/'){
|
||||
/* if($_POST ['node'] == '/'){
|
||||
$notInFolderLabel = G::LoadTranslation ( 'ID_NOT_IN_FOLDER' );
|
||||
$tempTree ['text'] = $notInFolderLabel;
|
||||
$tempTree ['id'] = "NA";
|
||||
@@ -131,7 +127,7 @@ function expandNode(){
|
||||
|
||||
if((isset($_POST['option']))&&($_POST['option']=="gridDocuments")){
|
||||
$tempTree ['icon'] = "/images/documents/extension/bz2.png";
|
||||
}
|
||||
}*/
|
||||
//$tempTree ['leaf'] = true;
|
||||
//$tempTree ['optionType'] = "category";
|
||||
//$tempTree['allowDrop']=false;
|
||||
@@ -144,10 +140,10 @@ function expandNode(){
|
||||
$tempTree ['expanded'] = true;
|
||||
}
|
||||
*/
|
||||
$processListTree [] = $tempTree;
|
||||
/* $processListTree [] = $tempTree;
|
||||
$tempTree=array();
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if(isset($folderContent)){
|
||||
@@ -1326,4 +1322,4 @@ function extPathName($p_path,$p_addtrailingslash = false) {
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ function openActionDialog( caller, action ) {
|
||||
autoCreate: true,
|
||||
modal:true,
|
||||
width:600,
|
||||
height:400,
|
||||
autoHeight: true,
|
||||
shadow:true,
|
||||
minWidth:300,
|
||||
minHeight:200,
|
||||
@@ -1795,4 +1795,4 @@ Ext.onReady(function() {
|
||||
parent.Ext.getCmp('debugPanel').ownerCt.doLayout();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user