~ubuntu-branches/ubuntu/breezy/moodle/breezy

« back to all changes in this revision

Viewing changes to blocks/html/block_html.php

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2005-10-13 02:00:59 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051013020059-y2qcyo41t7nqppcg
Tags: 1.5.2-1ubuntu1
* Resync with debian (security update)
* changed dependencys to php5
* changed apache dependency to apache2 
* References
  CAN-2005-2247

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php //$Id: block_html.php,v 1.8 2005/05/19 20:09:57 defacer Exp $
 
2
 
 
3
class block_html extends block_base {
 
4
 
 
5
    function init() {
 
6
        $this->title = get_string('html', 'block_html');
 
7
        $this->version = 2004123000;
 
8
    }
 
9
 
 
10
    function applicable_formats() {
 
11
        return array('all' => true);
 
12
    }
 
13
 
 
14
    function specialization() {
 
15
        $this->title = isset($this->config->title) ? $this->config->title : get_string('newhtmlblock', 'block_html');
 
16
    }
 
17
 
 
18
    function instance_allow_multiple() {
 
19
        return true;
 
20
    }
 
21
 
 
22
    function get_content() {
 
23
        if ($this->content !== NULL) {
 
24
            return $this->content;
 
25
        }
 
26
 
 
27
        $filteropt = new stdClass;
 
28
        $filteropt->noclean = true;
 
29
 
 
30
        $this->content = new stdClass;
 
31
        $this->content->text = isset($this->config->text) ? format_text($this->config->text, FORMAT_HTML, $filteropt) : '';
 
32
        $this->content->footer = '';
 
33
 
 
34
        unset($filteropt); // memory footprint
 
35
 
 
36
        return $this->content;
 
37
    }
 
38
}
 
39
?>