<commit_before><?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
// 
// 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.
// $Id$

/*	list files of galleries
 * galleryId
 * categId
 * 
*/
function wikiplugin_files_help() {
	return tra("List files in a file gallery (with a category) or in a category or a file gallery od this category.")
		."<br />~np~{FILES(galleryId=id,categId=id,sort=name_asc,showaction=n,showfind=n,slideshow=n)}Title{FILES}~/np~";
}
function wikiplugin_files_info() {
	return array(
		'name' => tra('Files'),
		'documentation' => 'PluginFiles',
		'description' => tra("Displays a list of files from the File Gallery"),
		'prefs' => array( 'feature_file_galleries', 'wikiplugin_files' ),
		'body' => tra('Title'),
		'params' => array(
			'galleryId' => array(
				'required' => false,
				'name' => tra('Gallery ID'),
				'description' => tra('Gallery ID'),
			),
			'categId' => array(
				'required' => false,
				'name' => tra('Category ID'),
				'description' => tra('Category ID').':'.tra('Category ID'),
			),
			'sort' => array(
				'required' => false,
				'name' => tra('sort'),
				'description' => tra('name_asc'),
			),
			'showaction' => array(
				'required' => false,
				'name' => tra('sort'),
				'description' => 'y|n',
			),
			'showfind' => array(
				'required' => false,
				'name' => tra('find'),
				'description' => 'y|n',
			),
			'showid' => array(
				'required' => false,
				'name' => tra('Shows ID'),
				'description' => 'y|n',
			),
			'showicon' => array(
				'required' => false,
				'name' => tra('Shows Icon'),
				'description' => 'y|n',
			),
			'showname' => array(
				'required' => false,
				'name' => tra('Shows Name'),
				'description' => 'y|n',
			),
			'showfilename' => array(
				'required' => false,
				'name' => tra('Shows Filename'),
				'description' => 'y|n',
			),
			'showsize' => array(
				'required' => false,
				'name' => tra('Shows Size'),
				'description' => 'y|n',
			),
			'showdescription' => array(
				'required' => false,
				'name' => tra('Shows Description'),
				'description' => 'y|n',
			),
			'showcreated' => array(
				'required' => false,
				'name' => tra('Shows Creation Date'),
				'description' => 'y|n',
			),
			'showhits' => array(
				'required' => false,
				'name' => tra('Shows Hits'),
				'description' => 'y|n',
			),
			'showlockedby' => array(
				'required' => false,
				'name' => tra('Shows Locked by'),
				'description' => 'y|n',
			),
			'showlmodified' => array(
				'required' => false,
				'name' => tra('Shows Modification Date'),
				'description' => 'y|n',
			),
			'showauthor' => array(
				'required' => false,
				'name' => tra('Shows Author'),
				'description' => 'y|n',
			),
			'showcreator' => array(
				'required' => false,
				'name' => tra('Shows Creator'),
				'description' => 'y|n',
			),
			'showgallery' => array(
				'required' => false,
				'name' => tra('Shows Parent Gallery Name'),
				'description' => 'y|n',
			),
			'showfiles' => array(
				'required' => false,
				'name' => tra('Shows Number of Files'),
				'description' => 'y|n',
			),
			'slideshow' => array(
				'required' => false,
				'name' => tra('Shows the slideshow of a gallery'),
				'description' => 'y|n',
			),
			'creator' => array(
				'required' => false,
				'name' => tra('Show only created by this user'),
				'description' => tra('User Login'),
			),
	  )
	 );
}
function wikiplugin_files($data, $params) {
	global $prefs, $tikilib, $smarty, $tiki_p_admin, $tiki_p_admin_files_galleries, $user;
	if ($prefs['feature_file_galleries'] != 'y') {
		return('');
	}
	global $filegallib; include_once('lib/filegals/filegallib.php');

	extract($params, EXTR_SKIP);

	if ($prefs['feature_categories'] != 'y') {
		if (isset($categId))
			unset($categId);
	} else {
		global $categlib; include_once('lib/categories/categlib.php');
	}

	$files = array();
	if (isset($categId) && strstr($categId, ':')) {
		$categId = explode(':', $categId);
	}
	static $iplugin = 0;
	++$iplugin;
	if (isset($_REQUEST["wp_files_sort_mode$iplugin"])) {
		$sort = $_REQUEST["wp_files_sort_mode$iplugin"];
	}
	if (!isset($sort))
		$sort = 'name_asc';
	if (isset($galleryId)) {
		$gal_info = $tikilib->get_file_gallery($galleryId);
		if ($tiki_p_admin != 'y' && $tiki_p_admin_files_galleries != 'y' && $gal_info['user'] != $user) {<commit_msg>notice<commit_after><?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
// 
// 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.
// $Id$

/*	list files of galleries
 * galleryId
 * categId
 * 
*/
function wikiplugin_files_help() {
	return tra("List files in a file gallery (with a category) or in a category or a file gallery od this category.")
		."<br />~np~{FILES(galleryId=id,categId=id,sort=name_asc,showaction=n,showfind=n,slideshow=n)}Title{FILES}~/np~";
}
function wikiplugin_files_info() {
	return array(
		'name' => tra('Files'),
		'documentation' => 'PluginFiles',
		'description' => tra("Displays a list of files from the File Gallery"),
		'prefs' => array( 'feature_file_galleries', 'wikiplugin_files' ),
		'body' => tra('Title'),
		'params' => array(
			'galleryId' => array(
				'required' => false,
				'name' => tra('Gallery ID'),
				'description' => tra('Gallery ID'),
			),
			'categId' => array(
				'required' => false,
				'name' => tra('Category ID'),
				'description' => tra('Category ID').':'.tra('Category ID'),
			),
			'sort' => array(
				'required' => false,
				'name' => tra('sort'),
				'description' => tra('name_asc'),
			),
			'showaction' => array(
				'required' => false,
				'name' => tra('sort'),
				'description' => 'y|n',
			),
			'showfind' => array(
				'required' => false,
				'name' => tra('find'),
				'description' => 'y|n',
			),
			'showid' => array(
				'required' => false,
				'name' => tra('Shows ID'),
				'description' => 'y|n',
			),
			'showicon' => array(
				'required' => false,
				'name' => tra('Shows Icon'),
				'description' => 'y|n',
			),
			'showname' => array(
				'required' => false,
				'name' => tra('Shows Name'),
				'description' => 'y|n',
			),
			'showfilename' => array(
				'required' => false,
				'name' => tra('Shows Filename'),
				'description' => 'y|n',
			),
			'showsize' => array(
				'required' => false,
				'name' => tra('Shows Size'),
				'description' => 'y|n',
			),
			'showdescription' => array(
				'required' => false,
				'name' => tra('Shows Description'),
				'description' => 'y|n',
			),
			'showcreated' => array(
				'required' => false,
				'name' => tra('Shows Creation Date'),
				'description' => 'y|n',
			),
			'showhits' => array(
				'required' => false,
				'name' => tra('Shows Hits'),
				'description' => 'y|n',
			),
			'showlockedby' => array(
				'required' => false,
				'name' => tra('Shows Locked by'),
				'description' => 'y|n',
			),
			'showlmodified' => array(
				'required' => false,
				'name' => tra('Shows Modification Date'),
				'description' => 'y|n',
			),
			'showauthor' => array(
				'required' => false,
				'name' => tra('Shows Author'),
				'description' => 'y|n',
			),
			'showcreator' => array(
				'required' => false,
				'name' => tra('Shows Creator'),
				'description' => 'y|n',
			),
			'showgallery' => array(
				'required' => false,
				'name' => tra('Shows Parent Gallery Name'),
				'description' => 'y|n',
			),
			'showfiles' => array(
				'required' => false,
				'name' => tra('Shows Number of Files'),
				'description' => 'y|n',
			),
			'slideshow' => array(
				'required' => false,
				'name' => tra('Shows the slideshow of a gallery'),
				'description' => 'y|n',
			),
			'creator' => array(
				'required' => false,
				'name' => tra('Show only created by this user'),
				'description' => tra('User Login'),
			),
	  )
	 );
}
function wikiplugin_files($data, $params) {
	global $prefs, $tikilib, $smarty, $tiki_p_admin, $tiki_p_admin_files_galleries, $user;
	if ($prefs['feature_file_galleries'] != 'y') {
		return('');
	}
	global $filegallib; include_once('lib/filegals/filegallib.php');

	$creator = '';
	extract($params, EXTR_SKIP);

	if ($prefs['feature_categories'] != 'y') {
		if (isset($categId))
			unset($categId);
	} else {
		global $categlib; include_once('lib/categories/categlib.php');
	}

	$files = array();
	if (isset($categId) && strstr($categId, ':')) {
		$categId = explode(':', $categId);
	}
	static $iplugin = 0;
	++$iplugin;
	if (isset($_REQUEST["wp_files_sort_mode$iplugin"])) {
		$sort = $_REQUEST["wp_files_sort_mode$iplugin"];
	}
	if (!isset($sort))
		$sort = 'name_asc';
	if (isset($galleryId)) {
		$gal_info = $tikilib->get_file_gallery($galleryId);
		if ($tiki_p_admin != 'y' && $tiki_p_admin_files_galleries != 'y' && $gal_info['user'] != $user) {
{'fraction_non_alphanumeric': 0.21195954206957876, 'fraction_numerical': 0.0020006668889629878, 'mean_word_length': 3.523881347410759, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 187, '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': '509076', 'n_tokens_mistral': 3886, 'n_tokens_neox': 3277, 'n_words': 719}