Bladeren bron

fix panel klienta url

Piotr Labudda 6 jaren geleden
bovenliggende
commit
059d61d9e7
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      SE/se-lib/Route/UrlAction/PanelKlientaBiallNet.php

+ 6 - 2
SE/se-lib/Route/UrlAction/PanelKlientaBiallNet.php

@@ -1,16 +1,20 @@
 <?php
 <?php
 
 
 Lib::loadClass('RouteBase');
 Lib::loadClass('RouteBase');
+Lib::loadClass('Request');
 Lib::loadClass('Response');
 Lib::loadClass('Response');
 
 
 class Route_UrlAction_PanelKlientaBiallNet extends RouteBase {
 class Route_UrlAction_PanelKlientaBiallNet extends RouteBase {
 
 
-	static $PANEL_URL = "https://biuro.biall-net.pl/dev-pl/se-projects/panel_biall_net/SE/index.php?_route=UrlAction_ChangeUser&id_admin={id}";
+	static $PANEL_URL = "https://biuro.biall-net.pl/panel/index.php?_route=UrlAction_ChangeUser&id_admin={id}";
+	static $PANEL_DEV_URL = "https://biuro.biall-net.pl/dev-pl/se-projects/panel_biall_net/SE/index.php?_route=UrlAction_ChangeUser&id_admin={id}";
 
 
 	function defaultAction() {
 	function defaultAction() {
 		$id = V::get('id', '', $_GET);
 		$id = V::get('id', '', $_GET);
 		if (!$id) throw new Exception("Missing id");
 		if (!$id) throw new Exception("Missing id");
-		Response::sendRedirect( str_replace('{id}', $id, self::$PANEL_URL) );
+		$devPrefix = 'https://biuro.biall-net.pl/dev-pl';
+		$panelUrl = ($devPrefix === substr(Request::getScriptUri(), 0, strlen($devPrefix))) ? self::$PANEL_DEV_URL : self::$PANEL_URL;
+		Response::sendRedirect( str_replace('{id}', $id, $panelUrl) );
 	}
 	}
 
 
 }
 }