diff options
author | Michael Scherer <misc@zarb.org> | 2011-04-19 12:53:36 +0200 |
---|---|---|
committer | Michael Scherer <misc@zarb.org> | 2011-04-19 12:53:36 +0200 |
commit | 1bac695a72e263a4bd71d1d8079e06bb227c1077 (patch) | |
tree | 7246e2206346fb635a9bb69fac942ead2d9d80b7 /phpBB/includes/functions_posting.php | |
parent | b85c3b967a7f6fa061439061076695613622960c (diff) | |
download | forums-1bac695a72e263a4bd71d1d8079e06bb227c1077.tar forums-1bac695a72e263a4bd71d1d8079e06bb227c1077.tar.gz forums-1bac695a72e263a4bd71d1d8079e06bb227c1077.tar.bz2 forums-1bac695a72e263a4bd71d1d8079e06bb227c1077.tar.xz forums-1bac695a72e263a4bd71d1d8079e06bb227c1077.zip |
revert previous commit, as phpbb-seo is incompatible with phpbb license
the commit is still in git, and can be reserected with a branch, but
having it on HEAD make forum deployment more difficult
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 3fbd812a5d..6fd87db663 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1319,18 +1319,13 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $messenger->to($addr['email'], $addr['name']); $messenger->im($addr['jabber'], $addr['name']); - // www.phpBB-SEO.com SEO TOOLKIT BEGIN - global $phpbb_seo; - $phpbb_seo->set_url(htmlspecialchars_decode($forum_name), $forum_id, 'forum'); - $phpbb_seo->prepare_iurl(array('topic_id' => $topic_id, 'topic_title' => htmlspecialchars_decode($topic_title)), 'topic', $phpbb_seo->seo_url['forum'][$forum_id]); $messenger->assign_vars(array( 'USERNAME' => htmlspecialchars_decode($addr['name']), 'TOPIC_TITLE' => htmlspecialchars_decode($topic_title), 'FORUM_NAME' => htmlspecialchars_decode($forum_name), - 'U_FORUM' => !empty($phpbb_seo->seo_opt['url_rewrite']) ? $phpbb_seo->drop_sid(append_sid("{$phpbb_root_path}viewforum.$phpEx?f=$forum_id")) : generate_board_url() . "/viewforum.$phpEx?f=$forum_id", - 'U_TOPIC' => !empty($phpbb_seo->seo_opt['url_rewrite']) ? $phpbb_seo->drop_sid(append_sid("{$phpbb_root_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id")) : generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id", - // www.phpBB-SEO.com SEO TOOLKIT END + 'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id", + 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id", 'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?uid={$addr['user_id']}&f=$forum_id&t=$topic_id&unwatch=topic", 'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?uid={$addr['user_id']}&f=$forum_id&unwatch=forum", @@ -1633,9 +1628,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true) { global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path; - // www.phpBB-SEO.com SEO TOOLKIT BEGIN - global $phpbb_seo; - // www.phpBB-SEO.com SEO TOOLKIT END + // We do not handle erasing posts here if ($mode == 'delete') { @@ -1823,11 +1816,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0, 'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0, ); - // www.phpBB-SEO.com SEO TOOLKIT BEGIN - if (!empty($phpbb_seo->seo_opt['sql_rewrite'])) { - $sql_data[TOPICS_TABLE]['sql'] += array('topic_url' => isset($data['topic_url']) ? $data['topic_url'] : ''); - } - // www.phpBB-SEO.com SEO TOOLKIT END + if (isset($poll['poll_options']) && !empty($poll['poll_options'])) { $poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time; @@ -1913,11 +1902,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0), ); - // www.phpBB-SEO.com SEO TOOLKIT BEGIN - if (!empty($phpbb_seo->seo_opt['sql_rewrite'])) { - $sql_data[TOPICS_TABLE]['sql'] += array('topic_url' => isset($data['topic_url']) ? $data['topic_url'] : ''); - } - // www.phpBB-SEO.com SEO TOOLKIT END + // Correctly set back the topic replies and forum posts... only if the topic was approved before and now gets disapproved if (!$post_approval && $data['topic_approved']) { @@ -2619,12 +2604,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u { $params .= '&t=' . $data['topic_id']; } - // www.phpBB-SEO.com SEO TOOLKIT BEGIN - $phpbb_seo->set_url($data['forum_name'], $data['forum_id'], 'forum'); - if ( $params ) { - $phpbb_seo->prepare_iurl($data, 'topic', $topic_type == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$data['forum_id']]); - } - // www.phpBB-SEO.com SEO TOOLKIT END + $url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx"; $url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor; |