aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-13 17:27:17 -0700
committerfriendica <info@friendica.com>2013-03-13 17:27:17 -0700
commit580acc5445571a0405363807b8cf172262b365b4 (patch)
tree2e8fc3769b00ca2efd2b40dcd0809eda4f26d254 /include
parented2bcb6855e3d0e74e1b85aeb69e380a562b0c89 (diff)
downloadvolse-hubzilla-580acc5445571a0405363807b8cf172262b365b4.tar.gz
volse-hubzilla-580acc5445571a0405363807b8cf172262b365b4.tar.bz2
volse-hubzilla-580acc5445571a0405363807b8cf172262b365b4.zip
update modification time whenever a directory related attribute is changed
Diffstat (limited to 'include')
-rw-r--r--include/zot.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index abaa5c9ab..909c4a2e8 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -469,6 +469,7 @@ function import_xchan($arr) {
dbesc($arr['url']),
dbesc($xchan_hash)
);
+ update_modtime($xchan_hash);
}
}
else {
@@ -490,6 +491,7 @@ function import_xchan($arr) {
dbesc($arr['photo_updated']),
dbesc($arr['name_updated'])
);
+ update_modtime($xchan_hash);
}
@@ -544,6 +546,7 @@ function import_xchan($arr) {
intval($r[0]['hubloc_id'])
);
}
+ update_modtime($xchan_hash);
continue;
}
@@ -570,7 +573,7 @@ function import_xchan($arr) {
dbesc($location['callback']),
dbesc($location['sitekey'])
);
-
+ update_modtime($xchan_hash);
}
// get rid of any hubs we have for this channel which weren't reported.
@@ -581,6 +584,7 @@ function import_xchan($arr) {
$r = q("delete from hubloc where hubloc_id = %d limit 1",
intval($x['hubloc_id'])
);
+ update_modtime($xchan_hash);
}
}
}
@@ -1152,6 +1156,7 @@ function import_directory_profile($hash,$profile) {
);
}
+ update_modtime($arr['xprof_hash']);
return;
}
@@ -1187,4 +1192,21 @@ function import_directory_keywords($hash,$keywords) {
dbesc($x)
);
}
-} \ No newline at end of file
+}
+
+
+function update_modtime($hash) {
+ $r = q("select * from updates where ud_hash = '%s' limit 1",
+ dbesc($hash)
+ );
+ if($r)
+ q("update updates set ud_date = '%s' where ud_hash = '%s' limit 1",
+ dbesc(datetime_convert()),
+ dbesc($hash)
+ );
+ else
+ q("insert into updates (ud_hash, ud_date) values ( '%s', '%s' )",
+ dbesc($hash),
+ dbesc(datetime_convert())
+ );
+}