Vergleich admin/inc/functions.php - 1.8.6 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 205Zeile 205

reset($pforumcache);
reset($pforumcache[$fid]);


reset($pforumcache);
reset($pforumcache[$fid]);

 

$navigation = '';


foreach($pforumcache[$fid] as $key => $forum)
{


foreach($pforumcache[$fid] as $key => $forum)
{

Zeile 213Zeile 215
			if($pforumcache[$forum['pid']])
{
$navigation = make_parent_list($forum['pid'], $navsep).$navigation;

			if($pforumcache[$forum['pid']])
{
$navigation = make_parent_list($forum['pid'], $navsep).$navigation;

			}


			}


			if($navigation)
{
$navigation .= $navsep;

			if($navigation)
{
$navigation .= $navsep;

Zeile 259Zeile 261
			$query2 = $db->simple_select("usergroups", $db->escape_string(implode(',', array_keys($usergroup_permission_fields))), "gid='{$usergroup['gid']}'", array('limit' => 1));
$existing_permissions = $db->fetch_array($query2);
}

			$query2 = $db->simple_select("usergroups", $db->escape_string(implode(',', array_keys($usergroup_permission_fields))), "gid='{$usergroup['gid']}'", array('limit' => 1));
$existing_permissions = $db->fetch_array($query2);
}





		// Delete existing permissions
$db->delete_query("forumpermissions", "fid='{$fid}' AND gid='{$usergroup['gid']}'");


		// Delete existing permissions
$db->delete_query("forumpermissions", "fid='{$fid}' AND gid='{$usergroup['gid']}'");


Zeile 278Zeile 280
			if($canpostthreads[$usergroup['gid']] == 1)
{
$pthreads = 1;

			if($canpostthreads[$usergroup['gid']] == 1)
{
$pthreads = 1;

			}
else

			}
else

			{
$pthreads = 0;
}

			{
$pthreads = 0;
}

Zeile 427Zeile 429

// What are we trying to find?
if($get_gid && !$get_uid)


// What are we trying to find?
if($get_gid && !$get_uid)

	{

	{

		// A group only

$options = array(

		// A group only

$options = array(

Zeile 446Zeile 448
			"order_by" => "uid",
"order_dir" => "DESC"
);

			"order_by" => "uid",
"order_dir" => "DESC"
);





		// Prepare user's groups into SQL format
$group_sql = '';
foreach($gid_array as $gid)

		// Prepare user's groups into SQL format
$group_sql = '';
foreach($gid_array as $gid)

Zeile 473Zeile 475
			else
{
$perms_def = $perm['permissions'];

			else
{
$perms_def = $perm['permissions'];

			}
}

			}
}


// Figure out group permissions...ugh.
foreach($perms_group as $gperms)


// Figure out group permissions...ugh.
foreach($perms_group as $gperms)

Zeile 501Zeile 503
		if(isset($final_group_perms))
{
return $final_group_perms;

		if(isset($final_group_perms))
{
return $final_group_perms;

		}

		}

		else
{
return $perms_def;

		else
{
return $perms_def;

Zeile 655Zeile 657
function check_template($template)
{
// Check to see if our database password is in the template

function check_template($template)
{
// Check to see if our database password is in the template

	if(preg_match("#database'?\\s*\]\\s*\[\\s*'?password#", $template))

	if(preg_match('#\$config\[(([\'|"]database[\'|"])|([^\'"].*?))\]\[(([\'|"](database|hostname|password|table_prefix|username)[\'|"])|([^\'"].*?))\]#i', $template)) 

	{
return true;
}

	{
return true;
}

Zeile 723Zeile 725
		else
{
while($post = $db->fetch_array($query))

		else
{
while($post = $db->fetch_array($query))

			{
if($post['usepostcounts'] != 0 && $post['visible'] != 0)
{

			{
if($post['usepostcounts'] != 0 && $post['visible'] == 1)
{

					++$post_count;

					++$post_count;

				}


				}


				if($post['pid'] == $post['firstpost'])
{
$delete_thread_list[] = $post['thread'];
}

if(!in_array($post['thread'], $thread_list) && !in_array($post['thread'], $delete_thread_list))

				if($post['pid'] == $post['firstpost'])
{
$delete_thread_list[] = $post['thread'];
}

if(!in_array($post['thread'], $thread_list) && !in_array($post['thread'], $delete_thread_list))

				{

				{

					$thread_list[] = $post['thread']; // Threads that have been affected by this action, that aren't marked to be deleted
}
if(!in_array($post['forum'], $forum_list))

					$thread_list[] = $post['thread']; // Threads that have been affected by this action, that aren't marked to be deleted
}
if(!in_array($post['forum'], $forum_list))

Zeile 758Zeile 760
			);

return $to_return;

			);

return $to_return;

		}
}
}

/**

		}
}
}

/**

 * Prints a selection JavaScript code for selectable groups/forums fields.
*/
function print_selection_javascript()

 * Prints a selection JavaScript code for selectable groups/forums fields.
*/
function print_selection_javascript()

Zeile 772Zeile 774
	if($already_printed)
{
return;

	if($already_printed)
{
return;

	}

	}


$already_printed = true;



$already_printed = true;


Zeile 790Zeile 792
		});

$('.'+id+'_forums_groups').each(function(e)

		});

$('.'+id+'_forums_groups').each(function(e)

		{

		{

			$(this).hide();

			$(this).hide();

		});


		});


		if($('#'+id+'_forums_groups_'+checked))

		if($('#'+id+'_forums_groups_'+checked))

		{

		{

			$('#'+id+'_forums_groups_'+checked).show();
}
}

			$('#'+id+'_forums_groups_'+checked).show();
}
}

</script>";





































































</script>";
}

if(!function_exists('array_column'))
{
function array_column($input, $column_key)
{
$values = array();

if(!is_array($input))
{
$input = array($input);
}

foreach($input as $val)
{
if(is_array($val) && isset($val[$column_key]))
{
$values[] = $val[$column_key];
}
elseif(is_object($val) && isset($val->$column_key))
{
$values[] = $val->$column_key;
}
}

return $values;
}
}

/**
* Output the auto redirect block.
*
* @param \Form $form An existing form instance to wrap the redirect within.
* @param string $prompt The prompt to show.
*/
function output_auto_redirect($form, $prompt)
{
global $lang;

echo <<<HTML
<div class="confirm_action">
<p>{$prompt}</p>
<br />
<script type="text/javascript">
$(function() {
var button = $("#proceed_button");
if (button.length > 0) {
// create a temporary div element to render the text within, un-escaping HTML entities
var textElement = $('<div/>').html('{$lang->automatically_redirecting}');

button.val(textElement.text());
button.attr("disabled", true);
button.css("color", "#aaa");
button.css("borderColor", "#aaa");

var parent_form = button.closest('form');

if (parent_form.length > 0) {
parent_form.submit();
}
}
});
</script>
<p class="buttons">
{$form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button'))}
</p>
</div>
HTML;

}

}