Vergleich admin/inc/functions.php - 1.4.0 - 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 3990 2008-07-06 01:01:20Z Tikitiki $

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

 */

/**

 */

/**

Zeile 233Zeile 233

$query = $db->simple_select("usergroups", "gid");
while($usergroup = $db->fetch_array($query))


$query = $db->simple_select("usergroups", "gid");
while($usergroup = $db->fetch_array($query))

	{










	{		
$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 295Zeile 304
			}

$insertquery = array(

			}

$insertquery = array(

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

				"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);