diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-06 22:18:28 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-06 22:18:28 +0200 |
commit | 83354b2b88218090988dd6e526b0a2505b57e0f1 (patch) | |
tree | e3c73c38a122a78bb7e66fbb99056407edd9d4b9 /includes/refresh.php | |
parent | 47b8f2299a483024c4a6a8876af825a010954caa (diff) | |
download | pluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.tar.gz pluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.tar.bz2 pluralconnect-83354b2b88218090988dd6e526b0a2505b57e0f1.zip |
Updated 5 files and added 1110 files (automated)
Diffstat (limited to 'includes/refresh.php')
-rw-r--r-- | includes/refresh.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/refresh.php b/includes/refresh.php index 98bda15..8c50dfb 100644 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -137,4 +137,19 @@ chdir("../.."); echo("Fetched school information\n"); +echo("Updating address book...\n"); + +$contacts = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/addressbook/contacts.json"), true); + +foreach ($contacts as $id => $_) { + $out = []; + exec("cd /_ch/includes/jobs && php UpdateContactMethods.php {\\\"contact\\\":\\\"$id\\\"}", $out); + + foreach ($out as $line) { + echo(" " . $line . "\n"); + } +} + +echo("Updated address book\n"); + echo("Completed.\n");
\ No newline at end of file |