1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-20 02:32:56 +00:00

Set 'last_modified' in repo info

This commit is contained in:
cuihaikuo
2017-06-26 18:30:58 +08:00
parent fd0dbd0160
commit c98978c245
3 changed files with 8 additions and 2 deletions

View File

@@ -9,6 +9,10 @@ public class Repo : Object {
// vala to automatically generate a property. Note, // vala to automatically generate a property. Note,
// if a Vala property is start with _, it is not // if a Vala property is start with _, it is not
// translated into a GObject property. // translated into a GObject property.
// Due to performance reasons, 'desc', 'magic', 'enc_version', 'root', 'repaired', 'random_key'
// are no longer returned in listing repos API.
public char _id[37]; public char _id[37];
public string id { public string id {
get { return (string)_id; } get { return (string)_id; }

View File

@@ -3022,8 +3022,8 @@ seaf_fill_repo_obj_from_commit (GList **repos)
NULL); NULL);
g_object_set (repo, g_object_set (repo,
"repo_name", commit->repo_name, "repo_desc", commit->repo_desc, "repo_name", commit->repo_name, "repo_desc", commit->repo_desc,
"last_modified", commit->ctime, "repaired", commit->repaired, "last_modified", commit->ctime, "last_modify", commit->ctime,
"last_modifier", commit->creator_name, NULL); "repaired", commit->repaired, "last_modifier", commit->creator_name, NULL);
if (commit->encrypted && commit->enc_version == 2) if (commit->encrypted && commit->enc_version == 2)
g_object_set (repo, "random_key", commit->random_key, NULL); g_object_set (repo, "random_key", commit->random_key, NULL);

View File

@@ -188,6 +188,7 @@ collect_repos (SeafDBRow *row, void *data)
g_object_set (repo, "name", repo_name, g_object_set (repo, "name", repo_name,
"repo_name", repo_name, "repo_name", repo_name,
"last_modify", update_time, "last_modify", update_time,
"last_modified", update_time,
"version", version, "version", version,
"encrypted", is_encrypted, "encrypted", is_encrypted,
"last_modifier", last_modifier, NULL); "last_modifier", last_modifier, NULL);
@@ -232,6 +233,7 @@ seaf_fill_repo_commit_if_not_in_db (GList **repos)
g_object_set (repo, "name", commit->repo_name, g_object_set (repo, "name", commit->repo_name,
"repo_name", commit->repo_name, "repo_name", commit->repo_name,
"last_modify", commit->ctime, "last_modify", commit->ctime,
"last_modified", commit->ctime,
"version", commit->version, "version", commit->version,
"encrypted", commit->encrypted, "encrypted", commit->encrypted,
"last_modifier", commit->creator_name, "last_modifier", commit->creator_name,