mirror of
https://gitlab.com/ceda_ei/Zeeth-Naaw-Bot
synced 2025-10-30 01:40:05 +01:00
Add write last member. Add new_member function
The update file now writes the last member to lastmember.php. Added new_member function.
This commit is contained in:
@@ -87,7 +87,7 @@ function chain_to_string($chain) {
|
||||
for ($i = count($chain) - 1; $i >= 0 ; $i--) {
|
||||
$string .= $chain[$i]['username'];
|
||||
if ($i != 0) {
|
||||
$string .= " > ";
|
||||
$string .= " → ";
|
||||
}
|
||||
}
|
||||
return $string;
|
||||
@@ -133,6 +133,10 @@ if ($saved_chain != $chain_string) {
|
||||
$contents = "<?php return '". $chain_string . "'; ?>";
|
||||
fwrite($file, $contents);
|
||||
fclose($file);
|
||||
$file2 = fopen('lastmember.php', 'w');
|
||||
$contents = "<?php return '" . $chain[count($chain) - 1] . "'; ?>";
|
||||
fwrite($file2, $contents);
|
||||
fclose($file2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user