From 5b5485ac12a8f992c9fff7c9a17a91ca9ee3ec31 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Mon, 6 Apr 2020 04:28:55 +0200 Subject: Mayor-Nextcloud script: Tankörmappák userek --- "egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" | 1 + "egy\303\251b/nextcloud/mayor-nextcloud.php" | 28 ++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'egyéb/nextcloud') diff --git "a/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" "b/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" index 4206d949..65547de7 100644 --- "a/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" +++ "b/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" @@ -24,6 +24,7 @@ $m2n['isk_rovidnev'] = "rovid"; $m2n['csoport_prefix'] = "(tk) "; $m2n['default_email'] = "indulo@iskola.hu"; $m2n['default_passw'] = "EHYmGktzrdfS7wxJR6DFqxjJ"; +$m2n['always_set_diak_quota'] = false; $m2n['default_quota'] = "10GB"; $m2n['diak_quota'] = "2GB"; $m2n['min_osztalyok'] = array(); //pl: array('9.a','11.a'); diff --git "a/egy\303\251b/nextcloud/mayor-nextcloud.php" "b/egy\303\251b/nextcloud/mayor-nextcloud.php" index 6132f6b1..3f5ed7da 100644 --- "a/egy\303\251b/nextcloud/mayor-nextcloud.php" +++ "b/egy\303\251b/nextcloud/mayor-nextcloud.php" @@ -2,6 +2,7 @@ = 7) { //MySQLi (Improved) és php7 kell! @@ -726,7 +722,7 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im } //------------------------------------------------------------------------------------------------------------------------------- - if($log['verbose'] > 0) { echo "\n\n######## Mayor-Nextcloud Script ########\n"; echo "######## ".date("Y-m-d H:i:s")."\n\n"; } + if(true) { echo "\n\n######## Mayor-Nextcloud Script ########\n"; echo "######## (".date("Y-m-d H:i:s").")\n\n"; } if( file_exists($cfgfile)===TRUE ){ @@ -735,7 +731,11 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im } else { if($log['verbose'] > 0) { echo "*** M2N Config betöltése: (".pathinfo($cfgfile)['dirname']."/mayor-nextcloud.php fejlécéből.) ***\n\n"; } } - + $log['verbose'] = $m2n['verbose']; + if(isset($m2l['always_set_diak_quota'])){ $m2n['always_set_diak_quota'] = $m2l['always_set_diak_quota']; } + if(isset($m2l['groupdir_users'])){ $m2n['groupdir_users'] = $m2l['groupdir_users']; } + if(isset($m2l['log_verbose'])){ $log['verbose'] = $m2l['log_verbose']; } + if( $m2l['always_set_diak_quota'] === true && $log['verbose'] < 4 ){ $log['verbose'] = 4; } if(($link = db_connect($db)) == FALSE){ //csatlakozás echo "\n******** MySQL (general) kapcsolat hiba. ********\n"; @@ -882,7 +882,7 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im if ($log['verbose'] > 1 ){ echo "-\t\tA felhasználó:".po("\t$curr",$m2n['felhasznalo_hossz'],1)."-\tnyilvántartásba véve.\n";} } //--------------------------------------- QUOTA -----------------------------------// - if($ALWAYS_SET_DIAK_QUOTA === true && $curr_tanarId < 0 && $curr_diakId > 0 ){ //Állítsunk-e erőből (diák) qvótát? + if($m2n['always_set_diak_quota'] === true && $curr_tanarId < 0 && $curr_diakId > 0 ){ //Állítsunk-e erőből (diák) qvótát? $params['quota'] = $m2n['diak_quota']; // Alapértelmezett diák kvóta user_set($curr,$params); if ($log['verbose'] > 3 ){ echo "* -\t\tBeállítva:\t"."Qvóta: ".$params['quota']."\t\n";} @@ -1034,7 +1034,7 @@ if (function_exists('mysqli_connect') and PHP_MAJOR_VERSION >= 7) { //MySQLi (Im @mysqli_close($link2); @mysqli_close($link); - if ($log['verbose'] > 0 ){echo "kész.\n"; echo "(".date("Y-m-d H:i:s").")\n";} //endline + if ($log['verbose'] > 0 ){echo "\nkész.\n"; echo "(".date("Y-m-d H:i:s").")\n";} //endline } else { echo "\n\n******** Legalább PHP7 és mysqli szükséges! ********\n\n"; -- cgit v1.2.3