From bf473f6d51c05c95c1d20995dda57d004ac9e578 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 29 May 2019 18:23:29 +0100 Subject: [PATCH] more lint fixes --- composer.json | 15 +++++++++++++++ core/database.php | 16 ++++++++-------- core/imageboard/image.php | 22 +++++++++++----------- core/imageboard/misc.php | 2 +- core/imageboard/search.php | 6 +++--- core/page.php | 12 ++++++------ core/polyfills.php | 4 ++-- core/send_event.php | 4 ++-- core/sys_config.php | 2 +- core/user.php | 16 ++++++++-------- core/util.php | 12 ++++++------ ext/artists/theme.php | 20 ++++++++++---------- ext/bulk_add/main.php | 10 +++------- ext/forum/theme.php | 2 +- ext/handle_flash/theme.php | 2 +- ext/handle_static/style.css | 3 +-- ext/index/style.css | 1 + ext/link_image/test.php | 2 +- ext/mail/mail.css | 2 +- ext/ouroboros_api/main.php | 2 +- ext/rule34/script.js | 4 ++-- ext/tag_categories/main.php | 2 ++ ext/tag_categories/theme.php | 2 +- ext/tag_editcloud/main.php | 2 +- ext/tag_list/main.php | 4 ++-- ext/tagger/script.js | 2 +- ext/tagger/style.css | 1 - ext/tagger/theme.php | 14 +++++++------- ext/tips/test.php | 2 +- index.php | 2 +- themes/danbooru/user.theme.php | 2 +- themes/danbooru2/user.theme.php | 2 +- themes/futaba/style.css | 1 - themes/lite/style.css | 8 ++------ themes/lite/user.theme.php | 2 +- themes/warm/style.css | 3 +-- 36 files changed, 107 insertions(+), 101 deletions(-) diff --git a/composer.json b/composer.json index 902eca86..114d990e 100644 --- a/composer.json +++ b/composer.json @@ -43,5 +43,20 @@ "require-dev" : { "phpunit/phpunit" : "6.*" + }, + + "suggest": { + "ext-memcache": "memcache caching", + "ext-memcached": "memcached caching", + "ext-apc": "apc caching", + "ext-redis": "redis caching", + "ext-dom": "some extensions", + "ext-curl": "some extensions", + "ext-ctype": "some extensions", + "ext-json": "some extensions", + "ext-zip": "self-updater extension", + "ext-zlib": "anti-spam", + "ext-xml": "some extensions", + "ext-gd": "GD-based thumbnailing" } } diff --git a/core/database.php b/core/database.php index 9234cfa5..c630c3b6 100644 --- a/core/database.php +++ b/core/database.php @@ -50,7 +50,7 @@ class Database $this->cache = new Cache(CACHE_DSN); } - private function connect_db() + private function connect_db(): void { # FIXME: detect ADODB URI, automatically translate PDO DSN @@ -88,7 +88,7 @@ class Database $this->beginTransaction(); } - private function connect_engine() + private function connect_engine(): void { if (preg_match("/^([^:]*)/", DATABASE_DSN, $matches)) { $db_proto=$matches[1]; @@ -107,7 +107,7 @@ class Database } } - public function beginTransaction() + public function beginTransaction(): void { if ($this->transaction === false) { $this->db->beginTransaction(); @@ -167,7 +167,7 @@ class Database return $this->engine->name; } - private function count_execs(string $sql, array $inputarray) + private function count_execs(string $sql, array $inputarray): void { if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) { $sql = trim(preg_replace('/\s+/msi', ' ', $sql)); @@ -189,7 +189,7 @@ class Database } } - private function count_time(string $method, float $start) + private function count_time(string $method, float $start): void { if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) { $text = $method.":".(microtime(true) - $start)."\n"; @@ -242,7 +242,7 @@ class Database /** * Execute an SQL query and return a single row. */ - public function get_row(string $query, array $args=[]) + public function get_row(string $query, array $args=[]): ?PDORow { $_start = microtime(true); $row = $this->execute($query, $args)->fetch(); @@ -385,7 +385,7 @@ class MockDatabase extends Database { return $this->_execute($query, $args); } - public function get_row(string $query, array $args=[]) + public function get_row(string $query, array $args=[]): ?PDORow { return $this->_execute($query, $args); } @@ -416,7 +416,7 @@ class MockDatabase extends Database { } - public function connect_engine() + public function connect_engine(): void { } } diff --git a/core/imageboard/image.php b/core/imageboard/image.php index 415d961a..a5d90979 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -71,21 +71,21 @@ class Image } } - public static function by_id(int $id) + public static function by_id(int $id): ?Image { global $database; $row = $database->get_row("SELECT * FROM images WHERE images.id=:id", ["id"=>$id]); return ($row ? new Image($row) : null); } - public static function by_hash(string $hash) + public static function by_hash(string $hash): ?Image { global $database; $row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]); return ($row ? new Image($row) : null); } - public static function by_random(array $tags=[]) + public static function by_random(array $tags=[]): ?Image { $max = Image::count_images($tags); if ($max < 1) { @@ -148,7 +148,7 @@ class Image /* * Accelerator stuff */ - public static function get_acceleratable(array $tags) + public static function get_acceleratable(array $tags): ?array { $ret = [ "yays" => [], @@ -158,7 +158,7 @@ class Image $nays = 0; foreach ($tags as $tag) { if (!preg_match("/^-?[a-zA-Z0-9_-]+$/", $tag)) { - return false; + return null; } if ($tag[0] == "-") { $nays++; @@ -171,10 +171,10 @@ class Image if ($yays > 1 || $nays > 0) { return $ret; } - return false; + return null; } - public static function get_accelerated_result(array $tags, int $offset, int $limit) + public static function get_accelerated_result(array $tags, int $offset, int $limit): ?PDOStatement { global $database; @@ -195,7 +195,7 @@ class Image return $result; } - public static function get_accelerated_count(array $tags) + public static function get_accelerated_count(array $tags): ?int { $req = Image::get_acceleratable($tags); if (!$req) { @@ -336,7 +336,7 @@ class Image /** * Set the image's owner. */ - public function set_owner(User $owner) + public function set_owner(User $owner): void { global $database; if ($owner->id != $this->owner_id) { @@ -514,7 +514,7 @@ class Image return $this->locked; } - public function set_locked(bool $tf) + public function set_locked(bool $tf): void { global $database; $ln = $tf ? "Y" : "N"; @@ -566,7 +566,7 @@ class Image /** * Set the tags for this image. */ - public function set_tags(array $unfiltered_tags) + public function set_tags(array $unfiltered_tags): void { global $database; diff --git a/core/imageboard/misc.php b/core/imageboard/misc.php index cde0d981..5ae727f3 100644 --- a/core/imageboard/misc.php +++ b/core/imageboard/misc.php @@ -9,7 +9,7 @@ * * @throws UploadException */ -function move_upload_to_archive(DataUploadEvent $event) +function move_upload_to_archive(DataUploadEvent $event): void { $target = warehouse_path("images", $event->hash); if (!@copy($event->tmpname, $target)) { diff --git a/core/imageboard/search.php b/core/imageboard/search.php index 6a2bc916..e3c63940 100644 --- a/core/imageboard/search.php +++ b/core/imageboard/search.php @@ -12,18 +12,18 @@ class Querylet $this->variables = $variables; } - public function append(Querylet $querylet) + public function append(Querylet $querylet): void { $this->sql .= $querylet->sql; $this->variables = array_merge($this->variables, $querylet->variables); } - public function append_sql(string $sql) + public function append_sql(string $sql): void { $this->sql .= $sql; } - public function add_variable($var) + public function add_variable($var): void { $this->variables[] = $var; } diff --git a/core/page.php b/core/page.php index 6bd67e75..e9b3384b 100644 --- a/core/page.php +++ b/core/page.php @@ -47,7 +47,7 @@ class Page /** * Set what this page should do; "page", "data", or "redirect". */ - public function set_mode(string $mode) + public function set_mode(string $mode): void { $this->mode = $mode; } @@ -55,7 +55,7 @@ class Page /** * Set the page's MIME type. */ - public function set_type(string $type) + public function set_type(string $type): void { $this->type = $type; } @@ -75,7 +75,7 @@ class Page /** * Set the raw data to be sent. */ - public function set_data(string $data) + public function set_data(string $data): void { $this->data = $data; } @@ -83,7 +83,7 @@ class Page /** * Set the recommended download filename. */ - public function set_filename(string $filename) + public function set_filename(string $filename): void { $this->filename = $filename; } @@ -101,7 +101,7 @@ class Page * Set the URL to redirect to (remember to use make_link() if linking * to a page in the same site). */ - public function set_redirect(string $redirect) + public function set_redirect(string $redirect): void { $this->redirect = $redirect; } @@ -229,7 +229,7 @@ class Page /** * Add a Block of data to the page. */ - public function add_block(Block $block) + public function add_block(Block $block): void { $this->blocks[] = $block; } diff --git a/core/polyfills.php b/core/polyfills.php index 95866525..e543bb5a 100644 --- a/core/polyfills.php +++ b/core/polyfills.php @@ -78,7 +78,7 @@ function ip_in_range(string $IP, string $CIDR): bool * from a patch by Christian Walde; only intended for use in the * "extension manager" extension, but it seems to fit better here */ -function deltree(string $f) +function deltree(string $f): void { //Because Windows (I know, bad excuse) if (PHP_OS === 'WINNT') { @@ -117,7 +117,7 @@ function deltree(string $f) * * from a comment on http://uk.php.net/copy */ -function full_copy(string $source, string $target) +function full_copy(string $source, string $target): void { if (is_dir($source)) { @mkdir($target); diff --git a/core/send_event.php b/core/send_event.php index 52d6dadf..6903a03c 100644 --- a/core/send_event.php +++ b/core/send_event.php @@ -7,7 +7,7 @@ global $_shm_event_listeners; $_shm_event_listeners = []; -function _load_event_listeners() +function _load_event_listeners(): void { global $_shm_event_listeners, $_shm_ctx; @@ -27,7 +27,7 @@ function _load_event_listeners() $_shm_ctx->log_endok(); } -function _set_event_listeners() +function _set_event_listeners(): void { global $_shm_event_listeners; $_shm_event_listeners = []; diff --git a/core/sys_config.php b/core/sys_config.php index 4c6d648e..a2fbefee 100644 --- a/core/sys_config.php +++ b/core/sys_config.php @@ -19,7 +19,7 @@ * */ -function _d(string $name, $value) +function _d(string $name, $value): void { if (!defined($name)) { define($name, $value); diff --git a/core/user.php b/core/user.php index ae3a0a5f..098c7723 100644 --- a/core/user.php +++ b/core/user.php @@ -64,7 +64,7 @@ class User } } - public static function by_session(string $name, string $session) + public static function by_session(string $name, string $session): ?User { global $config, $database; $row = $database->cache->get("user-session:$name-$session"); @@ -80,7 +80,7 @@ class User return is_null($row) ? null : new User($row); } - public static function by_id(int $id) + public static function by_id(int $id): ?User { global $database; if ($id === 1) { @@ -96,14 +96,14 @@ class User return is_null($row) ? null : new User($row); } - public static function by_name(string $name) + public static function by_name(string $name): ?User { global $database; $row = $database->get_row($database->scoreql_to_sql("SELECT * FROM users WHERE SCORE_STRNORM(name) = SCORE_STRNORM(:name)"), ["name"=>$name]); return is_null($row) ? null : new User($row); } - public static function by_name_and_pass(string $name, string $pass) + public static function by_name_and_pass(string $name, string $pass): ?User { $user = User::by_name($name); if ($user) { @@ -149,14 +149,14 @@ class User return ($this->class->name === "admin"); } - public function set_class(string $class) + public function set_class(string $class): void { global $database; $database->Execute("UPDATE users SET class=:class WHERE id=:id", ["class"=>$class, "id"=>$this->id]); log_info("core-user", 'Set class for '.$this->name.' to '.$class); } - public function set_name(string $name) + public function set_name(string $name): void { global $database; if (User::by_name($name)) { @@ -168,7 +168,7 @@ class User log_info("core-user", "Changed username for {$old_name} to {$this->name}"); } - public function set_password(string $password) + public function set_password(string $password): void { global $database; $hash = password_hash($password, PASSWORD_BCRYPT); @@ -181,7 +181,7 @@ class User } } - public function set_email(string $address) + public function set_email(string $address): void { global $database; $database->Execute("UPDATE users SET email=:email WHERE id=:id", ["email"=>$address, "id"=>$this->id]); diff --git a/core/util.php b/core/util.php index 4481729e..63e4f725 100644 --- a/core/util.php +++ b/core/util.php @@ -137,7 +137,7 @@ function get_session_ip(Config $config): string * the action actually takes place (eg onWhateverElse) - but much of the time, actions * are taken from within onPageRequest... */ -function flash_message(string $text, string $type="info") +function flash_message(string $text, string $type="info"): void { global $page; $current = $page->get_cookie("flash_message"); @@ -332,7 +332,7 @@ function get_debug_info(): string return $debug; } -function log_slow() +function log_slow(): void { global $_shm_load_start; if (!is_null(SLOW_PAGES)) { @@ -345,7 +345,7 @@ function log_slow() } } -function score_assert_handler($file, $line, $code, $desc = null) +function score_assert_handler($file, $line, $code, $desc = null): void { $file = basename($file); print("Assertion failed at $file:$line: $code ($desc)"); @@ -363,7 +363,7 @@ function score_assert_handler($file, $line, $code, $desc = null) /** @privatesection */ -function _version_check() +function _version_check(): void { if (MIN_PHP_VERSION) { if (version_compare(phpversion(), MIN_PHP_VERSION, ">=") === false) { @@ -378,7 +378,7 @@ date and you should plan on moving elsewhere. } } -function _sanitise_environment() +function _sanitise_environment(): void { global $_shm_ctx; @@ -438,7 +438,7 @@ function _get_themelet_files(string $_theme): array /** * Used to display fatal errors to the web user. */ -function _fatal_error(Exception $e) +function _fatal_error(Exception $e): void { $version = VERSION; $message = $e->getMessage(); diff --git a/ext/artists/theme.php b/ext/artists/theme.php index 825e2f1b..aebd2757 100644 --- a/ext/artists/theme.php +++ b/ext/artists/theme.php @@ -31,38 +31,38 @@ class ArtistsTheme extends Themelet if ($mode == "editor") { $html = "
".$user->get_auth_html()." - +
".$user->get_auth_html()." - +
"; if ($is_admin) { $html .= "
".$user->get_auth_html()." - +
"; } $html .= "
".$user->get_auth_html()." - +
".$user->get_auth_html()." - +
".$user->get_auth_html()." - +
"; } @@ -297,7 +297,7 @@ class ArtistsTheme extends Themelet
'.$user->get_auth_html().' - +
@@ -315,7 +315,7 @@ class ArtistsTheme extends Themelet
'.$user->get_auth_html().' - +
@@ -332,8 +332,8 @@ class ArtistsTheme extends Themelet $html = '
'.$user->get_auth_html().' - - + +
diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php index 9634d50e..c1379680 100644 --- a/ext/bulk_add/main.php +++ b/ext/bulk_add/main.php @@ -37,13 +37,9 @@ class BulkAdd extends Extension set_time_limit(0); $bae = new BulkAddEvent($_POST['dir']); send_event($bae); - if (is_array($bae->results)) { - foreach ($bae->results as $result) { - $this->theme->add_status("Adding files", $result); - } - } elseif (strlen($bae->results) > 0) { - $this->theme->add_status("Adding files", $bae->results); - } + foreach ($bae->results as $result) { + $this->theme->add_status("Adding files", $result); + } $this->theme->display_upload_results($page); } } diff --git a/ext/forum/theme.php b/ext/forum/theme.php index de72e63e..d5b8bb79 100644 --- a/ext/forum/theme.php +++ b/ext/forum/theme.php @@ -39,7 +39,7 @@ class ForumTheme extends Themelet Message: Max characters alowed: $max_characters."; if ($user->is_admin()) { - $html .= ""; + $html .= ""; } $html .= " diff --git a/ext/handle_flash/theme.php b/ext/handle_flash/theme.php index 3d5683d1..a630da5e 100644 --- a/ext/handle_flash/theme.php +++ b/ext/handle_flash/theme.php @@ -20,7 +20,7 @@ class FlashFileHandlerTheme extends Themelet height='{$image->height}' width='{$image->width}' wmode='opaque' - type='application/x-shockwave-flash'> + type='application/x-shockwave-flash' /> "; $page->add_block(new Block("Flash Animation", $html, "main", 10)); } diff --git a/ext/handle_static/style.css b/ext/handle_static/style.css index e4709711..b8dfc252 100644 --- a/ext/handle_static/style.css +++ b/ext/handle_static/style.css @@ -37,8 +37,7 @@ IMG.lazy {display: none;} font-family: "Arial", sans-serif; font-size: 14px; width: 512px; - margin: auto; - margin-top: 16px; + margin: 16px auto auto; border: 1px solid black; border-radius: 16px; } diff --git a/ext/index/style.css b/ext/index/style.css index a709965f..c23a0c12 100644 --- a/ext/index/style.css +++ b/ext/index/style.css @@ -1,4 +1,5 @@ +/*noinspection CssRedundantUnit*/ #image-list .blockbody { background: none; border: none; diff --git a/ext/link_image/test.php b/ext/link_image/test.php index 16fa07e8..c0ce6ae3 100644 --- a/ext/link_image/test.php +++ b/ext/link_image/test.php @@ -15,7 +15,7 @@ class LinkImageTest extends ShimmiePHPUnitTestCase // FIXME $matches = []; - preg_match("#value='(http://.*(/|%2F)post(/|%2F)view(/|%2F)[0-9]+)'#", $raw, $matches); + preg_match("#value='(http://.*(/|%2F)post(/|%2F)view(/|%2F)[0-9]+)'#", $this->page_to_text(), $matches); $this->assertTrue(count($matches) > 0); if ($matches) { $this->get($matches[1]); diff --git a/ext/mail/mail.css b/ext/mail/mail.css index 34b8b3c3..17ddccc1 100644 --- a/ext/mail/mail.css +++ b/ext/mail/mail.css @@ -6,4 +6,4 @@ .defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; } .footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; } .footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; } -a { color:#FF6600; color:#FF6600; color:#FF6600; } \ No newline at end of file +a { color:#FF6600; } \ No newline at end of file diff --git a/ext/ouroboros_api/main.php b/ext/ouroboros_api/main.php index 54a68d35..9434f6aa 100644 --- a/ext/ouroboros_api/main.php +++ b/ext/ouroboros_api/main.php @@ -569,7 +569,7 @@ class OuroborosAPI extends Extension { if (!is_null($id)) { $post = new _SafeOuroborosImage(Image::by_id($id)); - $this->sendData('post', $post); + $this->sendData('post', [$post]); } else { $this->sendResponse(424, 'ID is mandatory'); } diff --git a/ext/rule34/script.js b/ext/rule34/script.js index c80bddf1..fe45729f 100644 --- a/ext/rule34/script.js +++ b/ext/rule34/script.js @@ -59,12 +59,12 @@ $(function() { var forceDesktop = false; function toggleDesktop() { if(forceDesktop) { - var viewport = document.querySelector("meta[name=viewport]"); + let viewport = document.querySelector("meta[name=viewport]"); viewport.setAttribute('content', 'width=512'); Cookies.set("ui-desktop", "false"); } else { - var viewport = document.querySelector("meta[name=viewport]"); + let viewport = document.querySelector("meta[name=viewport]"); viewport.setAttribute('content', 'width=1024, initial-scale=0.4'); Cookies.set("ui-desktop", "true"); navHidden = true; diff --git a/ext/tag_categories/main.php b/ext/tag_categories/main.php index e3f702e8..b51d0708 100644 --- a/ext/tag_categories/main.php +++ b/ext/tag_categories/main.php @@ -126,6 +126,8 @@ class TagCategories extends Extension return false; } + $is_success = null; + if ($_POST['tc_status'] == 'edit') { $is_success = $database->execute( 'UPDATE image_tag_categories diff --git a/ext/tag_categories/theme.php b/ext/tag_categories/theme.php index d8a15c8c..df09beaf 100644 --- a/ext/tag_categories/theme.php +++ b/ext/tag_categories/theme.php @@ -49,7 +49,7 @@ class TagCategoriesTheme extends Themelet - + diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php index 198c05cf..60f01b6c 100644 --- a/ext/tag_editcloud/main.php +++ b/ext/tag_editcloud/main.php @@ -75,9 +75,9 @@ class TagEditCloud extends Extension $ignore_tags = Tag::explode($config->get_string("tageditcloud_ignoretags")); + $cat_color = []; if (ext_is_live("TagCategories")) { $categories = $database->get_all("SELECT category, color FROM image_tag_categories"); - $cat_color = []; foreach ($categories as $row) { $cat_color[$row['category']] = $row['color']; } diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 85367686..c546794e 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -302,8 +302,8 @@ class TagList extends Extension # which breaks down into "az, a-, az" :( ksort($tag_data, SORT_STRING | SORT_FLAG_CASE); foreach ($tag_data as $tag => $count) { - if ($lastLetter != mb_strtolower(substr($tag, 0, count($starts_with)+1))) { - $lastLetter = mb_strtolower(substr($tag, 0, count($starts_with)+1)); + if ($lastLetter != mb_strtolower(substr($tag, 0, strlen($starts_with)+1))) { + $lastLetter = mb_strtolower(substr($tag, 0, strlen($starts_with)+1)); $h_lastLetter = html_escape($lastLetter); $html .= "

$h_lastLetter
"; } diff --git a/ext/tagger/script.js b/ext/tagger/script.js index 2fb624a3..05206611 100644 --- a/ext/tagger/script.js +++ b/ext/tagger/script.js @@ -57,7 +57,7 @@ var Tagger = { } } else if (text) { // create - var t_alert = document.createElement("div"); + t_alert = document.createElement("div"); t_alert.setAttribute("id",id); t_alert.appendChild(document.createTextNode(text)); this.editor.statusbar.appendChild(t_alert); diff --git a/ext/tagger/style.css b/ext/tagger/style.css index 40c79065..799877bd 100644 --- a/ext/tagger/style.css +++ b/ext/tagger/style.css @@ -31,7 +31,6 @@ } #tagger_body { max-height:175px; - overflow:auto; overflow-x:hidden; overflow-y:auto; } diff --git a/ext/tagger/theme.php b/ext/tagger/theme.php index d2f65efa..6d56811d 100644 --- a/ext/tagger/theme.php +++ b/ext/tagger/theme.php @@ -49,15 +49,15 @@ class taggerTheme extends Themelet

Tagger
- - + +
- - - - + + + + - +
diff --git a/ext/tips/test.php b/ext/tips/test.php index ccb2b225..38a9e855 100644 --- a/ext/tips/test.php +++ b/ext/tips/test.php @@ -11,7 +11,7 @@ class TipsTest extends ShimmiePHPUnitTestCase $this->markTestIncomplete(); // get rid of the default data if it's there - if (strpos($raw, "Delete")) { + if (strpos($this->page_to_text(), "Delete")) { $this->click("Delete"); } $this->log_out(); diff --git a/index.php b/index.php index b9c0b824..1ccb804e 100644 --- a/index.php +++ b/index.php @@ -69,7 +69,7 @@ if (!file_exists("vendor/")) {

Shimmie is unable to find the composer vendor directory.
Have you followed the composer setup instructions found in the - README? + README?

If you are not intending to do any development with Shimmie, it is highly recommend you use one of the pre-packaged releases diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php index 4ba40100..bdd6a6e7 100644 --- a/themes/danbooru/user.theme.php +++ b/themes/danbooru/user.theme.php @@ -87,7 +87,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Signup", $html)); } - public function display_ip_list(Page $page, array $uploads, array $comments) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events) { $html = ""; $html .= "
Uploaded from: "; diff --git a/themes/danbooru2/user.theme.php b/themes/danbooru2/user.theme.php index 4ba40100..bdd6a6e7 100644 --- a/themes/danbooru2/user.theme.php +++ b/themes/danbooru2/user.theme.php @@ -87,7 +87,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Signup", $html)); } - public function display_ip_list(Page $page, array $uploads, array $comments) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events) { $html = ""; $html .= "
Uploaded from: "; diff --git a/themes/futaba/style.css b/themes/futaba/style.css index 34805b86..9b22277c 100644 --- a/themes/futaba/style.css +++ b/themes/futaba/style.css @@ -97,7 +97,6 @@ TABLE.tag_list>TBODY>TR>TD:after { .reply, .paginator { margin-bottom: 2px; font-size: 10pt; - padding: 0px 5px; background: #F0E0D6; color: #800000; border: 1px solid #D9BFB7; diff --git a/themes/lite/style.css b/themes/lite/style.css index f7856495..47bfeaae 100644 --- a/themes/lite/style.css +++ b/themes/lite/style.css @@ -32,7 +32,6 @@ a.tab:hover, a.tab:active, .tab-selected { -moz-border-radius:4px; -webkit-border-radius:4px; border:1px solid #C8D1DB; - padding:4px; cursor:default; margin-right:2px; padding:2px; @@ -126,8 +125,7 @@ CODE { #subtitle { width: 256px; font-size: 0.75em; - margin: auto; - margin-top: -16px; + margin: -16px auto auto; text-align: center; border: 1px solid black; border-top: none; @@ -146,7 +144,6 @@ INPUT, TEXTAREA { -moz-border-radius:4px; -webkit-border-radius:4px; border:1px solid #C8D1DB; - padding:4px; cursor:default; margin-right:2px; padding:2px; @@ -255,7 +252,6 @@ TABLE.tag_list>TBODY>TR>TD:after { -webkit-border-radius:4px; color: #000; border:1px solid #C8D1DB; - padding:4px; cursor:default; margin-right:2px; padding:2px; @@ -275,7 +271,7 @@ ARTICLE { text-align: left; height: 1%; } -ARTICLE_noleft { +ARTICLE.body_noleft { margin-left: 4px; margin-right: 16px; margin-bottom:16px; diff --git a/themes/lite/user.theme.php b/themes/lite/user.theme.php index e5a6d635..26c19fdb 100644 --- a/themes/lite/user.theme.php +++ b/themes/lite/user.theme.php @@ -84,7 +84,7 @@ class CustomUserPageTheme extends UserPageTheme $page->add_block(new Block("Signup", $html)); } - public function display_ip_list(Page $page, array $uploads, array $comments) + public function display_ip_list(Page $page, array $uploads, array $comments, array $events) { $html = ""; $html .= "
Uploaded from: "; diff --git a/themes/warm/style.css b/themes/warm/style.css index 0b117631..b4491f07 100644 --- a/themes/warm/style.css +++ b/themes/warm/style.css @@ -43,8 +43,7 @@ CODE { #subtitle { width: 256px; font-size: 0.75em; - margin: auto; - margin-top: -16px; + margin: -16px auto auto; text-align: center; border: 1px solid black; border-top: none;