Vergleich admin/inc/functions.php - 1.4.2 - 1.4.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: functions.php 4181 2008-09-07 17:19:49Z Tikitiki $

 * $Id: functions.php 4314 2009-01-31 00:43:26Z Tikitiki $

 */

/**

 */

/**

Zeile 236Zeile 236
	{		
$query2 = $db->simple_select("forumpermissions", "canviewthreads,candlattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canvotepolls,cansearch", "fid='{$fid}' AND gid='{$usergroup['gid']}'", array('limit' => 1));
$existing_permissions = $db->fetch_array($query2);

	{		
$query2 = $db->simple_select("forumpermissions", "canviewthreads,candlattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canvotepolls,cansearch", "fid='{$fid}' AND gid='{$usergroup['gid']}'", array('limit' => 1));
$existing_permissions = $db->fetch_array($query2);

 
		
if(!$existing_permissions)
{
$query2 = $db->simple_select("usergroups", "canviewthreads,candlattachments,canratethreads,caneditposts,candeleteposts,candeletethreads,caneditattachments,canvotepolls,cansearch", "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 298Zeile 304
			}

$insertquery = array(

			}

$insertquery = array(

				"fid" => $fid,
"gid" => $usergroup['gid'],
"canview" => $pview,
"canviewthreads" => $existing_permissions['canviewthreads'],
"candlattachments" => $existing_permissions['candlattachments'],
"canpostthreads" => $pthreads,
"canpostreplys" => $preplies,
"canpostattachments" => $pattachments,
"canratethreads" => $existing_permissions['canratethreads'],
"caneditposts" => $existing_permissions['caneditposts'],
"candeleteposts" => $existing_permissions['candeleteposts'],
"candeletethreads" => $existing_permissions['candeletethreads'],
"caneditattachments" => $existing_permissions['caneditattachments'],
"canpostpolls" => $ppolls,
"canvotepolls" => $existing_permissions['canvotepolls'],
"cansearch" => $existing_permissions['cansearch']

				"fid" => intval($fid),
"gid" => intval($usergroup['gid']),
"canview" => intval($pview),
"canviewthreads" => intval($existing_permissions['canviewthreads']),
"candlattachments" => intval($existing_permissions['candlattachments']),
"canpostthreads" => intval($pthreads),
"canpostreplys" => intval($preplies),
"canpostattachments" => intval($pattachments),
"canratethreads" => intval($existing_permissions['canratethreads']),
"caneditposts" => intval($existing_permissions['caneditposts']),
"candeleteposts" => intval($existing_permissions['candeleteposts']),
"candeletethreads" => intval($existing_permissions['candeletethreads']),
"caneditattachments" => intval($existing_permissions['caneditattachments']),
"canpostpolls" => intval($ppolls),
"canvotepolls" => intval($existing_permissions['canvotepolls']),
"cansearch" => intval($existing_permissions['cansearch'])

			);

$db->insert_query("forumpermissions", $insertquery);

			);

$db->insert_query("forumpermissions", $insertquery);