- Timestamp:
- 03/16/10 12:47:03 (11 years ago)
- Location:
- trunk/server/www/app/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/www/app/models/gallery.php
r317 r321 347 347 348 348 foreach ($jobs as $job) { 349 if (empty($job['Job'])) { // When a testsuite request has no jobs yet 350 continue; 351 } 352 349 353 $application = $job['Job']['application_id']; 350 354 if (!isset($versions[$application])) { -
trunk/server/www/app/models/testsuite.php
r317 r321 103 103 $directories = glob(FILES . $path . DS . '*', GLOB_NOSORT | GLOB_ONLYDIR); 104 104 foreach ($directories as $directory) { 105 // Skip testDoc directories in the Fellowship 106 if (strtolower(substr($directory, -7)) == 'testdoc') { 107 $this->_syncDirectory($path . DS . basename($directory), $root, $gallery_id); 108 return; 109 } 110 105 // Skip testDoc directories in the Fellowship test suite 106 if (is_dir($directory . DS . 'testDoc')) { 107 $this->_syncDirectory($path . DS . basename($directory) . DS . 'testDoc', $root, $gallery_id); 108 continue; 109 } 110 111 if (is_dir($directory . DS . 'testdoc')) { 112 $this->_syncDirectory($path . DS . basename($directory) . DS . 'testdoc', $root, $gallery_id); 113 continue; 114 } 115 116 // See if a gallery exists 111 117 $gallery_name = basename($directory); 112 118 $gallery = $this->Gallery->find('first', array( … … 170 176 $filename = basename($path); 171 177 if (strtolower(substr($filename, 0, 8)) == 'testdoc.') { 172 $filename = $gallery['Gallery']['name']; 178 // Rename to parent directory. If that is testDoc too, rename to grandparent 179 $filename = dirname($path); 180 if (strtolower(substr($filename, -7)) == 'testdoc') { 181 $filename = dirname($filename); 182 } 183 184 $filename = basename($filename); 173 185 $filename .= strrchr($path, '.'); 174 186 } … … 224 236 return; 225 237 } 226 238 227 239 // See if the request needs updating 228 240 if (strtotime($request['Request']['modified']) < filemtime($path)) {
Note: See TracChangeset
for help on using the changeset viewer.