more lint fixes
This commit is contained in:
parent
8a49b1e80e
commit
bf473f6d51
36 changed files with 107 additions and 101 deletions
|
@ -43,5 +43,20 @@
|
||||||
|
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
"phpunit/phpunit" : "6.*"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Database
|
||||||
$this->cache = new Cache(CACHE_DSN);
|
$this->cache = new Cache(CACHE_DSN);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function connect_db()
|
private function connect_db(): void
|
||||||
{
|
{
|
||||||
# FIXME: detect ADODB URI, automatically translate PDO DSN
|
# FIXME: detect ADODB URI, automatically translate PDO DSN
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Database
|
||||||
$this->beginTransaction();
|
$this->beginTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function connect_engine()
|
private function connect_engine(): void
|
||||||
{
|
{
|
||||||
if (preg_match("/^([^:]*)/", DATABASE_DSN, $matches)) {
|
if (preg_match("/^([^:]*)/", DATABASE_DSN, $matches)) {
|
||||||
$db_proto=$matches[1];
|
$db_proto=$matches[1];
|
||||||
|
@ -107,7 +107,7 @@ class Database
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beginTransaction()
|
public function beginTransaction(): void
|
||||||
{
|
{
|
||||||
if ($this->transaction === false) {
|
if ($this->transaction === false) {
|
||||||
$this->db->beginTransaction();
|
$this->db->beginTransaction();
|
||||||
|
@ -167,7 +167,7 @@ class Database
|
||||||
return $this->engine->name;
|
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'])) {
|
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
||||||
$sql = trim(preg_replace('/\s+/msi', ' ', $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'])) {
|
if ((DEBUG_SQL === true) || (is_null(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) {
|
||||||
$text = $method.":".(microtime(true) - $start)."\n";
|
$text = $method.":".(microtime(true) - $start)."\n";
|
||||||
|
@ -242,7 +242,7 @@ class Database
|
||||||
/**
|
/**
|
||||||
* Execute an SQL query and return a single row.
|
* 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);
|
$_start = microtime(true);
|
||||||
$row = $this->execute($query, $args)->fetch();
|
$row = $this->execute($query, $args)->fetch();
|
||||||
|
@ -385,7 +385,7 @@ class MockDatabase extends Database
|
||||||
{
|
{
|
||||||
return $this->_execute($query, $args);
|
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);
|
return $this->_execute($query, $args);
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ class MockDatabase extends Database
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function connect_engine()
|
public function connect_engine(): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,21 +71,21 @@ class Image
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function by_id(int $id)
|
public static function by_id(int $id): ?Image
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
$row = $database->get_row("SELECT * FROM images WHERE images.id=:id", ["id"=>$id]);
|
$row = $database->get_row("SELECT * FROM images WHERE images.id=:id", ["id"=>$id]);
|
||||||
return ($row ? new Image($row) : null);
|
return ($row ? new Image($row) : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function by_hash(string $hash)
|
public static function by_hash(string $hash): ?Image
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
$row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]);
|
$row = $database->get_row("SELECT images.* FROM images WHERE hash=:hash", ["hash"=>$hash]);
|
||||||
return ($row ? new Image($row) : null);
|
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);
|
$max = Image::count_images($tags);
|
||||||
if ($max < 1) {
|
if ($max < 1) {
|
||||||
|
@ -148,7 +148,7 @@ class Image
|
||||||
/*
|
/*
|
||||||
* Accelerator stuff
|
* Accelerator stuff
|
||||||
*/
|
*/
|
||||||
public static function get_acceleratable(array $tags)
|
public static function get_acceleratable(array $tags): ?array
|
||||||
{
|
{
|
||||||
$ret = [
|
$ret = [
|
||||||
"yays" => [],
|
"yays" => [],
|
||||||
|
@ -158,7 +158,7 @@ class Image
|
||||||
$nays = 0;
|
$nays = 0;
|
||||||
foreach ($tags as $tag) {
|
foreach ($tags as $tag) {
|
||||||
if (!preg_match("/^-?[a-zA-Z0-9_-]+$/", $tag)) {
|
if (!preg_match("/^-?[a-zA-Z0-9_-]+$/", $tag)) {
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
if ($tag[0] == "-") {
|
if ($tag[0] == "-") {
|
||||||
$nays++;
|
$nays++;
|
||||||
|
@ -171,10 +171,10 @@ class Image
|
||||||
if ($yays > 1 || $nays > 0) {
|
if ($yays > 1 || $nays > 0) {
|
||||||
return $ret;
|
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;
|
global $database;
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ class Image
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_accelerated_count(array $tags)
|
public static function get_accelerated_count(array $tags): ?int
|
||||||
{
|
{
|
||||||
$req = Image::get_acceleratable($tags);
|
$req = Image::get_acceleratable($tags);
|
||||||
if (!$req) {
|
if (!$req) {
|
||||||
|
@ -336,7 +336,7 @@ class Image
|
||||||
/**
|
/**
|
||||||
* Set the image's owner.
|
* Set the image's owner.
|
||||||
*/
|
*/
|
||||||
public function set_owner(User $owner)
|
public function set_owner(User $owner): void
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
if ($owner->id != $this->owner_id) {
|
if ($owner->id != $this->owner_id) {
|
||||||
|
@ -514,7 +514,7 @@ class Image
|
||||||
return $this->locked;
|
return $this->locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_locked(bool $tf)
|
public function set_locked(bool $tf): void
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
$ln = $tf ? "Y" : "N";
|
$ln = $tf ? "Y" : "N";
|
||||||
|
@ -566,7 +566,7 @@ class Image
|
||||||
/**
|
/**
|
||||||
* Set the tags for this image.
|
* Set the tags for this image.
|
||||||
*/
|
*/
|
||||||
public function set_tags(array $unfiltered_tags)
|
public function set_tags(array $unfiltered_tags): void
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* @throws UploadException
|
* @throws UploadException
|
||||||
*/
|
*/
|
||||||
function move_upload_to_archive(DataUploadEvent $event)
|
function move_upload_to_archive(DataUploadEvent $event): void
|
||||||
{
|
{
|
||||||
$target = warehouse_path("images", $event->hash);
|
$target = warehouse_path("images", $event->hash);
|
||||||
if (!@copy($event->tmpname, $target)) {
|
if (!@copy($event->tmpname, $target)) {
|
||||||
|
|
|
@ -12,18 +12,18 @@ class Querylet
|
||||||
$this->variables = $variables;
|
$this->variables = $variables;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function append(Querylet $querylet)
|
public function append(Querylet $querylet): void
|
||||||
{
|
{
|
||||||
$this->sql .= $querylet->sql;
|
$this->sql .= $querylet->sql;
|
||||||
$this->variables = array_merge($this->variables, $querylet->variables);
|
$this->variables = array_merge($this->variables, $querylet->variables);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function append_sql(string $sql)
|
public function append_sql(string $sql): void
|
||||||
{
|
{
|
||||||
$this->sql .= $sql;
|
$this->sql .= $sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_variable($var)
|
public function add_variable($var): void
|
||||||
{
|
{
|
||||||
$this->variables[] = $var;
|
$this->variables[] = $var;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Page
|
||||||
/**
|
/**
|
||||||
* Set what this page should do; "page", "data", or "redirect".
|
* 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;
|
$this->mode = $mode;
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ class Page
|
||||||
/**
|
/**
|
||||||
* Set the page's MIME type.
|
* Set the page's MIME type.
|
||||||
*/
|
*/
|
||||||
public function set_type(string $type)
|
public function set_type(string $type): void
|
||||||
{
|
{
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class Page
|
||||||
/**
|
/**
|
||||||
* Set the raw data to be sent.
|
* Set the raw data to be sent.
|
||||||
*/
|
*/
|
||||||
public function set_data(string $data)
|
public function set_data(string $data): void
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ class Page
|
||||||
/**
|
/**
|
||||||
* Set the recommended download filename.
|
* Set the recommended download filename.
|
||||||
*/
|
*/
|
||||||
public function set_filename(string $filename)
|
public function set_filename(string $filename): void
|
||||||
{
|
{
|
||||||
$this->filename = $filename;
|
$this->filename = $filename;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ class Page
|
||||||
* Set the URL to redirect to (remember to use make_link() if linking
|
* Set the URL to redirect to (remember to use make_link() if linking
|
||||||
* to a page in the same site).
|
* to a page in the same site).
|
||||||
*/
|
*/
|
||||||
public function set_redirect(string $redirect)
|
public function set_redirect(string $redirect): void
|
||||||
{
|
{
|
||||||
$this->redirect = $redirect;
|
$this->redirect = $redirect;
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ class Page
|
||||||
/**
|
/**
|
||||||
* Add a Block of data to the 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;
|
$this->blocks[] = $block;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* from a patch by Christian Walde; only intended for use in the
|
||||||
* "extension manager" extension, but it seems to fit better here
|
* "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)
|
//Because Windows (I know, bad excuse)
|
||||||
if (PHP_OS === 'WINNT') {
|
if (PHP_OS === 'WINNT') {
|
||||||
|
@ -117,7 +117,7 @@ function deltree(string $f)
|
||||||
*
|
*
|
||||||
* from a comment on http://uk.php.net/copy
|
* 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)) {
|
if (is_dir($source)) {
|
||||||
@mkdir($target);
|
@mkdir($target);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
global $_shm_event_listeners;
|
global $_shm_event_listeners;
|
||||||
$_shm_event_listeners = [];
|
$_shm_event_listeners = [];
|
||||||
|
|
||||||
function _load_event_listeners()
|
function _load_event_listeners(): void
|
||||||
{
|
{
|
||||||
global $_shm_event_listeners, $_shm_ctx;
|
global $_shm_event_listeners, $_shm_ctx;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ function _load_event_listeners()
|
||||||
$_shm_ctx->log_endok();
|
$_shm_ctx->log_endok();
|
||||||
}
|
}
|
||||||
|
|
||||||
function _set_event_listeners()
|
function _set_event_listeners(): void
|
||||||
{
|
{
|
||||||
global $_shm_event_listeners;
|
global $_shm_event_listeners;
|
||||||
$_shm_event_listeners = [];
|
$_shm_event_listeners = [];
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function _d(string $name, $value)
|
function _d(string $name, $value): void
|
||||||
{
|
{
|
||||||
if (!defined($name)) {
|
if (!defined($name)) {
|
||||||
define($name, $value);
|
define($name, $value);
|
||||||
|
|
|
@ -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;
|
global $config, $database;
|
||||||
$row = $database->cache->get("user-session:$name-$session");
|
$row = $database->cache->get("user-session:$name-$session");
|
||||||
|
@ -80,7 +80,7 @@ class User
|
||||||
return is_null($row) ? null : new User($row);
|
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;
|
global $database;
|
||||||
if ($id === 1) {
|
if ($id === 1) {
|
||||||
|
@ -96,14 +96,14 @@ class User
|
||||||
return is_null($row) ? null : new User($row);
|
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;
|
global $database;
|
||||||
$row = $database->get_row($database->scoreql_to_sql("SELECT * FROM users WHERE SCORE_STRNORM(name) = SCORE_STRNORM(:name)"), ["name"=>$name]);
|
$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);
|
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);
|
$user = User::by_name($name);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
@ -149,14 +149,14 @@ class User
|
||||||
return ($this->class->name === "admin");
|
return ($this->class->name === "admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function set_class(string $class)
|
public function set_class(string $class): void
|
||||||
{
|
{
|
||||||
global $database;
|
global $database;
|
||||||
$database->Execute("UPDATE users SET class=:class WHERE id=:id", ["class"=>$class, "id"=>$this->id]);
|
$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);
|
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;
|
global $database;
|
||||||
if (User::by_name($name)) {
|
if (User::by_name($name)) {
|
||||||
|
@ -168,7 +168,7 @@ class User
|
||||||
log_info("core-user", "Changed username for {$old_name} to {$this->name}");
|
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;
|
global $database;
|
||||||
$hash = password_hash($password, PASSWORD_BCRYPT);
|
$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;
|
global $database;
|
||||||
$database->Execute("UPDATE users SET email=:email WHERE id=:id", ["email"=>$address, "id"=>$this->id]);
|
$database->Execute("UPDATE users SET email=:email WHERE id=:id", ["email"=>$address, "id"=>$this->id]);
|
||||||
|
|
|
@ -137,7 +137,7 @@ function get_session_ip(Config $config): string
|
||||||
* the action actually takes place (eg onWhateverElse) - but much of the time, actions
|
* the action actually takes place (eg onWhateverElse) - but much of the time, actions
|
||||||
* are taken from within onPageRequest...
|
* are taken from within onPageRequest...
|
||||||
*/
|
*/
|
||||||
function flash_message(string $text, string $type="info")
|
function flash_message(string $text, string $type="info"): void
|
||||||
{
|
{
|
||||||
global $page;
|
global $page;
|
||||||
$current = $page->get_cookie("flash_message");
|
$current = $page->get_cookie("flash_message");
|
||||||
|
@ -332,7 +332,7 @@ function get_debug_info(): string
|
||||||
return $debug;
|
return $debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_slow()
|
function log_slow(): void
|
||||||
{
|
{
|
||||||
global $_shm_load_start;
|
global $_shm_load_start;
|
||||||
if (!is_null(SLOW_PAGES)) {
|
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);
|
$file = basename($file);
|
||||||
print("Assertion failed at $file:$line: $code ($desc)");
|
print("Assertion failed at $file:$line: $code ($desc)");
|
||||||
|
@ -363,7 +363,7 @@ function score_assert_handler($file, $line, $code, $desc = null)
|
||||||
|
|
||||||
/** @privatesection */
|
/** @privatesection */
|
||||||
|
|
||||||
function _version_check()
|
function _version_check(): void
|
||||||
{
|
{
|
||||||
if (MIN_PHP_VERSION) {
|
if (MIN_PHP_VERSION) {
|
||||||
if (version_compare(phpversion(), MIN_PHP_VERSION, ">=") === false) {
|
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;
|
global $_shm_ctx;
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ function _get_themelet_files(string $_theme): array
|
||||||
/**
|
/**
|
||||||
* Used to display fatal errors to the web user.
|
* Used to display fatal errors to the web user.
|
||||||
*/
|
*/
|
||||||
function _fatal_error(Exception $e)
|
function _fatal_error(Exception $e): void
|
||||||
{
|
{
|
||||||
$version = VERSION;
|
$version = VERSION;
|
||||||
$message = $e->getMessage();
|
$message = $e->getMessage();
|
||||||
|
|
|
@ -31,38 +31,38 @@ class ArtistsTheme extends Themelet
|
||||||
if ($mode == "editor") {
|
if ($mode == "editor") {
|
||||||
$html = "<form method='post' action='".make_link("artist/new_artist")."'>
|
$html = "<form method='post' action='".make_link("artist/new_artist")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='New Artist'/>
|
<input type='submit' name='edit' value='New Artist'/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method='post' action='".make_link("artist/edit_artist")."'>
|
<form method='post' action='".make_link("artist/edit_artist")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='Edit Artist'/>
|
<input type='submit' name='edit' value='Edit Artist'/>
|
||||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||||
</form>";
|
</form>";
|
||||||
|
|
||||||
if ($is_admin) {
|
if ($is_admin) {
|
||||||
$html .= "<form method='post' action='".make_link("artist/nuke_artist")."'>
|
$html .= "<form method='post' action='".make_link("artist/nuke_artist")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='Delete Artist'/>
|
<input type='submit' name='edit' value='Delete Artist'/>
|
||||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||||
</form>";
|
</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= "<form method='post' action='".make_link("artist/add_alias")."'>
|
$html .= "<form method='post' action='".make_link("artist/add_alias")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='Add Alias'/>
|
<input type='submit' name='edit' value='Add Alias'/>
|
||||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method='post' action='".make_link("artist/add_member")."'>
|
<form method='post' action='".make_link("artist/add_member")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='Add Member'/>
|
<input type='submit' name='edit' value='Add Member'/>
|
||||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method='post' action='".make_link("artist/add_url")."'>
|
<form method='post' action='".make_link("artist/add_url")."'>
|
||||||
".$user->get_auth_html()."
|
".$user->get_auth_html()."
|
||||||
<input type='submit' name='edit' id='edit' value='Add Url'/>
|
<input type='submit' name='edit' value='Add Url'/>
|
||||||
<input type='hidden' name='artist_id' value='".$artistID."'>
|
<input type='hidden' name='artist_id' value='".$artistID."'>
|
||||||
</form>";
|
</form>";
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ class ArtistsTheme extends Themelet
|
||||||
<form method="POST" action="'.make_link("artist/alias/edited/".$alias['id']).'">
|
<form method="POST" action="'.make_link("artist/alias/edited/".$alias['id']).'">
|
||||||
'.$user->get_auth_html().'
|
'.$user->get_auth_html().'
|
||||||
<label for="alias">Alias:</label>
|
<label for="alias">Alias:</label>
|
||||||
<input type="text" name="alias" value="'.$alias['alias'].'" />
|
<input type="text" name="alias" id="alias" value="'.$alias['alias'].'" />
|
||||||
<input type="hidden" name="aliasID" value="'.$alias['id'].'" />
|
<input type="hidden" name="aliasID" value="'.$alias['id'].'" />
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -315,7 +315,7 @@ class ArtistsTheme extends Themelet
|
||||||
<form method="POST" action="'.make_link("artist/url/edited/".$url['id']).'">
|
<form method="POST" action="'.make_link("artist/url/edited/".$url['id']).'">
|
||||||
'.$user->get_auth_html().'
|
'.$user->get_auth_html().'
|
||||||
<label for="url">URL:</label>
|
<label for="url">URL:</label>
|
||||||
<input type="text" name="url" value="'.$url['url'].'" />
|
<input type="text" name="url" id="url" value="'.$url['url'].'" />
|
||||||
<input type="hidden" name="urlID" value="'.$url['id'].'" />
|
<input type="hidden" name="urlID" value="'.$url['id'].'" />
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -332,8 +332,8 @@ class ArtistsTheme extends Themelet
|
||||||
$html = '
|
$html = '
|
||||||
<form method="POST" action="'.make_link("artist/member/edited/".$member['id']).'">
|
<form method="POST" action="'.make_link("artist/member/edited/".$member['id']).'">
|
||||||
'.$user->get_auth_html().'
|
'.$user->get_auth_html().'
|
||||||
<label for="member">Member name:</label>
|
<label for="name">Member name:</label>
|
||||||
<input type="text" name="name" value="'.$member['name'].'" />
|
<input type="text" name="name" id="name" value="'.$member['name'].'" />
|
||||||
<input type="hidden" name="memberID" value="'.$member['id'].'" />
|
<input type="hidden" name="memberID" value="'.$member['id'].'" />
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit" />
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -37,13 +37,9 @@ class BulkAdd extends Extension
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
$bae = new BulkAddEvent($_POST['dir']);
|
$bae = new BulkAddEvent($_POST['dir']);
|
||||||
send_event($bae);
|
send_event($bae);
|
||||||
if (is_array($bae->results)) {
|
foreach ($bae->results as $result) {
|
||||||
foreach ($bae->results as $result) {
|
$this->theme->add_status("Adding files", $result);
|
||||||
$this->theme->add_status("Adding files", $result);
|
}
|
||||||
}
|
|
||||||
} elseif (strlen($bae->results) > 0) {
|
|
||||||
$this->theme->add_status("Adding files", $bae->results);
|
|
||||||
}
|
|
||||||
$this->theme->display_upload_results($page);
|
$this->theme->display_upload_results($page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ForumTheme extends Themelet
|
||||||
<tr><td>Message:</td><td><textarea id='message' name='message' >$threadText</textarea></td></tr>
|
<tr><td>Message:</td><td><textarea id='message' name='message' >$threadText</textarea></td></tr>
|
||||||
<tr><td></td><td><small>Max characters alowed: $max_characters.</small></td></tr>";
|
<tr><td></td><td><small>Max characters alowed: $max_characters.</small></td></tr>";
|
||||||
if ($user->is_admin()) {
|
if ($user->is_admin()) {
|
||||||
$html .= "<tr><td colspan='2'><label for='sticky'>Sticky:</label><input name='sticky' type='checkbox' value='Y' /></td></tr>";
|
$html .= "<tr><td colspan='2'><label for='sticky'>Sticky:</label><input name='sticky' id='sticky' type='checkbox' value='Y' /></td></tr>";
|
||||||
}
|
}
|
||||||
$html .= "<tr><td colspan='2'><input type='submit' value='Submit' /></td></tr>
|
$html .= "<tr><td colspan='2'><input type='submit' value='Submit' /></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -20,7 +20,7 @@ class FlashFileHandlerTheme extends Themelet
|
||||||
height='{$image->height}'
|
height='{$image->height}'
|
||||||
width='{$image->width}'
|
width='{$image->width}'
|
||||||
wmode='opaque'
|
wmode='opaque'
|
||||||
type='application/x-shockwave-flash'></embed>
|
type='application/x-shockwave-flash' />
|
||||||
</object>";
|
</object>";
|
||||||
$page->add_block(new Block("Flash Animation", $html, "main", 10));
|
$page->add_block(new Block("Flash Animation", $html, "main", 10));
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,7 @@ IMG.lazy {display: none;}
|
||||||
font-family: "Arial", sans-serif;
|
font-family: "Arial", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
width: 512px;
|
width: 512px;
|
||||||
margin: auto;
|
margin: 16px auto auto;
|
||||||
margin-top: 16px;
|
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
/*noinspection CssRedundantUnit*/
|
||||||
#image-list .blockbody {
|
#image-list .blockbody {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
@ -15,7 +15,7 @@ class LinkImageTest extends ShimmiePHPUnitTestCase
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
$matches = [];
|
$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);
|
$this->assertTrue(count($matches) > 0);
|
||||||
if ($matches) {
|
if ($matches) {
|
||||||
$this->get($matches[1]);
|
$this->get($matches[1]);
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
.defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
|
.defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
|
||||||
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
|
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
|
||||||
.footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
|
.footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
|
||||||
a { color:#FF6600; color:#FF6600; color:#FF6600; }
|
a { color:#FF6600; }
|
|
@ -569,7 +569,7 @@ class OuroborosAPI extends Extension
|
||||||
{
|
{
|
||||||
if (!is_null($id)) {
|
if (!is_null($id)) {
|
||||||
$post = new _SafeOuroborosImage(Image::by_id($id));
|
$post = new _SafeOuroborosImage(Image::by_id($id));
|
||||||
$this->sendData('post', $post);
|
$this->sendData('post', [$post]);
|
||||||
} else {
|
} else {
|
||||||
$this->sendResponse(424, 'ID is mandatory');
|
$this->sendResponse(424, 'ID is mandatory');
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,12 +59,12 @@ $(function() {
|
||||||
var forceDesktop = false;
|
var forceDesktop = false;
|
||||||
function toggleDesktop() {
|
function toggleDesktop() {
|
||||||
if(forceDesktop) {
|
if(forceDesktop) {
|
||||||
var viewport = document.querySelector("meta[name=viewport]");
|
let viewport = document.querySelector("meta[name=viewport]");
|
||||||
viewport.setAttribute('content', 'width=512');
|
viewport.setAttribute('content', 'width=512');
|
||||||
Cookies.set("ui-desktop", "false");
|
Cookies.set("ui-desktop", "false");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var viewport = document.querySelector("meta[name=viewport]");
|
let viewport = document.querySelector("meta[name=viewport]");
|
||||||
viewport.setAttribute('content', 'width=1024, initial-scale=0.4');
|
viewport.setAttribute('content', 'width=1024, initial-scale=0.4');
|
||||||
Cookies.set("ui-desktop", "true");
|
Cookies.set("ui-desktop", "true");
|
||||||
navHidden = true;
|
navHidden = true;
|
||||||
|
|
|
@ -126,6 +126,8 @@ class TagCategories extends Extension
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$is_success = null;
|
||||||
|
|
||||||
if ($_POST['tc_status'] == 'edit') {
|
if ($_POST['tc_status'] == 'edit') {
|
||||||
$is_success = $database->execute(
|
$is_success = $database->execute(
|
||||||
'UPDATE image_tag_categories
|
'UPDATE image_tag_categories
|
||||||
|
|
|
@ -49,7 +49,7 @@ class TagCategoriesTheme extends Themelet
|
||||||
</table>
|
</table>
|
||||||
<button class="tc_edit" type="button" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') tr + tr td span\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') td input\').show(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_edit\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_submit\').show();">Edit</button>
|
<button class="tc_edit" type="button" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') tr + tr td span\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') td input\').show(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_edit\').hide(); $(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_submit\').show();">Edit</button>
|
||||||
<button class="tc_submit" type="submit" style="display:none;" name="tc_status" value="edit">Submit</button>
|
<button class="tc_submit" type="submit" style="display:none;" name="tc_status" value="edit">Submit</button>
|
||||||
<button class="tc_submit" type="button" style="display:none.tagcategoryblock:nth-of-type('.$tc_block_index.');" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_delete\').show(); $(this).hide();">Delete</button>
|
<button class="tc_submit" type="button" style="display:none;" onclick="$(\'.tagcategoryblock:nth-of-type('.$tc_block_index.') .tc_delete\').show(); $(this).hide();">Delete</button>
|
||||||
<button class="tc_delete" type="submit" style="display:none;" name="tc_status" value="delete">Really, really delete</button>
|
<button class="tc_delete" type="submit" style="display:none;" name="tc_status" value="delete">Really, really delete</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -75,9 +75,9 @@ class TagEditCloud extends Extension
|
||||||
|
|
||||||
$ignore_tags = Tag::explode($config->get_string("tageditcloud_ignoretags"));
|
$ignore_tags = Tag::explode($config->get_string("tageditcloud_ignoretags"));
|
||||||
|
|
||||||
|
$cat_color = [];
|
||||||
if (ext_is_live("TagCategories")) {
|
if (ext_is_live("TagCategories")) {
|
||||||
$categories = $database->get_all("SELECT category, color FROM image_tag_categories");
|
$categories = $database->get_all("SELECT category, color FROM image_tag_categories");
|
||||||
$cat_color = [];
|
|
||||||
foreach ($categories as $row) {
|
foreach ($categories as $row) {
|
||||||
$cat_color[$row['category']] = $row['color'];
|
$cat_color[$row['category']] = $row['color'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,8 +302,8 @@ class TagList extends Extension
|
||||||
# which breaks down into "az, a-, az" :(
|
# which breaks down into "az, a-, az" :(
|
||||||
ksort($tag_data, SORT_STRING | SORT_FLAG_CASE);
|
ksort($tag_data, SORT_STRING | SORT_FLAG_CASE);
|
||||||
foreach ($tag_data as $tag => $count) {
|
foreach ($tag_data as $tag => $count) {
|
||||||
if ($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, count($starts_with)+1));
|
$lastLetter = mb_strtolower(substr($tag, 0, strlen($starts_with)+1));
|
||||||
$h_lastLetter = html_escape($lastLetter);
|
$h_lastLetter = html_escape($lastLetter);
|
||||||
$html .= "<p>$h_lastLetter<br>";
|
$html .= "<p>$h_lastLetter<br>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ var Tagger = {
|
||||||
}
|
}
|
||||||
} else if (text) {
|
} else if (text) {
|
||||||
// create
|
// create
|
||||||
var t_alert = document.createElement("div");
|
t_alert = document.createElement("div");
|
||||||
t_alert.setAttribute("id",id);
|
t_alert.setAttribute("id",id);
|
||||||
t_alert.appendChild(document.createTextNode(text));
|
t_alert.appendChild(document.createTextNode(text));
|
||||||
this.editor.statusbar.appendChild(t_alert);
|
this.editor.statusbar.appendChild(t_alert);
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
}
|
}
|
||||||
#tagger_body {
|
#tagger_body {
|
||||||
max-height:175px;
|
max-height:175px;
|
||||||
overflow:auto;
|
|
||||||
overflow-x:hidden;
|
overflow-x:hidden;
|
||||||
overflow-y:auto;
|
overflow-y:auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,15 +49,15 @@ class taggerTheme extends Themelet
|
||||||
<div id="tagger_titlebar">Tagger</div>
|
<div id="tagger_titlebar">Tagger</div>
|
||||||
|
|
||||||
<div id="tagger_toolbar">
|
<div id="tagger_toolbar">
|
||||||
<input type="text" value="" id="tagger_filter" onkeyup="Tagger.tag.search(this.value, $delay);"></input>
|
<input type="text" value="" id="tagger_filter" onkeyup="Tagger.tag.search(this.value, $delay);" />
|
||||||
<input type="button" value="Add" onclick="Tagger.tag.create(byId('tagger_filter').value);"></input>
|
<input type="button" value="Add" onclick="Tagger.tag.create(byId('tagger_filter').value);" />
|
||||||
<form action="$url_form" method="POST" onsubmit="Tagger.tag.submit();">
|
<form action="$url_form" method="POST" onsubmit="Tagger.tag.submit();">
|
||||||
<input type='hidden' name='image_id' value='$i_image_id' id="image_id"></input>
|
<input type='hidden' name='image_id' value='$i_image_id' id="image_id" />
|
||||||
<input type='hidden' name='query' value='$h_query'></input>
|
<input type='hidden' name='query' value='$h_query' />
|
||||||
<input type='hidden' name='source' value='$h_source'></input>
|
<input type='hidden' name='source' value='$h_source' />
|
||||||
<input type="hidden" name="tags" value="" id="tagger_tags"></input>
|
<input type="hidden" name="tags" value="" id="tagger_tags" />
|
||||||
|
|
||||||
<input type="submit" value="Set"></input>
|
<input type="submit" value="Set" />
|
||||||
</form>
|
</form>
|
||||||
<!--<ul id="tagger_p-menu"></ul>
|
<!--<ul id="tagger_p-menu"></ul>
|
||||||
<br style="clear:both;"/>-->
|
<br style="clear:both;"/>-->
|
||||||
|
|
|
@ -11,7 +11,7 @@ class TipsTest extends ShimmiePHPUnitTestCase
|
||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
// get rid of the default data if it's there
|
// 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->click("Delete");
|
||||||
}
|
}
|
||||||
$this->log_out();
|
$this->log_out();
|
||||||
|
|
|
@ -69,7 +69,7 @@ if (!file_exists("vendor/")) {
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p>Shimmie is unable to find the composer vendor directory.<br>
|
<p>Shimmie is unable to find the composer vendor directory.<br>
|
||||||
Have you followed the composer setup instructions found in the
|
Have you followed the composer setup instructions found in the
|
||||||
<a href="https://github.com/shish/shimmie2#installation-development">README</a>?</>
|
<a href="https://github.com/shish/shimmie2#installation-development">README</a>?</p>
|
||||||
|
|
||||||
<p>If you are not intending to do any development with Shimmie,
|
<p>If you are not intending to do any development with Shimmie,
|
||||||
it is highly recommend you use one of the pre-packaged releases
|
it is highly recommend you use one of the pre-packaged releases
|
||||||
|
|
|
@ -87,7 +87,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Signup", $html));
|
$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 = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
|
|
@ -87,7 +87,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Signup", $html));
|
$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 = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
|
|
@ -97,7 +97,6 @@ TABLE.tag_list>TBODY>TR>TD:after {
|
||||||
.reply, .paginator {
|
.reply, .paginator {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
padding: 0px 5px;
|
|
||||||
background: #F0E0D6;
|
background: #F0E0D6;
|
||||||
color: #800000;
|
color: #800000;
|
||||||
border: 1px solid #D9BFB7;
|
border: 1px solid #D9BFB7;
|
||||||
|
|
|
@ -32,7 +32,6 @@ a.tab:hover, a.tab:active, .tab-selected {
|
||||||
-moz-border-radius:4px;
|
-moz-border-radius:4px;
|
||||||
-webkit-border-radius:4px;
|
-webkit-border-radius:4px;
|
||||||
border:1px solid #C8D1DB;
|
border:1px solid #C8D1DB;
|
||||||
padding:4px;
|
|
||||||
cursor:default;
|
cursor:default;
|
||||||
margin-right:2px;
|
margin-right:2px;
|
||||||
padding:2px;
|
padding:2px;
|
||||||
|
@ -126,8 +125,7 @@ CODE {
|
||||||
#subtitle {
|
#subtitle {
|
||||||
width: 256px;
|
width: 256px;
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
margin: auto;
|
margin: -16px auto auto;
|
||||||
margin-top: -16px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
@ -146,7 +144,6 @@ INPUT, TEXTAREA {
|
||||||
-moz-border-radius:4px;
|
-moz-border-radius:4px;
|
||||||
-webkit-border-radius:4px;
|
-webkit-border-radius:4px;
|
||||||
border:1px solid #C8D1DB;
|
border:1px solid #C8D1DB;
|
||||||
padding:4px;
|
|
||||||
cursor:default;
|
cursor:default;
|
||||||
margin-right:2px;
|
margin-right:2px;
|
||||||
padding:2px;
|
padding:2px;
|
||||||
|
@ -255,7 +252,6 @@ TABLE.tag_list>TBODY>TR>TD:after {
|
||||||
-webkit-border-radius:4px;
|
-webkit-border-radius:4px;
|
||||||
color: #000;
|
color: #000;
|
||||||
border:1px solid #C8D1DB;
|
border:1px solid #C8D1DB;
|
||||||
padding:4px;
|
|
||||||
cursor:default;
|
cursor:default;
|
||||||
margin-right:2px;
|
margin-right:2px;
|
||||||
padding:2px;
|
padding:2px;
|
||||||
|
@ -275,7 +271,7 @@ ARTICLE {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
height: 1%;
|
height: 1%;
|
||||||
}
|
}
|
||||||
ARTICLE_noleft {
|
ARTICLE.body_noleft {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
margin-bottom:16px;
|
margin-bottom:16px;
|
||||||
|
|
|
@ -84,7 +84,7 @@ class CustomUserPageTheme extends UserPageTheme
|
||||||
$page->add_block(new Block("Signup", $html));
|
$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 = "<table id='ip-history' style='width: 400px;'>";
|
$html = "<table id='ip-history' style='width: 400px;'>";
|
||||||
$html .= "<tr><td>Uploaded from: ";
|
$html .= "<tr><td>Uploaded from: ";
|
||||||
|
|
|
@ -43,8 +43,7 @@ CODE {
|
||||||
#subtitle {
|
#subtitle {
|
||||||
width: 256px;
|
width: 256px;
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
margin: auto;
|
margin: -16px auto auto;
|
||||||
margin-top: -16px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
|
Reference in a new issue