Fix errors about PHP complaining of strict standards, Pools extension needs an overhaul due to display errors being different in BaseThemelet than it is in the ext/pools/main.php

This commit is contained in:
Diftraku 2012-12-26 20:35:00 +02:00
parent 9ef73748de
commit 09a18b8710
7 changed files with 15 additions and 12 deletions

View file

@ -394,9 +394,12 @@ class PoolsTheme extends Themelet {
/** /**
* Display an error message to the user. * Display an error message to the user.
*/ */
public function display_error(/*string*/ $errMessage) { public function display_error(/*int*/ $code, /*string*/ $title, /*string*/ $message) {
global $page; global $page;
// Quick n' Dirty fix
$message = $code;
$page->set_title("Error"); $page->set_title("Error");
$page->set_heading("Error"); $page->set_heading("Error");
$page->add_block(new Block("Error", $errMessage, "main", 10)); $page->add_block(new Block("Error", $errMessage, "main", 10));

View file

@ -87,7 +87,7 @@ class CustomCommentListTheme extends CommentListTheme {
} }
protected function comment_to_html(Comment $comment, $trim=false) { protected function comment_to_html($comment, $trim=false) {
global $user; global $user;
$tfe = new TextFormattingEvent($comment->comment); $tfe = new TextFormattingEvent($comment->comment);

View file

@ -1,7 +1,7 @@
<?php <?php
class CustomIndexTheme extends IndexTheme { class CustomIndexTheme extends IndexTheme {
public function display_page($page, $images) { public function display_page(Page $page, $images) {
global $config; global $config;
if(count($this->search_terms) == 0) { if(count($this->search_terms) == 0) {

View file

@ -1,7 +1,7 @@
<?php <?php
class CustomTagListTheme extends TagListTheme { class CustomTagListTheme extends TagListTheme {
public function display_page($page) { public function display_page(Page $page) {
$page->disable_left(); $page->disable_left();
parent::display_page($page); parent::display_page($page);
} }

View file

@ -1,12 +1,12 @@
<?php <?php
class CustomUploadTheme extends UploadTheme { class CustomUploadTheme extends UploadTheme {
public function display_block($page) { public function display_block(Page $page) {
// this theme links to /upload // this theme links to /upload
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20)); // $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
} }
public function display_page($page) { public function display_page(Page $page) {
$page->disable_left(); $page->disable_left();
parent::display_page($page); parent::display_page($page);
} }

View file

@ -1,7 +1,7 @@
<?php <?php
class CustomUserPageTheme extends UserPageTheme { class CustomUserPageTheme extends UserPageTheme {
public function display_login_page($page) { public function display_login_page(Page $page) {
global $config; global $config;
$page->set_title("Login"); $page->set_title("Login");
$page->set_heading("Login"); $page->set_heading("Login");
@ -27,14 +27,14 @@ class CustomUserPageTheme extends UserPageTheme {
$page->add_block(new Block("Login", $html, "main", 90)); $page->add_block(new Block("Login", $html, "main", 90));
} }
public function display_user_links($page, $user, $parts) { public function display_user_links(Page $page, User $user, $parts) {
// no block in this theme // no block in this theme
} }
public function display_login_block(Page $page) { public function display_login_block(Page $page) {
// no block in this theme // no block in this theme
} }
public function display_user_block($page, $user, $parts) { public function display_user_block(Page $page, User $user, $parts) {
$h_name = html_escape($user->name); $h_name = html_escape($user->name);
$html = ""; $html = "";
$blocked = array("Pools", "Pool Changes", "Alias Editor", "My Profile"); $blocked = array("Pools", "Pool Changes", "Alias Editor", "My Profile");
@ -45,7 +45,7 @@ class CustomUserPageTheme extends UserPageTheme {
$page->add_block(new Block("User Links", $html, "user", 90)); $page->add_block(new Block("User Links", $html, "user", 90));
} }
public function display_signup_page($page) { public function display_signup_page(Page $page) {
global $config; global $config;
$tac = $config->get_string("login_tac", ""); $tac = $config->get_string("login_tac", "");
@ -77,7 +77,7 @@ class CustomUserPageTheme extends UserPageTheme {
$page->add_block(new Block("Signup", $html)); $page->add_block(new Block("Signup", $html));
} }
public function display_ip_list($page, $uploads, $comments) { public function display_ip_list(Page $page, $uploads, $comments) {
$html = "<table id='ip-history' style='width: 400px;'>"; $html = "<table id='ip-history' style='width: 400px;'>";
$html .= "<tr><td>Uploaded from: "; $html .= "<tr><td>Uploaded from: ";
foreach($uploads as $ip => $count) { foreach($uploads as $ip => $count) {

View file

@ -1,7 +1,7 @@
<?php <?php
class CustomViewImageTheme extends ViewImageTheme { class CustomViewImageTheme extends ViewImageTheme {
public function display_page($image, $editor_parts) { public function display_page(Image $image, $editor_parts) {
global $page; global $page;
$page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list())); $page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list()));
$page->set_heading(html_escape($image->get_tag_list())); $page->set_heading(html_escape($image->get_tag_list()));