Codice: Seleziona tutto
'post_approved' => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false,
);
Codice: Seleziona tutto
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (!empty($phpbb_seo->seo_opt['sql_rewrite'])) {
if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)) {
$phpbb_seo->set_url($post_data['forum_name'], $forum_id, $phpbb_seo->seo_static['forum']);
$_parent = $post_data['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$forum_id];
$_t = !empty($post_data['topic_id']) ? max(0, (int) $post_data['topic_id'] ) : 0;
$_url = $phpbb_seo->url_can_edit($forum_id) ? utf8_normalize_nfc(request_var('url', '', true)) : ( isset($post_data['topic_url']) ? $post_data['topic_url'] : '' );
if (!$phpbb_seo->check_url('topic', $_url, $_parent)) {
if (!empty($_url)) {
// Here we get rid of the seo delim (-t) and put it back even in simple mod
// to be able to handle all cases at once
$_url = preg_replace('`' . $phpbb_seo->seo_delim['topic'] . '$`i', '', $_url);
$_title = $phpbb_seo->get_url_info('topic', $_url . $phpbb_seo->seo_delim['topic'] . $_t);
} else {
$_title = $phpbb_seo->modrtype > 2 ? censor_text($post_data['post_subject']) : '';
}
unset($phpbb_seo->seo_url['topic'][$_t]);
$_url = $phpbb_seo->get_url_info('topic', $phpbb_seo->prepare_url( 'topic', $_title, $_t, $_parent , (( empty($_title) || ($_title == $phpbb_seo->seo_static['topic']) ) ? true : false)), 'url');
unset($phpbb_seo->seo_url['topic'][$_t]);
}
$post_data['topic_url'] = $_url;
}
}
// www.phpBB-SEO.com SEO TOOLKIT END