query("CREATE TABLE IF NOT EXISTS {author_records} ( `id` int(9) NOT NULL auto_increment, `item_id` INTEGER(9) NOT NULL, `author` TEXT, `dirty` BOOLEAN default 1, PRIMARY KEY (`id`), KEY(`item_id`)) DEFAULT CHARSET=utf8;"); module::set_version("author", 1); module::set_var("author", "usage_terms", ''); module::set_var("author", "credit", ''); return true; } static function activate() { gallery::set_path_env( array( getenv("PATH"), module::get_var("gallery", "extra_binary_paths") )); $exiv = exec('which exiv2'); if ($exiv == '') { # Proper warning } else { module::set_var("author", "exiv_path", $exiv); $out = array(); exec("$exiv -V", $out); $parts = split(' ', $out[0]); module::set_var("author", "exiv_version", $parts[1]); } } static function deactivate() { } static function uninstall() { Database::instance()->query("DROP TABLE IF EXISTS {author_records};"); } }