File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Cacti CHANGELOG
22
331.2.27
44-issue#5622: Errors and deprecation warnings with PHP 8.3.0
5+ -issue#5628: Argument '--with-profile' is a invalid arg of cli/import_package.php
56-issue#5629: auth_changepassword.php cannot return to the refer url by just clicking the "Return" button once
67-issue#5636: Cacti 1.2.26 error on LDAP authentication the first time
78-issue#5638: Add tooltip info about IPv6 address
Original file line number Diff line number Diff line change 5050 $ preview_only = false ;
5151 $ info_only = false ;
5252 $ profile_id = '' ;
53+ $ profile_set = false ;
5354
5455 foreach ($ parms as $ parameter ) {
5556 if (strpos ($ parameter , '= ' )) {
6364 case '--filename ' :
6465 $ filename = trim ($ value );
6566
67+ break ;
68+ case '--with-profile ' :
69+ if ($ profile_set ) {
70+ print 'The argument --with-profile can not be used in conjunction with --profile-id. ' . PHP_EOL ;
71+ exit (1 );
72+ }
73+
74+ $ profile_set = true ;
75+
76+ $ profile_id = db_fetch_cell ('SELECT id FROM data_source_profiles WHERE `default` = "on" ' );
77+
6678 break ;
6779 case '--use-profile ' :
6880 $ use_profile = true ;
7789
7890 break ;
7991 case '--profile-id ' :
92+ if ($ profile_set ) {
93+ print 'The argument --profile-id can not be used in conjunction with --with-profile. ' . PHP_EOL ;
94+ exit (1 );
95+ }
96+
97+ $ profile_set = true ;
98+
8099 $ profile_id = trim ($ value );
81100
82101 break ;
You can’t perform that action at this time.
0 commit comments