set structure properly

This commit is contained in:
John Bintz 2009-11-21 14:38:05 -05:00
parent c27558a15a
commit 9053f943b2
2 changed files with 6 additions and 4 deletions

View File

@ -30,9 +30,11 @@ class ComicPressStoryline {
* Set the global storyline as a flattened storyline. * Set the global storyline as a flattened storyline.
*/ */
function set_flattened_storyline($storyline) { function set_flattened_storyline($storyline) {
$comicpress = &ComicPress::get_instance(); if (class_exists('ComicPress')) {
$comicpress->comicpress_options['storyline_order'] = $storyline; $comicpress = &ComicPress::get_instance();
$comicpress->save(); $comicpress->comicpress_options['storyline_order'] = $storyline;
$comicpress->save();
}
} }
/** /**

View File

@ -239,7 +239,7 @@ class WidgetComicPressGraphicalStorylineNavigation extends WP_Widget {
if (is_home() || is_single()) { if (is_home() || is_single()) {
$storyline = new ComicPressStoryline(); $storyline = new ComicPressStoryline();
$storyline->create_structure(get_option('comicpress-storyline-category-order')); $storyline->set_order_via_flattened_storyline(get_option('comicpress-storyline-category-order'));
$navigation = new ComicPressNavigation(); $navigation = new ComicPressNavigation();
$navigation->init($storyline); $navigation->init($storyline);