Skip to content

Commit

Permalink
MDL-34741 use 2in3 in mod_wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Aug 11, 2012
1 parent 080d057 commit 5f573e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions mod/wiki/module.js
Expand Up @@ -47,7 +47,9 @@ M.mod_wiki.renew_lock = function(Y, args) {
args['section'] = wiki.section;
}
var callback = {};
YAHOO.util.Connect.asyncRequest('GET', 'lock.php?' + build_querystring(args), callback);
Y.use('yui2-connection', function(Y) {
Y.YUI2.util.Connect.asyncRequest('GET', 'lock.php?' + build_querystring(args), callback);
});
}
setInterval(renewLock, wiki.renew_lock_timeout * 1000);
}
Expand Down Expand Up @@ -115,7 +117,7 @@ M.mod_wiki.deleteversion = function(Y, args) {

M.mod_wiki.init_tree = function(Y, expand_all, htmlid) {
Y.use('yui2-treeview', function(Y) {
var tree = new YAHOO.widget.TreeView(htmlid);
var tree = new Y.YUI2.widget.TreeView(htmlid);

tree.subscribe("clickEvent", function(node, event) {
// we want normal clicking which redirects to url
Expand Down
1 change: 0 additions & 1 deletion mod/wiki/pagelib.php
Expand Up @@ -388,7 +388,6 @@ function __construct($wiki, $subwiki, $cm) {
parent::__construct($wiki, $subwiki, $cm);
self::$attachmentoptions = array('subdirs' => false, 'maxfiles' => - 1, 'maxbytes' => $CFG->maxbytes, 'accepted_types' => '*');
$PAGE->requires->js_init_call('M.mod_wiki.renew_lock', null, true);
$PAGE->requires->yui2_lib('connection');
}

protected function print_pagetitle() {
Expand Down

0 comments on commit 5f573e8

Please sign in to comment.