summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-02-17 13:04:50 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-02-17 13:04:50 +0000
commit9062b566b28d6b658888c4ab6bae856827a8cab7 (patch)
treee17d29e8b54157de8e6edf000e1c2909b9e734c2
parent8c70eae2e49930eb6ebe063849adf9be14cf28c5 (diff)
downloadbrdo-9062b566b28d6b658888c4ab6bae856827a8cab7.tar.gz
brdo-9062b566b28d6b658888c4ab6bae856827a8cab7.tar.bz2
- applying patches from Axel Kollmorgen. See
http://list.drupal.org/drupal-devel/2002-February/thread.html#6678 http://list.drupal.org/drupal-devel/2002-February/thread.html#6629 - removed references to $this->user() from themes. - removed $BaseTheme->user(). It was deprecated a while back. NOTE: this update will break custom themes, so make sure you update your themes before updating!
-rw-r--r--.htaccess1
-rw-r--r--includes/theme.inc15
-rw-r--r--includes/xmlrpc.inc4
-rw-r--r--themes/example/example.theme2
-rw-r--r--themes/goofy/goofy.theme3
-rw-r--r--themes/marvin/marvin.theme3
-rw-r--r--themes/unconed/unconed.theme3
7 files changed, 14 insertions, 17 deletions
diff --git a/.htaccess b/.htaccess
index 5cc16dad1..3b27a5a5b 100644
--- a/.htaccess
+++ b/.htaccess
@@ -29,6 +29,7 @@ ErrorDocument 500 /error.php
php_value session.cookie_lifetime 2000000
php_value session.auto_start 0
php_value session.save_handler user
+ php_value allow_call_time_pass_reference Off
</IfModule>
# Various rewrite rules
diff --git a/includes/theme.inc b/includes/theme.inc
index 62c790919..48b61589d 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -8,7 +8,7 @@ class BaseTheme {
$output .= "<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\"><tr><td valign=\"top\" width=\"170\">";
print $output;
- $this->box(t("Navigation"), implode("<br />", link_page())); $this->user("all", $this); theme_blocks("all", $this);
+ $this->box(t("Navigation"), implode("<br />", link_page())); theme_blocks("all", $this);
print "</td><td valign=\"top\">";
}
@@ -21,9 +21,6 @@ class BaseTheme {
return "misc/$name";
}
- function user($region) {
- }
-
function node($node, $main) {
$output .= "<b>". check_output($node->title) ."</b> by ". format_name($node) ."<br />";
if ($main && $node->teaser) {
@@ -74,13 +71,15 @@ class BaseTheme {
function theme_init() {
global $user, $themes;
- if ($user->theme && file_exists($themes[$user->theme][0])) {
- include_once $themes[$user->theme][0];
+ if ($user->theme && file_exists($themes[$theme_name = $user->theme][0])) {
+ include_once $themes[$theme_name][0];
}
else {
- include_once $themes[variable_get("theme_default", key($themes))][0];
+ include_once $themes[$theme_name = variable_get("theme_default", key($themes))][0];
}
- return new Theme();
+
+ $theme_class = 'Theme_'. $theme_name;
+ return new $theme_class();
}
function theme_blocks($region, &$theme) {
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index 78ff37700..db6d68b36 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -407,10 +407,10 @@ class xmlrpc_client {
if ($port==0) $port=80;
if($timeout>0)
$fp=fsockopen($server, $port,
- &$this->errno, &$this->errstr, $timeout);
+ $this->errno, $this->errstr, $timeout);
else
$fp=fsockopen($server, $port,
- &$this->errno, &$this->errstr);
+ $this->errno, $this->errstr);
if (!$fp) {
return 0;
}
diff --git a/themes/example/example.theme b/themes/example/example.theme
index 326580c4c..90c22e5cd 100644
--- a/themes/example/example.theme
+++ b/themes/example/example.theme
@@ -1,7 +1,7 @@
<?php
// $Id$
- class Theme extends BaseTheme {
+ class Theme_example extends BaseTheme {
}
diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme
index 73c60f767..b0562c068 100644
--- a/themes/goofy/goofy.theme
+++ b/themes/goofy/goofy.theme
@@ -12,7 +12,7 @@
*********************************************************************/
- class Theme extends BaseTheme {
+ class Theme_goofy extends BaseTheme {
// General colorset that can be used for this theme
var $foreground = "#000000";
var $background = "#FFFFFF";
@@ -150,7 +150,6 @@ function c(subject,mod,author,date,body) {document.writeln("<table border=\"0\"
</td>
<td valign="top">
<?php
- $this->user("all");
theme_blocks("all", $this);
?>
</td>
diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme
index fc3f5580b..bfed08274 100644
--- a/themes/marvin/marvin.theme
+++ b/themes/marvin/marvin.theme
@@ -11,7 +11,7 @@
*********************************************************************/
- class Theme extends BaseTheme {
+ class Theme_marvin extends BaseTheme {
var $link = "#666699";
// General colorset that can be used for this theme
@@ -174,7 +174,6 @@
</td>
<td valign="top" width="200">
<?php
- $this->user("all");
theme_blocks("all", $this);
?>
</td>
diff --git a/themes/unconed/unconed.theme b/themes/unconed/unconed.theme
index c4346fdb6..78f4b3f46 100644
--- a/themes/unconed/unconed.theme
+++ b/themes/unconed/unconed.theme
@@ -11,7 +11,7 @@
*********************************************************************/
- class Theme extends BaseTheme {
+ class Theme_unconed extends BaseTheme {
var $foreground = "#000000";
var $background = "#FFFFFF";
@@ -191,7 +191,6 @@
</TD>
<TD VALIGN="top" WIDTH="20%">
<?php
- $this->user("all");
theme_blocks("all", $this);
?>
</TD>