| Server IP : 195.134.90.114 / Your IP : 216.73.217.33 Web Server : Apache/2.4.58 System : Linux nepub 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/public_html/plugins/generic/editorialBio/ |
Upload File : |
<?php
/**
* @file plugins/generic/editorialBio/EditorialBioHandler.inc.php
*
* Copyright (c) University of Pittsburgh
* Distributed under the GNU GPL v2 or later. For full terms see the LICENSE file.
*
* @ingroup plugins_generic_editorialBio
* @brief Handles controller requests for EditorialBio plugin.
*/
import('classes.handler.Handler');
class EditorialBioHandler extends Handler {
/**
* Handle editorialTeamBio action
* @param $args array Arguments array.
* @param $request PKPRequest Request object.
*/
function editorialTeamBio($args, $request) {
if (preg_match('/^[[:digit:]]+$/', $args[0])) {
$userId = (int)$args[0];
} else {
$userId = 0;
}
$plugin = PluginRegistry::getPlugin('generic', 'editorialbioplugin');
$editor = $plugin->isEditorWithBio($userId);
if ($editor) {
// This user is an editor and has a biography
$templateMgr = TemplateManager::getManager($request);
$templateMgr->assign('editor', $editor);
// fetch the template across versions
$tplName = 'frontend/pages/aboutEditorialTeamBio.tpl';
if (method_exists($plugin, 'getTemplateResource')) {
// 3.1.2 and after
$tpl = $plugin->getTemplateResource($tplName);
} else {
// 3.1.1 and before
$tpl = $plugin->getTemplatePath() . $tplName;
}
$templateMgr->display($tpl);
} else {
// Don't trust other users biographies
$dispatcher = $request->getDispatcher();
$dispatcher->handle404();
}
}
}