Change messages. Not send 1 members in /all_chains
This commit is contained in:
parent
ee5b5a6ee9
commit
b808d36a7b
|
@ -106,7 +106,7 @@ function chain_to_string($chain) {
|
||||||
for ($i = count($chain) - 1; $i >= 0 ; $i--) {
|
for ($i = count($chain) - 1; $i >= 0 ; $i--) {
|
||||||
$string .= $chain[$i]['username'];
|
$string .= $chain[$i]['username'];
|
||||||
if ($i != 0) {
|
if ($i != 0) {
|
||||||
$string .= "\n";
|
$string .= " → ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $string;
|
return $string;
|
||||||
|
@ -144,6 +144,9 @@ if ($argv[1] == "all") {
|
||||||
$end_points = $conn->query($query);
|
$end_points = $conn->query($query);
|
||||||
while ($end_point = $end_points->fetch_assoc()){
|
while ($end_point = $end_points->fetch_assoc()){
|
||||||
$chain = get_chain_from_user($end_point);
|
$chain = get_chain_from_user($end_point);
|
||||||
|
if (count($chain) == 1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
send_text(chain_to_string($chain));
|
send_text(chain_to_string($chain));
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -89,7 +89,7 @@ function member_exit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
send_html("Update started. New chain will only be send if the chain has changed. Please wait as this takes about a minute.");
|
send_html("Update started. Please wait as this takes about a minute.");
|
||||||
exec('echo php ' . __DIR__ . '/update_chain.php send | at now');
|
exec('echo php ' . __DIR__ . '/update_chain.php send | at now');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue