Skip to content

Commit

Permalink
MDL-19817 Upgraded calls to helpbutton, print_simple_box* and notify
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 18, 2009
1 parent 8b1b038 commit 56da74f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions mod/wiki/admin.php
Expand Up @@ -338,12 +338,12 @@
}

// The wiki Contents
print_simple_box_start( 'center', '100%', '', '20');
echo $OUTPUT->box_start();
// Do the Action
# "setpageflags", "removepages", "strippages", "checklinks", "revertpages"
print_heading_with_help(get_string($action,"wiki"), $action, "wiki");
include $action.".html";
print_simple_box_end();
echo $OUTPUT->box_end();

/// Finish the page
echo $OUTPUT->footer();
Expand Down
4 changes: 2 additions & 2 deletions mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php
Expand Up @@ -149,7 +149,7 @@ function moodle_ewiki_page_wiki_dump($id=0, $data=0, $action=0) {
}

function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvirtualpages=0, $exportdestinations=0) {
global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid;
global $ewiki_config, $wiki, $ewiki_plugins, $wiki_entry, $course, $CFG, $ewiki_t, $userid, $groupid, $OUTPUT;

$filestozip=array();
#-- disable protected email
Expand Down Expand Up @@ -317,7 +317,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
$destfn=clean_filename(substr($id,strlen(EWIKI_IDF_INTERNAL)));
$dest="$exportdir/".$destfn;
if(!copy($fn,$dest)) {
notify("Cannot copy $fn to $dest.");
echo $OUTPUT->notification("Cannot copy $fn to $dest.");
}

#$fn = urlencode(preg_replace(EWIKI_DUMP_FILENAME_REGEX, "", $id));
Expand Down
4 changes: 2 additions & 2 deletions mod/wiki/lib.php
Expand Up @@ -170,7 +170,7 @@ function wiki_rmdir($basedir) {
* @return bool
*/
function wiki_delete_instance($id) {
global $CFG, $DB;
global $CFG, $DB, $OUTPUT;

if (! $wiki = $DB->get_record("wiki", array("id"=>$id))) {
return false;
Expand All @@ -186,7 +186,7 @@ function wiki_delete_instance($id) {
foreach ($files as $file) {
#if ($file != $exception) {
unlink("$basedir/$file");
notify("Existing file '$file' has been deleted!");
echo $OUTPUT->notification("Existing file '$file' has been deleted!");
#}
}
}
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/revertpages.html
Expand Up @@ -28,7 +28,7 @@
<td>
<input type="text" name="authorfieldpattern" size="30" value="<?php p($form->authorfieldpattern) ?>" />
<?php
helpbutton('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki');
echo $OUTPUT->help_icon(moodle_help_icon::make('revertauthorfieldpattern', get_string('authorfieldpattern', 'wiki'), 'wiki'));
if (!empty($err->authorfieldpattern)) { formerr($err->authorfieldpattern); }
?>
</td>
Expand Down
6 changes: 3 additions & 3 deletions mod/wiki/view.php
Expand Up @@ -339,7 +339,7 @@

/// Formatting Rules
echo '<td class="howtowiki">';
helpbutton('howtowiki', get_string('howtowiki', 'wiki'), 'wiki');
echo $OUTPUT->help_icon(moodle_help_icon::make('howtowiki', get_string('howtowiki', 'wiki'), 'wiki'));
echo '</td>';

echo '</tr></table>';
Expand Down Expand Up @@ -396,7 +396,7 @@
$linktext = get_string('reloadlinktext', 'wiki');
echo "<div class='wikilinkright'><a href='$me' title='$linkdesc'><input type='button' value='$linktext' /></a></div>";

print_simple_box_start('center', '100%', '', '20');
echo $OUTPUT->box_start();

/// Don't filter any pages containing wiki actions (except view). A wiki page containing
/// actions will have the form [action]/[pagename]. If the action is 'view' or the '/'
Expand Down Expand Up @@ -476,7 +476,7 @@ function handleFailure(o) {
print $content;
}
print $content2;
print_simple_box_end();
echo $OUTPUT->box_end();
echo "<br />";

/// Finish the page
Expand Down

0 comments on commit 56da74f

Please sign in to comment.