Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: functions.php 5511 2011-07-25 07:53:32Z Tomm $
| * $Id$
|
*/
/**
| */
/**
|
Zeile 153 | Zeile 153 |
---|
if($from > 2) { $first = fetch_page_url($url, 1);
|
if($from > 2) { $first = fetch_page_url($url, 1);
|
$pagination .= "<a href=\"{$first}\" title=\"Page 1\" class=\"pagination_first\">1</a> ... ";
| $pagination .= "<a href=\"{$first}\" title=\"{$lang->page} 1\" class=\"pagination_first\">1</a> ... ";
|
}
for($i = $from; $i <= $to; ++$i)
| }
for($i = $from; $i <= $to; ++$i)
|
Zeile 298 | Zeile 298 |
---|
else { $ppolls = 0;
|
else { $ppolls = 0;
|
} if($canpostattachments[$usergroup['gid']] == 1) { $pattachments = 1; } else { $pattachments = 0;
| |
} if(!$preplies && !$pthreads)
| } if(!$preplies && !$pthreads)
|
Zeile 314 | Zeile 305 |
---|
$ppost = 0; } else
|
$ppost = 0; } else
|
{
| {
|
$ppost = 1; }
| $ppost = 1; }
|
Zeile 324 | Zeile 315 |
---|
"canview" => intval($pview), "canpostthreads" => intval($pthreads), "canpostreplys" => intval($preplies),
|
"canview" => intval($pview), "canpostthreads" => intval($pthreads), "canpostreplys" => intval($preplies),
|
"canpostattachments" => intval($pattachments),
| |
"canpostpolls" => intval($ppolls), );
| "canpostpolls" => intval($ppolls), );
|
Zeile 352 | Zeile 342 |
---|
function check_admin_permissions($action, $error = true) { global $mybb, $page, $lang, $modules_dir;
|
function check_admin_permissions($action, $error = true) { global $mybb, $page, $lang, $modules_dir;
|
|
|
if(is_super_admin($mybb->user['uid'])) { return true;
| if(is_super_admin($mybb->user['uid'])) { return true;
|
Zeile 479 | Zeile 469 |
---|
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 567 | Zeile 557 |
---|
else { if(!empty($page))
|
else { if(!empty($page))
|
{
| {
|
if($adminoption['uid'] == 0) { $adminoption['permissions'][$tab][$page] = 0;
| if($adminoption['uid'] == 0) { $adminoption['permissions'][$tab][$page] = 0;
|
Zeile 649 | Zeile 639 |
---|
*/ function check_template($template) {
|
*/ function check_template($template) {
|
// Check to see of $config is in the template if(preg_match("#\\\$(GLOBALS\\s*\\[\\s*'(GLOBALS|config)'\\s*\\]|(config|(GLOBALS\\s*\\[\\s*'mybb'\\s*\\]|mybb)\\s*->\\s*config)(?![A-Za-z0-9_]))#", $template))
| // Check to see if our database password is in the template if(preg_match("#database'?\\s*\]\\s*\[\\s*'?password#", $template)) { return true; }
// System calls via backtick if(preg_match('#\$\s*\{#', $template))
|
{ return true; }
| { return true; }
|