upload path

This commit is contained in:
John Bintz 2010-01-24 13:38:07 -05:00
parent 9bfedbe0c9
commit cc1044392d
3 changed files with 7 additions and 2 deletions

View File

@ -120,6 +120,8 @@ class ComicPressBackendFilesystemFactory {
function _replace_type($post, $type) { return $type; }
function _replace_upload_path($post, $type) { return get_option('upload_path'); }
function _replace_type_folder($post, $type) {
$comicpress = ComicPress::get_instance();

View File

@ -1,9 +1,9 @@
<h3><?php _e('URL Backend Configuration', 'comicpress') ?></h3>
<h3><?php _e('Filesystem Backend Configuration', 'comicpress') ?></h3>
<div id="comicpress-url-backend-configuration" class="comicpress-holder">
<table width="100%">
<tr>
<th scope="row">
<?php _e('URL Pattern:', 'comicpress') ?>
<?php _e('Filesystem Pattern:', 'comicpress') ?>
</th>
<td>
<input style="font-size: 1.5em; width: 100%" type="text" name="cp[backend_options][filesystem][search_pattern]" value="<?php echo $pattern ?>" />

View File

@ -117,6 +117,7 @@ class ComicPressBackendFilesystemFactoryTest extends PHPUnit_Framework_TestCase
),
2
),
array('%wordpress%/%upload-path%/comic/%date-Y%/%date-Y-m-d%*.jpg', array('/wordpress/upload/comic/2009/2009-01-01*.jpg')),
);
}
@ -140,6 +141,8 @@ class ComicPressBackendFilesystemFactoryTest extends PHPUnit_Framework_TestCase
wp_set_post_categories(1, array(2));
wp_set_post_categories(2, array(4));
update_option('upload_path', 'upload');
$fs->search_string = $string;
$comicpress = ComicPress::get_instance(true);