diff --git a/TracyDebugger.module.php b/TracyDebugger.module.php index 16f3469..12a82a2 100644 --- a/TracyDebugger.module.php +++ b/TracyDebugger.module.php @@ -27,7 +27,7 @@ public static function getModuleInfo() { 'summary' => __('Tracy debugger from Nette with many PW specific custom tools.', __FILE__), 'author' => 'Adrian Jones', 'href' => 'https://processwire.com/talk/forum/58-tracy-debugger/', - 'version' => '4.26.20', + 'version' => '4.26.21', 'autoload' => 100000, // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first 'singular' => true, 'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4', diff --git a/panels/Adminer/plugins/AdminerProcessWireLogin.php b/panels/Adminer/plugins/AdminerProcessWireLogin.php index 6236985..1eeba17 100644 --- a/panels/Adminer/plugins/AdminerProcessWireLogin.php +++ b/panels/Adminer/plugins/AdminerProcessWireLogin.php @@ -139,17 +139,27 @@ public function selectVal(&$val, $link, $field, $original) { if(wire('modules')->isInstalled('PagePaths')) { $label[] = 'url'; } - $name = wire('pages')->getRaw('id='.$val, $label); - if($name) { - $name = (isset($name['title']) ? $name['title'] : $name['name']) . (isset($name['url']) ? ' ('.$name['url'].')' : ''); - $val = '<a href="'.$this->pwAdminUrl.'page/edit/?id='.$val.'" target="_parent" title="'.$name.'">'.$val.'</a>'; + if(method_exists(wire('pages'), 'getRaw')) { + $name = wire('pages')->getRaw('id='.$val, $label); + if($name) { + $name = (isset($name['title']) ? $name['title'] : $name['name']) . (isset($name['url']) ? ' ('.$name['url'].')' : ''); + $val = '<a href="'.$this->pwAdminUrl.'page/edit/?id='.$val.'" target="_parent" title="'.$name.'">'.$val.'</a>'; + } + } + else { + $val = '<a href="'.$this->pwAdminUrl.'page/edit/?id='.$val.'" target="_parent">'.$val.'</a>'; } } } elseif(in_array($field['field'], array('uid', 'user_id', 'created_users_id', 'modified_users_id', 'user_created', 'user_updated'))) { - $name = wire('pages')->getRaw('id='.$val, 'name'); - if($name) { - $val = '<a href="'.$this->pwAdminUrl.'access/users/edit/?id='.$val.'" target="_parent" title="'.$name.'">'.$val.'</a>'; + if(method_exists(wire('pages'), 'getRaw')) { + $name = wire('pages')->getRaw('id='.$val, 'name'); + if($name) { + $val = '<a href="'.$this->pwAdminUrl.'access/users/edit/?id='.$val.'" target="_parent" title="'.$name.'">'.$val.'</a>'; + } + } + else { + $val = '<a href="'.$this->pwAdminUrl.'access/users/edit/?id='.$val.'" target="_parent">'.$val.'</a>'; } } }