<commit_before><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-upload_file.php,v 1.60 2007-08-29 14:15:26 sept_7 Exp $

// Copyright (c) 2002-2007, <NAME>, <NAME>, <NAME>, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.

require_once ('tiki-setup.php');
include_once ('lib/categories/categlib.php');
include_once ('lib/filegals/filegallib.php');

if ($feature_file_galleries != 'y') {
	$smarty->assign('msg', tra("This feature is disabled").": feature_file_galleries");
	$smarty->display("error.tpl");
	die;
}

if (!empty($_REQUEST['fileId'])) {
	if (!($fileInfo = $filegallib->get_file_info($_REQUEST['fileId']))) {
		$smarty->assign('msg', tra("Incorrect param"));
		$smarty->display('error.tpl');
		die;
	}
	if (empty($_REQUEST['galleryId'])) {
		$_REQUEST['galleryId'] = $fileInfo['galleryId'];
	} elseif ($_REQUEST['galleryId'] != $fileInfo['galleryId']) {
		$smarty->assign('msg', tra("Could not find the file requested"));<commit_msg>[MOD]fgal: set max_execution_time to infinite if the system allows it<commit_after><?php

// $Header: /cvsroot/tikiwiki/tiki/tiki-upload_file.php,v 1.61 2007-09-20 16:42:07 sylvieg Exp $

// Copyright (c) 2002-2007, <NAME>, <NAME>, <NAME>, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.

require_once ('tiki-setup.php');
include_once ('lib/categories/categlib.php');
include_once ('lib/filegals/filegallib.php');
@ini_set('max_execution_time', 0); //will not work in safe_mode is on

if ($feature_file_galleries != 'y') {
	$smarty->assign('msg', tra("This feature is disabled").": feature_file_galleries");
	$smarty->display("error.tpl");
	die;
}

if (!empty($_REQUEST['fileId'])) {
	if (!($fileInfo = $filegallib->get_file_info($_REQUEST['fileId']))) {
		$smarty->assign('msg', tra("Incorrect param"));
		$smarty->display('error.tpl');
		die;
	}
	if (empty($_REQUEST['galleryId'])) {
		$_REQUEST['galleryId'] = $fileInfo['galleryId'];
	} elseif ($_REQUEST['galleryId'] != $fileInfo['galleryId']) {
		$smarty->assign('msg', tra("Could not find the file requested"));
{'fraction_non_alphanumeric': 0.1919859092910612, 'fraction_numerical': 0.02289740202553941, 'mean_word_length': 5.547550432276657, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5970836', 'n_tokens_mistral': 844, 'n_tokens_neox': 775, 'n_words': 181}