# gettext catalog for 5 web page(s) # Copyright (C) 2014 - 2015 Mageia # This file is distributed under the same license as # the content of the corresponding web page(s). # # Generated by extract2gettext.php # Domain: 5 # # include translation strings from: # en/5/download_index.php # en/5/nav.php # en/5/index.php # # Translators: msgid "" msgstr "" "Project-Id-Version: Mageia\n" "Report-Msgid-Bugs-To: mageia-i18n@mageia.org\n" "POT-Creation-Date: 2015-09-19 19:27:09+0000\n" "PO-Revision-Date: 2015-06-20 04:43+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Urdu (http://www.transifex.com/projects/p/mageia/language/ur/)\n" "Language: ur\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: "/web/en/5/download_index.php +36" msgid "32 bit" msgstr "" #: "/web/en/5/download_index.php +39" msgid "64 bit" msgstr "" #: "/web/en/5/download_index.php +42" msgid "Dualarch" msgstr "" #: "/web/en/5/download_index.php +49" msgid "forthcoming" msgstr "" #: "/web/en/5/download_index.php +67" msgid "Download" msgstr "" #: "/web/en/5/download_index.php +68" msgid "Download %s DVD, CD, LiveCD, network install ISO images." msgstr "" #: "/web/en/5/download_index.php +69" msgid "mageia, %s, linux, free, download, iso, torrent, vm, http, ftp, rsync, bittorrent" msgstr "" #: "/web/en/5/download_index.php +149" msgid "It looks like you have JavaScript disable. Please enable it to have better render. At the end of this page there will be download link for you. But what is written between is important." msgstr "" #: "/web/en/5/download_index.php +155" msgid "Mageia is provided as ISO image files that have to be written to blank CD or DVD discs." msgstr "" #: "/web/en/5/download_index.php +155" msgid "https://wiki.mageia.org/en/Writing_CD_and_DVD_images" msgstr "" #: "/web/en/5/download_index.php +157" msgid "All ISOs can also be launched from a USB drive." msgstr "" #: "/web/en/5/download_index.php +157" msgid "https://wiki.mageia.org/en/Installation_Media#Dump_Mageia_ISO_on_a_USB_flash_drive" msgstr "" #: "/web/en/5/download_index.php +159" msgid "To dump a Mageia installation ISO on a USB stick, you may try one of several tools:" msgstr "" #: "/web/en/5/download_index.php +161" msgid "For Linux, IsoDumper, available inside repo. Or any tools based on dd." msgstr "" #: "/web/en/5/download_index.php +162" msgid "Unetbootin is not supported." msgstr "" #: "/web/en/5/download_index.php +164" msgid "For Windows please have a look on our wiki for your options." msgstr "" #: "/web/en/5/download_index.php +164" msgid "https://wiki.mageia.org/en/Dump_Mageia_ISO_on_a_USB_flash_drive_-_Alternative_tools" msgstr "" #: "/web/en/5/download_index.php +167" msgid "\"Dumping\" an image onto a flash device destroys any prior file-system in the partition; access to any data not destroyed will be lost, and partition capacity will be reduced to the image size. In other words, all prior data on the device is at risk." msgstr "" #: "/web/en/5/download_index.php +170" msgid "If you have UEFI, a procedure is available in the wiki." msgstr "" #: "/web/en/5/download_index.php +170" msgid "http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface" msgstr "" #: "/web/en/5/download_index.php +170" msgid "https://wiki.mageia.org/en/Installing_on_systems_with_UEFI_firmware" msgstr "" #: "/web/en/5/download_index.php +178" msgid "Classical Installation Flavours" msgstr "" #: "/web/en/5/download_index.php +180" msgid "The Classical ISO is the traditional way to install Mageia directly. Take a look at the complete documentation for this installer." msgstr "" #: "/web/en/5/download_index.php +182" msgid "Up to 167 locales are supported:" msgstr "" #: "/web/en/5/download_index.php +184" msgid "and so much more!" msgstr "" #: "/web/en/5/download_index.php +185" msgid "See the comprehensive list" msgstr "" #: "/web/en/5/download_index.php +188" msgid "These ISOs contains Free Software and some proprietary drivers." msgstr "" #: "/web/en/5/download_index.php +189" msgid "You will be asked of which kind of Software you want to install." msgstr "" #: "/web/en/5/download_index.php +190" msgid "The installer includes the capability of adding the online Mageia repositories during the installation, which means you can install even more packages than those available on the ISO." msgstr "" #: "/web/en/5/download_index.php +193" msgid "For 32 and 64bit, size of the ISOs is about %sGB. For the dualarch it's about %sGB." msgstr "" #: "/web/en/5/download_index.php +201" msgid "LiveCDs and LiveDVDs" msgstr "" #: "/web/en/5/download_index.php +203" msgid "Live ISO's let you try %s without installation. You can run Mageia directly from a CD, DVD or USB device, and try it using one of the graphical user interfaces such as GNOME or KDE." msgstr "" #: "/web/en/5/download_index.php +204" msgid "If you are happy with the Mageia experience, you can then install it onto your hard drive from the Live media." msgstr "" #: "/web/en/5/download_index.php +206" msgid "Use LiveCDs and LiveDVDs for fresh new installs ONLY." msgstr "" #: "/web/en/5/download_index.php +207" msgid "DO NOT use these LiveCDs or LiveDVDs to upgrade from the prior Mageia release!" msgstr "" #: "/web/en/5/download_index.php +208" msgid "Use a classical installation and see upgrade guide." msgstr "" #: "/web/en/5/download_index.php +211" msgid "For LiveDVDs, size of the ISOs is about %sGB. For the LiveCDs it's about %sMB." msgstr "" #: "/web/en/5/download_index.php +216" msgid "Wired Network-based Installation CD" msgstr "" #: "/web/en/5/download_index.php +217" msgid "Download quickly and immediately boot into install mode from wired network or a local disk." msgstr "" #: "/web/en/5/download_index.php +218" msgid "Have a look in the wiki to get a list of possibilities." msgstr "" #: "/web/en/5/download_index.php +218" msgid "https://wiki.mageia.org/en/Boot.iso_install" msgstr "" #: "/web/en/5/download_index.php +220" msgid "Size of the ISOs is about 50MB." msgstr "" #: "/web/en/5/download_index.php +225" msgid "Classic Installation" msgstr "" #: "/web/en/5/download_index.php +227" msgid "Live Media" msgstr "" #: "/web/en/5/download_index.php +229" msgid "Network Installation" msgstr "" #: "/web/en/5/download_index.php +233" msgid "The dualarch is not yet available." msgstr "" #: "/web/en/5/download_index.php +234" msgid "LiveCDs and LiveDVDs are not yet available." msgstr "" #: "/web/en/5/download_index.php +235" msgid "Classical Installation flavours is not yet available." msgstr "" #: "/web/en/5/download_index.php +245" msgid "LiveDVDs" msgstr "" #: "/web/en/5/download_index.php +246" msgid "LiveDVDs contain all languages and is available in both 32 and 64bit." msgstr "" #: "/web/en/5/download_index.php +250" msgid "LiveCDs" msgstr "" #: "/web/en/5/download_index.php +251" msgid "LiveCDs contain only English and is available only in 32bit." msgstr "" #: "/web/en/5/download_index.php +252" msgid "Do not use unless you really DON'T NEED any other language than English." msgstr "" #: "/web/en/5/download_index.php +259" msgid "English only (CD)" msgstr "" #: "/web/en/5/download_index.php +264" msgid "Desktop" msgstr "" #: "/web/en/5/download_index.php +267" msgid "GNOME Desktop" msgstr "" #: "/web/en/5/download_index.php +271" msgid "KDE Desktop" msgstr "" #: "/web/en/5/download_index.php +284" msgid "Network installer" msgstr "" #: "/web/en/5/download_index.php +287" msgid "Network installer, Free Software CD" msgstr "" #: "/web/en/5/download_index.php +288" msgid "Contain only free software" msgstr "" #: "/web/en/5/download_index.php +291" msgid "Network installer + nonfree firmware CD" msgstr "" #: "/web/en/5/download_index.php +292" msgid "Contain nonfree drivers needed for some disc controllers, some network cards, etc." msgstr "" #: "/web/en/5/download_index.php +296" msgid "Free Software CD" msgstr "" #: "/web/en/5/download_index.php +298" msgid "Nonfree Firmware CD" msgstr "" #: "/web/en/5/download_index.php +303" msgid "Supported Architecture" msgstr "" #: "/web/en/5/download_index.php +306" msgid "Most new computers support x86-64 (also known as AMD64 and Intel64), but some laptop processors and netbook processors do not support it." msgstr "" #: "/web/en/5/download_index.php +310" msgid "This version runs on all PCs including those that support 64 Bit. If you have more than 3 GB of RAM you should prefer the 64 Bit version though." msgstr "" #: "/web/en/5/download_index.php +316" msgid "The dualarch DVD contains only a minimal list of packages and a lite desktop, %s, to fit on %sGB." msgstr "" #: "/web/en/5/download_index.php +318" msgid "Dual iso size is intended to be small for advanced users, only network proprietary drivers are included." msgstr "" #: "/web/en/5/download_index.php +319" msgid "You will have to add remote nonfree media if you need some more." msgstr "" #: "/web/en/5/download_index.php +320" msgid "Furthermore UEFI is not supported." msgstr "" #: "/web/en/5/download_index.php +322" msgid "It can be used to install either a 32bit system or a 64bit system, the installer defaults to x86_64 when it detects a 64bit capable CPU." msgstr "" #: "/web/en/5/download_index.php +323" msgid "This ISO is generally for advanced users and system administrator for fast deployment of Mageia." msgstr "" #: "/web/en/5/download_index.php +337" msgid "Download Method" msgstr "" #: "/web/en/5/download_index.php +339" msgid "Direct Link" msgstr "" #: "/web/en/5/download_index.php +340" msgid "You will be redirected to a HTTP or FTP mirror." msgstr "" #: "/web/en/5/download_index.php +346" msgid "BitTorrent" msgstr "" #: "/web/en/5/download_index.php +347" msgid "We recommend you to use BitTorrent for downloading as it usually give a higher speeds and more reliable download of large files." msgstr "" #: "/web/en/5/download_index.php +347" msgid "http://en.wikipedia.org/wiki/BitTorrent" msgstr "" #: "/web/en/5/download_index.php +348" msgid "BitTorrent link are not yet available." msgstr "" #: "/web/en/5/download_index.php +365" msgid "Format" msgstr "" #: "/web/en/5/download_index.php +366" msgid "link" msgstr "" #: "/web/en/5/download_index.php +487" msgid "Release notes" msgstr "" #: "/web/en/5/download_index.php +488" msgid "More about known issues or limitation in installation and usage" msgstr "" #: "/web/en/5/download_index.php +489" msgid "Which to choose" msgstr "" #: "/web/en/5/download_index.php +489" msgid "https://wiki.mageia.org/en/Installation_Media" msgstr "" #: "/web/en/5/download_index.php +490" msgid "Get ISO on USB flash drive" msgstr "" #: "/web/en/5/download_index.php +491" msgid "Newcomer? Here's a wiki page for you." msgstr "" #: "/web/en/5/download_index.php +491" msgid "https://wiki.mageia.org/en/Newcomers_start_here" msgstr "" #: "/web/en/5/download_index.php +492" msgid "Help us on %s" msgstr "" #: "/web/en/5/download_index.php +495" msgid "Upgrading
from %s ?" msgstr "" #: "/web/en/5/download_index.php +498" msgid "do not use LiveCDs;" msgstr "" #: "/web/en/5/download_index.php +499" msgid "see the upgrade guide" msgstr "" #: "/web/en/5/download_index.php +502" msgid "Looking for %s ?" msgstr "" #: "/web/en/5/download_index.php +504" msgid "It is here." msgstr "" #: "/web/en/5/download_index.php +506" msgid "But please remember that it will soon reach EOL." msgstr "" #: "/web/en/5/download_index.php +507" msgid "But please remember that it already reached EOL." msgstr "" #: "/web/en/5/download_index.php +507" msgid "http://blog.mageia.org/en/2015/09/10/mageia-4-about-to-reach-its-end-of-life/" msgstr "" #: "/web/en/5/download_index.php +511" msgid "Need more challenge?" msgstr "" #: "/web/en/5/download_index.php +512" msgid "You can help us on %s." msgstr "" #: "/web/en/5/nav.php +3" msgid "https://wiki.mageia.org/en/Mageia_5_Release_Notes" msgstr "" #: "/web/en/5/nav.php +4" msgid "https://wiki.mageia.org/en/Mageia_5_Errata" msgstr "" #: "/web/en/5/nav.php +5" msgid "https://wiki.mageia.org/en/Mageia_5_Release_Notes#Upgrading_from_Mageia_4" msgstr "" #: "/web/en/5/nav.php +12" msgid "Errata" msgstr "" #: "/web/en/5/nav.php +13" msgid "Bugs Reports" msgstr "" #: "/web/en/5/index.php +12" msgid "Mageia 5" msgstr "" #: "/web/en/5/index.php +14" msgid "Mageia 5 is the new, solid, stable Linux distribution from the Mageia project." msgstr "" #: "/web/en/5/index.php +34" msgid "About Mageia 5" msgstr "" #: "/web/en/5/index.php +36" msgid "Mageia 5 is a GNU/Linux distribution for your computer, released by the Mageia community. It can be installed in several ways, with the Live or Classical ISOs being the most popular methods." msgstr "" #: "/web/en/5/index.php +38" msgid "Download it right away!" msgstr "" #: "/web/en/5/index.php +40" msgid "Live ISO's let you try Mageia without installation. Use these instructions to put the Live ISO on a CD, DVD or USB device. Then you can run Mageia 5 directly from there, and try Mageia using one of the graphical user interfaces such as GNOME or KDE." msgstr "" #: "/web/en/5/index.php +43" msgid "The Classical ISO is the more traditional way to install Mageia directly. Take a look at the complete documentation for this installer." msgstr "" #: "/web/en/5/index.php +45" msgid "Mageia 5 includes several desktop managers including KDE, Gnome, XFCE, Mate, and Cinnamon." msgstr "" #: "/web/en/5/index.php +47" msgid "There are lots of applications in the official repositories. You can have a look at the Mageia Application Database to get a complete list of packages inside Mageia." msgstr "" #: "/web/en/5/index.php +49" msgid "What's new?" msgstr "" #: "/web/en/5/index.php +51" msgid "There's plenty of new goodness in Mageia 5, too much to include here - see the release notes for an extensive exposé." msgstr "" #: "/web/en/5/index.php +53" msgid "There is one feature worth mentioning here. It took a lot of effort and time but it was worth it. Mageia 5 supports UEFI, which means it’s now even easier to install it on recent hardware." msgstr "" #: "/web/en/5/index.php +54" msgid "https://blog.mageia.org/en/2015/05/30/waiting-for-mageia-5-spotlight-on-uefi-support/" msgstr "" #: "/web/en/5/index.php +56" msgid "To help users configure and use Mageia, and to provide some information about the community and the project, there's a program called MageiaWelcome. It starts automatically when a session opens for the first time in any of the graphical environments." msgstr "" #: "/web/en/5/index.php +56" msgid "https://wiki.mageia.org/en/Feature:MageiaWelcome" msgstr "" #: "/web/en/5/index.php +73" msgid "Mageia Control Center" msgstr "" #: "/web/en/5/index.php +85" msgid "Mageia in context" msgstr "" #: "/web/en/5/index.php +87" msgid "Mageia is both a Community and a Linux Distribution, with Mageia 5 being our fifth release." msgstr "" #: "/web/en/5/index.php +89" msgid "Mageia 5 is supported by the Mageia.org nonprofit organisation, which is governed by a body of recognized and elected contributors." msgstr "" #: "/web/en/5/index.php +91" msgid "Mageia 5 has been made by more than 100 people from all around the world." msgstr "" #: "/web/en/5/index.php +93" msgid "Our work adds to the excellent work of the wider Linux and Free Software community. We aim to blend all the excellent work done by the community, adding the special Mageia ingredients, to bring you the best, most stable, reliable and enjoyable experience we can make for regular users, developers and businesses." msgstr "" #: "/web/en/5/index.php +95" msgid "We welcome new contributors to any of the many different teams that go to make up Mageia the Community, and we encourage you to join us." msgstr "" href='#n403'>403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
<?php
/**
*
* @package mcp
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* View topic in MCP
*/
function mcp_topic_view($id, $mode, $action)
{
	global $phpEx, $phpbb_root_path, $config;
	global $template, $db, $user, $auth, $cache, $phpbb_container;

	$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());

	$user->add_lang('viewtopic');
	$pagination = $phpbb_container->get('pagination');

	$topic_id = request_var('t', 0);
	$topic_info = get_topic_data(array($topic_id), false, true);

	if (!sizeof($topic_info))
	{
		trigger_error('TOPIC_NOT_EXIST');
	}

	$topic_info = $topic_info[$topic_id];

	// Set up some vars
	$icon_id		= request_var('icon', 0);
	$subject		= utf8_normalize_nfc(request_var('subject', '', true));
	$start			= request_var('start', 0);
	$sort_days_old	= request_var('st_old', 0);
	$forum_id		= request_var('f', 0);
	$to_topic_id	= request_var('to_topic_id', 0);
	$to_forum_id	= request_var('to_forum_id', 0);
	$sort			= isset($_POST['sort']) ? true : false;
	$submitted_id_list	= request_var('post_ids', array(0));
	$checked_ids = $post_id_list = request_var('post_id_list', array(0));

	// Resync Topic?
	if ($action == 'resync')
	{
		if (!function_exists('mcp_resync_topics'))
		{
			include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
		}
		mcp_resync_topics(array($topic_id));
	}

	// Split Topic?
	if ($action == 'split_all' || $action == 'split_beyond')
	{
		if (!$sort)
		{
			split_topic($action, $topic_id, $to_forum_id, $subject);
		}
		$action = 'split';
	}

	// Merge Posts?
	if ($action == 'merge_posts')
	{
		if (!$sort)
		{
			merge_posts($topic_id, $to_topic_id);
		}
		$action = 'merge';
	}

	if ($action == 'split' && !$subject)
	{
		$subject = $topic_info['topic_title'];
	}

	// Restore or pprove posts?
	if (($action == 'restore' || $action == 'approve') && $auth->acl_get('m_approve', $topic_info['forum_id']))
	{
		include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
		include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
		include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);

		if (!sizeof($post_id_list))
		{
			trigger_error('NO_POST_SELECTED');
		}

		if (!$sort)
		{
			mcp_queue::approve_posts($action, $post_id_list, $id, $mode);
		}
	}

	// Jumpbox, sort selects and that kind of things
	make_jumpbox($url . "&amp;i=$id&amp;mode=forum_view", $topic_info['forum_id'], false, 'm_', true);
	$where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE';

	$sort_days = $total = 0;
	$sort_key = $sort_dir = '';
	$sort_by_sql = $sort_order_sql = array();
	mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);

	$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
	$phpbb_content_visibility = $phpbb_container->get('content.visibility');

	if ($total == -1)
	{
		$total = $phpbb_content_visibility->get_count('topic_posts', $topic_info, $topic_info['forum_id']);
	}

	$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
	if ($posts_per_page == 0)
	{
		$posts_per_page = $total;
	}

	if ((!empty($sort_days_old) && $sort_days_old != $sort_days) || $total <= $posts_per_page)
	{
		$start = 0;
	}
	$start = $pagination->validate_start($start, $posts_per_page, $total);

	$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
		FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
		WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
			p.topic_id = ' . $topic_id . '
			AND ' .	$phpbb_content_visibility->get_visibility_sql('post', $topic_info['forum_id'], 'p.') . '
			AND p.poster_id = u.user_id ' .
			$limit_time_sql . '
		ORDER BY ' . $sort_order_sql;
	$result = $db->sql_query_limit($sql, $posts_per_page, $start);

	$rowset = $post_id_list = array();
	$bbcode_bitfield = '';
	while ($row = $db->sql_fetchrow($result))
	{
		$rowset[] = $row;
		$post_id_list[] = $row['post_id'];
		$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
	}
	$db->sql_freeresult($result);

	if ($bbcode_bitfield !== '')
	{
		include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
		$bbcode = new bbcode(base64_encode($bbcode_bitfield));
	}

	$topic_tracking_info = array();

	// Get topic tracking info
	if ($config['load_db_lastread'])
	{
		$tmp_topic_data = array($topic_id => $topic_info);
		$topic_tracking_info = get_topic_tracking($topic_info['forum_id'], $topic_id, $tmp_topic_data, array($topic_info['forum_id'] => $topic_info['forum_mark_time']));
		unset($tmp_topic_data);
	}
	else
	{
		$topic_tracking_info = get_complete_topic_tracking($topic_info['forum_id'], $topic_id);
	}

	$has_unapproved_posts = $has_deleted_posts = false;

	// Grab extensions
	$extensions = $attachments = array();
	if ($topic_info['topic_attachment'] && sizeof($post_id_list))
	{
		$extensions = $cache->obtain_attach_extensions($topic_info['forum_id']);

		// Get attachments...
		if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
		{
			$sql = 'SELECT *
				FROM ' . ATTACHMENTS_TABLE . '
				WHERE ' . $db->sql_in_set('post_msg_id', $post_id_list) . '
					AND in_message = 0
				ORDER BY filetime DESC, post_msg_id ASC';
			$result = $db->sql_query($sql);

			while ($row = $db->sql_fetchrow($result))
			{
				$attachments[$row['post_msg_id']][] = $row;
			}
			$db->sql_freeresult($result);
		}
	}

	foreach ($rowset as $i => $row)
	{
		$message = $row['post_text'];
		$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];

		$parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
		$message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);

		if (!empty($attachments[$row['post_id']]))
		{
			$update_count = array();
			parse_attachments($topic_info['forum_id'], $message, $attachments[$row['post_id']], $update_count);
		}

		if ($row['post_visibility'] == ITEM_UNAPPROVED)
		{
			$has_unapproved_posts = true;
		}

		if ($row['post_visibility'] == ITEM_DELETED)
		{
			$has_deleted_posts = true;
		}

		$post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;

		$template->assign_block_vars('postrow', array(
			'POST_AUTHOR_FULL'		=> get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
			'POST_AUTHOR_COLOUR'	=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
			'POST_AUTHOR'			=> get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
			'U_POST_AUTHOR'			=> get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),

			'POST_DATE'		=> $user->format_date($row['post_time']),
			'POST_SUBJECT'	=> $post_subject,
			'MESSAGE'		=> $message,
			'POST_ID'		=> $row['post_id'],
			'RETURN_TOPIC'	=> sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>'),

			'MINI_POST_IMG'			=> ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),

			'S_POST_REPORTED'	=> ($row['post_reported'] && $auth->acl_get('m_report', $topic_info['forum_id'])),
			'S_POST_UNAPPROVED'	=> ($row['post_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
			'S_POST_DELETED'	=> ($row['post_visibility'] == ITEM_DELETED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
			'S_CHECKED'			=> (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
			'S_HAS_ATTACHMENTS'	=> (!empty($attachments[$row['post_id']])) ? true : false,

			'U_POST_DETAILS'	=> "$url&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details" . (($forum_id) ? "&amp;f=$forum_id" : ''),
			'U_MCP_APPROVE'		=> ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
			'U_MCP_REPORT'		=> ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '')
		);

		// Display not already displayed Attachments for this post, we already parsed them. ;)
		if (!empty($attachments[$row['post_id']]))
		{
			foreach ($attachments[$row['post_id']] as $attachment)
			{
				$template->assign_block_vars('postrow.attachment', array(
					'DISPLAY_ATTACHMENT'	=> $attachment)
				);
			}
		}

		unset($rowset[$i]);
	}

	// Display topic icons for split topic
	$s_topic_icons = false;

	if ($auth->acl_gets('m_split', 'm_merge', (int) $topic_info['forum_id']))
	{
		include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
		$s_topic_icons = posting_gen_topic_icons('', $icon_id);

		// Has the user selected a topic for merge?
		if ($to_topic_id)
		{
			$to_topic_info = get_topic_data(array($to_topic_id), 'm_merge');

			if (!sizeof($to_topic_info))
			{
				$to_topic_id = 0;
			}
			else
			{
				$to_topic_info = $to_topic_info[$to_topic_id];

				if (!$to_topic_info['enable_icons'] || $auth->acl_get('!f_icons', $topic_info['forum_id']))
				{
					$s_topic_icons = false;
				}
			}
		}
	}

	$s_hidden_fields = build_hidden_fields(array(
		'st_old'	=> $sort_days,
		'post_ids'	=> $post_id_list,
	));

	$base_url = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;t={$topic_info['topic_id']}&amp;mode=$mode&amp;action=$action&amp;to_topic_id=$to_topic_id&amp;posts_per_page=$posts_per_page&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir");
	if ($posts_per_page)
	{
		$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $posts_per_page, $start);
	}

	$template->assign_vars(array(
		'TOPIC_TITLE'		=> $topic_info['topic_title'],
		'U_VIEW_TOPIC'		=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),

		'TO_TOPIC_ID'		=> $to_topic_id,
		'TO_TOPIC_INFO'		=> ($to_topic_id) ? sprintf($user->lang['YOU_SELECTED_TOPIC'], $to_topic_id, '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_topic_info['forum_id'] . '&amp;t=' . $to_topic_id) . '">' . $to_topic_info['topic_title'] . '</a>') : '',

		'SPLIT_SUBJECT'		=> $subject,
		'POSTS_PER_PAGE'	=> $posts_per_page,
		'ACTION'			=> $action,

		'REPORTED_IMG'		=> $user->img('icon_topic_reported', 'POST_REPORTED'),
		'UNAPPROVED_IMG'	=> $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
		'DELETED_IMG'		=> $user->img('icon_topic_deleted', 'POST_DELETED_RESTORE'),
		'INFO_IMG'			=> $user->img('icon_post_info', 'VIEW_INFO'),

		'S_MCP_ACTION'		=> "$url&amp;i=$id&amp;mode=$mode&amp;action=$action&amp;start=$start",
		'S_FORUM_SELECT'	=> ($to_forum_id) ? make_forum_select($to_forum_id, false, false, true, true, true) : make_forum_select($topic_info['forum_id'], false, false, true, true, true),
		'S_CAN_SPLIT'		=> ($auth->acl_get('m_split', $topic_info['forum_id'])) ? true : false,
		'S_CAN_MERGE'		=> ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
		'S_CAN_DELETE'		=> ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
		'S_CAN_APPROVE'		=> ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
		'S_CAN_RESTORE'		=> ($has_deleted_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
		'S_CAN_LOCK'		=> ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
		'S_CAN_REPORT'		=> ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
		'S_CAN_SYNC'		=> $auth->acl_get('m_', $topic_info['forum_id']),
		'S_REPORT_VIEW'		=> ($action == 'reports') ? true : false,
		'S_MERGE_VIEW'		=> ($action == 'merge') ? true : false,
		'S_SPLIT_VIEW'		=> ($action == 'split') ? true : false,

		'S_HIDDEN_FIELDS'	=> $s_hidden_fields,

		'S_SHOW_TOPIC_ICONS'	=> $s_topic_icons,
		'S_TOPIC_ICON'			=> $icon_id,

		'U_SELECT_TOPIC'	=> "$url&amp;i=$id&amp;mode=forum_view&amp;action=merge_select" . (($forum_id) ? "&amp;f=$forum_id" : ''),

		'RETURN_TOPIC'		=> sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&amp;t={$topic_info['topic_id']}&amp;start=$start") . '">', '</a>'),
		'RETURN_FORUM'		=> sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&amp;start=$start") . '">', '</a>'),

		'PAGE_NUMBER'		=> $pagination->on_page($base_url, $total, $posts_per_page, $start),
		'TOTAL_POSTS'		=> $user->lang('VIEW_TOPIC_POSTS', (int) $total),
	));
}

/**
* Split topic
*/
function split_topic($action, $topic_id, $to_forum_id, $subject)
{
	global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $config;

	$post_id_list	= request_var('post_id_list', array(0));
	$forum_id		= request_var('forum_id', 0);
	$start			= request_var('start', 0);

	if (!sizeof($post_id_list))
	{
		$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
		return;
	}

	if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_split')))
	{
		return;
	}

	$post_id = $post_id_list[0];
	$post_info = get_post_data(array($post_id));

	if (!sizeof($post_info))
	{
		$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
		return;
	}

	$post_info = $post_info[$post_id];
	$subject = trim($subject);

	// Make some tests
	if (!$subject)
	{
		$template->assign_var('MESSAGE', $user->lang['EMPTY_SUBJECT']);
		return;
	}

	if ($to_forum_id <= 0)
	{
		$template->assign_var('MESSAGE', $user->lang['NO_DESTINATION_FORUM']);
		return;
	}

	$forum_info = get_forum_data(array($to_forum_id), 'f_post');

	if (!sizeof($forum_info))
	{
		$template->assign_var('MESSAGE', $user->lang['USER_CANNOT_POST']);
		return;
	}

	$forum_info = $forum_info[$to_forum_id];

	if ($forum_info['forum_type'] != FORUM_POST)
	{
		$template->assign_var('MESSAGE', $user->lang['FORUM_NOT_POSTABLE']);
		return;
	}

	$redirect = request_var('redirect', build_url(array('quickmod')));

	$s_hidden_fields = build_hidden_fields(array(
		'i'				=> 'main',
		'post_id_list'	=> $post_id_list,
		'f'				=> $forum_id,
		'mode'			=> 'topic_view',
		'start'			=> $start,
		'action'		=> $action,
		't'				=> $topic_id,
		'redirect'		=> $redirect,
		'subject'		=> $subject,
		'to_forum_id'	=> $to_forum_id,
		'icon'			=> request_var('icon', 0))
	);
	$success_msg = $return_link = '';

	if (confirm_box(true))
	{
		if ($action == 'split_beyond')
		{
			$sort_days = $total = 0;
			$sort_key = $sort_dir = '';
			$sort_by_sql = $sort_order_sql = array();
			mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);

			$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';

			if ($sort_order_sql[0] == 'u')
			{
				$sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
					FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
					WHERE p.topic_id = $topic_id
						AND p.poster_id = u.user_id
						$limit_time_sql
					ORDER BY $sort_order_sql";
			}
			else
			{
				$sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
					FROM ' . POSTS_TABLE . " p
					WHERE p.topic_id = $topic_id
						$limit_time_sql
					ORDER BY $sort_order_sql";
			}
			$result = $db->sql_query_limit($sql, 0, $start);

			$store = false;
			$post_id_list = array();
			while ($row = $db->sql_fetchrow($result))
			{
				// If split from selected post (split_beyond), we split the unapproved items too.
				if ($row['post_visibility'] == ITEM_UNAPPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
				{
//					continue;
				}

				// Start to store post_ids as soon as we see the first post that was selected
				if ($row['post_id'] == $post_id)
				{
					$store = true;
				}

				if ($store)
				{
					$post_id_list[] = $row['post_id'];
				}
			}
			$db->sql_freeresult($result);
		}

		if (!sizeof($post_id_list))
		{
			trigger_error('NO_POST_SELECTED');
		}

		$icon_id = request_var('icon', 0);

		$sql_ary = array(
			'forum_id'			=> $to_forum_id,
			'topic_title'		=> $subject,
			'icon_id'			=> $icon_id,
			'topic_visibility'	=> 1
		);

		$sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);

		$to_topic_id = $db->sql_nextid();
		move_posts($post_id_list, $to_topic_id);

		$topic_info = get_topic_data(array($topic_id));
		$topic_info = $topic_info[$topic_id];

		add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject);
		add_log('mod', $forum_id, $topic_id, 'LOG_SPLIT_SOURCE', $topic_info['topic_title']);

		// Change topic title of first post
		$sql = 'UPDATE ' . POSTS_TABLE . "
			SET post_subject = '" . $db->sql_escape($subject) . "'
			WHERE post_id = {$post_id_list[0]}";
		$db->sql_query($sql);

		// Copy topic subscriptions to new topic
		$sql = 'SELECT user_id, notify_status
			FROM ' . TOPICS_WATCH_TABLE . '
			WHERE topic_id = ' . $topic_id;
		$result = $db->sql_query($sql);

		$sql_ary = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$sql_ary[] = array(
				'topic_id'		=> (int) $to_topic_id,
				'user_id'		=> (int) $row['user_id'],
				'notify_status'	=> (int) $row['notify_status'],
			);
		}
		$db->sql_freeresult($result);

		if (sizeof($sql_ary))
		{
			$db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary);
		}

		// Copy bookmarks to new topic
		$sql = 'SELECT user_id
			FROM ' . BOOKMARKS_TABLE . '
			WHERE topic_id = ' . $topic_id;
		$result = $db->sql_query($sql);

		$sql_ary = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$sql_ary[] = array(
				'topic_id'		=> (int) $to_topic_id,
				'user_id'		=> (int) $row['user_id'],
			);
		}
		$db->sql_freeresult($result);

		if (sizeof($sql_ary))
		{
			$db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary);
		}

		$success_msg = 'TOPIC_SPLIT_SUCCESS';

		// Update forum statistics
		set_config_count('num_topics', 1, true);

		// Link back to both topics
		$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
		$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
		$redirect = reapply_sid($redirect);

		meta_refresh(3, $redirect);
		trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
	}
	else
	{
		confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
	}
}

/**
* Merge selected posts into selected topic
*/
function merge_posts($topic_id, $to_topic_id)
{
	global $db, $template, $user, $phpEx, $phpbb_root_path, $auth;

	if (!$to_topic_id)
	{
		$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
		return;
	}

	$topic_data = get_topic_data(array($to_topic_id), 'm_merge');

	if (!sizeof($topic_data))
	{
		$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
		return;
	}

	$topic_data = $topic_data[$to_topic_id];

	$post_id_list	= request_var('post_id_list', array(0));
	$start			= request_var('start', 0);

	if (!sizeof($post_id_list))
	{
		$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
		return;
	}

	if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_merge')))
	{
		return;
	}

	$redirect = request_var('redirect', build_url(array('quickmod')));

	$s_hidden_fields = build_hidden_fields(array(
		'i'				=> 'main',
		'post_id_list'	=> $post_id_list,
		'to_topic_id'	=> $to_topic_id,
		'mode'			=> 'topic_view',
		'action'		=> 'merge_posts',
		'start'			=> $start,
		'redirect'		=> $redirect,
		't'				=> $topic_id)
	);
	$success_msg = $return_link = '';

	if (confirm_box(true))
	{
		$to_forum_id = $topic_data['forum_id'];

		move_posts($post_id_list, $to_topic_id);
		add_log('mod', $to_forum_id, $to_topic_id, 'LOG_MERGE', $topic_data['topic_title']);

		// Message and return links
		$success_msg = 'POSTS_MERGED_SUCCESS';

		// Does the original topic still exist? If yes, link back to it
		$sql = 'SELECT forum_id
			FROM ' . TOPICS_TABLE . '
			WHERE topic_id = ' . $topic_id;
		$result = $db->sql_query_limit($sql, 1);
		$row = $db->sql_fetchrow($result);
		$db->sql_freeresult($result);

		if ($row)
		{
			$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
		}
		else
		{
			if (!function_exists('phpbb_update_rows_avoiding_duplicates_notify_status'))
			{
				include($phpbb_root_path . 'includes/functions_database_helper.' . $phpEx);
			}

			// If the topic no longer exist, we will update the topic watch table.
			phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', array($topic_id), $to_topic_id);

			// If the topic no longer exist, we will update the bookmarks table.
			phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id);
		}

		// Link to the new topic
		$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
		$redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
		$redirect = reapply_sid($redirect);

		meta_refresh(3, $redirect);
		trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
	}
	else
	{
		confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
	}
}