show other folder counts

This commit is contained in:
John Bintz 2009-08-24 21:03:11 -04:00
parent 0fdfae5d37
commit 9a955ad232
2 changed files with 11 additions and 2 deletions

View File

@ -2092,7 +2092,9 @@ function cpm_show_comicpress_details() {
<?php foreach (array('archive' => __('Archive folder:', 'comicpress-manager'), <?php foreach (array('archive' => __('Archive folder:', 'comicpress-manager'),
'rss' => __('RSS feed folder:', 'comicpress-manager')) 'rss' => __('RSS feed folder:', 'comicpress-manager'))
as $type => $title) { ?> as $type => $title) {
$realpath = realpath(CPM_DOCUMENT_ROOT . '/' . $cpm_config->properties["${type}_comic_folder"] . $subdir_path);
?>
<li><strong><?php echo $title ?></strong> <?php echo $cpm_config->properties["${type}_comic_folder"] . $subdir_path; ?> <li><strong><?php echo $title ?></strong> <?php echo $cpm_config->properties["${type}_comic_folder"] . $subdir_path; ?>
<?php if ( <?php if (
($cpm_config->get_scale_method() != CPM_SCALE_NONE) && ($cpm_config->get_scale_method() != CPM_SCALE_NONE) &&
@ -2111,6 +2113,13 @@ function cpm_show_comicpress_details() {
?> ?>
(<em style="cursor: help; text-decoration: underline" title="<?php echo implode(", ", $reasons) ?>">not generating</em>) (<em style="cursor: help; text-decoration: underline" title="<?php echo implode(", ", $reasons) ?>">not generating</em>)
<?php } ?> <?php } ?>
<?php
if ($realpath !== false) {
printf(__("(<em>%d files in folder</em>)", 'comicpress-manager'), count(glob($realpath . "/*")));
} else {
_e('(<em>folder not found</em>)', 'comicpress-manager');
}
?>
</li> </li>
<?php } ?> <?php } ?>

View File

@ -290,7 +290,7 @@ function cpm_get_subcomic_directory() {
$result = get_option('comicpress-manager-manage-subcomic'); $result = get_option('comicpress-manager-manage-subcomic');
if (!empty($result)) { if (!empty($result)) {
if ($result != $cpm_config->properties['comiccat']) { if ($result != $cpm_config->properties['comiccat']) {
if (($category= get_category($result)) !== false) { if (($category = get_category($result)) !== false) {
return $category->slug; return $category->slug;
} }
} }