diff --git a/library/ZendAfi/Controller/Plugin/InspectorGadget.php b/library/ZendAfi/Controller/Plugin/InspectorGadget.php index 3f62960ec649c7c73623ff114b34d3d1d792c499..62eaf8fb768caa3df26238ef67eac6025b9298ad 100644 --- a/library/ZendAfi/Controller/Plugin/InspectorGadget.php +++ b/library/ZendAfi/Controller/Plugin/InspectorGadget.php @@ -24,8 +24,8 @@ class ZendAfi_Controller_Plugin_InspectorGadget extends Zend_Controller_Plugin_A protected $_calls = []; public function preDispatch(Zend_Controller_Request_Abstract $request) { - /*if (!$request->getParam('inspector_gadget', false)) - return;*/ + if (!$request->getParam('inspector_gadget', false)) + return; $this->beEnabled(); Class_WebService_SIGB_AbstractService::setLogger($this); @@ -43,7 +43,7 @@ class ZendAfi_Controller_Plugin_InspectorGadget extends Zend_Controller_Plugin_A $html = '<ul>'; foreach($this->_calls as $call) { - $html .= sprintf('<li>%s, %s, %s</li>', + $html .= sprintf('<li><ul><li>%s</li>, <li>%s</li>, <li><textarea>%s</textarea></li></ul></li>', $call->request, $call->response_code, $call->response_body); } diff --git a/library/ZendAfi/View/Helper/AbsoluteUrl.php b/library/ZendAfi/View/Helper/AbsoluteUrl.php index 57d88de467b4ca46bab1564bf911113cf9a2cba3..eb75324708e0b82dc50a9d02cd7db58b38608f5a 100644 --- a/library/ZendAfi/View/Helper/AbsoluteUrl.php +++ b/library/ZendAfi/View/Helper/AbsoluteUrl.php @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with AFI-OPAC 2.0; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class ZendAfi_View_Helper_AbsoluteUrl extends Zend_View_Helper_HtmlElement { protected static $_do_not_add_base_url; @@ -26,10 +26,14 @@ class ZendAfi_View_Helper_AbsoluteUrl extends Zend_View_Helper_HtmlElement { } public function absoluteUrl($url_array_or_string = [], $name = null, $reset = false, $encode = true) { - $url = is_string($url_array_or_string) - ? $url_array_or_string - : $this->view->url($url_array_or_string, $name, $reset, $encode); - + if ($url = is_string($url_array_or_string)) + $url=$url_array_or_string; + else { + $this->_request = Zend_Controller_Front::getInstance()->getRequest(); + if ($this->_request->getParam('inspector_gadget')) + $url_array_or_string['inspector_gadget'] = '1'; + $url=$this->view->url($url_array_or_string, $name, $reset, $encode); + } if (preg_match('/http[s]?:\/\//', $url)) return $url;