~ubuntu-branches/ubuntu/lucid/mahara/lucid-security

« back to all changes in this revision

Viewing changes to htdocs/lib/dwoo/mahara/Dwoo_Template_Mahara_Interaction.php

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2009-11-27 22:09:03 UTC
  • mfrom: (6.3.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091127220903-aiigd3tr46z0rmcg
Tags: 1.2.0-2
Fix postrm script so that Mahara can be uninstalled

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * implements the Interaction resource type
 
5
 * 
 
6
 * @author Jordi Boggiano <j.boggiano@seld.be>
 
7
 */
 
8
class Dwoo_Template_Mahara_Interaction extends Dwoo_Template_Mahara
 
9
{
 
10
    protected function resolveFileName(array $name, array $includePath)
 
11
    {
 
12
        global $THEME;
 
13
        
 
14
        $plugin_name = $name[0];
 
15
        $plugin_path = $name[1];
 
16
    
 
17
        $basedir = get_config('docroot') . 'interaction/' . $plugin_name . '/theme/';
 
18
 
 
19
        foreach ($THEME->inheritance as $theme) {
 
20
            $filename = $basedir . $theme . '/' . $plugin_path;
 
21
            if (is_readable($filename)) {
 
22
                array_unshift($includePath, $basedir . $theme . '/');
 
23
                return array($plugin_path, $includePath);
 
24
            }
 
25
        }
 
26
 
 
27
        throw new MaharaException('Artefact template could not be found : '.implode(':', $name));
 
28
    }
 
29
}
 
30
 
 
31
?>
 
 
b'\\ No newline at end of file'