Commit 0a18b1cf0a7ee96a7ab362f86370d2b41a88f1d8

Authored by Elena.Budnik
1 parent 2ce0aff1

bug while IMPEX adding

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
php/classes/BaseManager.php
... ... @@ -103,14 +103,15 @@ class BaseManager
103 103 */
104 104 public function addFile($fileName, $start = null, $stop = null)
105 105 {
106   - // standard file upload : start / stop get from file
  106 +
  107 + // standard file upload : start / stop get from file
107 108 if (!$start)
108 109 {
109 110 $fileDom = new DomDocument("1.0");
110 111 $fileDom->load($this->fileDomName);
111 112 $file = $fileDom->getElementById($fileName);
112 113 $start = $file->getAttribute('start');
113   - $stop = $file->getAttribute('stop');
  114 + $stop = $file->getAttribute('stop');
114 115 }
115 116  
116 117 $lastMask = null;
... ... @@ -280,7 +281,10 @@ class BaseManager
280 281 $newVi->appendChild($this->baseDom->createElement("mask",$fileMask));
281 282 $this->appendFiles($newVi, $fileMask);
282 283  
283   - $this->baseDom->documentElement->appendChild($newVi);
  284 + $this->baseDom->documentElement->appendChild($newVi);
  285 +
  286 + /* SORT files by Start Time */
  287 + $this->xslt->transformToDoc($this->baseDom)->save($this->baseDomName);
284 288 return $newId;
285 289 }
286 290  
... ...