From 5f4f941444fd6d71dbdf047b75a000b6443ccebb Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 9 Feb 2012 17:11:03 +0000 Subject: [PATCH 1/7] half-logged-in only for one day --- ext/comment/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/comment/main.php b/ext/comment/main.php index 2ebed4c3..d1b121b8 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -471,7 +471,7 @@ class CommentList extends Extension { throw new CommentPostingException("Comment too repetitive~"); } else if($user->is_anonymous() && !$this->hash_match()) { - set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24*$config->get_int('login_memory'), "/"); + set_prefixed_cookie("nocache", "Anonymous Commenter", time()+60*60*24, "/"); throw new CommentPostingException( "Comment submission form is out of date; refresh the ". "comment form to show you aren't a spammer~"); From db9a1cc7d8e5b0be2bdb9b3351fcfe9840c583d7 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 9 Feb 2012 17:29:04 +0000 Subject: [PATCH 2/7] only show edit / set if the user can edit tags --- ext/view/theme.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/view/theme.php b/ext/view/theme.php index 4cd80d2a..668e9289 100644 --- a/ext/view/theme.php +++ b/ext/view/theme.php @@ -72,7 +72,10 @@ class ViewImageTheme extends Themelet { foreach($editor_parts as $part) { $html .= $part; } - if(!$image->is_locked() || $user->can("lock_image")) { + if( + (!$image->is_locked() || $user->can("lock_image")) && + $user->can("edit_image_tag") + ) { $html .= " From d15c3010c891e810d2a83dfdeb0edc4d05c17cbf Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 9 Feb 2012 17:35:42 +0000 Subject: [PATCH 3/7] clearer terminology --- ext/tag_edit/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index edabd32f..28c7bbfa 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -40,7 +40,7 @@ class TagEditTheme extends Themelet { $ip = $user->can("view_ip") ? " ({$image->owner_ip})" : ""; return " - User + Uploader $h_owner$ip, $h_date From 410c4ff1a077b2273619219a57427090b149688f Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 9 Feb 2012 17:37:41 +0000 Subject: [PATCH 4/7] default gravatar url needs urlencoding --- core/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/user.class.php b/core/user.class.php index aa9073d1..5d418bce 100644 --- a/core/user.class.php +++ b/core/user.class.php @@ -229,7 +229,7 @@ class User { if(!empty($this->email)) { $hash = md5(strtolower($this->email)); $s = $config->get_string("avatar_gravatar_size"); - $d = $config->get_string("avatar_gravatar_default"); + $d = urlencode($config->get_string("avatar_gravatar_default")); $r = $config->get_string("avatar_gravatar_rating"); return ""; } From 01306712b72b447beb1eda99c136d8b0b1ded094 Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Thu, 9 Feb 2012 15:10:53 -0500 Subject: [PATCH 5/7] Shish you broke this~ --- contrib/notes/theme.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/notes/theme.php b/contrib/notes/theme.php index 0da3a29e..bba37b28 100644 --- a/contrib/notes/theme.php +++ b/contrib/notes/theme.php @@ -57,12 +57,12 @@ class NotesTheme extends Themelet { $parsedNote = str_replace("\r", "\\r", $parsedNote); $to_json[] = array( - 'x1': $note["x1"], - 'y1': $note["y1"], - 'height': $note["height"], - 'width': $note["width"], - 'note': $parsedNote, - 'note_id': $note["id"], + 'x1' => $note["x1"], + 'y1' => $note["y1"], + 'height' => $note["height"], + 'width' => $note["width"], + 'note' => $parsedNote, + 'note_id' => $note["id"], ); } From 983c0d96b85a89e2c12957e7ea0cd074c28e5116 Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Thu, 9 Feb 2012 15:33:40 -0500 Subject: [PATCH 6/7] Fixing bug with installer. (thanks RainbowDash) --- install.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/install.php b/install.php index 139bc4c5..30cfe291 100755 --- a/install.php +++ b/install.php @@ -44,6 +44,22 @@ assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_BAIL, 1); +/* + * Compute the path to the folder containing "install.php" and + * store it as the 'Shimmie Root' folder for later on. + * + * Example: + * __SHIMMIE_ROOT__ = '/var/www/shimmie2/' + * + */ +define('__SHIMMIE_ROOT__', trim( remove_trailing_slash( dirname(__FILE__) ) ) . '/' ); + +// Pull in necessary files +require_once __SHIMMIE_ROOT__."config.php"; // Load user/site specifics First +require_once __SHIMMIE_ROOT__."core/default_config.inc.php"; // Defaults for the rest. +require_once __SHIMMIE_ROOT__."core/util.inc.php"; +require_once __SHIMMIE_ROOT__."core/database.class.php"; + /* * This file lets anyone destroy the database -- disable it * as soon as the admin is done installing for the first time @@ -54,22 +70,6 @@ if(is_readable("config.php")) {

Shimmie Repair Console

Date: Thu, 9 Feb 2012 15:37:40 -0500 Subject: [PATCH 7/7] bugs~ --- install.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.php b/install.php index 30cfe291..01938651 100755 --- a/install.php +++ b/install.php @@ -55,8 +55,6 @@ assert_options(ASSERT_BAIL, 1); define('__SHIMMIE_ROOT__', trim( remove_trailing_slash( dirname(__FILE__) ) ) . '/' ); // Pull in necessary files -require_once __SHIMMIE_ROOT__."config.php"; // Load user/site specifics First -require_once __SHIMMIE_ROOT__."core/default_config.inc.php"; // Defaults for the rest. require_once __SHIMMIE_ROOT__."core/util.inc.php"; require_once __SHIMMIE_ROOT__."core/database.class.php"; @@ -70,7 +68,10 @@ if(is_readable("config.php")) {

Shimmie Repair Console