From 3c089c1b117068e8b1da0fff8b4b917d73c4e7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Tue, 23 Aug 2016 16:10:26 +0200 Subject: [PATCH] [core] keep compatibility with nameBridge and nameFormat naming scheme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/index.php b/index.php index 7ce9d768..157c6410 100644 --- a/index.php +++ b/index.php @@ -96,8 +96,20 @@ try{ if($action === 'display' && !empty($bridge)){ unset($_REQUEST['action']); unset($_REQUEST['bridge']); + // DEPRECATED: 'nameBridge' scheme is replaced by 'name' in bridge parameter values + // this is to keep compatibility until futher complete removal + if(($pos=strpos($bridge,'Bridge'))===(strlen($bridge)-strlen('Bridge'))){ + $bridge=substr($bridge,0,$pos); + } + $format = $_REQUEST['format']; unset($_REQUEST['format']); + // DEPRECATED: 'nameFormat' scheme is replaced by 'name' in format parameter values + // this is to keep compatibility until futher complete removal + if(($pos=strpos($format,'Format'))===(strlen($format)-strlen('Format'))){ + $format=substr($format,0,$pos); + } + // whitelist control if(!Bridge::isWhitelisted($whitelist_selection, $bridge)) {