Changeset: 81853131ccbc https://sourceforge.net/p/mrbs/hg-code/ci/81853131ccbcaadb26bcf8e1ed590c008c75a38d Author: Campbell Morrison <cimorri...@hg.code.sf.net> Date: Tue Mar 28 17:33:23 2017 +0100 Log message:
Merge with default diffstat: web/edit_entry_handler.php | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diffs (50 lines): diff -r 210008845822 -r 81853131ccbc web/edit_entry_handler.php --- a/web/edit_entry_handler.php Tue Mar 28 16:21:02 2017 +0100 +++ b/web/edit_entry_handler.php Tue Mar 28 17:33:23 2017 +0100 @@ -575,26 +575,34 @@ // (2) Avoid an endless loop. It shouldn't happen, but just in case ... // (3) If you've come from search, you probably don't want to go back there (and if you did we'd // have to preserve the search parameter in the query string) -$returl_base = explode('?', basename($returl)); -if (empty($returl) || ($returl_base[0] == "edit_entry.php") || ($returl_base[0] == "edit_entry_handler.php") - || ($returl_base[0] == "search.php")) +if (isset($returl) && ($returl !== '')) +{ + $returl = parse_url($returl, PHP_URL_PATH); + if ($returl !== false) + { + $returl = explode('/', $returl); + $returl = end($returl); + } +} + +if (empty($returl) || + in_array($returl, array('edit_entry.php', + 'edit_entry_handler.php', + 'search.php'))) { switch ($default_view) { - case "month": - $returl = "month.php"; + case 'month': + $returl = 'month.php'; break; - case "week": - $returl = "week.php"; + case 'week': + $returl = 'week.php'; break; default: - $returl = "day.php"; + $returl = 'day.php'; + break; } } -else -{ - $returl = $returl_base[0]; -} // If we haven't been given a sensible date then get out of here and don't try and make a booking ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mrbs-commits mailing list Mrbs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mrbs-commits