Merge branch 'master' of git@github.com:johnbintz/comicpress-2.8

This commit is contained in:
John Bintz 2009-12-17 21:17:04 -05:00
commit e9dc0e1bf7
2 changed files with 43 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<?php
function comicpress_notice_debug() {
global $current_user, $comiccat, $blogcat, $comic_folder;
global $current_user, $comiccat, $blogcat, $comic_folder, $wpdb, $category_tree;
if( substr( $_SERVER[ 'PHP_SELF' ], -19 ) != '/wp-admin/index.php' )
return;
@ -18,16 +18,44 @@ function comicpress_notice_debug() {
__(' It is necessary to have 2 more categories in addition to the uncategorized category, a Blog and Comic primary categories. These two additional categories will be the root categories that seperate the difference between the comic and blog posts. When you post a new comic you will be posting it into the comic category or heirarchal children of the comic category. When posting a new blog post you need to set it into the blog category or child of the blog category. Uncategorized will act as a blog post category (do not rename uncategorized). You can configure the categories to set as the primary blog and comic category from within the comicpress-config.php file or use ComicPress Manager - ComicPress Config','comicpress');
}
// Check Comics Folder
if (!is_dir(ABSPATH . '/' . $comic_folder)) {
$error[] = array('header', __('Comics Folder is not configured and is unable to be found.','comicpress'));
$error[] = __('ComicPress stores the files it uses inside a specific directory and that directory is set within the comicpress-config.php or you can configure it from within ComicPress Manager. When this error is present it means that the theme is unable to find the appropriate directory to read the comics from.','comicpress');
if (empty($error)) {
// Check Comics Folder
if (!is_dir(ABSPATH . '/' . $comic_folder)) {
$error[] = array('header', __('Comics Folder is not configured and is unable to be found.','comicpress'));
$error[] = __('ComicPress stores the files it uses inside a specific directory and that directory is set within the comicpress-config.php or you can configure it from within ComicPress Manager. When this error is present it means that the theme is unable to find the appropriate directory to read the comics from.','comicpress');
}
}
// Make sure the ComicPress theme is installed in themes/comicpress
if (ABSPATH . 'wp-content/themes/comicpress' != get_template_directory()) {
$error[] = array('header', __('ComicPress theme is not installed into the correct folder.','comicpress'));
$error[] = __('As of version 2.9, the ComicPress main core theme is required to be installed into the wp-content/themes/comicpress directory. It is currently not installed into that directory.','comicpress');
if (empty($error)) {
// Make sure the ComicPress theme is installed in themes/comicpress
if (ABSPATH . 'wp-content/themes/comicpress' != get_template_directory()) {
$error[] = array('header', __('ComicPress theme is not installed into the correct folder.','comicpress'));
$error[] = __('As of version 2.9, the ComicPress main core theme is required to be installed into the wp-content/themes/comicpress directory. It is currently not installed into that directory.','comicpress');
}
}
if (empty($error)) {
$founderror = FALSE;
$blog_query = '&show_posts=-1&posts_per_page=-1&cat="-'.exclude_comic_categories().'"';
$comic_categories = array();
$founderrorpost = array();
foreach ($category_tree as $node) {
$comic_categories[] = end(explode("/", $node));
}
query_posts($blog_query);
if (have_posts()) {
while (have_posts()) : the_post();
$founderrorpost[] = wp_get_post_categories($post->ID);
if (count(array_intersect($comic_categories, wp_get_post_categories($post->ID))) > 0) {
$founderror = TRUE;
}
endwhile;
}
// if ($founderror) {
$error[] = array('header', __('A post is in both a comic category and blog category.','comicpress'));
$error[] = __('*duel category error message and fix*','comicpress');
// }
}
if (!empty($error)) {
@ -37,6 +65,8 @@ function comicpress_notice_debug() {
ComicPress doesn't seem to be fully installed at this time, check out these messages.<br />
<br />
<?php
var_dump($founderrorpost);
// var_dump($comic_categories);
foreach ($error as $info) {
unset($text);
if (is_array($info)) {

View File

@ -100,7 +100,7 @@ function comicpress_load_options() {
global $comicpress_options;
$comicpress_options = get_option('comicpress_options');
if (empty($comicpress_options)) {
$comicpress_options['comicpress_version'] = '2.9.0.5';
$comicpress_options['comicpress_version'] = '2.9.0.6';
foreach (array(
'disable_comic_frontpage' => false,
'disable_comic_blog_frontpage' => false,
@ -177,7 +177,7 @@ function comicpress_load_options() {
add_option('comicpress_options', $comicpress_options, '', 'yes');
// update_option('comicpress_options', $comicpress_options);
}
$comicpress_options['comicpress_version'] = '2.9.0.5';
$comicpress_options['comicpress_version'] = '2.9.0.6';
update_option('comicpress_options', $comicpress_options);
return $comicpress_options;
}
@ -816,6 +816,7 @@ function comicpress_check_child_file($filename = '') {
return false;
}
/*
function rss_count_comments(){
global $wpdb,$post;
$args = func_get_args();
@ -828,6 +829,7 @@ function rss_count_comments(){
}
add_action('the_title_rss','rss_count_comments');
*/
function comicpress_gnav_display_css() {
global $comicpress_options;