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 = " - - - + $html = ' +
$thumb_html$comment_html
+ +
'.$thumb_html.''.$comment_html.'
- "; + '; - $page->add_block(new Block("{$image->id}: ".($image->get_tag_list()), $html, "main", $position++)); + $page->add_block(new Block( $image->id.': '.$image->get_tag_list(), $html, "main", $position++)); } } @@ -154,23 +154,23 @@ class CommentListTheme extends Themelet { $anoncode = ""; if($h_name == "Anonymous" && $this->anon_id >= 0) { - $anoncode = "{$this->anon_id}"; + $anoncode = ''.$this->anon_id.''; $this->anon_id++; } - $h_userlink = "$h_name$anoncode"; + $h_userlink = ''.$h_name.''.$anoncode; $stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50)); $stripped_nonl = str_replace("\r", "\\r", $stripped_nonl); $h_dellink = $user->is_admin() ? - "
($h_poster_ip, $h_timestamp, Del)" : ""; + '
('.$h_poster_ip.', '.$h_timestamp.', Del)' : ''; if($trim) { - return " - $h_userlink: $h_comment - >>> - $h_dellink - "; + return ' + '.$h_userlink.': '.$h_comment.' + >>> + '.$h_dellink.' + '; } else { //$avatar = ""; @@ -179,14 +179,14 @@ class CommentListTheme extends Themelet { // $avatar = "
"; //} $oe = ($this->comments_shown++ % 2 == 0) ? "even" : "odd"; - return " - -
- - $h_userlink: $h_comment - $h_dellink + return ' + +
+ + '.$h_userlink.': '.$h_comment.' + '.$h_dellink.'
- "; + '; } } @@ -197,15 +197,15 @@ class CommentListTheme extends Themelet { $hash = CommentList::get_hash(); $captcha = $config->get_bool("comment_captcha") ? captcha_get_html() : ""; - return " - ".make_form(make_link("comment/add"))." - - - - $captcha -
+ 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 = "".captcha_get_html().""; - $html .= " - ".make_form(make_link("user_admin/create"))." + $html .= ' + '.make_form(make_link("user_admin/create"))." @@ -81,8 +81,8 @@ class UserPageTheme extends Themelet { public function display_login_block(Page $page) { global $config; - $html = " - ".make_form(make_link("user_admin/login"))." + $html = ' + '.make_form(make_link("user_admin/login"))."
Name
Password
@@ -107,7 +107,7 @@ class UserPageTheme extends Themelet { $html .= "
Uploaded from: "; $n = 0; foreach($uploads as $ip => $count) { - $html .= "
$ip ($count)"; + $html .= '
'.$ip.' ('.$count.')'; if(++$n >= 20) { $html .= "
..."; break; @@ -117,7 +117,7 @@ class UserPageTheme extends Themelet { $html .= "
Commented from:"; $n = 0; foreach($comments as $ip => $count) { - $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"))." - - - - - - + $html = ' + '.make_form(make_link("user_admin/change_pass")).' + +
Change Password
Password
Repeat Password
+ + + +
Change Password
Password
Repeat Password
-

".make_form(make_link("user_admin/change_email"))." - - - - - +

'.make_form(make_link("user_admin/change_email")).' + +

Change Email
Address
+ + +
Change Email
Address
- "; + '; if($user->is_admin()) { $i_user_id = int_escape($duser->id); $h_is_admin = $duser->is_admin() ? " checked" : ""; - $html .= " -

".make_form(make_link("user_admin/set_more"))." - - Admin: - + $html .= ' +

'.make_form(make_link("user_admin/set_more")).' + + Admin: + - "; + '; } return $html; }