summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog1
-rw-r--r--scripts/create-testbookmarks.php5
-rw-r--r--scripts/create-testuser.php5
-rw-r--r--src/SemanticScuttle/header-standalone.php20
4 files changed, 23 insertions, 8 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 9c7fa0e..be7b2ad 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -17,6 +17,7 @@ ChangeLog for SemantiScuttle
description. Patch by fnorder@users.sourceforge.net
- Fix bug #2934891: RSS XML was sometimes invalid because
special characters did not get escaped.
+- Special header file for shell scripts (header-standalone.php)
0.95.2 - 2010-01-16
diff --git a/scripts/create-testbookmarks.php b/scripts/create-testbookmarks.php
index d92a007..cbacb85 100644
--- a/scripts/create-testbookmarks.php
+++ b/scripts/create-testbookmarks.php
@@ -2,10 +2,7 @@
/**
* Simply create some test bookmarks
*/
-$_SERVER['HTTP_HOST'] = 'http://localhost/';
-define('UNIT_TEST_MODE', true);
-
-require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+require_once dirname(__FILE__) . '/../src/SemanticScuttle/header-standalone.php';
$us = SemanticScuttle_Service_Factory::get('User');
$uid = $us->addUser('dummy', 'dummy', 'dummy@example.org');
diff --git a/scripts/create-testuser.php b/scripts/create-testuser.php
index 4fa168b..0a74f6c 100644
--- a/scripts/create-testuser.php
+++ b/scripts/create-testuser.php
@@ -2,10 +2,7 @@
/**
* Simply create a test user in the database with "test" as password
*/
-$_SERVER['HTTP_HOST'] = 'http://localhost/';
-define('UNIT_TEST_MODE', true);
-
-require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+require_once dirname(__FILE__) . '/../src/SemanticScuttle/header-standalone.php';
$us = SemanticScuttle_Service_Factory::get('User');
$us->addUser('test', 'test', 'test@example.org');
diff --git a/src/SemanticScuttle/header-standalone.php b/src/SemanticScuttle/header-standalone.php
new file mode 100644
index 0000000..cc1b0bd
--- /dev/null
+++ b/src/SemanticScuttle/header-standalone.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Load this file instead of header.php if you
+ * are using it in a standalone non-webserver script.
+ *
+ * SemanticScuttle - your social bookmark manager.
+ *
+ * PHP version 5.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+$_SERVER['HTTP_HOST'] = 'http://localhost/';
+define('UNIT_TEST_MODE', true);
+
+require_once dirname(__FILE__) . '/header.php';
+?> \ No newline at end of file