Vergleich admin/modules/tools/tasks.php - 1.8.0 - 1.8.31

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 23Zeile 23
/**
* Validates a string or array of values
*

/**
* Validates a string or array of values
*

 * @param mixed Comma-separated list or array of values
* @param int Minimum value
* @param int Maximum value
* @param string Set "string" to return in a comma-separated list, or "array" to return in an array
* @return mixed String or array of valid values OR false if string/array is invalid

 * @param string|array $value Comma-separated list or array of values
* @param int $min Minimum value
* @param int $max Maximum value
* @param string $return_type Set "string" to return in a comma-separated list, or "array" to return in an array
* @return string|array String or array of valid values OR false if string/array is invalid

 */
function check_time_values($value, $min, $max, $return_type)
{

 */
function check_time_values($value, $min, $max, $return_type)
{

Zeile 79Zeile 79
			$errors[] = $lang->error_missing_description;
}


			$errors[] = $lang->error_missing_description;
}


		if(!file_exists(MYBB_ROOT."inc/tasks/".$mybb->input['file'].".php"))




		$file = $mybb->get_input('file');
$file = basename($file, '.php');

if(!file_exists(MYBB_ROOT."inc/tasks/".$file.".php"))

		{
$errors[] = $lang->error_invalid_task_file;
}

		{
$errors[] = $lang->error_invalid_task_file;
}

Zeile 92Zeile 95

$mybb->input['hour'] = check_time_values($mybb->input['hour'], 0, 59, 'string');
if($mybb->input['hour'] === false)


$mybb->input['hour'] = check_time_values($mybb->input['hour'], 0, 59, 'string');
if($mybb->input['hour'] === false)

		{

		{

			$errors[] = $lang->error_invalid_hour;
}


			$errors[] = $lang->error_invalid_hour;
}


Zeile 106Zeile 109
			$mybb->input['weekday'] = array('*');
}
else

			$mybb->input['weekday'] = array('*');
}
else

		{

		{

			$mybb->input['weekday'] = check_time_values($mybb->input['weekday'], 0, 6, 'array');
if($mybb->input['weekday'] === false)
{
$errors[] = $lang->error_invalid_weekday;
}
$mybb->input['day'] = '*';

			$mybb->input['weekday'] = check_time_values($mybb->input['weekday'], 0, 6, 'array');
if($mybb->input['weekday'] === false)
{
$errors[] = $lang->error_invalid_weekday;
}
$mybb->input['day'] = '*';

		}

		}





		$mybb->input['month'] = check_time_values($mybb->input['month'], 1, 12, 'array');

		$mybb->input['month'] = check_time_values($mybb->get_input('month', MyBB::INPUT_ARRAY), 1, 12, 'array');

		if($mybb->input['month'] === false)
{
$errors[] = $lang->error_invalid_month;

		if($mybb->input['month'] === false)
{
$errors[] = $lang->error_invalid_month;

Zeile 126Zeile 129
			$new_task = array(
"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),

			$new_task = array(
"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),

				"file" => $db->escape_string($mybb->input['file']),

				"file" => $db->escape_string($file),

				"minute" => $db->escape_string($mybb->input['minute']),
"hour" => $db->escape_string($mybb->input['hour']),
"day" => $db->escape_string($mybb->input['day']),
"month" => $db->escape_string(implode(',', $mybb->input['month'])),
"weekday" => $db->escape_string(implode(',', $mybb->input['weekday'])),

				"minute" => $db->escape_string($mybb->input['minute']),
"hour" => $db->escape_string($mybb->input['hour']),
"day" => $db->escape_string($mybb->input['day']),
"month" => $db->escape_string(implode(',', $mybb->input['month'])),
"weekday" => $db->escape_string(implode(',', $mybb->input['weekday'])),

				"enabled" => (int)$mybb->input['enabled'],
"logging" => (int)$mybb->input['logging']

				"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"logging" => $mybb->get_input('logging', MyBB::INPUT_INT)

			);

$new_task['nextrun'] = fetch_next_run($new_task);
$tid = $db->insert_query("tasks", $new_task);

			);

$new_task['nextrun'] = fetch_next_run($new_task);
$tid = $db->insert_query("tasks", $new_task);

			$cache->update_tasks();

$plugins->run_hooks("admin_tools_tasks_add_commit");




$plugins->run_hooks("admin_tools_tasks_add_commit");

$cache->update_tasks();


			// Log admin action
log_admin_action($tid, $mybb->input['title']);

flash_message($lang->success_task_created, 'success');
admin_redirect("index.php?module=tools-tasks");

			// Log admin action
log_admin_action($tid, $mybb->input['title']);

flash_message($lang->success_task_created, 'success');
admin_redirect("index.php?module=tools-tasks");

		}
}

		}
}

	$page->add_breadcrumb_item($lang->add_new_task);
$page->output_header($lang->scheduled_tasks." - ".$lang->add_new_task);


	$page->add_breadcrumb_item($lang->add_new_task);
$page->output_header($lang->scheduled_tasks." - ".$lang->add_new_task);


Zeile 172Zeile 176
	$page->output_nav_tabs($sub_tabs, 'add_task');
$form = new Form("index.php?module=tools-tasks&action=add", "post", "add");
if($errors)

	$page->output_nav_tabs($sub_tabs, 'add_task');
$form = new Form("index.php?module=tools-tasks&action=add", "post", "add");
if($errors)

	{

	{

		$page->output_inline_error($errors);
}
else

		$page->output_inline_error($errors);
}
else

Zeile 184Zeile 188
		$mybb->input['month'] = '*';
}
$form_container = new FormContainer($lang->add_new_task);

		$mybb->input['month'] = '*';
}
$form_container = new FormContainer($lang->add_new_task);

	$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->input['description'], array('id' => 'description')), 'description');

$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");
foreach($task_files as $task_file)
{
if(is_file(MYBB_ROOT."inc/tasks/{$task_file}") && get_extension($task_file) == "php")
{
$file_id = preg_replace("#\.".get_extension($task_file)."$#i", "$1", $task_file);
$task_list[$file_id] = $task_file;
}
}
$form_container->output_row($lang->task_file." <em>*</em>", $lang->task_file_desc, $form->generate_select_box("file", $task_list, $mybb->input['file'], array('id' => 'file')), 'file');
$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $mybb->input['minute'], array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $mybb->input['hour'], array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $mybb->input['day'], array('id' => 'day')), 'day');

$options = array(
"*" => $lang->every_weekday,
"0" => $lang->sunday,

	$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $mybb->get_input('description'), array('id' => 'description')), 'description');

$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");
foreach($task_files as $task_file)
{
if(is_file(MYBB_ROOT."inc/tasks/{$task_file}") && get_extension($task_file) == "php")
{
$file_id = preg_replace("#\.".get_extension($task_file)."$#i", "$1", $task_file);
$task_list[$file_id] = $task_file;
}
}
$form_container->output_row($lang->task_file." <em>*</em>", $lang->task_file_desc, $form->generate_select_box("file", $task_list, $mybb->get_input('file'), array('id' => 'file')), 'file');
$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $mybb->get_input('minute'), array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $mybb->get_input('hour'), array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $mybb->get_input('day'), array('id' => 'day')), 'day');

$options = array(
"*" => $lang->every_weekday,
"0" => $lang->sunday,

		"1" => $lang->monday,
"2" => $lang->tuesday,
"3" => $lang->wednesday,

		"1" => $lang->monday,
"2" => $lang->tuesday,
"3" => $lang->wednesday,

Zeile 229Zeile 233
		"11" => $lang->november,
"12" => $lang->december
);

		"11" => $lang->november,
"12" => $lang->december
);

	$form_container->output_row($lang->time_months, $lang->time_months_desc, $form->generate_select_box('month[]', $options, $mybb->input['month'], array('id' => 'month', 'multiple' => true, 'size' => 13)), 'month');

	$form_container->output_row($lang->time_months, $lang->time_months_desc, $form->generate_select_box('month[]', $options, $mybb->get_input('month', MyBB::INPUT_ARRAY), array('id' => 'month', 'multiple' => true, 'size' => 13)), 'month');





	$form_container->output_row($lang->enable_logging." <em>*</em>", "", $form->generate_yes_no_radio("logging", $mybb->input['logging'], true));

	$form_container->output_row($lang->enable_logging." <em>*</em>", "", $form->generate_yes_no_radio("logging", $mybb->get_input('logging'), true));





	$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio("enabled", $mybb->input['enabled'], true));

	$form_container->output_row($lang->enabled." <em>*</em>", "", $form->generate_yes_no_radio("enabled", $mybb->get_input('enabled'), true));

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_task);

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->save_task);

Zeile 246Zeile 250

if($mybb->input['action'] == "edit")
{


if($mybb->input['action'] == "edit")
{

	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', 1)."'");

	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");

	$task = $db->fetch_array($query);

// Does the task not exist?

	$task = $db->fetch_array($query);

// Does the task not exist?

Zeile 263Zeile 267
		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		}

if(!trim($mybb->input['description']))
{

		}

if(!trim($mybb->input['description']))
{

			$errors[] = $lang->error_missing_description;
}


			$errors[] = $lang->error_missing_description;
}


		if(!file_exists(MYBB_ROOT."inc/tasks/".$mybb->input['file'].".php"))




        $file = $mybb->get_input('file');
$file = basename($file, '.php');

if(!file_exists(MYBB_ROOT."inc/tasks/".$file.".php"))

		{
$errors[] = $lang->error_invalid_task_file;
}

		{
$errors[] = $lang->error_invalid_task_file;
}

Zeile 306Zeile 313
			$mybb->input['day'] = '*';
}


			$mybb->input['day'] = '*';
}


		$mybb->input['month'] = check_time_values($mybb->input['month'], 1, 12, 'array');

		$mybb->input['month'] = check_time_values($mybb->get_input('month', MyBB::INPUT_ARRAY), 1, 12, 'array');

		if($mybb->input['month'] === false)
{
$errors[] = $lang->error_invalid_month;

		if($mybb->input['month'] === false)
{
$errors[] = $lang->error_invalid_month;

Zeile 325Zeile 332
			$updated_task = array(
"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),

			$updated_task = array(
"title" => $db->escape_string($mybb->input['title']),
"description" => $db->escape_string($mybb->input['description']),

				"file" => $db->escape_string($mybb->input['file']),

				"file" => $db->escape_string($file),

				"minute" => $db->escape_string($mybb->input['minute']),
"hour" => $db->escape_string($mybb->input['hour']),
"day" => $db->escape_string($mybb->input['day']),
"month" => $db->escape_string(implode(',', $mybb->input['month'])),
"weekday" => $db->escape_string(implode(',', $mybb->input['weekday'])),

				"minute" => $db->escape_string($mybb->input['minute']),
"hour" => $db->escape_string($mybb->input['hour']),
"day" => $db->escape_string($mybb->input['day']),
"month" => $db->escape_string(implode(',', $mybb->input['month'])),
"weekday" => $db->escape_string(implode(',', $mybb->input['weekday'])),

				"enabled" => (int)$mybb->input['enabled'],
"logging" => (int)$mybb->input['logging']

				"enabled" => $mybb->get_input('enabled', MyBB::INPUT_INT),
"logging" => $mybb->get_input('logging', MyBB::INPUT_INT)

			);

$updated_task['nextrun'] = fetch_next_run($updated_task);

			);

$updated_task['nextrun'] = fetch_next_run($updated_task);

 

$plugins->run_hooks("admin_tools_tasks_edit_commit");


			$db->update_query("tasks", $updated_task, "tid='{$task['tid']}'");

			$db->update_query("tasks", $updated_task, "tid='{$task['tid']}'");

			$cache->update_tasks();

 




			$plugins->run_hooks("admin_tools_tasks_edit_commit");

			$cache->update_tasks();


// Log admin action
log_admin_action($task['tid'], $mybb->input['title']);


// Log admin action
log_admin_action($task['tid'], $mybb->input['title']);

Zeile 355Zeile 364
				admin_redirect("index.php?module=tools-tasks");
}
}

				admin_redirect("index.php?module=tools-tasks");
}
}

	}

	}


$page->add_breadcrumb_item($lang->edit_task);
$page->output_header($lang->scheduled_tasks." - ".$lang->edit_task);


$page->add_breadcrumb_item($lang->edit_task);
$page->output_header($lang->scheduled_tasks." - ".$lang->edit_task);

Zeile 367Zeile 376
	);

$page->output_nav_tabs($sub_tabs, 'edit_task');

	);

$page->output_nav_tabs($sub_tabs, 'edit_task');





	$form = new Form("index.php?module=tools-tasks&amp;action=edit", "post");

if($errors)
{
$page->output_inline_error($errors);
$task_data = $mybb->input;

	$form = new Form("index.php?module=tools-tasks&amp;action=edit", "post");

if($errors)
{
$page->output_inline_error($errors);
$task_data = $mybb->input;

	}

	}

	else
{
$task_data = $task;

	else
{
$task_data = $task;

Zeile 385Zeile 394
	$form_container = new FormContainer($lang->edit_task);
echo $form->generate_hidden_field("tid", $task['tid']);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $task_data['title'], array('id' => 'title')), 'title');

	$form_container = new FormContainer($lang->edit_task);
echo $form->generate_hidden_field("tid", $task['tid']);
$form_container->output_row($lang->title." <em>*</em>", "", $form->generate_text_box('title', $task_data['title'], array('id' => 'title')), 'title');

	$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $task_data['description'], array('id' => 'description')), 'description');


	$form_container->output_row($lang->short_description." <em>*</em>", "", $form->generate_text_box('description', $task_data['description'], array('id' => 'description')), 'description');


	$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");
foreach($task_files as $task_file)

	$task_list = array();
$task_files = scandir(MYBB_ROOT."inc/tasks/");
foreach($task_files as $task_file)

Zeile 401Zeile 410
	$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $task_data['minute'], array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $task_data['hour'], array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $task_data['day'], array('id' => 'day')), 'day');

	$form_container->output_row($lang->time_minutes, $lang->time_minutes_desc, $form->generate_text_box('minute', $task_data['minute'], array('id' => 'minute')), 'minute');
$form_container->output_row($lang->time_hours, $lang->time_hours_desc, $form->generate_text_box('hour', $task_data['hour'], array('id' => 'hour')), 'hour');
$form_container->output_row($lang->time_days_of_month, $lang->time_days_of_month_desc, $form->generate_text_box('day', $task_data['day'], array('id' => 'day')), 'day');





	$options = array(
"*" => $lang->every_weekday,
"0" => $lang->sunday,

	$options = array(
"*" => $lang->every_weekday,
"0" => $lang->sunday,

Zeile 442Zeile 451
	$form->end();

$page->output_footer();

	$form->end();

$page->output_footer();

}


}


if($mybb->input['action'] == "delete")

if($mybb->input['action'] == "delete")

{
$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', 1)."'");
$task = $db->fetch_array($query);

// Does the task not exist?
if(!$task['tid'])
{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");
}

// User clicked no
if($mybb->input['no'])
{
admin_redirect("index.php?module=tools-tasks");
}

{
$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");
$task = $db->fetch_array($query);

// Does the task not exist?
if(!$task['tid'])
{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");
}

// User clicked no
if($mybb->get_input('no'))
{
admin_redirect("index.php?module=tools-tasks");
}


$plugins->run_hooks("admin_tools_tasks_delete");



$plugins->run_hooks("admin_tools_tasks_delete");


Zeile 471Zeile 480
		$db->delete_query("tasklog", "tid='{$task['tid']}'");

// Fetch next task run

		$db->delete_query("tasklog", "tid='{$task['tid']}'");

// Fetch next task run

		$cache->update_tasks();

$plugins->run_hooks("admin_tools_tasks_delete_commit");




$plugins->run_hooks("admin_tools_tasks_delete_commit");

$cache->update_tasks();


		// Log admin action
log_admin_action($task['tid'], $task['title']);


		// Log admin action
log_admin_action($task['tid'], $task['title']);


Zeile 482Zeile 492
		admin_redirect("index.php?module=tools-tasks");
}
else

		admin_redirect("index.php?module=tools-tasks");
}
else

	{

	{

		$page->output_confirm_action("index.php?module=tools-tasks&amp;action=delete&amp;tid={$task['tid']}", $lang->confirm_task_deletion);
}
}

if($mybb->input['action'] == "enable" || $mybb->input['action'] == "disable")
{

		$page->output_confirm_action("index.php?module=tools-tasks&amp;action=delete&amp;tid={$task['tid']}", $lang->confirm_task_deletion);
}
}

if($mybb->input['action'] == "enable" || $mybb->input['action'] == "disable")
{

	if(!verify_post_check($mybb->input['my_post_key']))
{

	if(!verify_post_check($mybb->get_input('my_post_key')))
{

		flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-tasks");
}


		flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-tasks");
}


	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', 1)."'");

	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");

	$task = $db->fetch_array($query);

// Does the task not exist?

	$task = $db->fetch_array($query);

// Does the task not exist?

Zeile 503Zeile 513
	{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");

	{
flash_message($lang->error_invalid_task, 'error');
admin_redirect("index.php?module=tools-tasks");

	}

if($mybb->input['action'] == "enable")
{

	}

if($mybb->input['action'] == "enable")
{

		$plugins->run_hooks("admin_tools_tasks_enable");
}
else
{
$plugins->run_hooks("admin_tools_tasks_disable");

		$plugins->run_hooks("admin_tools_tasks_enable");
}
else
{
$plugins->run_hooks("admin_tools_tasks_disable");

	}


	}


	if($mybb->input['action'] == "enable")
{
if($task['file'] == "backupdb" || $task['file'] == "checktables")
{
// User clicked no

	if($mybb->input['action'] == "enable")
{
if($task['file'] == "backupdb" || $task['file'] == "checktables")
{
// User clicked no

			if($mybb->input['no'])
{
admin_redirect("index.php?module=tools-tasks");

			if($mybb->get_input('no'))
{
admin_redirect("index.php?module=tools-tasks");

			}

if($mybb->request_method == "post")
{
$nextrun = fetch_next_run($task);
$db->update_query("tasks", array("nextrun" => $nextrun, "enabled" => 1), "tid='{$task['tid']}'");

			}

if($mybb->request_method == "post")
{
$nextrun = fetch_next_run($task);
$db->update_query("tasks", array("nextrun" => $nextrun, "enabled" => 1), "tid='{$task['tid']}'");

				$cache->update_tasks();

 

$plugins->run_hooks("admin_tools_tasks_enable_commit");


$plugins->run_hooks("admin_tools_tasks_enable_commit");

 

$cache->update_tasks();


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);

Zeile 542Zeile 553
			{
$page->output_confirm_action("index.php?module=tools-tasks&amp;action=enable&amp;tid={$task['tid']}", $lang->confirm_task_enable);
}

			{
$page->output_confirm_action("index.php?module=tools-tasks&amp;action=enable&amp;tid={$task['tid']}", $lang->confirm_task_enable);
}

		}

		}

		else
{
$nextrun = fetch_next_run($task);
$db->update_query("tasks", array("nextrun" => $nextrun, "enabled" => 1), "tid='{$task['tid']}'");

		else
{
$nextrun = fetch_next_run($task);
$db->update_query("tasks", array("nextrun" => $nextrun, "enabled" => 1), "tid='{$task['tid']}'");

			$cache->update_tasks();

$plugins->run_hooks("admin_tools_tasks_enable_commit");



$plugins->run_hooks("admin_tools_tasks_enable_commit");

$cache->update_tasks();


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);

Zeile 561Zeile 573
	else
{
$db->update_query("tasks", array("enabled" => 0), "tid='{$task['tid']}'");

	else
{
$db->update_query("tasks", array("enabled" => 0), "tid='{$task['tid']}'");

		$cache->update_tasks();





		$plugins->run_hooks("admin_tools_tasks_disable_commit");

		$plugins->run_hooks("admin_tools_tasks_disable_commit");

 

$cache->update_tasks();


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);


// Log admin action
log_admin_action($task['tid'], $task['title'], $mybb->input['action']);

Zeile 575Zeile 588

if($mybb->input['action'] == "run")
{


if($mybb->input['action'] == "run")
{

	if(!verify_post_check($mybb->input['my_post_key']))

	if(!verify_post_check($mybb->get_input('my_post_key')))

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-tasks");

	{
flash_message($lang->invalid_post_verify_key2, 'error');
admin_redirect("index.php?module=tools-tasks");

Zeile 586Zeile 599

$plugins->run_hooks("admin_tools_tasks_run");



$plugins->run_hooks("admin_tools_tasks_run");


	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', 1)."'");

	$query = $db->simple_select("tasks", "*", "tid='".$mybb->get_input('tid', MyBB::INPUT_INT)."'");

	$task = $db->fetch_array($query);

// Does the task not exist?

	$task = $db->fetch_array($query);

// Does the task not exist?

Zeile 643Zeile 656
	$per_page = 50;
$current_page = 1;


	$per_page = 50;
$current_page = 1;


	if($mybb->input['page'] > 0)

	if(($mybb->get_input('page', MyBB::INPUT_INT)) > 0)

	{

	{

		$current_page = $mybb->get_input('page', 1);

		$current_page = $mybb->get_input('page', MyBB::INPUT_INT);

		$start = ($current_page-1)*$per_page;
$pages = $log_count / $per_page;
$pages = ceil($pages);

		$start = ($current_page-1)*$per_page;
$pages = $log_count / $per_page;
$pages = ceil($pages);

Zeile 723Zeile 736
	{
$task['title'] = htmlspecialchars_uni($task['title']);
$task['description'] = htmlspecialchars_uni($task['description']);

	{
$task['title'] = htmlspecialchars_uni($task['title']);
$task['description'] = htmlspecialchars_uni($task['description']);

		$next_run = date($mybb->settings['dateformat'], $task['nextrun']).", ".date($mybb->settings['timeformat'], $task['nextrun']);

		$next_run = my_date('normal', $task['nextrun'], "", 2);

		if($task['enabled'] == 1)
{
$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.png\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\" style=\"vertical-align: middle;\" /> ";

		if($task['enabled'] == 1)
{
$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.png\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\" style=\"vertical-align: middle;\" /> ";