<commit_before><?php

namespace OC\Pictures;

require_once('lib/base.php');

class DatabaseManager {
	private static $instance = null;
	const TAG = 'DatabaseManager';
	
	public static function getInstance() {
		if (self::$instance === null)
			self::$instance = new DatabaseManager();
		return self::$instance;
	}
	
	public function getFileData($path) {
		$gallery_path = \OCP\Config::getSystemValue( 'datadirectory' ).'/'.\OC_User::getUser().'/gallery';
		$path = $gallery_path.$path;
		$stmt = \OCP\DB::prepare('SELECT * FROM *PREFIX*pictures_images_cache WHERE uid_owner LIKE ? AND path = ?');
		$result = $stmt->execute(array(\OCP\USER::getUser(), $path));
		if (($row = $result->fetchRow()) != false) {
			return $row;
		}<commit_msg>Gallery: remove extra include of lib/base.php<commit_after><?php

namespace OC\Pictures;

class DatabaseManager {
	private static $instance = null;
	const TAG = 'DatabaseManager';
	
	public static function getInstance() {
		if (self::$instance === null)
			self::$instance = new DatabaseManager();
		return self::$instance;
	}
	
	public function getFileData($path) {
		$gallery_path = \OCP\Config::getSystemValue( 'datadirectory' ).'/'.\OC_User::getUser().'/gallery';
		$path = $gallery_path.$path;
		$stmt = \OCP\DB::prepare('SELECT * FROM *PREFIX*pictures_images_cache WHERE uid_owner LIKE ? AND path = ?');
		$result = $stmt->execute(array(\OCP\USER::getUser(), $path));
		if (($row = $result->fetchRow()) != false) {
			return $row;
		}
{'fraction_non_alphanumeric': 0.1757944557133198, 'fraction_numerical': 0.0, 'mean_word_length': 4.92, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2202964', 'n_tokens_mistral': 526, 'n_tokens_neox': 478, 'n_words': 108}