summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-03-07 06:37:30 +0000
committerDries Buytaert <dries@buytaert.net>2003-03-07 06:37:30 +0000
commitd659fedb389a42173d18bfc2aea2628372579a52 (patch)
tree9a8ae00e584b4915613d876e521250dfc53802ec /modules/system/system.module
parentd5fe0cfe2017241094a84e4c4fb6bfdf1928f8eb (diff)
downloadbrdo-d659fedb389a42173d18bfc2aea2628372579a52.tar.gz
brdo-d659fedb389a42173d18bfc2aea2628372579a52.tar.bz2
- Removed the path_uri() function in favor of the $base_url variable and
fixes a handful of bugs introduced by the clean URL patch.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 5b26eebca..4c32056a4 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -20,11 +20,13 @@ function system_help_cache() {
}
function system_help_cron() {
+ global $base_url;
+
$output .= "<p>Some settings require a <i>cron</i> or <i>crontab</i>. Cron, which stands for chronograph, is a periodic command scheduler: it executes commands at intervals specified in seconds. It can be used to control the execution of daily, weekly and monthly jobs (or anything with a period of <i>n</i> seconds). Automating tasks is one of the best ways to keep a system running smoothly, and if most of your administration does not require your direct involvement, cron is an ideal solution.</p>";
- $output .= "<p>Whenever <a href=\"". path_uri() ."cron.php\">". path_uri() ."cron.php</a> is accessed, cron will run: it checks for the jobs cron controls, and their periods in seconds. If a certain task wasn't executed in the last n seconds, where n is the period of that job, it will be executed. When all the executed commands terminate, cron is done.</p>";
- $output .= "<p>The recommended way to setup your cron system is to setup a Unix/Linux crontab that frequently visits <a href=\"". path_uri() ."cron.php\">". path_uri() ."cron.php</a>. Note that cron does not guarantee the commands will be executed at the specified interval. However, Drupal will try his best and run the crons as close to the specified intervals as possible. The more you visit cron.php, the more accurate cron will be.</p>";
- $output .= "<p>If your hosting company does not allow you to setup crontabs, you can always ask someone else to setup a crontab for you. After all, virtually any Unix/Linux machine with access to the internet can setup a crontab to frequently visit <a href=\"". path_uri() ."cron.php\">". path_uri() ."cron.php</a>.</p>";
- $output .= "<p>For the Unix/Linux crontab itself, use a browser like <i>lynx</i> or <i>wget</i> but make sure the process terminates: either use <code>/usr/bin/lynx -source " . path_uri() . "cron.php</code> or <code>/usr/bin/wget -O /dev/null " . path_uri() ."cron.php</code>. Take a look at the example scripts in the <code>scripts</code>-directory and make sure to adjust them to your needs. A good crontab-line to run the cron-script once every hour would be: <pre> 00 * * * * /home/www/drupal/scripts/cron-lynx.sh</pre>Note that it is essential to access <code>cron.php</code> using a browser; don't run it using command line PHP and avoid using <code>localhost</code> or <code>127.0.0.1</code>, or some features won't work as expected. For all the environment variables to be correct; use a browser to access <code>cron.php</code> on a publicly accessible domain.</p>";
+ $output .= "<p>Whenever <a href=\"$base_url/cron.php\">$base_url/cron.php</a> is accessed, cron will run: it checks for the jobs cron controls, and their periods in seconds. If a certain task wasn't executed in the last n seconds, where n is the period of that job, it will be executed. When all the executed commands terminate, cron is done.</p>";
+ $output .= "<p>The recommended way to setup your cron system is to setup a Unix/Linux crontab that frequently visits <a href=\"$base_url/cron.php\">$base_url/cron.php</a>. Note that cron does not guarantee the commands will be executed at the specified interval. However, Drupal will try his best and run the crons as close to the specified intervals as possible. The more you visit cron.php, the more accurate cron will be.</p>";
+ $output .= "<p>If your hosting company does not allow you to setup crontabs, you can always ask someone else to setup a crontab for you. After all, virtually any Unix/Linux machine with access to the internet can setup a crontab to frequently visit <a href=\"$base_url/cron.php\">$base_url/cron.php</a>.</p>";
+ $output .= "<p>For the Unix/Linux crontab itself, use a browser like <i>lynx</i> or <i>wget</i> but make sure the process terminates: either use <code>/usr/bin/lynx -source $base_url/cron.php</code> or <code>/usr/bin/wget -O /dev/null $base_url/cron.php</code>. Take a look at the example scripts in the <code>scripts</code>-directory and make sure to adjust them to your needs. A good crontab-line to run the cron-script once every hour would be: <pre> 00 * * * * /home/www/drupal/scripts/cron-lynx.sh</pre>Note that it is essential to access <code>cron.php</code> using a browser; don't run it using command line PHP and avoid using <code>localhost</code> or <code>127.0.0.1</code>, or some features won't work as expected. For all the environment variables to be correct; use a browser to access <code>cron.php</code> on a publicly accessible domain.</p>";
return $output;
}
@@ -299,7 +301,7 @@ function system_listing($type, $directory, $required = array()) {
function system_init() {
global $HTTP_POST_VARS, $REQUEST_URI, $system_init_status;
-
+
session_register("system_init_status");
if (user_access("administer site configuration")) {
if (isset($HTTP_POST_VARS["op"]) && $HTTP_POST_VARS["op"] == t("Reset to defaults")) {
@@ -317,7 +319,7 @@ function system_init() {
function system_admin() {
global $HTTP_POST_VARS, $system_init_status;
-
+
if (user_access("administer site configuration")) {
session_register("system_init_status");
print $system_init_status;