本文整理汇总了PHP中XoopsModule::loadInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsModule::loadInfo方法的具体用法?PHP XoopsModule::loadInfo怎么用?PHP XoopsModule::loadInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsModule
的用法示例。
在下文中一共展示了XoopsModule::loadInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: module_uninstall_now
function module_uninstall_now()
{
global $xoopsSecurity, $xoopsConfig;
$mod = rmc_server_var($_POST, 'module', '');
if (!$xoopsSecurity->check()) {
redirectMsg('modules.php', __('Sorry, this operation could not be completed!', 'rmcommon'), 1);
die;
}
$module_handler = xoops_gethandler('module');
if (!$module_handler->getByDirname($mod)) {
redirectMsg('modules.php', sprintf(__('Module %s is not installed yet!', 'rmcommon'), $mod), 1);
die;
}
$file = XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/modulesadmin.php';
if (file_exists($file)) {
include_once $file;
} else {
include_once str_replace($xoopsConfig['language'], 'english', $file);
}
include_once XOOPS_ROOT_PATH . '/modules/system/admin/modulesadmin/modulesadmin.php';
RMEvents::get()->run_event('rmcommon.uninstalling.module', $mod);
$module_log = xoops_module_uninstall($mod);
$module_log = RMEvents::get()->run_event('rmcommon.module.uninstalled', $module_log, $mod);
RMFunctions::create_toolbar();
RMTemplate::get()->add_style('modules.css', 'rmcommon');
xoops_cp_header();
$module = new XoopsModule();
$module->loadInfo($mod, false);
$log_title = sprintf(__('Uninstall log for %s', 'rmcommon'), $module ? $module->getInfo('name') : $mod);
$action = rmc_server_var($_POST, 'action', '');
include RMTemplate::get()->get_template('rmc_mod_log.php', 'module', 'rmcommon');
xoops_cp_footer();
}
示例2: module_uninstall_now
function module_uninstall_now()
{
global $xoopsSecurity, $xoopsConfig, $rmTpl, $xoopsDB;
$dir = RMHttpRequest::post('module', 'string', '');
if (!$xoopsSecurity->check()) {
redirectMsg('modules.php', __('Sorry, this operation could not be completed!', 'rmcommon'), 1);
die;
}
$module_handler = xoops_gethandler('module');
if (!($mod = $module_handler->getByDirname($dir))) {
redirectMsg('modules.php', sprintf(__('Module %s is not installed yet!', 'rmcommon'), $mod), 1);
die;
}
$file = XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/modulesadmin.php';
if (file_exists($file)) {
include_once $file;
} else {
include_once str_replace($xoopsConfig['language'], 'english', $file);
}
include_once XOOPS_ROOT_PATH . '/modules/system/admin/modulesadmin/modulesadmin.php';
RMEvents::get()->run_event('rmcommon.uninstalling.module', $mod);
$module_log = xoops_module_uninstall($dir);
// Remove comments
$sql = "DELETE FROM " . $xoopsDB->prefix("mod_rmcommon_comments") . " WHERE id_obj='{$dir}'";
if ($xoopsDB->queryF($sql)) {
$module_log .= '<br><span class="text-success"><span class="fa fa-check"></span> Comments deleted successfully!</span>';
} else {
$module_log .= '<br><span class="text-danger"><span class="fa fa-exclamation-triangle"></span> Comments could not be deleted: ' . $xoopsDB->error() . '</span>';
}
// Remove notifications
$sql = "DELETE FROM " . $xoopsDB->prefix("mod_rmcommon_notifications") . " WHERE element='{$dir}' AND `type`='module'";
if ($xoopsDB->queryF($sql)) {
$module_log .= '<br><span class="text-success"><span class="fa fa-check"></span> Notifications deleted successfully!</span>';
} else {
$module_log .= '<br><span class="text-danger"><span class="fa fa-exclamation-triangle"></span> Notifications could not be deleted: ' . $xoopsDB->error() . '</span>';
}
$module_log = RMEvents::get()->run_event('rmcommon.module.uninstalled', $module_log, $mod);
//RMFunctions::create_toolbar();
RMTemplate::get()->add_style('modules.min.css', 'rmcommon');
RMBreadCrumb::get()->add_crumb(__('Modules Management', 'rmcommon'), 'modules.php');
RMBreadCrumb::get()->add_crumb(sprintf(__('%s install log', 'rmcommon'), $mod->getVar('name')));
$rmTpl->assign('xoops_pagetitle', sprintf(__('%s install log', 'rmcommon'), $mod->getVar('name')));
xoops_cp_header();
$module = new XoopsModule();
$module->loadInfo($mod, false);
$log_title = sprintf(__('Uninstall log for %s', 'rmcommon'), $module ? $module->getInfo('name') : $mod);
$action = rmc_server_var($_POST, 'action', '');
include RMTemplate::get()->get_template('rmc-modules-log.php', 'module', 'rmcommon');
xoops_cp_footer();
}