phpBB

Code Changes

File: includes/acp/acp_attachments.php

  Unmodified   Added   Modified   Removed
Line 26Line 26

/** @var \phpbb\config\config */
protected $config;


/** @var \phpbb\config\config */
protected $config;

 

/** @var \phpbb\language\language */
protected $language;


/** @var ContainerBuilder */
protected $phpbb_container;


/** @var ContainerBuilder */
protected $phpbb_container;

Line 54Line 57
		$this->id = $id;
$this->db = $db;
$this->config = $config;

		$this->id = $id;
$this->db = $db;
$this->config = $config;

 
		$this->language = $phpbb_container->get('language');

		$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;

		$this->template = $template;
$this->user = $user;
$this->phpbb_container = $phpbb_container;

Line 128Line 132
				$s_assigned_groups = array();
while ($row = $db->sql_fetchrow($result))
{

				$s_assigned_groups = array();
while ($row = $db->sql_fetchrow($result))
{

					$row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];

					$row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];

					$s_assigned_groups[$row['cat_id']][] = $row['group_name'];
}
$db->sql_freeresult($result);

					$s_assigned_groups[$row['cat_id']][] = $row['group_name'];
}
$db->sql_freeresult($result);

Line 164Line 168
						'img_create_thumbnail'		=> array('lang' => 'CREATE_THUMBNAIL',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),

						'img_create_thumbnail'		=> array('lang' => 'CREATE_THUMBNAIL',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),

						'img_imagick'				=> array('lang' => 'IMAGICK_PATH',			'validate' => 'absolute_path',	'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),

 
						'img_max'					=> array('lang' => 'MAX_IMAGE_SIZE',		'validate' => 'int:0:9999',	'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)

						'img_max'					=> array('lang' => 'MAX_IMAGE_SIZE',		'validate' => 'int:0:9999',	'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)

Line 190Line 193
				validate_config_vars($display_vars['vars'], $cfg_array, $error);

// Do not write values if there is an error

				validate_config_vars($display_vars['vars'], $cfg_array, $error);

// Do not write values if there is an error

				if (sizeof($error))

				if (count($error))

				{
$submit = false;
}

				{
$submit = false;
}

Line 226Line 229
					// Check Settings
$this->test_upload($error, $this->new_config['upload_path'], false);


					// Check Settings
$this->test_upload($error, $this->new_config['upload_path'], false);


					if (!sizeof($error))

					if (!count($error))

					{
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
}

$template->assign_var('S_ATTACHMENT_SETTINGS', true);

					{
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
}

$template->assign_var('S_ATTACHMENT_SETTINGS', true);


if ($action == 'imgmagick')
{
$this->new_config['img_imagick'] = $this->search_imagemagick();
}

// We strip eventually manual added convert program, we only want the patch
if ($this->new_config['img_imagick'])
{
// Change path separator
$this->new_config['img_imagick'] = str_replace('\\', '/', $this->new_config['img_imagick']);
$this->new_config['img_imagick'] = str_replace(array('convert', '.exe'), array('', ''), $this->new_config['img_imagick']);

// Check for trailing slash
if (substr($this->new_config['img_imagick'], -1) !== '/')
{
$this->new_config['img_imagick'] .= '/';
}
}

$supported_types = get_supported_image_types();

// Check Thumbnail Support
if (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format'])))
{
$this->new_config['img_create_thumbnail'] = 0;
}

$template->assign_vars(array(
'U_SEARCH_IMAGICK' => $this->u_action . '&amp;action=imgmagick',
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true)
);

 

// Secure Download Options - Same procedure as with banning
$allow_deny = ($this->new_config['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED';


// Secure Download Options - Same procedure as with banning
$allow_deny = ($this->new_config['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED';

Line 290Line 261
				$template->assign_vars(array(
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,

				$template->assign_vars(array(
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,

					'S_WARNING'				=> (sizeof($error)) ? true : false,

					'S_WARNING'				=> (count($error)) ? true : false,


'WARNING_MSG' => implode('<br />', $error),
'DEFINED_IPS' => $defined_ips,


'WARNING_MSG' => implode('<br />', $error),
'DEFINED_IPS' => $defined_ips,

Line 363Line 334
						// Generate correct Change List
$extensions = array();


						// Generate correct Change List
$extensions = array();


						for ($i = 0, $size = sizeof($extension_change_list); $i < $size; $i++)

						for ($i = 0, $size = count($extension_change_list); $i < $size; $i++)

						{
$extensions[$extension_change_list[$i]]['group_id'] = $group_select_list[$i];
}

						{
$extensions[$extension_change_list[$i]]['group_id'] = $group_select_list[$i];
}

Line 390Line 361
						// Delete Extension?
$extension_id_list = $request->variable('extension_id_list', array(0));


						// Delete Extension?
$extension_id_list = $request->variable('extension_id_list', array(0));


						if (sizeof($extension_id_list))

						if (count($extension_id_list))

						{
$sql = 'SELECT extension
FROM ' . EXTENSIONS_TABLE . '

						{
$sql = 'SELECT extension
FROM ' . EXTENSIONS_TABLE . '

Line 420Line 391

if ($add_extension && $add)
{


if ($add_extension && $add)
{

						if (!sizeof($error))

						if (!count($error))

						{
$sql = 'SELECT extension_id
FROM ' . EXTENSIONS_TABLE . "

						{
$sql = 'SELECT extension_id
FROM ' . EXTENSIONS_TABLE . "

Line 433Line 404
							}
$db->sql_freeresult($result);


							}
$db->sql_freeresult($result);


							if (!sizeof($error))

							if (!count($error))

							{
$sql_ary = array(
'group_id' => $add_extension_group,

							{
$sql_ary = array(
'group_id' => $add_extension_group,

Line 447Line 418
						}
}


						}
}


					if (!sizeof($error))

					if (!count($error))

					{
$notify[] = $user->lang['EXTENSIONS_UPDATED'];
}

					{
$notify[] = $user->lang['EXTENSIONS_UPDATED'];
}

Line 558Line 529
						$db->sql_freeresult($result);
}


						$db->sql_freeresult($result);
}


					if (!sizeof($error))

					if (!count($error))

					{
// Ok, build the update/insert array
$upload_icon = $request->variable('upload_icon', 'no_image');

					{
// Ok, build the update/insert array
$upload_icon = $request->variable('upload_icon', 'no_image');

Line 575Line 546
							$max_filesize = 0;
}


							$max_filesize = 0;
}


						if (!sizeof($allowed_forums))

						if (!count($allowed_forums))

						{
$forum_select = false;
}

						{
$forum_select = false;
}

Line 606Line 577
							$group_id = $db->sql_nextid();
}


							$group_id = $db->sql_nextid();
}


						$group_name = (isset($user->lang['EXT_GROUP_' . $group_name])) ? $user->lang['EXT_GROUP_' . $group_name] : $group_name;

						$group_name = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($group_name)) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($group_name)) : $group_name;

						$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}

$extension_list = $request->variable('extensions', array(0));


						$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACH_EXTGROUP_' . strtoupper($action), false, array($group_name));
}

$extension_list = $request->variable('extensions', array(0));


					if ($action == 'edit' && sizeof($extension_list))

					if ($action == 'edit' && count($extension_list))

					{
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
SET group_id = 0

					{
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
SET group_id = 0

Line 620Line 591
						$db->sql_query($sql);
}


						$db->sql_query($sql);
}


					if (sizeof($extension_list))

					if (count($extension_list))

					{
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
SET group_id = $group_id

					{
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
SET group_id = $group_id

Line 630Line 601

$cache->destroy('_extensions');



$cache->destroy('_extensions');


					if (!sizeof($error))

					if (!count($error))

					{
$notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)];
}

					{
$notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)];
}

Line 806Line 777
							'S_FILENAME_LIST'			=> $filename_list,
'S_EDIT_GROUP' => true,
'S_NO_IMAGE' => $no_image_select,

							'S_FILENAME_LIST'			=> $filename_list,
'S_EDIT_GROUP' => true,
'S_NO_IMAGE' => $no_image_select,

							'S_FORUM_IDS'				=> (sizeof($forum_ids)) ? true : false,

							'S_FORUM_IDS'				=> (count($forum_ids)) ? true : false,


'U_EXTENSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=extensions"),
'U_BACK' => $this->u_action,


'U_EXTENSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&amp;mode=extensions"),
'U_BACK' => $this->u_action,

Line 908Line 879
						'U_EDIT'		=> $this->u_action . "&amp;action=edit&amp;g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;g={$row['group_id']}",


						'U_EDIT'		=> $this->u_action . "&amp;action=edit&amp;g={$row['group_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;g={$row['group_id']}",


						'GROUP_NAME'	=> (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'],

						'GROUP_NAME'	=> $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'],

						'CATEGORY'		=> $cat_lang[$row['cat_id']],
)
);

						'CATEGORY'		=> $cat_lang[$row['cat_id']],
)
);

Line 921Line 892
			break;

case 'orphan':

			break;

case 'orphan':

 

/* @var $pagination \phpbb\pagination */
$pagination = $this->phpbb_container->get('pagination');


if ($submit)
{


if ($submit)
{

Line 928Line 902
					$add_files = (isset($_POST['add'])) ? array_keys($request->variable('add', array('' => 0))) : array();
$post_ids = $request->variable('post_id', array('' => 0));


					$add_files = (isset($_POST['add'])) ? array_keys($request->variable('add', array('' => 0))) : array();
$post_ids = $request->variable('post_id', array('' => 0));


					if (sizeof($delete_files))

					if (count($delete_files))

					{
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '

					{
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '

Line 951Line 925
						$db->sql_freeresult($result);
}


						$db->sql_freeresult($result);
}


					if (sizeof($delete_files))

					if (count($delete_files))

					{
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));

					{
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));

Line 971Line 945
					}
unset($add_files);


					}
unset($add_files);


					if (sizeof($upload_list))

					if (count($upload_list))

					{
$template->assign_var('S_UPLOADING_FILES', true);


					{
$template->assign_var('S_UPLOADING_FILES', true);


Line 1063Line 1037
				$template->assign_vars(array(
'S_ORPHAN' => true)
);

				$template->assign_vars(array(
'S_ORPHAN' => true)
);

 

$attachments_per_page = (int) $config['topics_per_page'];

// Get total number or orphans older than 3 hours
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60);
$result = $this->db->sql_query($sql);
$row = $this->db->sql_fetchrow($result);
$num_files = (int) $row['num_files'];
$total_size = (int) $row['total_size'];
$this->db->sql_freeresult($result);

$start = $request->variable('start', 0);
$start = $pagination->validate_start($start, $attachments_per_page, $num_files);


// Just get the files with is_orphan set and older than 3 hours
$sql = 'SELECT *


// Just get the files with is_orphan set and older than 3 hours
$sql = 'SELECT *

Line 1070Line 1060
					WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60) . '
ORDER BY filetime DESC';

					WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60) . '
ORDER BY filetime DESC';

				$result = $db->sql_query($sql);

				$result = $db->sql_query_limit($sql, $attachments_per_page, $start);


while ($row = $db->sql_fetchrow($result))
{


while ($row = $db->sql_fetchrow($result))
{

Line 1085Line 1075
					);
}
$db->sql_freeresult($result);

					);
}
$db->sql_freeresult($result);

 

$pagination->generate_template_pagination(
$this->u_action,
'pagination',
'start',
$num_files,
$attachments_per_page,
$start
);

$template->assign_vars(array(
'TOTAL_FILES' => $num_files,
'TOTAL_SIZE' => get_formatted_filesize($total_size),
));


break;



break;


Line 1094Line 1098
				{
$delete_files = (isset($_POST['delete'])) ? array_keys($request->variable('delete', array('' => 0))) : array();


				{
$delete_files = (isset($_POST['delete'])) ? array_keys($request->variable('delete', array('' => 0))) : array();


					if (sizeof($delete_files))

					if (count($delete_files))

					{
// Select those attachments we want to delete...
$sql = 'SELECT real_filename

					{
// Select those attachments we want to delete...
$sql = 'SELECT real_filename

Line 1110Line 1114

if ($num_deleted = $this->attachment_manager->delete('attach', $delete_files))
{


if ($num_deleted = $this->attachment_manager->delete('attach', $delete_files))
{

							if (sizeof($delete_files) != $num_deleted)

							if (count($delete_files) != $num_deleted)

							{
$error[] = $user->lang['FILES_GONE'];
}

							{
$error[] = $user->lang['FILES_GONE'];
}

Line 1231Line 1235
				// Grab extensions
$extensions = $cache->obtain_attach_extensions(true);


				// Grab extensions
$extensions = $cache->obtain_attach_extensions(true);


				for ($i = 0, $end = sizeof($attachments_list); $i < $end; ++$i)

				for ($i = 0, $end = count($attachments_list); $i < $end; ++$i)

				{
$row = $attachments_list[$i];

$row['extension'] = strtolower(trim((string) $row['extension']));
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';

				{
$row = $attachments_list[$i];

$row['extension'] = strtolower(trim((string) $row['extension']));
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';

					$display_cat = $extensions[$row['extension']]['display_cat'];

					$display_cat = isset($extensions[$row['extension']]['display_cat']) ? $extensions[$row['extension']]['display_cat'] : ATTACHMENT_CATEGORY_NONE;

					$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';

$template->assign_block_vars('attachments', array(
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),

					$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';

$template->assign_block_vars('attachments', array(
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),

						'REAL_FILENAME'		=> (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',

						'REAL_FILENAME'		=> utf8_basename((string) $row['real_filename']),
'EXT_GROUP_NAME' => $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($extensions[$row['extension']]['group_name'])) : $extensions[$row['extension']]['group_name'],


						'COMMENT'			=> $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],

						'COMMENT'			=> $comment,
'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
'ATTACH_ID' => (int) $row['attach_id'],

						'POST_ID'			=> (int) $row['post_msg_id'],
'TOPIC_ID' => (int) $row['topic_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',

 

'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),



'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),


Line 1266Line 1266
			break;
}


			break;
}


		if (sizeof($error))

		if (count($error))

		{
$template->assign_vars(array(
'S_WARNING' => true,

		{
$template->assign_vars(array(
'S_WARNING' => true,

Line 1274Line 1274
			);
}


			);
}


		if (sizeof($notify))

		if (count($notify))

		{
$template->assign_vars(array(
'S_NOTIFY' => true,

		{
$template->assign_vars(array(
'S_NOTIFY' => true,

Line 1434Line 1434
		$group_name = array();
while ($row = $db->sql_fetchrow($result))
{

		$group_name = array();
while ($row = $db->sql_fetchrow($result))
{

			$row['group_name'] = (isset($user->lang['EXT_GROUP_' . $row['group_name']])) ? $user->lang['EXT_GROUP_' . $row['group_name']] : $row['group_name'];

			$row['group_name'] = $this->language->is_set('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) ? $this->language->lang('EXT_GROUP_' . utf8_strtoupper($row['group_name'])) : $row['group_name'];

			$group_name[] = $row;
}
$db->sql_freeresult($result);

			$group_name[] = $row;
}
$db->sql_freeresult($result);

Line 1443Line 1443
		$row['group_name'] = $user->lang['NOT_ASSIGNED'];
$group_name[] = $row;


		$row['group_name'] = $user->lang['NOT_ASSIGNED'];
$group_name[] = $row;


		for ($i = 0, $groups_size = sizeof($group_name); $i < $groups_size; $i++)

		for ($i = 0, $groups_size = count($group_name); $i < $groups_size; $i++)

		{
if ($default_group === false)
{

		{
if ($default_group === false)
{

Line 1460Line 1460
		$group_select .= '</select>';

return $group_select;

		$group_select .= '</select>';

return $group_select;

	}

/**
* Search Imagick
*/
function search_imagemagick()
{
$imagick = '';

$exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';

$magic_home = getenv('MAGICK_HOME');

if (empty($magic_home))
{
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
$path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));

$locations = array_merge($path_locations, $locations);

foreach ($locations as $location)
{
// The path might not end properly, fudge it
if (substr($location, -1) !== '/')
{
$location .= '/';
}

if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
{
$imagick = str_replace('\\', '/', $location);
continue;
}
}
}
else
{
$imagick = str_replace('\\', '/', $magic_home);
}

return $imagick;

 
	}

/**

	}

/**

Line 1676Line 1635
			}
$db->sql_freeresult($result);


			}
$db->sql_freeresult($result);


			if (sizeof($iplist))

			if (count($iplist))

			{
foreach ($iplist as $ip_entry)
{

			{
foreach ($iplist as $ip_entry)
{

Line 1686Line 1645
				}
}


				}
}


			if (sizeof($hostlist))

			if (count($hostlist))

			{
foreach ($hostlist as $host_entry)
{

			{
foreach ($hostlist as $host_entry)
{

Line 1709Line 1668
		{
$unip_sql = $request->variable('unip', array(0));


		{
$unip_sql = $request->variable('unip', array(0));


			if (sizeof($unip_sql))

			if (count($unip_sql))

			{
$l_unip_list = '';


			{
$l_unip_list = '';