forked from Cavemanon/cavepaintings
a load more tests
This commit is contained in:
@ -4,7 +4,7 @@ class Themelet {
|
||||
/**
|
||||
* Generic error message display
|
||||
*/
|
||||
public function display_error($page, $title, $message) {
|
||||
public function display_error(Page $page, $title, $message) {
|
||||
$page->set_title($title);
|
||||
$page->set_heading($title);
|
||||
$page->add_block(new NavBlock());
|
||||
@ -15,7 +15,7 @@ class Themelet {
|
||||
/**
|
||||
* A specific, common error message
|
||||
*/
|
||||
public function display_permission_denied($page) {
|
||||
public function display_permission_denied(Page $page) {
|
||||
header("HTTP/1.0 403 Permission Denied");
|
||||
$this->display_error($page, "Permission Denied", "You do not have permission to access this page");
|
||||
}
|
||||
@ -25,7 +25,7 @@ class Themelet {
|
||||
* Generic thumbnail code; returns HTML rather than adding
|
||||
* a block since thumbs tend to go inside blocks...
|
||||
*/
|
||||
public function build_thumb_html($image, $query=null) {
|
||||
public function build_thumb_html(Image $image, $query=null) {
|
||||
global $config;
|
||||
$i_id = int_escape($image->id);
|
||||
$h_view_link = make_link("post/view/$i_id", $query);
|
||||
@ -40,7 +40,7 @@ class Themelet {
|
||||
/**
|
||||
* Add a generic paginator
|
||||
*/
|
||||
public function display_paginator($page, $base, $query, $page_number, $total_pages) {
|
||||
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
|
||||
if($total_pages == 0) $total_pages = 1;
|
||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
||||
$page->add_block(new Block(null, $body, "main", 90));
|
||||
|
Reference in New Issue
Block a user