mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
refresh githash.txt on login screen, removed cronjob githash.php part 2
This commit is contained in:
parent
0ad4b9600c
commit
5ccd0edbb9
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (c) 2022 OpenXE-org */
|
||||
/*
|
||||
Refresh the githash number in githash.txt
|
||||
*/
|
||||
$path = '../.git/';
|
||||
if (!is_dir($path)) {
|
||||
return;
|
||||
}
|
||||
$head = trim(file_get_contents($path . 'HEAD'));
|
||||
$refs = trim(substr($head,0,4));
|
||||
if ($refs == 'ref:') {
|
||||
$ref = substr($head,5);
|
||||
echo($path.$ref."\n");
|
||||
$hash = trim(file_get_contents($path . $ref));
|
||||
} else {
|
||||
$hash = $head;
|
||||
}
|
||||
if (!empty($hash)) {
|
||||
file_put_contents("../githash.txt", $hash);
|
||||
}
|
||||
?>
|
@ -16798,8 +16798,7 @@ INSERT INTO `prozessstarter` (`id`, `bezeichnung`, `bedingung`, `art`, `startzei
|
||||
(6, 'Überzahlte Rechnungen', '', 'uhrzeit', '2015-10-25 23:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'ueberzahlterechnungen', 0, 0, 0, 1, ''),
|
||||
(7, 'Umsatzstatistik', '', 'uhrzeit', '2015-10-25 23:30:00', '0000-00-00 00:00:00', '', 'cronjob', 'umsatzstatistik', 0, 0, 0, 1, ''),
|
||||
(8, 'Paketmarken Tracking Download', '', 'uhrzeit', '2015-10-25 14:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'wgettracking', 0, 0, 0, 1, ''),
|
||||
(9, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, ''),
|
||||
(10, 'Git Revision einlesen', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '120', 'cronjob', 'githash', 1, 0, 0, 1, '');
|
||||
(9, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, '');
|
||||
|
||||
INSERT INTO `user` (`id`, `username`, `password`, `repassword`, `description`, `settings`, `parentuser`, `activ`, `type`, `adresse`, `fehllogins`, `standarddrucker`, `firma`, `logdatei`, `startseite`, `hwtoken`, `hwkey`, `hwcounter`, `motppin`, `motpsecret`, `passwordmd5`, `externlogin`, `projekt_bevorzugen`, `email_bevorzugen`, `projekt`, `rfidtag`, `vorlage`, `kalender_passwort`, `kalender_ausblenden`, `kalender_aktiv`, `gpsstechuhr`, `standardetikett`, `standardfax`, `internebezeichnung`, `hwdatablock`, `standardversanddrucker`, `passwordsha512`, `salt`) VALUES
|
||||
(1, 'admin', 'qnvEQ1sFWNdIg', 0, 'Administrator', 'firstinstall', 0, 1, 'admin', 1, 0, 0, 1, '2016-08-05 08:34:59', NULL, NULL, NULL, NULL, NULL, NULL, '21232f297a57a5a743894a0e4a801fc3', 1, 0, 1, 0, '', NULL, NULL, 0, NULL, NULL, 0, 0, NULL, NULL, 0, '', '');
|
||||
|
@ -571,7 +571,7 @@ class Acl
|
||||
public function Login()
|
||||
{
|
||||
|
||||
include dirname(__DIR__).'/../cronjobs/githash.php';
|
||||
$this->refresh_githash();
|
||||
include dirname(__DIR__).'/../version.php';
|
||||
$this->app->Tpl->Set('XENTRALVERSION',"V.".$version_revision);
|
||||
|
||||
@ -1297,4 +1297,22 @@ Allow from all
|
||||
// HTACCESS SECURITY END
|
||||
}
|
||||
|
||||
function refresh_githash() {
|
||||
$path = '../.git/';
|
||||
if (!is_dir($path)) {
|
||||
return;
|
||||
}
|
||||
$head = trim(file_get_contents($path . 'HEAD'));
|
||||
$refs = trim(substr($head,0,4));
|
||||
if ($refs == 'ref:') {
|
||||
$ref = substr($head,5);
|
||||
$hash = trim(file_get_contents($path . $ref));
|
||||
} else {
|
||||
$hash = $head;
|
||||
}
|
||||
if (!empty($hash)) {
|
||||
file_put_contents("../githash.txt", $hash);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user