本文整理汇总了PHP中Help::saveEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP Help::saveEdit方法的具体用法?PHP Help::saveEdit怎么用?PHP Help::saveEdit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Help
的用法示例。
在下文中一共展示了Help::saveEdit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
} else {
die('{"status": "0", "data": "' . $lang['dashboard_err_19'] . '"}');
}
} elseif ($_POST['setting_type'] == 'help') {
$faq = isset($_POST['faq']) ? $_POST['faq'] : "";
//load parsedown markup to html converter
$ParsedownExtra = new ParsedownExtra();
$ParsedownExtra->setBreaksEnabled(true);
$faq_raw = $ParsedownExtra->text($faq);
//load and use html purifier for the readme notes.
$faq_html = Format::htmlSafeOutput($faq_raw);
//purify the readme note html
$_POST['faq_md'] = $faq;
$_POST['faq_html'] = $faq_html;
$help = new Help();
if ($help->saveEdit()) {
exit('{"status": "1", "data": "' . $lang['dashboard_msg_10'] . '", "callback_function": "setting_saved"}');
} else {
die('{"status": "0", "data": "' . $lang['dashboard_err_19'] . '"}');
}
} else {
$dashboard = new Dashboard();
if ($dashboard->saveSiteSetting()) {
exit('{"status": "1", "data": "' . $lang['dashboard_msg_10'] . '", "callback_function": "setting_saved"}');
} else {
die('{"status": "0", "data": "' . $lang['dashboard_err_19'] . '"}');
}
}
} else {
die('{"status": "0", "data": "' . $lang['dashboard_err_19'] . '"}');
}