From 87fedb04c71c75c4dc5f972f0d8703c3e9cc201d Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 31 Dec 2009 08:36:06 -0500 Subject: [PATCH] remove realpath check on abspath, messes up on badly-behaved webhosts --- classes/ComicPressMediaHandling.inc | 2 +- comicpress-options.php | 61 +++++++++++++-------------- functions/syndication.php | 64 ++++------------------------- options/generaloptions.php | 44 ++++++++++++-------- 4 files changed, 67 insertions(+), 104 deletions(-) diff --git a/classes/ComicPressMediaHandling.inc b/classes/ComicPressMediaHandling.inc index e5fbb41..9f24ab1 100644 --- a/classes/ComicPressMediaHandling.inc +++ b/classes/ComicPressMediaHandling.inc @@ -83,7 +83,7 @@ class ComicPressMediaHandling { // @codeCoverageIgnoreStart function _abspath() { - return trailingslashit($this->_resolve_regex_path(realpath(ABSPATH))); + return trailingslashit($this->_resolve_regex_path(ABSPATH)); } // @codeCoverageIgnoreEnd diff --git a/comicpress-options.php b/comicpress-options.php index 436483c..5f41e1a 100644 --- a/comicpress-options.php +++ b/comicpress-options.php @@ -15,22 +15,22 @@ function comicpress_admin_page_head() { ?> function comicpress_admin() { global $upload_path, $blogcat; $comicpress_options = get_option('comicpress_options'); ?> - +
- +

-

- function hidemessage() { document.getElementById('message').style.display = 'none'; } - +
@@ -174,12 +175,12 @@ function comicpress_admin() {
- +
- \ No newline at end of file +?> diff --git a/functions/syndication.php b/functions/syndication.php index f8668b4..c1b10cd 100644 --- a/functions/syndication.php +++ b/functions/syndication.php @@ -4,62 +4,9 @@ * Author: Philip M. Hofer (Frumph) * In Testing */ -/* - -function cp_add_to_feed_count_rss() { - $feedcount = get_option('comicpress_feed_count_rss'); - if (!empty($feedcount)) { - $feedcount = $feedcount + 1; - update_option('comicpress_feed_count_rss', $feedcount); - } else { - add_option('comicpress_feed_count_rss', 1, ' ', 'yes'); - } -} - -add_action('do_feed_rss', 'cp_add_to_feed_count_rss',5); - - -function cp_add_to_feed_count_rdf() { - $feedcount = get_option('comicpress_feed_count_rdf'); - if (!empty($feedcount)) { - $feedcount = $feedcount + 1; - update_option('comicpress_feed_count_rdf', $feedcount); - } else { - add_option('comicpress_feed_count_rdf', 1, ' ', 'yes'); - } -} - -add_action('do_feed_rdf', 'cp_add_to_feed_count_rdf',5); - - -function cp_add_to_feed_count_atom() { - $feedcount = get_option('comicpress_feed_count_atom'); - if (!empty($feedcount)) { - $feedcount = $feedcount + 1; - update_option('comicpress_feed_count_atom', $feedcount); - } else { - add_option('comicpress_feed_count_atom', 1, ' ', 'yes'); - } -} - -add_action('do_feed_atom', 'cp_add_to_feed_count_atom',5); - -function cp_add_to_feed_count_rss2() { - $feedcount = get_option('comicpress_feed_count_rss2'); - if (!empty($feedcount)) { - $feedcount = $feedcount + 1; - update_option('comicpress_feed_count_rss2', $feedcount); - } else { - add_option('comicpress_feed_count_rss2', 1, ' ', 'yes'); - } -} - -add_action('do_feed_rss2', 'cp_add_to_feed_count_rss2',5); -*/ /** * Add the number of post comments to the title of the RSS feed items. - * TODO Make this togglable via options. * @param string $title The title of the post. * @return string The filtered title of the post. */ @@ -86,5 +33,12 @@ function comicpress_export_wp() { remove_filter('the_title_rss', 'comicpress_the_title_rss'); } -add_filter('the_title_rss', 'comicpress_the_title_rss'); -add_action('export_wp', 'comicpress_export_wp'); +function comicpress_init_rss() { + $comicpress_options = comicpress_load_options(); + if ($comicpress_options['disable_rss_comments_count']) { + add_filter('the_title_rss', 'comicpress_the_title_rss'); + add_action('export_wp', 'comicpress_export_wp'); + } +} + +add_action('init', 'comicpress_init_rss'); diff --git a/options/generaloptions.php b/options/generaloptions.php index 3e33812..ef23c8c 100644 --- a/options/generaloptions.php +++ b/options/generaloptions.php @@ -2,7 +2,7 @@
- +
@@ -41,14 +41,23 @@ - + + + + + +
- /> + />
+ /> + + +
- + @@ -82,34 +91,34 @@ - + ?> -
- + + - + images/nav/ and place your image files inside of it and create a navstyle.css file to determine the style of your navigation display.','comicpress'); ?>
- + @@ -133,9 +142,9 @@ - +
- + @@ -152,7 +161,7 @@
- + @@ -178,7 +187,7 @@
- +
@@ -190,8 +199,7 @@
- + - + - \ No newline at end of file