More type hints.
This commit is contained in:
parent
30eb5ddd8b
commit
a95766c410
@ -7,7 +7,7 @@
|
||||
class Tag_HistoryTheme extends Themelet {
|
||||
var $messages = array();
|
||||
|
||||
public function display_history_page(Page $page, $image_id, $history) {
|
||||
public function display_history_page(Page $page, /*int*/ $image_id, /*array*/ $history) {
|
||||
global $user;
|
||||
$start_string = "
|
||||
<div style='text-align: left'>
|
||||
@ -50,7 +50,7 @@ class Tag_HistoryTheme extends Themelet {
|
||||
$page->add_block(new Block("Tag History", $history_html, "main", 10));
|
||||
}
|
||||
|
||||
public function display_global_page(Page $page, $history) {
|
||||
public function display_global_page(Page $page, /*array*/ $history) {
|
||||
$start_string = "
|
||||
<div style='text-align: left'>
|
||||
".make_form(make_link("tag_history/revert"))."
|
||||
@ -91,7 +91,7 @@ class Tag_HistoryTheme extends Themelet {
|
||||
$page->add_block(new Block("Tag History", $history_html, "main", 10));
|
||||
}
|
||||
|
||||
public function display_history_link(Page $page, $image_id) {
|
||||
public function display_history_link(Page $page, /*int*/ $image_id) {
|
||||
$link = '<a href="'.make_link('tag_history/'.$image_id).'">Tag History</a>';
|
||||
$page->add_block(new Block(null, $link, "main", 5));
|
||||
}
|
||||
@ -99,7 +99,7 @@ class Tag_HistoryTheme extends Themelet {
|
||||
/*
|
||||
* Add a section to the admin page.
|
||||
*/
|
||||
public function display_admin_block($validation_msg='') {
|
||||
public function display_admin_block(/*string*/ $validation_msg='') {
|
||||
global $page;
|
||||
|
||||
if (!empty($validation_msg)) {
|
||||
@ -130,7 +130,7 @@ class Tag_HistoryTheme extends Themelet {
|
||||
$page->add_block(new Block("Revert by IP", $html));
|
||||
}
|
||||
|
||||
public function add_status($title, $body) {
|
||||
public function add_status(/*string*/ $title, /*string*/ $body) {
|
||||
$this->messages[] = '<p><b>'. $title .'</b><br>'. $body .'</p>';
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Name: Image Manager
|
||||
* Author: Shish <webmaster@shishnet.org>
|
||||
* Modified by: jgen <jgen.tech@gmail.com>
|
||||
* Link: http://code.shishnet.org/shimmie2/
|
||||
* Description: Handle the image database
|
||||
* Visibility: admin
|
||||
*/
|
||||
@ -280,10 +281,7 @@ class ImageIO extends Extension {
|
||||
|
||||
// add image {{{
|
||||
private function add_image($image) {
|
||||
global $page;
|
||||
global $user;
|
||||
global $database;
|
||||
global $config;
|
||||
global $page, $user, $database, $config;
|
||||
|
||||
/*
|
||||
* Validate things
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Name: Uploader
|
||||
* Author: Shish
|
||||
* Author: Shish <webmaster@shishnet.org>
|
||||
* Link: http://code.shishnet.org/shimmie2/
|
||||
* Description: Allows people to upload files to the website
|
||||
*/
|
||||
|
||||
@ -18,7 +19,7 @@ class DataUploadEvent extends Event {
|
||||
* @param $tmpname The temporary file used for upload.
|
||||
* @param $metadata Info about the file, should contain at least "filename", "extension", "tags" and "source".
|
||||
*/
|
||||
public function DataUploadEvent(User $user, $tmpname, $metadata) {
|
||||
public function DataUploadEvent(User $user, /*string*/ $tmpname, /*array*/ $metadata) {
|
||||
assert(file_exists($tmpname));
|
||||
|
||||
$this->user = $user;
|
||||
@ -272,9 +273,7 @@ class Upload extends Extension {
|
||||
* @retval bool TRUE on upload successful.
|
||||
*/
|
||||
private function try_upload($file, $tags, $source, $replace='') {
|
||||
global $page;
|
||||
global $config;
|
||||
global $user;
|
||||
global $page, $config, $user;
|
||||
|
||||
if(empty($source)) $source = null;
|
||||
|
||||
@ -322,9 +321,7 @@ class Upload extends Extension {
|
||||
* @retval bool TRUE on transload successful.
|
||||
*/
|
||||
private function try_transload($url, $tags, $source, $replace='') {
|
||||
global $page;
|
||||
global $config;
|
||||
global $user;
|
||||
global $page, $config, $user;
|
||||
|
||||
$ok = true;
|
||||
|
||||
|
@ -155,7 +155,7 @@ class UploadTheme extends Themelet {
|
||||
}
|
||||
|
||||
/* only allows 1 file to be uploaded - for replacing another image file */
|
||||
public function display_replace_page(Page $page, $image_id) {
|
||||
public function display_replace_page(Page $page, /*int*/ $image_id) {
|
||||
global $config, $page;
|
||||
$page->add_html_header("<link rel='stylesheet' href='".get_base_href()."/ext/upload/_style.css' type='text/css'>");
|
||||
$tl_enabled = ($config->get_string("transload_engine", "none") != "none");
|
||||
@ -211,7 +211,7 @@ class UploadTheme extends Themelet {
|
||||
$page->add_block(new Block("Upload Replacement Image", $html, "main", 20));
|
||||
}
|
||||
|
||||
public function display_upload_status(Page $page, $ok) {
|
||||
public function display_upload_status(Page $page, /*bool*/ $ok) {
|
||||
if($ok) {
|
||||
$page->set_mode("redirect");
|
||||
$page->set_redirect(make_link());
|
||||
@ -223,7 +223,7 @@ class UploadTheme extends Themelet {
|
||||
}
|
||||
}
|
||||
|
||||
public function display_upload_error(Page $page, $title, $message) {
|
||||
public function display_upload_error(Page $page, /*string*/ $title, /*string*/ $message) {
|
||||
$page->add_block(new Block($title, $message));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user