comparison mod_bookmarks2/mod_bookmarks2.lua @ 4848:5001104f0275

Back out ad7767a9f3ea Turns out it does error on 0.11 because it tries to compare a number with the string "max" Thanks Marcel
author Kim Alvefur <zash@zash.se>
date Wed, 05 Jan 2022 00:06:24 +0100
parents ad7767a9f3ea
children 9187a7adfc39
comparison
equal deleted inserted replaced
4847:a280878c4ef2 4848:5001104f0275
18 ["max_items"] = "max"; 18 ["max_items"] = "max";
19 ["send_last_published_item"] = "never"; 19 ["send_last_published_item"] = "never";
20 ["access_model"] = "whitelist"; 20 ["access_model"] = "whitelist";
21 }; 21 };
22 22
23 if not mod_pep.check_node_config(nil, nil, default_options) then 23 if not pcall(mod_pep.check_node_config, nil, nil, default_options) then
24 -- 0.11 or earlier not supporting max_items="max" trows an error here 24 -- 0.11 or earlier not supporting max_items="max" trows an error here
25 module:log("debug", "Setting max_items=pep_max_items because 'max' is not supported in this version"); 25 module:log("debug", "Setting max_items=pep_max_items because 'max' is not supported in this version");
26 default_options["max_items"] = module:get_option_number("pep_max_items", 256); 26 default_options["max_items"] = module:get_option_number("pep_max_items", 256);
27 end 27 end
28 28