MDL-7861 related problems for wiki. use_html_editor() call in ewiki.php is probably causing additional problems.
This commit is contained in:
+1
-1
@@ -3694,7 +3694,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
|
||||
}
|
||||
}
|
||||
}
|
||||
$str .= '<textarea class="form=textarea" id="'. $id .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">';
|
||||
$str .= '<textarea class="form-textarea" id="'. $id .'" name="'. $name .'" rows="'. $rows .'" cols="'. $cols .'">';
|
||||
if ($usehtmleditor) {
|
||||
$str .= htmlspecialchars($value); // needed for editing of cleaned text!
|
||||
} else {
|
||||
|
||||
+2
-1
@@ -269,6 +269,7 @@
|
||||
echo '<tr><td colspan="2">';
|
||||
|
||||
echo '<form id="otherwikis" action="'.$CFG->wwwroot.'/mod/wiki/admin.php">';
|
||||
echo '<fieldset class="invisiblefieldset">';
|
||||
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
|
||||
echo '<td class="sideblockheading"> '
|
||||
.$WIKI_TYPES[$wiki->wtype].' '
|
||||
@@ -288,7 +289,7 @@
|
||||
choose_from_menu($wiki_admin_list, "wikiselect", $selected, "choose", $script);
|
||||
echo '</td>';
|
||||
echo '</tr></table>';
|
||||
echo '</form>';
|
||||
echo '</fieldset></form>';
|
||||
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
?>
|
||||
<form action="admin.php" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
|
||||
<input type="hidden" name="action" value="<?php print $action; ?>" />
|
||||
@@ -13,4 +14,4 @@
|
||||
choose_from_menu($pagelist, "pagetocheck", $wikipage, "");
|
||||
?>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("checklinks","wiki"); ?>" />
|
||||
</center></FORM>
|
||||
</center></fieldset></form>
|
||||
|
||||
@@ -1094,8 +1094,10 @@ function ewiki_page_search($id, &$data, $action) {
|
||||
if (! ($q = @$_REQUEST["q"])) {
|
||||
|
||||
$o .= '<form action="' . ewiki_script("", $id) . '" method="post">';
|
||||
$o .= '<fieldset class="invisiblefieldset">';
|
||||
$o .= '<input name="q" size="30" /><br /><br />';
|
||||
$o .= '<input type="submit" value="'.$id.'" />';
|
||||
$o .= '</fieldset>';
|
||||
$o .= '</form>';
|
||||
}
|
||||
else {
|
||||
@@ -1269,7 +1271,7 @@ function ewiki_page_info($id, &$data, $action) {
|
||||
}
|
||||
|
||||
##### BEGIN MOODLE ADDITION #####
|
||||
$o .= '<tr class="page-'.$i.'"><td valign="top" align="right" nowrap="nowrap"><b>' .ewiki_t($i). ':</b></td>' .
|
||||
$o .= '<tr class="page-'.$i.'"><td style="vertical-align:top;text-align:right;white-space: nowrap;"><b>' .ewiki_t($i). ':</b></td>' .
|
||||
'<td>' . $value . "</td></tr>\n";
|
||||
##### END MOODLE ADDITION #####
|
||||
|
||||
@@ -1537,11 +1539,12 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
$hidden_postdata["version"] = &$data["version"];
|
||||
|
||||
#-- edit textarea/form
|
||||
// deleted name="ewiki", can not find the reference, and it's breaking xhtml
|
||||
$o .= ewiki_t("EDIT_FORM_1")
|
||||
. '<form method="post" enctype="multipart/form-data" action="'
|
||||
. ewiki_script("edit", $id) . '" name="ewiki"'
|
||||
. ewiki_script("edit", $id) . '" '
|
||||
. ' accept-charset="'.EWIKI_CHARSET.'">' . "\n";
|
||||
|
||||
$o .= '<fieldset class="invisiblefieldset">';
|
||||
#-- additional POST vars
|
||||
foreach ($hidden_postdata as $name => $value) {
|
||||
$o .= '<input type="hidden" name="'.$name.'" value="'.$value.'" />'."\n";
|
||||
@@ -1564,11 +1567,14 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
}
|
||||
print_textarea($usehtmleditor, $rows, $cols, 680, 400, "content", $oldtext);
|
||||
echo '</td></tr></table>';
|
||||
|
||||
$o .= ob_get_contents();
|
||||
//yu: this is causing problem and i don't know where to put it
|
||||
if ($usehtmleditor) {
|
||||
use_html_editor("content");
|
||||
use_html_editor("content");
|
||||
}
|
||||
$o .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_end_clean();
|
||||
|
||||
} else {
|
||||
##### END MOODLE ADDITION #####
|
||||
|
||||
@@ -1598,10 +1604,10 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
|
||||
$o .= $pf($id, $data, $action);
|
||||
}
|
||||
|
||||
$o .= "\n</form>\n";
|
||||
$o .= "\n</fieldset></form>\n";
|
||||
// . ewiki_t("EDIT_FORM_2"); // MOODLE DELETION
|
||||
|
||||
return('<div align="center" class="edit-box">'. $o .'</div>');
|
||||
return('<div class="edit-box">'. $o .'</div>');
|
||||
}
|
||||
|
||||
|
||||
@@ -1613,13 +1619,14 @@ function ewiki_page_edit_form_final_imgupload(&$o, &$id, &$data, &$action) {
|
||||
. '<form action='
|
||||
. '"'. ewiki_script_binary("", EWIKI_IDF_INTERNAL, "", "_UPLOAD=1") .'"'
|
||||
. ' method="post" enctype="multipart/form-data" target="_upload">'
|
||||
. '<fieldset class="invisiblefieldset">'
|
||||
. '<input type="hidden" name="MAX_FILE_SIZE" value="'.EWIKI_IMAGE_MAXSIZE.'" />'
|
||||
. '<input type="file" name="'.EWIKI_UP_UPLOAD.'"'
|
||||
. (defined("EWIKI_IMAGE_ACCEPT") ? ' accept="'.EWIKI_IMAGE_ACCEPT.'" />' : " />")
|
||||
. '<input type="hidden" name="'.EWIKI_UP_BINARY.'" value="'.EWIKI_IDF_INTERNAL.'" />'
|
||||
. ' '
|
||||
. '<input type="submit" value="'.ewiki_t("UPLOAD_PICTURE_BUTTON").'" />'
|
||||
. '</form></div>'. "\n";
|
||||
. '</fieldset></form></div>'. "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1657,6 +1664,7 @@ function ewiki_control_links($id, &$data, $action) {
|
||||
if (@$data["forced_version"]) {
|
||||
|
||||
$o .= '<form action="' . ewiki_script("edit", $id) . '" method="post">' .
|
||||
'<fieldset class="invisiblefieldset">'.
|
||||
'<input type="hidden" name="edit" value="old" />' .
|
||||
'<input type="hidden" name="version" value="'.$data["forced_version"].'" />' .
|
||||
'<input type="submit" value="' . ewiki_t("OLDVERCOMEBACK") . '" /></form> ';
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
|
||||
$html .= '<form action="' . $url .
|
||||
'" method="POST" enctype="multipart/form-data" encoding="iso-8859-1">';
|
||||
$html .= '<fieldset class="invisiblefieldset">';
|
||||
$html .= '<input type="hidden" name="'.EWIKI_UP_ENCEMAIL.'" value="' . $email . '" />';
|
||||
foreach (array_merge($_GET, $_POST) as $var=>$value) {
|
||||
if (($var != "id") && ($var != EWIKI_UP_ENCEMAIL) && ($var != EWIKI_UP_NOSPAMBOT)) {
|
||||
@@ -129,7 +130,7 @@
|
||||
}
|
||||
}
|
||||
$html .= '<input type="checkbox" name="'.EWIKI_UP_NOSPAMBOT.'" value="true" /> ' . ewiki_t("PROTE4") . '<br /><br />';
|
||||
$html .= '<input type="submit" name="go" /></form><br /><br />';
|
||||
$html .= '<input type="submit" name="go" /></fieldset></form><br /><br />';
|
||||
|
||||
if (EWIKI_FAKE_EMAIL_LOOP) {
|
||||
$html .= "\n" . ewiki_t("PROTE7") . "<br />\n";
|
||||
|
||||
@@ -105,6 +105,7 @@ function ewiki_page_fileupload($id, $data, $action, $def_sec="") {
|
||||
'<form action="' .
|
||||
ewiki_script( ($action!="view" ? $action : ""), $id).
|
||||
'" method="POST" enctype="multipart/form-data">' ;
|
||||
$o. = '<fieldset class="invisiblefieldset">';
|
||||
require_once($CFG->dirroot.'/lib/uploadlib.php');
|
||||
$o .= upload_print_form_fragment(1,array(EWIKI_UP_UPLOAD),array(ewiki_t("file")),false,null,0,0,true);
|
||||
$o .= '<input type="submit" value="' . EWIKI_PAGE_UPLOAD . '" /><br /><br />'
|
||||
@@ -126,7 +127,7 @@ function ewiki_page_fileupload($id, $data, $action, $def_sec="") {
|
||||
|
||||
$o .= '<b>'.ewiki_t("UPL_NEWNAM").'</b><br /><input type="text" name="new_filename" size="20" /><br /><br />';
|
||||
|
||||
$o .= '</form></div>';
|
||||
$o .= '</fieldset></form></div>';
|
||||
|
||||
}
|
||||
elseif ($upload_file["size"] > EWIKI_UPLOAD_MAXSIZE) {
|
||||
|
||||
+4
-2
@@ -1088,14 +1088,16 @@ function wiki_print_search_form($cmid, $search="", $userid, $groupid, $return=fa
|
||||
global $CFG;
|
||||
# TODO: Add Group and User !!!
|
||||
$output = "<form id=\"search\" action=\"$CFG->wwwroot/mod/wiki/view.php\">";
|
||||
$output .= "<font size=\"-1\">";
|
||||
$output .="<fieldset class='invisiblefieldset'>";
|
||||
$output .= "<span style='font-size:0.6em;'>";
|
||||
$output .= "<input value=\"".get_string("searchwiki", "wiki").":\" type=\"submit\" />";
|
||||
$output .= "<input name=\"id\" type=\"hidden\" value=\"$cmid\" />";
|
||||
$output = $output.($groupid?"<input name=\"groupid\" type=\"hidden\" value=\"$groupid\" />":"");
|
||||
$output = $output.($userid?"<input name=\"userid\" type=\"hidden\" value=\"$userid\" />":"");
|
||||
$output .= "<input name=\"q\" type=\"text\" size=\"20\" value=\"".s($search)."\" />".' ';
|
||||
$output .= "</font>";
|
||||
$output .= "</span>";
|
||||
$output .= "<input name=\"page\" type=\"hidden\" value=\"SearchPages\" />";
|
||||
$output .= "</fieldset>";
|
||||
$output .= "</form>";
|
||||
|
||||
if ($return) {
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
?>
|
||||
|
||||
<form id="form" method="post" action="mod.php">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<center>
|
||||
<table cellpadding="5">
|
||||
<tr valign="top">
|
||||
@@ -214,4 +215,5 @@
|
||||
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
|
||||
<input type="submit" value="<?php print_string('savechanges') ?>" />
|
||||
</center>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
?>
|
||||
<form action="admin.php" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
|
||||
<input type="hidden" name="action" value="<?php print $action; ?>" />
|
||||
@@ -29,4 +30,4 @@
|
||||
}
|
||||
?>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("removeselectedpages","wiki"); ?>" />
|
||||
</center></FORM>
|
||||
</center></field></form>
|
||||
|
||||
@@ -9,6 +9,7 @@ if (!isset($form->changesfield)) {
|
||||
|
||||
?>
|
||||
<form action="admin.php" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
|
||||
<input type="hidden" name="action" value="<?php print $action; ?>" />
|
||||
@@ -59,4 +60,4 @@ if($err->remark) {
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("revertchanges","wiki"); ?>" />
|
||||
</center></form>
|
||||
</center></fieldset></form>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
?>
|
||||
<form action="admin.php" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
|
||||
<input type="hidden" name="action" value="<?php print $action; ?>" />
|
||||
@@ -15,4 +16,4 @@
|
||||
<br />
|
||||
<center>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("setpageflags","wiki"); ?>" />
|
||||
</center></FORM>
|
||||
</center></fieldset></form>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
?>
|
||||
<form action="admin.php" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<input type="hidden" name="userid" value="<?php print $userid; ?>" />
|
||||
<input type="hidden" name="groupid" value="<?php print $groupid ?>" />
|
||||
<input type="hidden" name="action" value="<?php print $action; ?>" />
|
||||
@@ -19,4 +20,4 @@
|
||||
}
|
||||
?>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("strippages","wiki"); ?>" />
|
||||
</center></FORM>
|
||||
</center></fieldset></form>
|
||||
+10
-8
@@ -252,7 +252,7 @@
|
||||
}
|
||||
else {
|
||||
$content = '';
|
||||
$content2 = '<div align="center">'.get_string('nowikicreated', 'wiki').'</div>';
|
||||
$content2 = '<div class="boxaligncenter">'.get_string('nowikicreated', 'wiki').'</div>';
|
||||
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
.get_string('modulename', 'wiki')." ".get_string('for',"wiki")." "
|
||||
.wiki_get_owner($wiki_entry).':</td>';
|
||||
|
||||
echo '<td class="sideblockheading" align="right">'
|
||||
echo '<td class="sideblockheading">'
|
||||
.get_string('otherwikis', 'wiki').': ';
|
||||
$script = 'self.location=getElementById(\'otherwikis\').wikiselect.options[getElementById(\'otherwikis\').wikiselect.selectedIndex].value';
|
||||
choose_from_menu($wiki_list, "wikiselect", $selected, "choose", $script);
|
||||
@@ -326,24 +326,24 @@
|
||||
echo '<tr>';
|
||||
|
||||
/// Searchform
|
||||
echo '<td align="center">';
|
||||
echo '<td class="wikisearchform">';
|
||||
wiki_print_search_form($cm->id, $q, $userid, $groupid, false);
|
||||
echo '</td>';
|
||||
|
||||
/// Internal Wikilinks
|
||||
echo '<td align="center">';
|
||||
echo '<td class="wikilinksblock">';
|
||||
wiki_print_wikilinks_block($cm->id, $wiki->ewikiacceptbinary);
|
||||
echo '</td>';
|
||||
|
||||
/// Administrative Links
|
||||
if($canedit) {
|
||||
echo '<td align="center">';
|
||||
echo '<td class="wikiadminactions">';
|
||||
wiki_print_administration_actions($wiki, $cm->id, $userid, $groupid, $ewiki_title, $wiki->htmlmode!=2, $course);
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
/// Formatting Rules
|
||||
echo '<td align="right">';
|
||||
echo '<td class="howtowiki">';
|
||||
helpbutton('howtowiki', get_string('howtowiki', 'wiki'), 'wiki');
|
||||
echo '</td>';
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
// Insert the link
|
||||
$linkdesc = get_string('reloadlinkdescription', 'wiki');
|
||||
$linktext = get_string('reloadlinktext', 'wiki');
|
||||
echo "<div align='right' style='padding-bottom: 0.5em;'><a href='$me' title='$linkdesc'><input type='button' value='$linktext' /></a></div>";
|
||||
echo "<div class='wikilinkright'><a href='$me' title='$linkdesc'><input type='button' value='$linktext' /></a></div>";
|
||||
|
||||
print_simple_box_start('center', '100%', '', '20');
|
||||
|
||||
@@ -434,11 +434,13 @@
|
||||
$sesskey=sesskey();
|
||||
print "
|
||||
<form id='overridelock' method='post' action='overridelock.php'>
|
||||
<fieldset class=\"invisiblefieldset\">
|
||||
<input type='hidden' name='sesskey' value='$sesskey' />
|
||||
<input type='hidden' name='id' value='$id' />
|
||||
<input type='hidden' name='page' value='$pageesc' />
|
||||
$stroverrideinfo
|
||||
<input type='submit' value='$stroverridebutton' />
|
||||
</fieldset>
|
||||
</form>
|
||||
";
|
||||
}
|
||||
@@ -480,7 +482,7 @@ $strnojslockwarning
|
||||
}
|
||||
print $content2;
|
||||
print_simple_box_end();
|
||||
echo "<br clear=\"all\" />";
|
||||
echo "<br />";
|
||||
|
||||
/// Finish the page
|
||||
echo '
|
||||
|
||||
@@ -84,6 +84,7 @@ h2.page.title {
|
||||
|
||||
<!-- Defines the <div> used for the edit box -->
|
||||
.edit-box {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
<!-- Defines the <div> used for the image upload form -->
|
||||
|
||||
@@ -2652,7 +2652,21 @@ body#question-preview .quemodname, body#question-preview .controls {
|
||||
/***
|
||||
*** Modules: Wiki
|
||||
***/
|
||||
.sideblockheading,
|
||||
.howtowiki {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.wikisearchform,
|
||||
.wikilinksblock,
|
||||
wikiadminactions {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.wikilinkright{
|
||||
text-align:right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
/***
|
||||
*** Modules: Workshop
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user