Deleting files no more required
This commit is contained in:
parent
570dc80359
commit
cf8e0f2819
9 changed files with 0 additions and 1809 deletions
|
@ -1,27 +0,0 @@
|
|||
|
||||
CREATE THE PostgreSQL DATABASE
|
||||
------------------------------
|
||||
|
||||
Note that the database must be created with UTF-8 (Unicode) encoding.
|
||||
|
||||
1. CREATE DATABASE USER
|
||||
|
||||
This step is only necessary if you don't already have a user set up (e.g.
|
||||
by your host) or you want to create new user for use with Drupal only. The
|
||||
following command creates a new user named "username" and asks for a
|
||||
password for that user:
|
||||
|
||||
createuser --pwprompt --encrypted --no-adduser --no-createdb username
|
||||
|
||||
If everything works correctly, you'll see a "CREATE USER" notice.
|
||||
|
||||
2. CREATE THE DRUPAL DATABASE
|
||||
|
||||
This step is only necessary if you don't already have a database set up (e.g.
|
||||
by your host) or you want to create new database for use with Drupal only.
|
||||
The following command creates a new database named "databasename", which is
|
||||
owned by previously created "username":
|
||||
|
||||
createdb --encoding=UNICODE --owner=username databasename
|
||||
|
||||
If everything works correctly, you'll see a "CREATE DATABASE" notice.
|
|
@ -1,85 +0,0 @@
|
|||
|
||||
List of maintainers
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
LEGEND
|
||||
======
|
||||
|
||||
- M: the maintainer
|
||||
- S: status:
|
||||
"supported" : someone is actually paid to look after this.
|
||||
"maintained" : someone actually looks after it.
|
||||
"fixes/patches" : it has a maintainer but they don't have time to
|
||||
do much other than throw the odd patch in.
|
||||
"orphan" : no current maintainer, but maybe you could take
|
||||
the role as you write new code?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
BLOG API
|
||||
M: James Walker <walkah@walkah.net>
|
||||
S: maintained
|
||||
|
||||
DISTRIBUTED AUTHENTICATION MODULES
|
||||
M: Moshe Weitzman <weitzman@tejasa.com>
|
||||
S: maintained
|
||||
|
||||
DOCUMENTATION COORDINATOR
|
||||
M: Steven Peck <speck@blkmtn.org>
|
||||
S: maintained
|
||||
|
||||
FILTER SYSTEM
|
||||
M: Steven Wittens <unconed@drupal.org>
|
||||
S: maintained
|
||||
|
||||
FORM SYSTEM
|
||||
M: Károly Négyesi <chx@mail.tvnet.hu>
|
||||
S: maintained
|
||||
|
||||
LOCALE MODULE
|
||||
M: Gabor Hojtsy <goba@php.net>
|
||||
S: maintained
|
||||
|
||||
LOGGING
|
||||
M: Khalid Baheyeldin <drupal@2bits.com>
|
||||
S: maintained
|
||||
|
||||
MENU SYSTEM
|
||||
M: Károly Négyesi <chx@mail.tvnet.hu>
|
||||
S: maintained
|
||||
|
||||
PATH MODULE
|
||||
M: Matt Westgate <drupal@asitis.org>
|
||||
S: maintained
|
||||
|
||||
POSTGRESQL
|
||||
M: Sammy Spets <sammys-drupal@synerger.com>
|
||||
S: maintained
|
||||
|
||||
SECURITY COORDINATOR
|
||||
M: Greg Knaddison <http://drupal.org/user/36762>
|
||||
S: maintained
|
||||
|
||||
STATISTICS MODULE
|
||||
M: Jeremy Andrews <jeremy@kerneltrap.com>
|
||||
S: maintained
|
||||
|
||||
THEME SYSTEM
|
||||
M: Earl Miles <merlin@logrus.com>
|
||||
Joon Park <joon@dvessel.com>
|
||||
S: maintained
|
||||
|
||||
UPDATE MODULE
|
||||
M: Derek Wright <http://drupal.org/user/46549/contact>
|
||||
S: maintained
|
||||
|
||||
XML-RPC SERVER/CLIENT
|
||||
M: John VanDyk <http://drupal.org/user/2375/contact>
|
||||
S: maintained
|
||||
|
||||
TRANSLATIONS COORDINATOR
|
||||
M: Gerhard Killesreiter <gerhard@killesreiter.de>
|
||||
S: maintained
|
||||
|
||||
THE REST:
|
||||
M: Dries <dries@drupal.org>
|
1195
install.php
1195
install.php
File diff suppressed because it is too large
Load diff
|
@ -1,150 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Return an array of the modules to be enabled when this profile is installed.
|
||||
*
|
||||
* @return
|
||||
* An array of modules to enable.
|
||||
*/
|
||||
function default_profile_modules() {
|
||||
return array('color', 'comment', 'help', 'menu', 'taxonomy', 'dblog');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a description of the profile for the initial installation screen.
|
||||
*
|
||||
* @return
|
||||
* An array with keys 'name' and 'description' describing this profile,
|
||||
* and optional 'language' to override the language selection for
|
||||
* language-specific profiles.
|
||||
*/
|
||||
function default_profile_details() {
|
||||
return array(
|
||||
'name' => 'Drupal',
|
||||
'description' => 'Select this profile to enable some basic Drupal functionality and the default theme.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of tasks that this profile supports.
|
||||
*
|
||||
* @return
|
||||
* A keyed array of tasks the profile will perform during
|
||||
* the final stage. The keys of the array will be used internally,
|
||||
* while the values will be displayed to the user in the installer
|
||||
* task list.
|
||||
*/
|
||||
function default_profile_task_list() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform any final installation tasks for this profile.
|
||||
*
|
||||
* The installer goes through the profile-select -> locale-select
|
||||
* -> requirements -> database -> profile-install-batch
|
||||
* -> locale-initial-batch -> configure -> locale-remaining-batch
|
||||
* -> finished -> done tasks, in this order, if you don't implement
|
||||
* this function in your profile.
|
||||
*
|
||||
* If this function is implemented, you can have any number of
|
||||
* custom tasks to perform after 'configure', implementing a state
|
||||
* machine here to walk the user through those tasks. First time,
|
||||
* this function gets called with $task set to 'profile', and you
|
||||
* can advance to further tasks by setting $task to your tasks'
|
||||
* identifiers, used as array keys in the hook_profile_task_list()
|
||||
* above. You must avoid the reserved tasks listed in
|
||||
* install_reserved_tasks(). If you implement your custom tasks,
|
||||
* this function will get called in every HTTP request (for form
|
||||
* processing, printing your information screens and so on) until
|
||||
* you advance to the 'profile-finished' task, with which you
|
||||
* hand control back to the installer. Each custom page you
|
||||
* return needs to provide a way to continue, such as a form
|
||||
* submission or a link. You should also set custom page titles.
|
||||
*
|
||||
* You should define the list of custom tasks you implement by
|
||||
* returning an array of them in hook_profile_task_list(), as these
|
||||
* show up in the list of tasks on the installer user interface.
|
||||
*
|
||||
* Remember that the user will be able to reload the pages multiple
|
||||
* times, so you might want to use variable_set() and variable_get()
|
||||
* to remember your data and control further processing, if $task
|
||||
* is insufficient. Should a profile want to display a form here,
|
||||
* it can; the form should set '#redirect' to FALSE, and rely on
|
||||
* an action in the submit handler, such as variable_set(), to
|
||||
* detect submission and proceed to further tasks. See the configuration
|
||||
* form handling code in install_tasks() for an example.
|
||||
*
|
||||
* Important: Any temporary variables should be removed using
|
||||
* variable_del() before advancing to the 'profile-finished' phase.
|
||||
*
|
||||
* @param $task
|
||||
* The current $task of the install system. When hook_profile_tasks()
|
||||
* is first called, this is 'profile'.
|
||||
* @param $url
|
||||
* Complete URL to be used for a link or form action on a custom page,
|
||||
* if providing any, to allow the user to proceed with the installation.
|
||||
*
|
||||
* @return
|
||||
* An optional HTML string to display to the user. Only used if you
|
||||
* modify the $task, otherwise discarded.
|
||||
*/
|
||||
function default_profile_tasks(&$task, $url) {
|
||||
|
||||
// Insert default user-defined node types into the database. For a complete
|
||||
// list of available node type attributes, refer to the node type API
|
||||
// documentation at: http://api.drupal.org/api/HEAD/function/hook_node_info.
|
||||
$types = array(
|
||||
array(
|
||||
'type' => 'page',
|
||||
'name' => st('Page'),
|
||||
'module' => 'node',
|
||||
'description' => st("A <em>page</em>, similar in form to a <em>story</em>, is a simple method for creating and displaying information that rarely changes, such as an \"About us\" section of a website. By default, a <em>page</em> entry does not allow visitor comments and is not featured on the site's initial home page."),
|
||||
'custom' => TRUE,
|
||||
'modified' => TRUE,
|
||||
'locked' => FALSE,
|
||||
'help' => '',
|
||||
'min_word_count' => '',
|
||||
),
|
||||
array(
|
||||
'type' => 'story',
|
||||
'name' => st('Story'),
|
||||
'module' => 'node',
|
||||
'description' => st("A <em>story</em>, similar in form to a <em>page</em>, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a <em>story</em> entry. By default, a <em>story</em> entry is automatically featured on the site's initial home page, and provides the ability to post comments."),
|
||||
'custom' => TRUE,
|
||||
'modified' => TRUE,
|
||||
'locked' => FALSE,
|
||||
'help' => '',
|
||||
'min_word_count' => '',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($types as $type) {
|
||||
$type = (object) _node_type_set_defaults($type);
|
||||
node_type_save($type);
|
||||
}
|
||||
|
||||
// Default page to not be promoted and have comments disabled.
|
||||
variable_set('node_options_page', array('status'));
|
||||
variable_set('comment_page', COMMENT_NODE_DISABLED);
|
||||
|
||||
// Don't display date and author information for page nodes by default.
|
||||
$theme_settings = variable_get('theme_settings', array());
|
||||
$theme_settings['toggle_node_info_page'] = FALSE;
|
||||
variable_set('theme_settings', $theme_settings);
|
||||
|
||||
// Update the menu router information.
|
||||
menu_rebuild();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_form_alter().
|
||||
*
|
||||
* Allows the profile to alter the site-configuration form. This is
|
||||
* called through custom invocation, so $form_state is not populated.
|
||||
*/
|
||||
function default_form_alter(&$form, $form_state, $form_id) {
|
||||
if ($form_id == 'install_configure') {
|
||||
// Set default for site name field.
|
||||
$form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
find . -name "*~" -type f | xargs rm -f
|
||||
find . -name ".#*" -type f | xargs rm -f
|
||||
find . -name "*.rej" -type f | xargs rm -f
|
||||
find . -name "*.orig" -type f | xargs rm -f
|
||||
find . -name "DEADJOE" -type f | xargs rm -f
|
||||
find . -type f | grep -v ".psp" | grep -v ".gif" | grep -v ".jpg" | grep -v ".png" | grep -v ".tgz" | grep -v ".ico" | grep -v "druplicon" | xargs perl -wi -pe 's/\s+$/\n/'
|
||||
find . -type f | grep -v ".psp" | grep -v ".gif" | grep -v ".jpg" | grep -v ".png" | grep -v ".tgz" | grep -v ".ico" | grep -v "druplicon" | xargs perl -wi -pe 's/\t/ /g'
|
|
@ -1,194 +0,0 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
use Pod::Usage;
|
||||
use Getopt::Long qw(GetOptions);
|
||||
Getopt::Long::Configure ("bundling");
|
||||
|
||||
my %opt = ( "help" => 0,
|
||||
'debug' => 0,
|
||||
);
|
||||
|
||||
if(!GetOptions(\%opt,
|
||||
'help|?',
|
||||
'debug',
|
||||
)) {
|
||||
pod2usage(-exitval => 1, 'verbose'=>0);
|
||||
}
|
||||
|
||||
pod2usage(-exitval => 0, -verbose => 2) if($opt{'help'});
|
||||
|
||||
$debug = $opt{'debug'};
|
||||
|
||||
$comment = 0; #flag used to signal we're inside /* */
|
||||
$program = 0; #flag used to signal we're inside <?php ?>
|
||||
#read the file
|
||||
while (<>) {
|
||||
$org=$_;
|
||||
s/\\["']//g;
|
||||
# please don't use nested comments for now... thanks!
|
||||
# handles comments // style, but don't mess with http://
|
||||
s/\/\/[^:].*//;
|
||||
# handles comments /**/ on a single line
|
||||
s/\/\*.*\*\///g;
|
||||
# handles comments /**/ over several lines
|
||||
if ($comment == 1) {
|
||||
if (s/.*\*\///) {
|
||||
$comment = 0;
|
||||
}
|
||||
else {
|
||||
next;
|
||||
}
|
||||
}
|
||||
if (s/\/\*.*//) {
|
||||
$comment = 1;
|
||||
}
|
||||
if (/^\s*#/) {
|
||||
next;
|
||||
}
|
||||
|
||||
if (s/<\?php//) {
|
||||
$program = 1;
|
||||
}
|
||||
if (/\?>/) {
|
||||
$program = 0;
|
||||
}
|
||||
|
||||
# enforce "bar". foo() ."bar" syntax
|
||||
if (/^("[^"]*"|[^"])*("[^"]*")\.[^ ]/ && $program) {
|
||||
$msg = "'\".' -> '\". '";
|
||||
}
|
||||
elsif (/^("[^"]*"|[^"])*("[^"]*")\s+\./ && $program) {
|
||||
$msg = "'\" .' -> '\".'";
|
||||
}
|
||||
# enforce "bar". foo() ."bar" syntax
|
||||
elsif (/^("[^"]*"|[^"])*[^ "]\.("[^"]*")/ && $program) {
|
||||
$msg = "'.\"' -> '.\"'";
|
||||
}
|
||||
elsif (/^("[^"]*"|[^"])*[^ "]\.\s+("[^"]*")/ && $program) {
|
||||
$msg = "'. \"' -> '.\"'";
|
||||
}
|
||||
# XHTML requires closing tag
|
||||
elsif (/<br>/i) {
|
||||
$msg = "'<br>' -> '<br />'";
|
||||
}
|
||||
elsif (/\$REQUEST_URI/i) {
|
||||
$msg = "the use of REQUEST_URI is prone to XSS exploits and does not work on IIS; use request_uri() instead";
|
||||
}
|
||||
elsif (/\"REQUEST_URI\"/i) {
|
||||
$msg = "the use of REQUEST_URI is prone to XSS exploits and does not work on IIS; use request_uri() instead";
|
||||
}
|
||||
|
||||
# XHTML compatibility mode suggests a blank before /
|
||||
# i.e. <br />
|
||||
elsif (/<[a-z][^>]*[^ >]\/>/i) {
|
||||
$msg = "'<foo/".">' -> '<foo />'";
|
||||
}
|
||||
# we write '{' on the same line, not on the next
|
||||
elsif (/^\s*{/ && $program) {
|
||||
$msg = "take '{' to previous line";
|
||||
}
|
||||
elsif (/([a-z])([A-Z])/) {
|
||||
$msg = "no mixed case function or variable names, use lower case and _";
|
||||
}
|
||||
elsif (/<[\/]*[A-Z]+[^>]*>/) {
|
||||
$msg = "XHTML demands tags to be lowercase";
|
||||
}
|
||||
|
||||
# trying to recognize splitted lines
|
||||
# there are only a few valid last characters in programming mode,
|
||||
# only sometimes it is ( if you use if/else with a single statement
|
||||
|
||||
# from here on we need no more strings
|
||||
while (s/^([^"]*)"[^"]*"/$1#/) {};
|
||||
while (s/^([^']*)'[^']*'/$1#/) {};
|
||||
|
||||
# it should be 'if (' all the time
|
||||
if (/(^|[^a-zA-Z])(if|else|elseif|while|foreach|switch|return|for)\(/) {
|
||||
$msg = "'(' -> ' ('";
|
||||
}
|
||||
#elsif (/[^;{}:\s\n]\s*\n*$/ && $program && !/^[\s}]*(if|else)/) {
|
||||
# $msg = "don't split lines";
|
||||
#}
|
||||
elsif (/\}\s*else/) {
|
||||
$msg = "'} else' -> '}\\nelse'";
|
||||
}
|
||||
elsif (/[^{\s\n]\s*\n*$/ && $program && /^\s*(if|else)/) {
|
||||
$msg = "every if/else needs a { at eol";
|
||||
}
|
||||
elsif (/([\(\[]) / && $program) {
|
||||
$msg = "'$1 ' -> '$1'";
|
||||
}
|
||||
elsif (/\S ([\)\]])/ && $program) {
|
||||
$msg = "' $1' -> '$1'";
|
||||
}
|
||||
# but no brackets
|
||||
elsif (/([a-z-A-Z_][a-zA-Z0-9_-]*)\s+\(/ && $program) {
|
||||
if ($1 ne "switch" and $1 ne "if" and $1 ne "while" and $1 ne "foreach" and $1 ne "return" and $1 ne "for" and $1 ne "elseif") {
|
||||
$msg = "'$1 (' -> '$1('";
|
||||
}
|
||||
}
|
||||
# there should be a space before '{'
|
||||
if (/[^ ]{/ && $program) {
|
||||
$msg = "missing space before '{'";
|
||||
}
|
||||
# there should be a space after ','
|
||||
elsif (/[,][^ \n\r]/ && $program) {
|
||||
$msg = "missing space after ','";
|
||||
}
|
||||
# spaces before and after, only foreach may use $foo=>bar
|
||||
elsif (/[^ =|\-|\+](\+|\-)[^ =>|\-|\+]/ && $program && !/foreach/) {
|
||||
$msg = "'$1' -> ' $1 '";
|
||||
}
|
||||
elsif (/[^ =](\*|==|\.=|=>|=|\|\|)[^ =>]/ && $program && !/foreach/) {
|
||||
$msg = "'$1' -> ' $1 '";
|
||||
}
|
||||
# ensure $bar["foo"] and $bar[$foo] and $bar[0]
|
||||
elsif (/\[[^#][^\]]*\]/ && !/\[[0-9\$][^\]]*\]/ && !/\[\]/) {
|
||||
$msg = "only [\"foo\"], [\$foo] or [0] is allowed";
|
||||
}
|
||||
# first try to find missing quotes after = in (X)HTML tags
|
||||
elsif (/<[^>]*=[a-zA-Z0-9][^>]*>/) {
|
||||
$msg = "=... -> =\"...\"";
|
||||
}
|
||||
if (defined $msg) {
|
||||
if ($debug==0) {
|
||||
print $ARGV .":". $. .": $msg : ". $org;
|
||||
}
|
||||
undef $msg;
|
||||
}
|
||||
elsif ($debug==1) {
|
||||
print $org;
|
||||
}
|
||||
} continue {
|
||||
close ARGV if eof;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
code-style.pl - Review drupal code for style
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
code-style.pl [options] <filename>
|
||||
|
||||
Options:
|
||||
|
||||
-? --help detailed help message
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Originally written for Drupal (http://drupal.org/) to ensure stylish
|
||||
code. This program reviews PHP code, and tries to show as many code
|
||||
improvements as possible with no false positives.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
--comment
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
./code-style.pl ../index.php
|
||||
|
||||
=cut
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
curl --silent --compressed http://example.com/cron.php
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
/usr/bin/lynx -source http://example.com/cron.php > /dev/null 2>&1
|
|
@ -1,143 +0,0 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Drupal shell execution script
|
||||
*
|
||||
* Check for your PHP interpreter - on Windows you'll probably have to
|
||||
* replace line 1 with
|
||||
* #!c:/program files/php/php.exe
|
||||
*
|
||||
* @param path Drupal's absolute root directory in local file system (optional).
|
||||
* @param URI A URI to execute, including HTTP protocol prefix.
|
||||
*/
|
||||
$script = basename(array_shift($_SERVER['argv']));
|
||||
|
||||
if (in_array('--help', $_SERVER['argv'])) {
|
||||
echo <<<EOF
|
||||
|
||||
Execute a Drupal page from the shell.
|
||||
|
||||
Usage: {$script} [OPTIONS] "<URI>"
|
||||
Example: {$script} "http://mysite.org/node"
|
||||
|
||||
All arguments are long options.
|
||||
|
||||
--help This page.
|
||||
|
||||
--root Set the working directory for the script to the specified path.
|
||||
To execute Drupal this has to be the root directory of your
|
||||
Drupal installation, f.e. /home/www/foo/drupal (assuming Drupal
|
||||
running on Unix). Current directory is not required.
|
||||
Use surrounding quotation marks on Windows.
|
||||
|
||||
--verbose This option displays the options as they are set, but will
|
||||
produce errors from setting the session.
|
||||
|
||||
URI The URI to execute, i.e. http://default/foo/bar for executing
|
||||
the path '/foo/bar' in your site 'default'. URI has to be
|
||||
enclosed by quotation marks if there are ampersands in it
|
||||
(f.e. index.php?q=node&foo=bar). Prefix 'http://' is required,
|
||||
and the domain must exist in Drupal's sites-directory.
|
||||
|
||||
If the given path and file exists it will be executed directly,
|
||||
i.e. if URI is set to http://default/bar/foo.php
|
||||
and bar/foo.php exists, this script will be executed without
|
||||
bootstrapping Drupal. To execute Drupal's cron.php, specify
|
||||
http://default/cron.php as the URI.
|
||||
|
||||
|
||||
To run this script without --root argument invoke it from the root directory
|
||||
of your Drupal installation with
|
||||
|
||||
./scripts/{$script}
|
||||
\n
|
||||
EOF;
|
||||
exit;
|
||||
}
|
||||
|
||||
// define default settings
|
||||
$cmd = 'index.php';
|
||||
$_SERVER['HTTP_HOST'] = 'default';
|
||||
$_SERVER['PHP_SELF'] = '/index.php';
|
||||
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
|
||||
$_SERVER['SERVER_SOFTWARE'] = 'PHP CLI';
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_SERVER['QUERY_STRING'] = '';
|
||||
$_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = '/';
|
||||
|
||||
// toggle verbose mode
|
||||
if (in_array('--verbose', $_SERVER['argv'])) {
|
||||
$_verbose_mode = true;
|
||||
}
|
||||
else {
|
||||
$_verbose_mode = false;
|
||||
}
|
||||
|
||||
// parse invocation arguments
|
||||
while ($param = array_shift($_SERVER['argv'])) {
|
||||
switch ($param) {
|
||||
case '--root':
|
||||
// change working directory
|
||||
$path = array_shift($_SERVER['argv']);
|
||||
if (is_dir($path)) {
|
||||
chdir($path);
|
||||
if ($_verbose_mode) {
|
||||
echo "cwd changed to: {$path}\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo "\nERROR: {$path} not found.\n\n";
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (substr($param, 0, 2) == '--') {
|
||||
// ignore unknown options
|
||||
break;
|
||||
}
|
||||
else {
|
||||
// parse the URI
|
||||
$path = parse_url($param);
|
||||
|
||||
// set site name
|
||||
if (isset($path['host'])) {
|
||||
$_SERVER['HTTP_HOST'] = $path['host'];
|
||||
}
|
||||
|
||||
// set query string
|
||||
if (isset($path['query'])) {
|
||||
$_SERVER['QUERY_STRING'] = $path['query'];
|
||||
parse_str($path['query'], $_GET);
|
||||
$_REQUEST = $_GET;
|
||||
}
|
||||
|
||||
// set file to execute or Drupal path (clean URLs enabled)
|
||||
if (isset($path['path']) && file_exists(substr($path['path'], 1))) {
|
||||
$_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = $path['path'];
|
||||
$cmd = substr($path['path'], 1);
|
||||
}
|
||||
else if (isset($path['path'])) {
|
||||
if (!isset($_GET['q'])) {
|
||||
$_REQUEST['q'] = $_GET['q'] = $path['path'];
|
||||
}
|
||||
}
|
||||
|
||||
// display setup in verbose mode
|
||||
if ($_verbose_mode) {
|
||||
echo "Hostname set to: {$_SERVER['HTTP_HOST']}\n";
|
||||
echo "Script name set to: {$cmd}\n";
|
||||
echo "Path set to: {$_GET['q']}\n";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($cmd)) {
|
||||
include $cmd;
|
||||
}
|
||||
else {
|
||||
echo "\nERROR: {$cmd} not found.\n\n";
|
||||
}
|
||||
exit();
|
Reference in a new issue