示例#1
0
 public function manage_fixPaths()
 {
     // fixes file directory issues when the old file class was used to save record
     // where the trailing forward slash was not added. This simply checks to see
     // if the trailing / is there, if not, it adds it.
     $file = new expFile();
     $files = $file->find('all');
     foreach ($files as $key => $file) {
         if (substr($files[$key]->directory, -1, 1) != "/") {
             $files[$key]->directory = $files[$key]->directory . '/';
         }
         $files[$key]->save();
     }
     //        eDebug($files,true);
 }