Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
c627e564c4
@ -57,12 +57,12 @@ class NotesTheme extends Themelet {
|
|||||||
$parsedNote = str_replace("\r", "\\r", $parsedNote);
|
$parsedNote = str_replace("\r", "\\r", $parsedNote);
|
||||||
|
|
||||||
$to_json[] = array(
|
$to_json[] = array(
|
||||||
'x1': $note["x1"],
|
'x1' => $note["x1"],
|
||||||
'y1': $note["y1"],
|
'y1' => $note["y1"],
|
||||||
'height': $note["height"],
|
'height' => $note["height"],
|
||||||
'width': $note["width"],
|
'width' => $note["width"],
|
||||||
'note': $parsedNote,
|
'note' => $parsedNote,
|
||||||
'note_id': $note["id"],
|
'note_id' => $note["id"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ class User {
|
|||||||
if(!empty($this->email)) {
|
if(!empty($this->email)) {
|
||||||
$hash = md5(strtolower($this->email));
|
$hash = md5(strtolower($this->email));
|
||||||
$s = $config->get_string("avatar_gravatar_size");
|
$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");
|
$r = $config->get_string("avatar_gravatar_rating");
|
||||||
return "<img class=\"avatar gravatar\" src=\"http://www.gravatar.com/avatar/$hash.jpg?s=$s&d=$d&r=$r\">";
|
return "<img class=\"avatar gravatar\" src=\"http://www.gravatar.com/avatar/$hash.jpg?s=$s&d=$d&r=$r\">";
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ class CommentList extends Extension {
|
|||||||
throw new CommentPostingException("Comment too repetitive~");
|
throw new CommentPostingException("Comment too repetitive~");
|
||||||
}
|
}
|
||||||
else if($user->is_anonymous() && !$this->hash_match()) {
|
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(
|
throw new CommentPostingException(
|
||||||
"Comment submission form is out of date; refresh the ".
|
"Comment submission form is out of date; refresh the ".
|
||||||
"comment form to show you aren't a spammer~");
|
"comment form to show you aren't a spammer~");
|
||||||
|
@ -40,7 +40,7 @@ class TagEditTheme extends Themelet {
|
|||||||
$ip = $user->can("view_ip") ? " (".show_ip($image->owner_ip, "Image posted {$image->posted}").")" : "";
|
$ip = $user->can("view_ip") ? " (".show_ip($image->owner_ip, "Image posted {$image->posted}").")" : "";
|
||||||
return "
|
return "
|
||||||
<tr>
|
<tr>
|
||||||
<td>User</td>
|
<td>Uploader</td>
|
||||||
<td>
|
<td>
|
||||||
<span class='view'><a class='username' href='".make_link("user/$h_owner")."'>$h_owner</a>$ip, $h_date</span>
|
<span class='view'><a class='username' href='".make_link("user/$h_owner")."'>$h_owner</a>$ip, $h_date</span>
|
||||||
<input class='edit' type='text' name='tag_edit__owner' value='$h_owner'>
|
<input class='edit' type='text' name='tag_edit__owner' value='$h_owner'>
|
||||||
|
@ -72,7 +72,10 @@ class ViewImageTheme extends Themelet {
|
|||||||
foreach($editor_parts as $part) {
|
foreach($editor_parts as $part) {
|
||||||
$html .= $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 .= "
|
$html .= "
|
||||||
<tr><td colspan='4'>
|
<tr><td colspan='4'>
|
||||||
<input class='view' type='button' value='Edit' onclick='$(\".view\").hide(); $(\".edit\").show();'>
|
<input class='view' type='button' value='Edit' onclick='$(\".view\").hide(); $(\".edit\").show();'>
|
||||||
|
31
install.php
31
install.php
@ -44,6 +44,20 @@
|
|||||||
assert_options(ASSERT_ACTIVE, 1);
|
assert_options(ASSERT_ACTIVE, 1);
|
||||||
assert_options(ASSERT_BAIL, 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__."core/util.inc.php";
|
||||||
|
require_once __SHIMMIE_ROOT__."core/database.class.php";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file lets anyone destroy the database -- disable it
|
* This file lets anyone destroy the database -- disable it
|
||||||
* as soon as the admin is done installing for the first time
|
* as soon as the admin is done installing for the first time
|
||||||
@ -54,23 +68,10 @@ if(is_readable("config.php")) {
|
|||||||
<div id="iblock">
|
<div id="iblock">
|
||||||
<h1>Shimmie Repair Console</h1>
|
<h1>Shimmie Repair Console</h1>
|
||||||
<?php
|
<?php
|
||||||
|
// Load the config
|
||||||
/*
|
|
||||||
* 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__."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/default_config.inc.php"; // Defaults for the rest.
|
||||||
require_once __SHIMMIE_ROOT__."core/util.inc.php";
|
|
||||||
require_once __SHIMMIE_ROOT__."core/database.class.php";
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
( array_key_exists('dsn', $_SESSION) && $_SESSION['dsn'] === DATABASE_DSN ) ||
|
( array_key_exists('dsn', $_SESSION) && $_SESSION['dsn'] === DATABASE_DSN ) ||
|
||||||
( array_key_exists('dsn', $_POST) && $_POST['dsn'] === DATABASE_DSN )
|
( array_key_exists('dsn', $_POST) && $_POST['dsn'] === DATABASE_DSN )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user