special header file for standalone scripts

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@618 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-01-19 22:58:19 +00:00
parent 777f7f072c
commit a2b518b1b3
4 changed files with 23 additions and 8 deletions

View file

@ -17,6 +17,7 @@ ChangeLog for SemantiScuttle
description. Patch by fnorder@users.sourceforge.net description. Patch by fnorder@users.sourceforge.net
- Fix bug #2934891: RSS XML was sometimes invalid because - Fix bug #2934891: RSS XML was sometimes invalid because
special characters did not get escaped. special characters did not get escaped.
- Special header file for shell scripts (header-standalone.php)
0.95.2 - 2010-01-16 0.95.2 - 2010-01-16

View file

@ -2,10 +2,7 @@
/** /**
* Simply create some test bookmarks * Simply create some test bookmarks
*/ */
$_SERVER['HTTP_HOST'] = 'http://localhost/'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header-standalone.php';
define('UNIT_TEST_MODE', true);
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$us = SemanticScuttle_Service_Factory::get('User'); $us = SemanticScuttle_Service_Factory::get('User');
$uid = $us->addUser('dummy', 'dummy', 'dummy@example.org'); $uid = $us->addUser('dummy', 'dummy', 'dummy@example.org');

View file

@ -2,10 +2,7 @@
/** /**
* Simply create a test user in the database with "test" as password * Simply create a test user in the database with "test" as password
*/ */
$_SERVER['HTTP_HOST'] = 'http://localhost/'; require_once dirname(__FILE__) . '/../src/SemanticScuttle/header-standalone.php';
define('UNIT_TEST_MODE', true);
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
$us = SemanticScuttle_Service_Factory::get('User'); $us = SemanticScuttle_Service_Factory::get('User');
$us->addUser('test', 'test', 'test@example.org'); $us->addUser('test', 'test', 'test@example.org');

View file

@ -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';
?>