]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
special header file for standalone scripts
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 19 Jan 2010 22:58:19 +0000 (22:58 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Tue, 19 Jan 2010 22:58:19 +0000 (22:58 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@618 b3834d28-1941-0410-a4f8-b48e95affb8f

doc/ChangeLog
scripts/create-testbookmarks.php
scripts/create-testuser.php
src/SemanticScuttle/header-standalone.php [new file with mode: 0644]

index 9c7fa0e3d5fff6332e014afa1301700b77c201ea..be7b2addb47bde50fa1947e6a194b107205b34b8 100644 (file)
@@ -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
index d92a0072ca45c2909e430cfd0f5e081d66b135a1..cbacb85d11317752a16026d4d281a2f2082bd6cb 100644 (file)
@@ -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');
index 4fa168be70d16593f93a503654fd7b7b25c30137..0a74f6cff3418531a833f78ffe29b679deab68bd 100644 (file)
@@ -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 (file)
index 0000000..cc1b0bd
--- /dev/null
@@ -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