diff --git a/core/page.class.php b/core/page.class.php index e6be9c33..514a1cfd 100644 --- a/core/page.class.php +++ b/core/page.class.php @@ -225,8 +225,8 @@ class Page { print $this->data; break; case "redirect": - header("Location: {$this->redirect}"); - print "You should be redirected to {$this->redirect}"; + header('Location: '.$this->redirect); + print 'You should be redirected to '.$this->redirect.''; break; default: print "Invalid page mode"; diff --git a/core/util.inc.php b/core/util.inc.php index 27ad46f2..b8883bb5 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -384,7 +384,7 @@ function _count_execs($db, $sql, $inputarray) { if(DEBUG) { $fp = @fopen("data/sql.log", "a"); if($fp) { - if(is_array($inputarray)) { + if(isset($inputarray) && is_array($inputarray)) { fwrite($fp, preg_replace('/\s+/msi', ' ', $sql)." -- ".join(", ", $inputarray)."\n"); } else { diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 3e2f9138..93936d8b 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -21,12 +21,12 @@ class CommentListTheme extends Themelet { $next = $page_number + 1; $h_prev = ($page_number <= 1) ? "Prev" : - "Prev"; + 'Prev'; $h_index = "Index"; $h_next = ($page_number >= $total_pages) ? "Next" : - "Next"; + 'Next'; - $nav = "$h_prev | $h_index | $h_next"; + $nav = $h_prev.' | '.$h_index.' | '.$h_next; $page->set_title("Comments"); $page->set_heading("Comments"); @@ -46,7 +46,7 @@ class CommentListTheme extends Themelet { $comment_count = count($comments); if($comment_limit > 0 && $comment_count > $comment_limit) { $hidden = $comment_count - $comment_limit; - $comment_html .= "
showing $comment_limit of $comment_count comments
"; + $comment_html .= 'showing '.$comment_limit.' of '.$comment_count.' comments
'; $comments = array_slice($comments, -$comment_limit); } $this->anon_id = 1; @@ -68,14 +68,14 @@ class CommentListTheme extends Themelet { } } - $html = " -$thumb_html | -$comment_html | + $html = ' +
'.$thumb_html.' | +'.$comment_html.' |
+ return ' + '.make_form(make_link("comment/add")).' + + + + '.$captcha.' +
- "; + '; } } ?> diff --git a/ext/user/theme.php b/ext/user/theme.php index 5f1491e1..3e0fe990 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -30,9 +30,9 @@ class UserPageTheme extends Themelet { public function display_user_block(Page $page, User $user, $parts) { $h_name = html_escape($user->name); - $html = "Logged in as $h_name"; + $html = 'Logged in as '.$h_name; foreach($parts as $part) { - $html .= "
{$part["name"]}"; + $html .= '
'.$part["name"].''; } $page->add_block(new Block("User Links", $html, "left", 90)); } @@ -48,12 +48,12 @@ class UserPageTheme extends Themelet { } if(empty($tac)) {$html = "";} - else {$html = "
$tac
";} + else {$html = ''.$tac.'
';} $reca = "$ip ($count)"; + $html .= '
'.$ip.' ('.$count.')'; if(++$n >= 20) { $html .= "
..."; break; @@ -117,7 +117,7 @@ class UserPageTheme extends Themelet { $html .= "
$ip ($count)"; + $html .= '
'.$ip.' ('.$count.')'; if(++$n >= 20) { $html .= "
..."; break; @@ -133,10 +133,10 @@ class UserPageTheme extends Themelet { public function display_user_page(User $duser, $stats) { global $page, $user; assert(is_array($stats)); - $stats[] = "User ID: {$duser->id}"; + $stats[] = 'User ID: '.$duser->id; - $page->set_title("{$duser->name}'s Page"); - $page->set_heading("{$duser->name}'s Page"); + $page->set_title($duser->name."'s Page"); + $page->set_heading($duser->name."'s Page"); $page->add_block(new NavBlock()); $page->add_block(new Block("Stats", join("
", $stats), "main", 0)); @@ -150,37 +150,37 @@ class UserPageTheme extends Themelet { protected function build_options(User $duser) { global $config, $database, $user; - $html = " - ".make_form(make_link("user_admin/change_pass"))." - -
".make_form(make_link("user_admin/change_email"))." - -
'.make_form(make_link("user_admin/change_email")).' + +
".make_form(make_link("user_admin/set_more"))." - - Admin: - + $html .= ' +
'.make_form(make_link("user_admin/set_more")).' + + Admin: + - "; + '; } return $html; }