mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-07-01 13:55:01 -04:00
removed lowercase y mask, test complete
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ function ceo_transform_date_string($string, $replacements) {
|
||||
if (!is_string($string)) { return false; }
|
||||
|
||||
$transformed_string = $string;
|
||||
foreach (array("Y", "m", "d", "y") as $required_key) {
|
||||
foreach (array("Y", "m", "d") as $required_key) {
|
||||
if (!isset($replacements[$required_key])) { return false; }
|
||||
$transformed_string = preg_replace('#(?<![\\\])' . $required_key . '#', $replacements[$required_key], $transformed_string);
|
||||
}
|
||||
@@ -26,7 +26,7 @@ function ceo_transform_date_string($string, $replacements) {
|
||||
function ceo_breakdown_comic_filename($filename, $import_date_format, $import_filename_mask) {
|
||||
|
||||
foreach (array('[0-9]{4}', '[0-9]{2}') as $year_pattern) {
|
||||
$new_pattern = ceo_transform_date_string($import_date_format, array("Y" => $year_pattern, "m" => '[0-9]{2}', "d" => '[0-9]{2}', "y" => '[0-9]{2}'));
|
||||
$new_pattern = ceo_transform_date_string($import_date_format, array("Y" => $year_pattern, "m" => '[0-9]{2}', "d" => '[0-9]{2}'));
|
||||
if (@preg_match("#^(${new_pattern})(.*)\.[^\.]+$#", $filename, $matches) > 0) {
|
||||
list($all, $date, $title) = $matches;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user