Trim trailing blank space.
This commit is contained in:
parent
96358f0bc0
commit
3d1217a1be
7 changed files with 28 additions and 28 deletions
|
@ -17,7 +17,7 @@ before_install:
|
|||
install:
|
||||
# Install nginx, php5-fpm and configure them
|
||||
- sudo ./tests/setup_test_env.sh $TRAVIS_BUILD_DIR
|
||||
|
||||
|
||||
# Create the database schema for shimmie.
|
||||
- if [[ "$DB" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS shimmie;" -U postgres; fi
|
||||
- if [[ "$DB" == "pgsql" ]]; then psql -c "CREATE DATABASE shimmie;" -U postgres; fi
|
||||
|
|
|
@ -33,7 +33,7 @@ class AliasEditorTheme extends Themelet {
|
|||
foreach($aliases as $old => $new) {
|
||||
$h_old = html_escape($old);
|
||||
$h_new = "<a href='".make_link("post/list/".url_escape($new)."/1")."'>".html_escape($new)."</a>";
|
||||
|
||||
|
||||
$h_aliases .= "<tr><td>$h_old</td><td>$h_new</td>";
|
||||
if($can_manage) {
|
||||
$h_aliases .= "
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* PMs; or one could replace it with a blog module; or one could have a blog
|
||||
* which links to images on an image board, with no wiki or messaging, and so
|
||||
* on and so on...
|
||||
*
|
||||
*
|
||||
* Dijkstra will kill me for personifying my architecture, but I can't think
|
||||
* of a better way without going into all the little details.
|
||||
* There are a bunch of Extension subclasses, they talk to each other by sending
|
||||
|
@ -32,9 +32,9 @@
|
|||
* \li \ref unittests
|
||||
*
|
||||
* \page scglobals SCore Globals
|
||||
*
|
||||
*
|
||||
* There are four global variables which are pretty essential to most extensions:
|
||||
*
|
||||
*
|
||||
* \li $config -- some variety of Config subclass
|
||||
* \li $database -- a Database object used to get raw SQL access
|
||||
* \li $page -- a Page to holds all the loose bits of extension output
|
||||
|
|
26
install.php
26
install.php
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Shimmie Installer
|
||||
*
|
||||
*
|
||||
* @package Shimmie
|
||||
* @author Shish et al. <webmaster at shishnet.org>
|
||||
* @link http://code.shishnet.org/shimmie2/
|
||||
|
@ -49,7 +49,7 @@ assert_options(ASSERT_ACTIVE, 1);
|
|||
assert_options(ASSERT_BAIL, 1);
|
||||
|
||||
/*
|
||||
* Compute the path to the folder containing "install.php" and
|
||||
* Compute the path to the folder containing "install.php" and
|
||||
* store it as the 'Shimmie Root' folder for later on.
|
||||
*
|
||||
* Example:
|
||||
|
@ -225,7 +225,7 @@ function ask_questions() { // {{{
|
|||
</form>
|
||||
|
||||
<h3>Help</h3>
|
||||
|
||||
|
||||
<p class="dbconf mysql pgsql">
|
||||
Please make sure the database you have chosen exists and is empty.<br>
|
||||
The username provided must have access to create tables within the database.
|
||||
|
@ -238,7 +238,7 @@ function ask_questions() { // {{{
|
|||
Drivers can generally be downloaded with your OS package manager;
|
||||
for Debian / Ubuntu you want php5-pgsql, php5-mysql, or php5-sqlite.
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
EOD;
|
||||
} // }}}
|
||||
|
@ -251,14 +251,14 @@ function install_process() { // {{{
|
|||
create_tables();
|
||||
insert_defaults();
|
||||
write_config();
|
||||
|
||||
|
||||
header("Location: index.php");
|
||||
} // }}}
|
||||
|
||||
function create_tables() { // {{{
|
||||
try {
|
||||
$db = new Database();
|
||||
|
||||
|
||||
if ( $db->count_tables() > 0 ) {
|
||||
print <<<EOD
|
||||
<div id="installer">
|
||||
|
@ -271,7 +271,7 @@ function create_tables() { // {{{
|
|||
EOD;
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$db->create_table("aliases", "
|
||||
oldtag VARCHAR(128) NOT NULL PRIMARY KEY,
|
||||
newtag VARCHAR(128) NOT NULL,
|
||||
|
@ -353,13 +353,13 @@ EOD;
|
|||
EOD;
|
||||
exit($e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
} // }}}
|
||||
|
||||
function insert_defaults() { // {{{
|
||||
try {
|
||||
$db = new Database();
|
||||
|
||||
|
||||
$db->execute("INSERT INTO users(name, pass, joindate, class) VALUES(:name, :pass, now(), :class)", Array("name" => 'Anonymous', "pass" => null, "class" => 'anonymous'));
|
||||
$db->execute("INSERT INTO config(name, value) VALUES(:name, :value)", Array("name" => 'anon_id', "value" => $db->get_last_insert_id('users_id_seq')));
|
||||
|
||||
|
@ -408,7 +408,7 @@ function build_dirs() { // {{{
|
|||
|
||||
// Clear file status cache before checking again.
|
||||
clearstatcache();
|
||||
|
||||
|
||||
if(
|
||||
!file_exists("images") || !file_exists("thumbs") || !file_exists("data") ||
|
||||
!is_writable("images") || !is_writable("thumbs") || !is_writable("data")
|
||||
|
@ -432,11 +432,11 @@ function write_config() { // {{{
|
|||
$file_content = '<' . '?php' . "\n" .
|
||||
"define('DATABASE_DSN', '".DATABASE_DSN."');\n" .
|
||||
'?' . '>';
|
||||
|
||||
|
||||
if(!file_exists("data/config")) {
|
||||
mkdir("data/config", 0755, true);
|
||||
}
|
||||
|
||||
|
||||
if(!file_put_contents("data/config/shimmie.conf.php", $file_content, LOCK_EX)) {
|
||||
$h_file_content = htmlentities($file_content);
|
||||
print <<<EOD
|
||||
|
@ -449,7 +449,7 @@ function write_config() { // {{{
|
|||
before the "<?php" or after the "?>"
|
||||
|
||||
<p><textarea cols="80" rows="2">$file_content</textarea>
|
||||
|
||||
|
||||
<p>Once done, <a href="index.php">Continue</a>
|
||||
<br/><br/>
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@ server {
|
|||
server_tokens off;
|
||||
root $1;
|
||||
index index.php;
|
||||
|
||||
|
||||
location / {
|
||||
index index.php;
|
||||
# For the Nice URLs in Shimmie.
|
||||
|
@ -40,7 +40,7 @@ server {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php\$ {
|
||||
try_files \$uri =404;
|
||||
fastcgi_index index.php;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* SimpleTest integration with Travis CI for Shimmie
|
||||
*
|
||||
*
|
||||
* @package Shimmie
|
||||
* @author jgen <jeffgenovy@gmail.com>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* SimpleTest integration with Travis CI for Shimmie
|
||||
*
|
||||
*
|
||||
* @package Shimmie
|
||||
* @author jgen <jeffgenovy@gmail.com>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
|
@ -31,20 +31,20 @@ class ShimmieInstallerTest extends WebTestCase {
|
|||
{
|
||||
$db = constant("_TRAVIS_DATABASE");
|
||||
$host = constant("_TRAVIS_WEBHOST");
|
||||
|
||||
|
||||
// Make sure that we know where the host is.
|
||||
$this->assertFalse(empty($host));
|
||||
// Make sure that we know what database to use.
|
||||
$this->assertFalse(empty($db));
|
||||
|
||||
|
||||
$this->get($host);
|
||||
$this->assertResponse(200);
|
||||
$this->assertTitle("Shimmie Installation");
|
||||
$this->assertText("Database Install");
|
||||
|
||||
|
||||
$this->setField("database_type", $db);
|
||||
$this->assertField("database_host", "localhost");
|
||||
|
||||
|
||||
if ($db === "mysql") {
|
||||
$this->setField("database_user", "root");
|
||||
$this->setField("database_password", "");
|
||||
|
@ -54,10 +54,10 @@ class ShimmieInstallerTest extends WebTestCase {
|
|||
} else {
|
||||
die("Unsupported Database Option");
|
||||
}
|
||||
|
||||
|
||||
$this->assertField("database_name", "shimmie");
|
||||
$this->clickSubmit("Go!");
|
||||
|
||||
|
||||
if (!$this->assertText("Installation Succeeded!")) {
|
||||
$this->showSource();
|
||||
}
|
||||
|
|
Reference in a new issue