diff --git a/search2/indexing/extractors/ExifExtractor.inc.php b/search2/indexing/extractors/ExifExtractor.inc.php new file mode 100644 index 0000000..12311fa --- /dev/null +++ b/search2/indexing/extractors/ExifExtractor.inc.php @@ -0,0 +1,50 @@ +sourcefile, 0, true); + $content = ''; + foreach ($exif as $key => $section) + { + foreach ($section as $name => $val) + { + if (is_numeric($val)) + { + // no point indexing numeric content. it will be ignored anyways! + continue; + } + $content .= "$val\n"; + } + } + + $result = file_put_contents($this->targetfile, $content); + + return false !== $result; + } + + public function diagnose() + { + if (!function_exists('exif_read_data')) + { + return sprintf(_kt('The Exif extractor requires the module exif php extension. Please include this in the php.ini.')); + } + + return null; + } +} + +?> \ No newline at end of file