本身迅睿有查询标题是否重复的功能。不需要单独二次开发,本教程主要针对部分功能二次开发和新应用。
\Phpcmf\Hooks::on('module_content_before', function ($data) {
$rt = \Phpcmf\Service::M()->table_site(MOD_DIR, SITE_ID)->where('title', $data[1]['title'])->getRow();
if($rt) dr_exit_msg(0, '...
迅睿开发实践,内容标题查重的钩子实现
本身迅睿有查询标题是否重复的功能。不需要单独二次开发,本教程主要针对部分功能二次开发和新应用。
\Phpcmf\Hooks::on('module_content_before', function ($data) {
$rt = \Phpcmf\Service::M()->table_site(MOD_DIR, SITE_ID)->where('title', $data[1]['title'])->getRow();
if($rt) dr_exit_msg(0, '...