# HG changeset patch # User Dan # Date 1261186660 0 # Node ID 1cbefc789a467aad2771a7d370483e41e2c37796 # Parent 93c01ea4366b385fb6597fb6315d1d50b4ce8413 Improved 1.1.6/1.1.7 compatibility diff -r 93c01ea4366b -r 1cbefc789a46 plugins/Newsboy.php --- a/plugins/Newsboy.php Tue May 05 22:35:52 2009 +0000 +++ b/plugins/Newsboy.php Sat Dec 19 01:37:40 2009 +0000 @@ -715,7 +715,8 @@ $time = mktime($hour, $minute, $second, $month, $day, $year); } - if ( isset($paths->pages[ $paths->nslist['NewsBoy'] . $time ]) && $paths->pages[ $paths->nslist['NewsBoy'] . $time ] != $paths->pages[ $paths->nslist['NewsBoy'] . $_POST['page_id'] ] ) + $time_changed = $time !== intval($_POST['page_id']); + if ( isPage($paths->nslist['NewsBoy'] . $time) && $time_changed ) // $paths->pages[ $paths->nslist['NewsBoy'] . $time ] != $paths->pages[ $paths->nslist['NewsBoy'] . $_POST['page_id'] ] ) $errors[] = 'You cannot have two news articles with the same publish time.'; if ( count($errors) < 1 ) @@ -760,12 +761,13 @@ echo '