diff --git a/contrib/link_image/theme.php b/contrib/link_image/theme.php
index c7a09be6..48e68cd2 100644
--- a/contrib/link_image/theme.php
+++ b/contrib/link_image/theme.php
@@ -33,7 +33,7 @@ class LinkImageTheme extends Themelet {
50));
}
- private function url ($url,$content,$type) {
+ protected function url ($url,$content,$type) {
if ($content == NULL) {$content=$url;}
switch ($type) {
@@ -49,7 +49,7 @@ class LinkImageTheme extends Themelet {
return $text;
}
- private function img ($src,$type) {
+ protected function img ($src,$type) {
switch ($type) {
case "html":
$text = "";
@@ -63,7 +63,7 @@ class LinkImageTheme extends Themelet {
return $text;
}
- private function link_code($label,$content,$id=NULL) {
+ protected function link_code($label,$content,$id=NULL) {
return "\n".
"\n
\n";
}
diff --git a/contrib/wiki/theme.php b/contrib/wiki/theme.php
index de03f0ea..f47319a9 100644
--- a/contrib/wiki/theme.php
+++ b/contrib/wiki/theme.php
@@ -36,7 +36,7 @@ class WikiTheme {
$page->add_block(new Block("Editor", $this->create_edit_html($wiki_page)));
}
- private function can_edit($user, $page) {
+ protected function can_edit($user, $page) {
global $config;
if(!is_null($page) && $page->is_locked() && !$user->is_admin()) return false;
@@ -46,7 +46,7 @@ class WikiTheme {
return false;
}
- private function create_edit_html($page) {
+ protected function create_edit_html($page) {
$h_title = html_escape($page->title);
$u_title = url_escape($page->title);
$i_revision = int_escape($page->revision) + 1;
@@ -70,7 +70,7 @@ class WikiTheme {
";
}
- private function create_display_html($page) {
+ protected function create_display_html($page) {
$owner = $page->get_owner();
$tfe = new TextFormattingEvent($page->body);
diff --git a/core/util.inc.php b/core/util.inc.php
index b0343650..30ab0863 100644
--- a/core/util.inc.php
+++ b/core/util.inc.php
@@ -167,12 +167,11 @@ function _count_execs($db, $sql, $inputarray) {
function get_theme_object($file, $class) {
global $config;
$theme = $config->get_string("theme", "default");
- if(file_exists("themes/$theme/$file.theme.php")) {
- require_once "themes/$theme/$file.theme.php";
+ if(class_exists("Custom$class")) {
+ $class = "Custom$class";
return new $class();
}
else {
- require_once "ext/$file/theme.php";
return new $class();
}
}
diff --git a/ext/comment/theme.php b/ext/comment/theme.php
index bc7bb8da..d91a0276 100644
--- a/ext/comment/theme.php
+++ b/ext/comment/theme.php
@@ -75,7 +75,7 @@ class CommentListTheme extends Themelet {
*/
- private function comments_to_html($comments, $trim=false) {
+ protected function comments_to_html($comments, $trim=false) {
$html = "";
foreach($comments as $comment) {
$html .= $this->comment_to_html($comment, $trim);
@@ -83,7 +83,7 @@ class CommentListTheme extends Themelet {
return $html;
}
- private function comment_to_html($comment, $trim=false) {
+ protected function comment_to_html($comment, $trim=false) {
global $user;
$tfe = new TextFormattingEvent($comment->comment);
@@ -105,7 +105,7 @@ class CommentListTheme extends Themelet {
return "
$h_userlink: $h_comment $h_imagelink $h_dellink
"; } - private function build_postbox($image_id) { + protected function build_postbox($image_id) { $i_image_id = int_escape($image_id); return "