本文整理匯總了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'] . '"}');
}