Skip to content

Commit

Permalink
Some fixes to avoid notices etc
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jan 29, 2005
1 parent 86db09e commit 63689c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 3 additions & 5 deletions blocks/html/block_html.php
Expand Up @@ -9,10 +9,8 @@ function init() {
} }


function specialization() { function specialization() {
// Does not check if $this->config or $this->config->title // We allow empty titles
// are empty because if they are then the user wishes the title $this->title = isset($this->config->title) ? $this->config->title : '';
// of the block to be hidden anyway
$this->title = $this->config->title;
} }


function instance_allow_multiple() { function instance_allow_multiple() {
Expand All @@ -27,7 +25,7 @@ function get_content() {
} }


$this->content = new stdClass; $this->content = new stdClass;
$this->content->text = $this->config->text; $this->content->text = isset($this->config->text) ? $this->config->text : '';
$this->content->footer = ''; $this->content->footer = '';


return $this->content; return $this->content;
Expand Down
8 changes: 6 additions & 2 deletions blocks/html/config_instance.html
@@ -1,15 +1,19 @@
<?php $usehtmleditor = can_use_html_editor(); ?>
<table cellpadding="9" cellspacing="0"> <table cellpadding="9" cellspacing="0">
<tr valign="top"> <tr valign="top">
<td align="right"><p><?php print_string('configtitle', 'block_html'); ?>:</td> <td align="right"><p><?php print_string('configtitle', 'block_html'); ?>:</td>
<td><input type="text" name="title" size="30" value="<?php echo $this->config->title; ?>" /> (<?php print_string('leaveblanktohide', 'block_html'); ?>)</td> <td><input type="text" name="title" size="30" value="<?php echo $this->config->title; ?>" /> (<?php print_string('leaveblanktohide', 'block_html'); ?>)</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td align="right"><p><?php print_string('configcontent', 'block_html'); ?>:</td> <td align="right"><p><?php print_string('configcontent', 'block_html'); ?>:</td>
<td><?php print_textarea(true, 10, 50, 0, 0, 'text', $this->config->text); ?></td> <td><?php print_textarea($usehtmleditor, 10, 50, 0, 0, 'text', isset($this->config->text)?$this->config->text:'') ?></td>
</tr> </tr>
<tr> <tr>
<td colspan="3" align="center"> <td colspan="3" align="center">
<input type="submit" value="<?php print_string('savechanges') ?>" /></td> <input type="submit" value="<?php print_string('savechanges') ?>" /></td>
</tr> </tr>
</table> </table>
<?php use_html_editor(); ?> <?php if ($usehtmleditor) {
use_html_editor();
}
?>

0 comments on commit 63689c5

Please sign in to comment.