Example #1
0
 /**
  * Export language as xml
  *
  * @param int $languageid Language ID to be exported
  * @param string $product Product ID. Language of which product to be exported.
  * @param bool $just_phrases Whether to Just fetch phrases
  * @param bool $custom Whether to Include Custom Phrases
  * @param string $charset Export charset
  * @return string XML data
  */
 public function export($languageid, $product = 'vbulletin', $just_phrases = false, $custom = false, $charset = 'ISO-8859-1')
 {
     $this->checkHasAdminPermission('canadminlanguages');
     $languageid = intval($languageid);
     require_once DIR . '/includes/adminfunctions_language.php';
     return get_language_export_xml($languageid, $product, $custom, $just_phrases, $charset);
 }
Example #2
0
//elsewhere we may need to change that.
$default_skipped_groups = array(
	'cphelptext'
);
*/
// #############################################################################
if ($_POST['do'] == 'download') {
    $vbulletin->input->clean_array_gpc('p', array('filename' => TYPE_STR, 'just_phrases' => TYPE_BOOL, 'product' => TYPE_STR, 'custom' => TYPE_BOOL, 'charset' => TYPE_NOHTML));
    if (empty($vbulletin->GPC['filename'])) {
        $vbulletin->GPC['filename'] = DEFAULT_FILENAME;
    }
    if (function_exists('set_time_limit') and !SAFEMODE) {
        @set_time_limit(1200);
    }
    try {
        $doc = get_language_export_xml($vbulletin->GPC['dolanguageid'], $vbulletin->GPC['product'], $vbulletin->GPC['custom'], $vbulletin->GPC['just_phrases'], $vbulletin->GPC['charset'] ? $vbulletin->GPC['charset'] : 'ISO-8859-1');
    } catch (vB_Exception_AdminStopMessage $e) {
        //move print_stop_message calls from install_product so we
        //can use it places where said calls aren't appropriate.
        call_user_func_array('print_stop_message', $e->getParams());
    }
    require_once DIR . '/includes/functions_file.php';
    file_download($doc, $vbulletin->GPC['filename'], 'text/xml');
}
// ##########################################################################
print_cp_header($vbphrase['language_manager']);
// #############################################################################
// #############################################################################
if ($_POST['do'] == 'update') {
    $vbulletin->input->clean_array_gpc('p', array('fieldname' => TYPE_NOHTML, 'pagenumber' => TYPE_UINT, 'def' => TYPE_ARRAY_STR, 'phr' => TYPE_ARRAY_STR, 'rvt' => TYPE_ARRAY_UINT, 'prod' => TYPE_ARRAY_STR));
    if (empty($vbulletin->GPC['product'])) {
Example #3
0
	}

	if (function_exists('set_time_limit') AND !SAFEMODE)
	{
		@set_time_limit(1200);
	}

	//inits classloader -- required to make vB_Cache work
	require_once(DIR . '/includes/class_bootstrap_framework.php');
	vB_Bootstrap_Framework::init();

	try
	{
		$doc = get_language_export_xml (
			$vbulletin->GPC['dolanguageid'], 
			$vbulletin->GPC['product'], 
			$vbulletin->GPC['custom'], 
			$vbulletin->GPC['just_phrases']
		);	
	}
	catch (vB_Exception_AdminStopMessage $e)
	{
		//move print_stop_message calls from install_product so we
		//can use it places where said calls aren't appropriate.
		call_user_func_array('print_stop_message', $e->getParams());
	}

	require_once(DIR . '/includes/functions_file.php');
	file_download($doc, $vbulletin->GPC['filename'], 'text/xml');
}

// ##########################################################################
function autoexport_write_master_language()
{
	require_once(DIR . '/includes/adminfunctions_language.php');
	$xml = get_language_export_xml(-1, 'vbulletin', 0, 0);
	autoexport_write_file_with_backup(DIR . '/install/vbulletin-language.xml', $xml);
}