* GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) */ namespace Panel; class Cert extends \Panel { function beforeRoute($f3) { parent::beforeRoute($f3); if ($f3->exists('SESSION.domain')) { /* set base path for vhost links */ if ($f3->get('NAV.mapping') == 'cert') { $f3->set('NAV.certbase', preg_replace('/\/$/', '', $f3->get('BASE'))); } elseif ($f3->get('NAV.mapping') == 'vpanel') { $f3->set('NAV.certbase', preg_replace('/\/$/', '', $f3->get('BASE') . '/Certs/' . $f3->get('SESSION.cert'))); } } } }