template of a semi-fix

This commit is contained in:
John McLear 2014-11-18 14:08:44 +00:00
parent 135aa3e8fe
commit 020b636b1f
2 changed files with 5 additions and 4 deletions

View file

@ -14,7 +14,6 @@ exports.expressCreateServer = function (hook_name, args, cb) {
search_results: {}, search_results: {},
errors: [], errors: [],
}; };
res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins.html", render_args) ); res.send( eejs.require("ep_etherpad-lite/templates/admin/plugins.html", render_args) );
}); });
args.app.get('/admin/plugins/info', function(req, res) { args.app.get('/admin/plugins/info', function(req, res) {
@ -25,7 +24,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
exports.socketio = function (hook_name, args, cb) { exports.socketio = function (hook_name, args, cb) {
var io = args.io.of("/pluginfw/installer"); var io = args.io.of("/pluginfw/installer");
io.on('connection', function (socket) { io.on('connection', function (socket) {
if (!socket.handshake.session.user || !socket.handshake.session.user.is_admin) return; console.warn("THIS IS BROKEN", socket.handshake);
if (!socket.handshake.session || !socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;
socket.on("getInstalled", function (query) { socket.on("getInstalled", function (query) {
// send currently installed plugins // send currently installed plugins

View file

@ -10,7 +10,8 @@ $(document).ready(function () {
resource = baseURL.substring(1) + "socket.io"; resource = baseURL.substring(1) + "socket.io";
//connect //connect
socket = io.connect(url, {resource : resource}).of("/pluginfw/installer"); var room = url + "pluginfw/installer";
socket = io.connect(room, {resource : resource});
function search(searchTerm, limit) { function search(searchTerm, limit) {
if(search.searchTerm != searchTerm) { if(search.searchTerm != searchTerm) {