Merge with 0.9
authorMatthew Wild <mwild1@gmail.com>
Wed, 18 Jan 2012 15:07:40 +0000 (15:07 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 18 Jan 2012 15:07:40 +0000 (15:07 +0000)
prosodyctl
util/json.lua

index 9f8724d290d4d64c86e9d37dde6692ac2939c56b..f0ba68ce4fc5b8497f9b39db499f21cd3d2a0e2c 100755 (executable)
@@ -540,7 +540,7 @@ end
 
 function commands.reload(arg)
        if arg[1] == "--help" then
-               show_usage([[reload]], [[Reload prosody configuration file]]);
+               show_usage([[reload]], [[Reload Prosody's configuration and re-open log files]]);
                return 1;
        end
 
index efc602f0ed7a183b064b5be7307e018c8977a212..5d0b087616750df647f9d6d5001aeee1be33da45 100644 (file)
@@ -1,6 +1,6 @@
 
 local type = type;
-local t_insert, t_concat, t_remove, t_sort = table.insert, table.concat, table.remove, table.sort;
+local t_insert, t_concat, t_remove = table.insert, table.concat, table.remove;
 local s_char = string.char;
 local tostring, tonumber = tostring, tonumber;
 local pairs, ipairs = pairs, ipairs;
@@ -79,25 +79,11 @@ function tablesave(o, buffer)
        if next(__hash) ~= nil or next(hash) ~= nil or next(__array) == nil then
                t_insert(buffer, "{");
                local mark = #buffer;
-               if buffer.ordered then
-                       local keys = {};
-                       for k in pairs(hash) do
-                               t_insert(keys, k);
-                       end
-                       t_sort(keys);
-                       for _,k in ipairs(keys) do
-                               stringsave(k, buffer);
-                               t_insert(buffer, ":");
-                               simplesave(hash[k], buffer);
-                               t_insert(buffer, ",");
-                       end
-               else
-                       for k,v in pairs(hash) do
-                               stringsave(k, buffer);
-                               t_insert(buffer, ":");
-                               simplesave(v, buffer);
-                               t_insert(buffer, ",");
-                       end
+               for k,v in pairs(hash) do
+                       stringsave(k, buffer);
+                       t_insert(buffer, ":");
+                       simplesave(v, buffer);
+                       t_insert(buffer, ",");
                end
                if next(__hash) ~= nil then
                        t_insert(buffer, "\"__hash\":[");
@@ -143,11 +129,6 @@ function json.encode(obj)
        simplesave(obj, t);
        return t_concat(t);
 end
-function json.encode_ordered(obj)
-       local t = { ordered = true };
-       simplesave(obj, t);
-       return t_concat(t);
-end
 
 -----------------------------------