diff -r 3914c9a95879 -r 81b03b3e88d0 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Fri Apr 30 22:15:03 2010 -0400 +++ b/plugins/SpecialAdmin.php Sun May 02 23:15:18 2010 -0400 @@ -1170,21 +1170,24 @@ $db->_die(); setConfig('file_history', '0'); } - if(file_exists($_POST['imagemagick_path']) && $_POST['imagemagick_path'] != getConfig('imagemagick_path')) + $path = $_POST['imagemagick_path']; + $result = @file_exists($path) && @is_file($path) && @is_executable($path); + if ( $path !== getConfig('imagemagick_path', '/usr/bin/convert') ) { + if ( !$result ) + { + echo '
' . $lang->get('acpup_err_magick_not_found', array('magick_path' => $path)) . '
'; + } + if ( defined('ENANO_DEMO_MODE') ) // Hackish but safe. - $_POST['imagemagick_path'] = '/usr/bin/convert'; - $old = getConfig('imagemagick_path'); - $oldnew = "{$old}||{$_POST['imagemagick_path']}"; - $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,edit_summary,author,author_uid,page_text) VALUES(\'security\',\'magick_path\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\',' . $session->user_id . ',\'' . $db->escape($oldnew) . '\');'); + $path = '/usr/bin/convert'; + $old = getConfig('imagemagick_path', '/usr/bin/convert'); + $oldnew = "{$old}||{$path}"; + $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,edit_summary,author,author_uid,page_text) VALUES(\'security\',\'magick_path\',' . time() . ',\'' . $db->escape($_SERVER['REMOTE_ADDR']) . '\',\'' . $db->escape($session->username) . '\',' . $session->user_id . ',\'' . $db->escape($oldnew) . '\');'); if ( !$q ) $db->_die(); - setConfig('imagemagick_path', $_POST['imagemagick_path']); - } - else if ( $_POST['imagemagick_path'] != getConfig('imagemagick_path') ) - { - echo '' . $lang->get('acpup_err_magick_not_found', array('magick_path' => htmlspecialchars($_POST['imagemagick_path']))) . ''; + setConfig('imagemagick_path', $path); } $max_upload = floor((float)$_POST['max_file_size'] * (int)$_POST['fs_units']); if ( $max_upload > 1048576 && defined('ENANO_DEMO_MODE') ) @@ -1209,6 +1212,20 @@ get('acpup_field_enable'); ?>

+
+ get('acpup_info_max_server_size', array('size' => $size)); + ?> +

get('acpup_field_max_size'); ?>