From 3d1217a1be2c7e226dd3413ea44639e5fbb3455b Mon Sep 17 00:00:00 2001 From: jgen Date: Sat, 22 Feb 2014 15:36:52 -0500 Subject: [PATCH] Trim trailing blank space. --- .travis.yml | 2 +- ext/alias_editor/theme.php | 2 +- index.php | 6 +++--- install.php | 26 +++++++++++++------------- tests/setup_test_env.sh | 4 ++-- tests/test_all.php | 2 +- tests/test_install.php | 14 +++++++------- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d4a4cb3..f398e0b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ext/alias_editor/theme.php b/ext/alias_editor/theme.php index b8b2f9a7..d206a916 100644 --- a/ext/alias_editor/theme.php +++ b/ext/alias_editor/theme.php @@ -33,7 +33,7 @@ class AliasEditorTheme extends Themelet { foreach($aliases as $old => $new) { $h_old = html_escape($old); $h_new = "".html_escape($new).""; - + $h_aliases .= "$h_old$h_new"; if($can_manage) { $h_aliases .= " diff --git a/index.php b/index.php index a2bdaa8a..28d6811a 100644 --- a/index.php +++ b/index.php @@ -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 diff --git a/install.php b/install.php index 3f11c2ba..217f7078 100644 --- a/install.php +++ b/install.php @@ -1,7 +1,7 @@ * @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() { // {{{

Help

- +

Please make sure the database you have chosen exists and is empty.
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.

- + 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 << @@ -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 << - +

Once done, Continue

diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index 9c16e819..1717cd2c 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -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; diff --git a/tests/test_all.php b/tests/test_all.php index d45112c0..9fb49de9 100644 --- a/tests/test_all.php +++ b/tests/test_all.php @@ -1,7 +1,7 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 diff --git a/tests/test_install.php b/tests/test_install.php index a547bd64..8519c6d5 100644 --- a/tests/test_install.php +++ b/tests/test_install.php @@ -1,7 +1,7 @@ * @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(); }