mirror of
https://github.com/moodle/moodle.git
synced 2025-07-16 20:06:30 +02:00
Warnings eliminated and made a fix for Bug #1557 - EWIKI_NAME already defined
This commit is contained in:
@@ -6,8 +6,6 @@
|
|||||||
require_once("../../config.php");
|
require_once("../../config.php");
|
||||||
require_once("lib.php");
|
require_once("lib.php");
|
||||||
|
|
||||||
include_once($CFG->dirroot."/mod/wiki/ewikimoodlelib.php");
|
|
||||||
include_once($CFG->dirroot."/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php");
|
|
||||||
|
|
||||||
require_login($course->id);
|
require_login($course->id);
|
||||||
|
|
||||||
@@ -83,6 +81,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Database and Binary Handler
|
||||||
|
include_once($CFG->dirroot."/mod/wiki/ewikimoodlelib.php");
|
||||||
|
include_once($CFG->dirroot."/mod/wiki/ewiki/plugins/moodle/moodle_binary_store.php");
|
||||||
|
|
||||||
/// The wiki_entry->pagename is set to the specified value of the wiki,
|
/// The wiki_entry->pagename is set to the specified value of the wiki,
|
||||||
/// or the default value in the 'lang' file if the specified value was empty.
|
/// or the default value in the 'lang' file if the specified value was empty.
|
||||||
define("EWIKI_PAGE_INDEX",$wiki_entry->pagename);
|
define("EWIKI_PAGE_INDEX",$wiki_entry->pagename);
|
||||||
|
@@ -279,8 +279,10 @@
|
|||||||
if ($pf_a = $ewiki_plugins["init"]) foreach ($pf_a as $pf) {
|
if ($pf_a = $ewiki_plugins["init"]) foreach ($pf_a as $pf) {
|
||||||
// Binary Handling starts here
|
// Binary Handling starts here
|
||||||
#### MOODLE CHANGE TO BE COMPATIBLE WITH PHP 4.1
|
#### MOODLE CHANGE TO BE COMPATIBLE WITH PHP 4.1
|
||||||
|
#if(headers_sent($file,$line)) {
|
||||||
|
# error("Headers already sent: $file:$line");
|
||||||
if(headers_sent()) {
|
if(headers_sent()) {
|
||||||
error("Headers already sent");
|
error("Headers already sent.");
|
||||||
}
|
}
|
||||||
$pf($GLOBALS);
|
$pf($GLOBALS);
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#-- settings
|
#-- settings
|
||||||
define("EWIKI_UPLOAD_MAXSIZE", 2*1024*1024);
|
|
||||||
|
# Defined in view.php
|
||||||
|
#define("EWIKI_UPLOAD_MAXSIZE", 2*1024*1024);
|
||||||
define("EWIKI_PAGE_UPLOAD", "FileUpload");
|
define("EWIKI_PAGE_UPLOAD", "FileUpload");
|
||||||
define("EWIKI_PAGE_DOWNLOAD", "FileDownload");
|
define("EWIKI_PAGE_DOWNLOAD", "FileDownload");
|
||||||
define("EWIKI_ACTION_ATTACHMENTS", "attachments"); #-- define to 0 to disable
|
define("EWIKI_ACTION_ATTACHMENTS", "attachments"); #-- define to 0 to disable
|
||||||
|
@@ -1357,4 +1357,4 @@ function wiki_admin_revert($proceed, $authorfieldpattern, $changesfield, $howtoo
|
|||||||
} #-- while($row)
|
} #-- while($row)
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@@ -95,7 +95,10 @@
|
|||||||
global $ewiki_title;
|
global $ewiki_title;
|
||||||
|
|
||||||
/// #-- predefine some of the configuration constants
|
/// #-- predefine some of the configuration constants
|
||||||
define("EWIKI_NAME", $wiki_entry->pagename);
|
|
||||||
|
|
||||||
|
/// EWIKI_NAME is defined in ewikimoodlelibs, so that also admin.php can use this
|
||||||
|
#define("EWIKI_NAME", $wiki_entry->pagename);
|
||||||
|
|
||||||
/// Search Hilighting
|
/// Search Hilighting
|
||||||
if($ewiki_title=="SearchPages") {
|
if($ewiki_title=="SearchPages") {
|
||||||
@@ -212,6 +215,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Group wiki, ...: No wikipage and no ewiki_title
|
||||||
|
if(!isset($ewiki_title)) {
|
||||||
|
$ewiki_title="";
|
||||||
|
}
|
||||||
|
|
||||||
/// Moodle Log
|
/// Moodle Log
|
||||||
add_to_log($course->id, "wiki", $ewiki_action, "view.php?id=$cm->id&groupid=$groupid&userid=$userid&wikipage=$wikipage", $wiki->name." ".$ewiki_title);
|
add_to_log($course->id, "wiki", $ewiki_action, "view.php?id=$cm->id&groupid=$groupid&userid=$userid&wikipage=$wikipage", $wiki->name." ".$ewiki_title);
|
||||||
|
|
||||||
@@ -225,7 +233,7 @@
|
|||||||
$strwiki = get_string("modulename", "wiki");
|
$strwiki = get_string("modulename", "wiki");
|
||||||
|
|
||||||
print_header("$course->shortname: ".($ewiki_title?$ewiki_title:$wiki->name), "$course->fullname",
|
print_header("$course->shortname: ".($ewiki_title?$ewiki_title:$wiki->name), "$course->fullname",
|
||||||
"$navigation <A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$moodleID\">$wiki->name</a> -> $ewiki_title",
|
"$navigation <A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$moodleID\">$wiki->name</a>".($ewiki_title?" -> $ewiki_title":""),
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strwiki),
|
"", "", true, update_module_button($cm->id, $course->id, $strwiki),
|
||||||
navmenu($course, $cm));
|
navmenu($course, $cm));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user