Maybe someone using this mod is missing the tool below (as I did), so I publish it here. This plugin just resetting all users limits to the default gallery setting. You'd need it, for example, if one day you decide to decrease global limit, and doesn't want to edit every existing user afterwards.
Save this code as /admin/plugins/reset_limits.php
<?php // PLUGIN_TITLE: Reset User Limits
define('IN_CP', 1);
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
if ( $action == "") {
$action = "modifysettings";
}
show_admin_header();
if ($action == "showsettings") {
$fldname = "user_limit";
$default_limit = $config['default_upload_limit'];
$sql = "UPDATE ".USERS_TABLE."
SET $fldname = $default_limit";
$site_db->query($sql);
if ($HTTP_POST_VARS['setting_item']['language_dir'] != $config['language_dir']) {
printf("<b>%s</b><p>", $lang['save_settings_success']);
show_admin_footer();
}
else {
$msg = sprintf("<b>%s</b><p>", $lang['save_settings_success']);
$action = "modifysettings";
}
}
if ($action == "modifysettings") {
if (isset($HTTP_GET_VARS['settings_msg'])) {
printf("<b>%s</b><p>", urldecode($HTTP_GET_VARS['settings_msg']));
}
elseif (!empty($msg)) {
echo $msg;
}
$sql = "SELECT setting_name, setting_value
FROM ".SETTINGS_TABLE;
$result = $site_db->query($sql);
$config = array();
while ($row = $site_db->fetch_array($result)) {
$config[$row['setting_name']] = $row['setting_value'];
}
show_form_header("$PHP_SELF", "showsettings");
show_table_header("Reset all users upload limit to the default value");
echo "<tr class=\"tablerow\"><td colspan=\"2\">";
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\"><tr valign=\"top\">\n";
echo "</tr></table>\n";
echo "<tr class=\"".get_row_bg()."\">\n<td valign=\"top\"><p class=\"rowtitle\">Default upload limit from Gallery config</p></td>\n";
echo "<td>".$config['default_upload_limit']."<p>";
echo "</p></td>\n</tr>\n";
show_form_footer($lang['save_changes'], "", 2);
}
show_admin_footer();
?>