diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 3e90c199..6b1d6764 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -58,6 +58,9 @@ class Image { /** @var string */ public $ext; + /** @var string[]|null */ + public $tag_array; + public $owner_id, $owner_ip; public $posted, $posted_timestamp; public $source; diff --git a/ext/artists/main.php b/ext/artists/main.php index 43edec08..7bb6238b 100644 --- a/ext/artists/main.php +++ b/ext/artists/main.php @@ -9,9 +9,19 @@ * */ class AuthorSetEvent extends Event { - var $image, $user, $author; + /** @var \Image */ + public $image; + /** @var \User */ + public $user; + /** @var string */ + public $author; - public function __construct(Image $image, User $user, /*string*/ $author) + /** + * @param Image $image + * @param User $user + * @param string $author + */ + public function __construct(Image $image, User $user, /*string*/ $author) { $this->image = $image; $this->user = $user; @@ -937,9 +947,12 @@ class Artists extends Extension { return $result; } - /* - * HERE WE GET THE ID OF THE ARTIST - */ + /** + * HERE WE GET THE ID OF THE ARTIST. + * + * @param string $name + * @return string|int + */ private function get_artist_id($name){ global $database; $artistID = $database->get_row("SELECT id FROM artists WHERE name = ?" @@ -1203,7 +1216,8 @@ class Artists extends Extension { /* * HERE WE GET THE INFO OF THE ALIAS */ - private function get_alias($artistID){ + private function get_alias($artistID) + { if (!is_numeric($artistID)) return; global $database; diff --git a/ext/setup/main.php b/ext/setup/main.php index 70b94e96..cf2f9fdc 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -12,8 +12,12 @@ * activated; new config options are in $_POST */ class ConfigSaveEvent extends Event { - var $config; + /** @var \Config */ + public $config; + /** + * @param Config $config + */ public function __construct(Config $config) { $this->config = $config; } diff --git a/ext/shimmie_api/main.php b/ext/shimmie_api/main.php index 0ea29ead..7e426288 100644 --- a/ext/shimmie_api/main.php +++ b/ext/shimmie_api/main.php @@ -42,7 +42,7 @@ class _SafeImage { $this->posted = $img->posted_timestamp; $this->source = $img->source; $this->owner_id = $img->owner_id; - $this->tags = $img->tag_array; + $this->tags = $img->get_tag_array(); } } diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php index 31ef1248..24646be6 100644 --- a/ext/tag_editcloud/main.php +++ b/ext/tag_editcloud/main.php @@ -122,15 +122,15 @@ class TagEditCloud extends Extension { $size = sprintf("%.2f", max($row['scaled'],0.5)); $js = htmlspecialchars('tageditcloud_toggle_tag(this,'.json_encode($full_tag).')',ENT_QUOTES); //Ugly, but it works - if(array_search($row['tag'],$image->tag_array) !== FALSE) { + if(array_search($row['tag'],$image->get_tag_array()) !== FALSE) { if($used_first) { - $precloud .= " $h_tag \n"; + $precloud .= " {$h_tag} \n"; continue; } else { - $entry = " $h_tag \n"; + $entry = " {$h_tag} \n"; } } else { - $entry = " $h_tag \n"; + $entry = " {$h_tag} \n"; } if($counter++ <= $def_count) { @@ -141,21 +141,21 @@ class TagEditCloud extends Extension { } if($precloud != '') { - $html .= "