diff --git a/ext/alias_editor/main.php b/ext/alias_editor/main.php index 883292d9..97446387 100644 --- a/ext/alias_editor/main.php +++ b/ext/alias_editor/main.php @@ -11,9 +11,15 @@ */ class AddAliasEvent extends Event { - var $oldtag; - var $newtag; + /** @var string */ + public $oldtag; + /** @var string */ + public $newtag; + /** + * @param string $oldtag + * @param string $newtag + */ public function __construct($oldtag, $newtag) { $this->oldtag = trim($oldtag); $this->newtag = trim($newtag); @@ -124,6 +130,10 @@ class AliasEditor extends Extension { } } + /** + * @param Database $database + * @return string + */ private function get_alias_csv(Database $database) { $csv = ""; $aliases = $database->get_pairs("SELECT oldtag, newtag FROM aliases ORDER BY newtag"); @@ -133,6 +143,10 @@ class AliasEditor extends Extension { return $csv; } + /** + * @param Database $database + * @param string $csv + */ private function add_alias_csv(Database $database, /*string*/ $csv) { $csv = str_replace("\r", "\n", $csv); foreach(explode("\n", $csv) as $line) { @@ -148,9 +162,15 @@ class AliasEditor extends Extension { } } - // add alias *after* mass tag editing, else the MTE will - // search for the images and be redirected to the alias, - // missing out the images tagged with the oldtag + /** + * Get the priority for this extension. + * + * Add alias *after* mass tag editing, else the MTE will + * search for the images and be redirected to the alias, + * missing out the images tagged with the old tag. + * + * @return int + */ public function get_priority() {return 60;} } diff --git a/ext/alias_editor/theme.php b/ext/alias_editor/theme.php index 21a984b8..4dc2d2b1 100644 --- a/ext/alias_editor/theme.php +++ b/ext/alias_editor/theme.php @@ -1,11 +1,14 @@ $new_tag) - * $can_manage = whether things like "add new alias" should be shown + * Note: $can_manage = whether things like "add new alias" should be shown + * + * @param array $aliases An array of ($old_tag => $new_tag) + * @param int $pageNumber + * @param int $totalPages */ public function display_aliases($aliases, $pageNumber, $totalPages) { global $page, $user; diff --git a/ext/arrowkey_navigation/main.php b/ext/arrowkey_navigation/main.php index 4d248f32..b808c90f 100644 --- a/ext/arrowkey_navigation/main.php +++ b/ext/arrowkey_navigation/main.php @@ -9,14 +9,22 @@ * Simply enable this extention in the extention manager to enable arrow key navigation. */ class ArrowkeyNavigation extends Extension { - # Adds functionality for post/view on images + /** + * Adds functionality for post/view on images. + * + * @param DisplayingImageEvent $event + */ public function onDisplayingImage(DisplayingImageEvent $event) { $prev_url = make_http(make_link("post/prev/".$event->image->id)); $next_url = make_http(make_link("post/next/".$event->image->id)); $this->add_arrowkeys_code($prev_url, $next_url); } - # Adds functionality for post/list + /** + * Adds functionality for post/list. + * + * @param PageRequestEvent $event + */ public function onPageRequest(PageRequestEvent $event) { if($event->page_matches("post/list")) { $pageinfo = $this->get_list_pageinfo($event); @@ -26,7 +34,12 @@ class ArrowkeyNavigation extends Extension { } } - # adds the javascript to the page with the given urls + /** + * Adds the javascript to the page with the given urls. + * + * @param string $prev_url + * @param string $next_url + */ private function add_arrowkeys_code($prev_url, $next_url) { global $page; @@ -41,8 +54,13 @@ class ArrowkeyNavigation extends Extension { ", 60); } - # returns info about the current page number - private function get_list_pageinfo($event) { + /** + * Returns info about the current page number. + * + * @param PageRequestEvent $event + * @return array + */ + private function get_list_pageinfo(PageRequestEvent $event) { global $config, $database; // get the amount of images per page diff --git a/ext/artists/theme.php b/ext/artists/theme.php index 3cecede4..347df0f1 100644 --- a/ext/artists/theme.php +++ b/ext/artists/theme.php @@ -1,6 +1,10 @@ cache->get("blocks"); if($blocks === false) {