public
Description: Midgard Components Framework 3rd generation
Homepage: http://www.midgard-project.org
Clone URL: git://github.com/bergie/midcom.git
Ensure we first get snippetdirs. For some reason 1.9 returns snippetdirs 
with also midgard_snippet::get_by_path()
bergie (author)
Fri Jun 27 11:08:31 -0700 2008
commit  fa351dce51f7c2288a21c80084d5fdb943d454ae
tree    ffd59506afbe43b3354a4b9212a0f8cbbdb4fa7d
parent  dc27dd982441a18b8ba5004131f298bbb4cb6a52
...
316
317
318
319
320
321
322
323
324
325
326
 
327
328
329
330
331
332
 
 
 
 
 
 
 
333
334
335
...
316
317
318
 
 
 
 
 
 
 
 
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
0
@@ -316,20 +316,20 @@ class midcom_core_controllers_snippets
0
                 return;
0
 
0
             case 'GET':
0
- if ($this->get_snippet($this->object_path))
0
- {
0
- $data['data'] = $this->snippet->code;
0
- $data['mimetype'] = 'text/plain';
0
- $data['mtime'] = strtotime($this->snippet->metadata->revised);
0
- return;
0
- }
0
- elseif ($this->get_snippetdir($this->object_path))
0
+ if ($this->get_snippetdir($this->object_path))
0
                 {
0
                     $data['mimetype'] = 'httpd/unix-directory';
0
                     $data['size'] = 0;
0
                     $data['mtime'] = strtotime($this->snippetdir->metadata->revised);
0
                     return;
0
                 }
0
+ elseif ($this->get_snippet($this->object_path))
0
+ {
0
+ $data['data'] = $this->snippet->code;
0
+ $data['mimetype'] = 'text/plain';
0
+ $data['mtime'] = strtotime($this->snippet->metadata->revised);
0
+ return;
0
+ }
0
 
0
                 throw new midcom_exception_notfound("Snippetdir {$this->object_path} not found");
0
 

Comments

    No one has commented yet.