Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
80aa991d
Commit
80aa991d
authored
10 months ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
fix php parser problems
parent
14e6a99c
No related branches found
No related tags found
1 merge request
!66
php8 only; added variable types; short array syntax; remove glyphicons
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
public_html/deployment/classes/foremanapi.class.php
+12
-15
12 additions, 15 deletions
public_html/deployment/classes/foremanapi.class.php
public_html/deployment/classes/formgen.class.php
+0
-1
0 additions, 1 deletion
public_html/deployment/classes/formgen.class.php
with
12 additions
and
16 deletions
public_html/deployment/classes/foremanapi.class.php
+
12
−
15
View file @
80aa991d
...
@@ -116,13 +116,13 @@ class ForemanApi {
...
@@ -116,13 +116,13 @@ class ForemanApi {
/**
/**
* last request
* last request
* @var
type
* @var
array
*/
*/
protected
$_aRequest
=
array
();
protected
$_aRequest
=
array
();
/**
/**
* last response
* last response
* @var
type
* @var
array
*/
*/
protected
$_aResponse
=
array
();
protected
$_aResponse
=
array
();
...
@@ -135,11 +135,8 @@ class ForemanApi {
...
@@ -135,11 +135,8 @@ class ForemanApi {
public
function
__construct
(
$aCfg
)
{
public
function
__construct
(
$aCfg
)
{
if
(
!
isset
(
$aCfg
[
'api'
])){
if
(
!
isset
(
$aCfg
[
'api'
])){
die
(
"ERROR: class "
.
__CLASS__
.
" must be initialized with an array containing api config for foreman."
);
die
(
"ERROR: class "
.
__CLASS__
.
" must be initialized with an array containing api config for foreman."
);
return
false
;
}
}
$this
->
_aCfg
=
$aCfg
;
$this
->
_aCfg
=
$aCfg
;
return
true
;
}
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
...
@@ -159,10 +156,10 @@ class ForemanApi {
...
@@ -159,10 +156,10 @@ class ForemanApi {
/**
/**
* search url prefix in $this->_aAllowedUrls by given key
* search url prefix in $this->_aAllowedUrls by given key
* @param
type
$sFunction
* @param
string
$sFunction
* @return
type
* @return
string
*/
*/
protected
function
_guessPrefixUrl
(
$sFunction
=
false
){
protected
function
_guessPrefixUrl
(
$sFunction
=
''
){
$sReturn
=
''
;
$sReturn
=
''
;
/*
/*
if (!$sFunction){
if (!$sFunction){
...
@@ -232,7 +229,7 @@ class ForemanApi {
...
@@ -232,7 +229,7 @@ class ForemanApi {
* - postdata; for POST only
* - postdata; for POST only
*
*
* @param array $aRequest arrayurl for Foreman API
* @param array $aRequest arrayurl for Foreman API
* @return
string
* @return
array
*/
*/
protected
function
_httpCall
(
$aRequest
=
false
,
$iTimeout
=
15
)
{
protected
function
_httpCall
(
$aRequest
=
false
,
$iTimeout
=
15
)
{
if
(
$aRequest
){
if
(
$aRequest
){
...
@@ -433,7 +430,7 @@ class ForemanApi {
...
@@ -433,7 +430,7 @@ class ForemanApi {
/**
/**
* check for missing config entries
* check for missing config entries
* @return
type
* @return
bool
*/
*/
public
function
selfcheck
()
{
public
function
selfcheck
()
{
$sOut
=
''
;
$sOut
=
''
;
...
@@ -498,7 +495,7 @@ class ForemanApi {
...
@@ -498,7 +495,7 @@ class ForemanApi {
* - list of keys, i.e. array('id', 'title')
* - list of keys, i.e. array('id', 'title')
*
*
* @param array $aOptions
* @param array $aOptions
* @return array
* @return
bool|
array
*/
*/
public
function
read
(
$aOptions
){
public
function
read
(
$aOptions
){
$this
->
_aRequest
=
$aOptions
;
$this
->
_aRequest
=
$aOptions
;
...
@@ -512,7 +509,7 @@ class ForemanApi {
...
@@ -512,7 +509,7 @@ class ForemanApi {
/**
/**
* TODO
* TODO
* @param
type
$aOptions
* @param
array
$aOptions
*/
*/
public
function
update
(
$aOptions
){
public
function
update
(
$aOptions
){
/*
/*
...
@@ -524,7 +521,7 @@ class ForemanApi {
...
@@ -524,7 +521,7 @@ class ForemanApi {
/**
/**
* TODO
* TODO
* @param
type
$aOptions
* @param
array
$aOptions
*/
*/
public
function
delete
(
$aOptions
){
public
function
delete
(
$aOptions
){
/*
/*
...
@@ -573,7 +570,7 @@ class ForemanApi {
...
@@ -573,7 +570,7 @@ class ForemanApi {
[local_port] => 33906
[local_port] => 33906
)
)
* @param string $sKey get value of given key only
* @param string $sKey get value of given key only
* @return
any
* @return
mixed
*/
*/
public
function
getResponseInfo
(
$sKey
=
false
){
public
function
getResponseInfo
(
$sKey
=
false
){
...
...
This diff is collapsed.
Click to expand it.
public_html/deployment/classes/formgen.class.php
+
0
−
1
View file @
80aa991d
...
@@ -331,7 +331,6 @@ class formgen
...
@@ -331,7 +331,6 @@ class formgen
default
:
default
:
die
(
"ERROR: "
.
__CLASS__
.
":"
.
__FUNCTION__
.
" - formelement type "
.
$elementData
[
"type"
]
.
" ist not supported (yet)."
);
die
(
"ERROR: "
.
__CLASS__
.
":"
.
__FUNCTION__
.
" - formelement type "
.
$elementData
[
"type"
]
.
" ist not supported (yet)."
);
break
;
}
}
// Default or table mode?
// Default or table mode?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment