/** * Get the image index information * */ static function SetIndex() { global $dataDir; //prevent setting twice if (self::$index !== false) { return; } $index_file = $dataDir . '/data/_site/image_index.php'; self::$index = gpFiles::Get($index_file, 'image_index'); if (self::$index) { self::$index_checksum = self::checksum(self::$index); if (isset(gpFiles::$last_meta['last_index'])) { self::$last_index = gpFiles::$last_meta['last_index']; } elseif (isset(gpFiles::$last_stats['last_index'])) { //pre 4.3.6 self::$last_index = gpFiles::$last_stats['last_index']; } } }
/** * Get the image index information * */ static function SetIndex() { global $dataDir; //prevent setting twice if (self::$index !== false) { return; } $index_file = $dataDir . '/data/_site/image_index.php'; self::$index = array(); if (file_exists($index_file)) { include $index_file; self::$index = $image_index; self::$index_checksum = self::checksum($image_index); self::$last_index = $file_stats['last_index']; } }