Skip to content

Commit

Permalink
Stable Release - 1.5.10.1622
Browse files Browse the repository at this point in the history
Stable Release PR For 1.5.10.1622 - 2024-10-15
  • Loading branch information
fog-workflows[bot] authored Oct 15, 2024
2 parents 3527eca + 37d76fa commit 2bf0e8c
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 55 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ tmp/*
#################
packages/web/status/injectHosts.php
packages/web/lib/plugins/hostext

# kernel images
*Image*
*.cache*
*.idea*
2 changes: 1 addition & 1 deletion lib/common/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ configureFTP() {
configureDefaultiPXEfile() {
dots 'Configuring default iPXE file'
[[ -z $webroot ]] && webroot='/'
echo -e "#!ipxe\ncpuid --ext 29 && set arch x86_64 || set arch \${buildarch}\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe"
echo -e "#!ipxe\nset arch \${buildarch}\nparams\nparam mac0 \${net0/mac}\nparam arch \${arch}\nparam platform \${platform}\nparam product \${product}\nparam manufacturer \${product}\nparam ipxever \${version}\nparam filename \${filename}\nparam sysuuid \${uuid}\nisset \${net1/mac} && param mac1 \${net1/mac} || goto bootme\nisset \${net2/mac} && param mac2 \${net2/mac} || goto bootme\n:bootme\nchain ${httpproto}://$ipaddress${webroot}service/ipxe/boot.php##params" > "$tftpdirdst/default.ipxe"
errorStat $?
}
configureTFTPandPXE() {
Expand Down
6 changes: 3 additions & 3 deletions lib/redhat/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[[ -z $packageQuery ]] && packageQuery="rpm -q \$x"
case $linuxReleaseName_lower in
*mageia*)
[[ -z $packages ]] && packages="apache apache-mod_fcgid apache-mod_php apache-mod_ssl cdrkit-genisoimage curl dhcp-server gcc gcc-c++ git gzip htmldoc lftp m4 make mariadb mariadb-common mariadb-common-core mariadb-core net-tools nfs-utils perl perl-Crypt-PasswdMD5 php-cli php-curl php-fpm php-gd php-gettext php-ldap php-mbstring php-mysqlnd php-pcntl php-pdo php-pdo_mysql tar tftp-server util-linux vsftpd wget"
[[ -z $packages ]] && packages="apache apache-mod_fcgid apache-mod_php apache-mod_ssl cdrkit-genisoimage curl dhcp-server gcc gcc-aarch64-linux-gnu gcc-c++ git gzip htmldoc lftp m4 make mariadb mariadb-common mariadb-common-core mariadb-core net-tools nfs-utils perl perl-Crypt-PasswdMD5 php-cli php-curl php-fpm php-gd php-gettext php-ldap php-mbstring php-mysqlnd php-pcntl php-pdo php-pdo_mysql tar tftp-server util-linux vsftpd wget"
[[ -z $packageinstaller ]] && packageinstaller="urpmi --auto"
[[ -z $packagelist ]] && packagelist="urpmq"
[[ -z $packageupdater ]] && packageupdater="$packageinstaller"
Expand All @@ -33,10 +33,10 @@ case $linuxReleaseName_lower in
[[ -z $etcconf ]] && etcconf="/etc/httpd/conf.d/fog.conf"
[[ -z $packages ]] && {
if [[ $OSVersion -gt 7 ]]; then
packages="curl dhcp-server gcc gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-json php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux-user vsftpd wget xz-devel"
packages="curl dhcp-server gcc gcc-aarch64-linux-gnu gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-json php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux-user vsftpd wget xz-devel"
[[ -z $dhcpname ]] && dhcpname="dhcp-server"
else
packages="curl dhcp gcc gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux vsftpd wget xz-devel"
packages="curl dhcp gcc gcc-aarch64-linux-gnu gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux vsftpd wget xz-devel"
fi
}
pkginst=$(command -v dnf)
Expand Down
2 changes: 1 addition & 1 deletion lib/ubuntu/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ case $linuxReleaseName_lower in
x="mysql-server"
eval $packageQuery >>$error_log 2>&1
[[ $? -eq 0 ]] && db_packages="mysql-client mysql-server" || db_packages="mariadb-client mariadb-server"
packages="apache2 build-essential cpp curl g++ gawk gcc genisoimage git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-fastcgi libapache2-mod-php libc6 libcurl3 liblzma-dev m4 ${db_packages} net-tools nfs-kernel-server openssh-server php-fpm php php-cli php-curl php-gd php-json php-ldap php-mbstring php-mysql php-mysqlnd tar tftpd-hpa tftp-hpa vsftpd wget zlib1g"
packages="apache2 build-essential cpp curl g++ gawk gcc gcc-aarch64-linux-gnu genisoimage git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-fastcgi libapache2-mod-php libc6 libcurl3 liblzma-dev m4 ${db_packages} net-tools nfs-kernel-server openssh-server php-fpm php php-cli php-curl php-gd php-json php-ldap php-mbstring php-mysql php-mysqlnd tar tftpd-hpa tftp-hpa vsftpd wget zlib1g"
else
# make sure we update the package list to not use specific version numbers anymore
packages=${packages//php[0-9]\.[0-9]/php}
Expand Down
20 changes: 10 additions & 10 deletions packages/web/lib/fog/bootmenu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function __construct()
);
}

if (isset($_REQUEST['arch']) && stripos($_REQUEST['arch'], 'arm') !== false) {
if (isset($_REQUEST['arch']) && stripos($_REQUEST['arch'], 'arm64') !== false) {
//use arm boot loaders instead
$refind = 'chain -ar ${boot-url}/service/ipxe/refind_aa64.efi';
}
Expand Down Expand Up @@ -296,7 +296,7 @@ public function __construct()
if (($_REQUEST['arch'] ?? '') == 'i386') {
$bzImage = $bzImage32;
$imagefile = $init_32;
} elseif (($_REQUEST['arch'] ?? '') == 'arm') {
} elseif (($_REQUEST['arch'] ?? '') == 'arm64') {
$bzImage = $bzImageArm;
$imagefile = $init_arm;
}
Expand Down Expand Up @@ -556,7 +556,7 @@ private function _chainBoot($debug = false, $shortCircuit = false)
$debug = $debug;
if (!(isset($this->_hiddenmenu) && $this->_hiddenmenu) || $shortCircuit) {
$Send['chainnohide'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'params',
'param mac0 ${net0/mac}',
'param arch ${arch}',
Expand All @@ -581,7 +581,7 @@ private function _chainBoot($debug = false, $shortCircuit = false)
'Escape'
);
$Send['chainhide'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
"iseq \${platform} efi && set key 0x1b || set key $KSKey",
"iseq \${platform} efi && set keyName ESC || "
. "set keyName $KSName",
Expand Down Expand Up @@ -738,7 +738,7 @@ private function _printTasking($kernelArgsArray)
public function delConf()
{
$Send['delconfirm'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'params',
'prompt --key y Would you like to delete this host? (y/N): && goto deleteyes || goto deleteno',
':deleteyes',
Expand All @@ -765,7 +765,7 @@ public function delConf()
public function aprvConf()
{
$Send['aprvconfirm'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'params',
'prompt --key y Would you like to approve this host? (y/N): && goto answeryes || goto answerno',
':answeryes',
Expand All @@ -792,7 +792,7 @@ public function aprvConf()
public function keyreg()
{
$Send['keyreg'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'echo -n Please enter the product key : ',
'read key',
'params',
Expand Down Expand Up @@ -846,7 +846,7 @@ public function sesscheck()
'echo No session found with that name.',
'clear sessname',
'sleep 3',
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'params',
'param mac0 ${net0/mac}',
'param arch ${arch}',
Expand All @@ -871,7 +871,7 @@ public function sesscheck()
public function sessjoin()
{
$Send['joinsession'] = array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'echo -n Please enter the session name to join > ',
'read sessname',
'params',
Expand Down Expand Up @@ -1970,7 +1970,7 @@ public function printDefault()
);
$Send['head'] = self::fastmerge(
array(
'cpuid --ext 29 && set arch x86_64 || set arch i386',
'set arch ${buildarch}',
'goto get_console',
':console_set',
),
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '1.5.10.1615');
define('FOG_VERSION', '1.5.10.1622');
define('FOG_SCHEMA', 273);
define('FOG_BCACHE_VER', 141);
define('FOG_CLIENT_VERSION', '0.13.0');
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/hooks/bootitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function tweakmenu($arguments)
$arguments['ipxe']['head'][0]
= '#!ipxeishereherherherher';
$arguments['ipxe']['head'][1]
= 'cpuid --ext 29 && set arch x86_64 || set arch i386';
= 'set arch ${buildarch}';
$arguments['ipxe']['head'][2]
= 'goto get_console';
$arguments['ipxe']['head'][3]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,6 @@ protected function loadUsers()
array('accesscontrolID' => $this->get('id')),
'userID'
);
$types = array();
self::$HookManager->processEvent(
'USER_TYPES_FILTER',
array('types' => &$types)
);
$userid = self::getSubObjectIDs(
'User',
array('type' => $types)
);
$associds = array_diff(
$associds,
$userid
);
unset($userid);
$userids = self::getSubObjectIDs(
'User',
array('id' => $associds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public function userFields($arguments)
. _('User Name')
. '</label>',
$arguments['fields'],
_('User Access Control'),
'<label for="accesscontrol">'
. _('User Access Control')
. '</label>',
self::getClass('AccessControlManager')->buildSelectBox(
$acID
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ public function deletemultiRule()
);
unset($object);
}
if (count($this->data) < 1) {
if (count((array)$this->data) < 1) {
self::redirect('?node=' . $node . '&sub=ruleList');
}
$this->data[] = array(
Expand Down Expand Up @@ -1400,7 +1400,7 @@ public function assocRule()
$this->attributes
);
$this->headerData = array(
'<label for="toggler2>'
'<label for="toggler2">'
. '<input type="checkbox" name="toggle-checkbox'
. $this->node
. '" class="toggle-checkboxrule" id="toggler2"/>'
Expand Down Expand Up @@ -1476,7 +1476,7 @@ public function assocRule()
echo '<form class="form-horizontal" method="post" action="'
. $this->formAction
. '">';
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
$notInMe = $meShow = 'accesscontrolrule';
$meShow .= 'MeShow';
$notInMe .= 'NotInMe';
Expand Down Expand Up @@ -1564,7 +1564,7 @@ public function assocRule()
);
$getter = 'accesscontrolrules';
array_walk($items, $returnData);
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
echo '<div class="panel panel-warning">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
Expand Down Expand Up @@ -1771,7 +1771,7 @@ public function membership()
echo '<form class="form-horizontal" method="post" action="'
. $this->formAction
. '">';
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
$notInMe = $meShow = 'user';
$meShow .= 'MeShow';
$notInMe .= 'NotInMe';
Expand All @@ -1792,7 +1792,7 @@ public function membership()
echo '<br/>';
echo '<div class="hiddeninitially panel panel-info" id="'
. $notInMe
. '"/>';
. '">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
echo _('Add Users');
Expand Down Expand Up @@ -1839,7 +1839,7 @@ public function membership()
);
$getter = 'users';
array_walk($items, $returnData);
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
echo '<div class="panel panel-warning">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
Expand Down
16 changes: 9 additions & 7 deletions packages/web/lib/plugins/site/hooks/addsitegroup.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ public function groupSideMenu($arguments)
if ($node != 'group') {
return;
}
$link = $arguments['linkformat'];
$this->arrayInsertAfter(
"$link#group-image",
$arguments['submenu'],
"$link#group-site",
_('Site Association')
);
if (isset($arguments['linkformat'])) {
$link = $arguments['linkformat'];
self::arrayInsertAfter(
"$link#group-image",
$arguments['submenu'],
"$link#group-site",
_('Site Association')
);
}
}
/**
* Group fields.
Expand Down
6 changes: 5 additions & 1 deletion packages/web/lib/plugins/site/hooks/addsiteuser.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public function userData($arguments)
)
)
);
$sitenames = '';
foreach ($SiteNames as $name) {
$sitenames .= $name.",";
unset($name);
Expand Down Expand Up @@ -268,7 +269,9 @@ public function userFields($arguments)
. _('User Name')
. '</label>',
$arguments['fields'],
_('Is Restricted User '),
'<label for="isRestricted">'
. _('Is Restricted User ')
. '</label>',
sprintf(
'<input type="checkbox" name="isRestricted" id="isRestricted"%s/>'
. '<label for="isRestricted"></label>',
Expand Down Expand Up @@ -360,6 +363,7 @@ public function addNotes($arguments)
)
)
);
$sitenames = '';
foreach ($Sites as $index) {
$sitenames .= $index." ";
unset($index);
Expand Down
12 changes: 6 additions & 6 deletions packages/web/lib/plugins/site/pages/sitemanagementpage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ public function __construct($name = '')
}
$this->headerData = array(
'<input type="checkbox" name="toggle-checkbox" class='
. '"toggle-checkboxAction" checked/>',
. '"toggle-checkboxAction" id="toggler"/>',
_('Site Name'),
_('Site Description'),
_('Hosts')
);
$this->templates = array(
'<input type="checkbox" name="location[]" value='
. '"${id}" class="toggle-action" checked/>',
. '"${id}" class="toggle-action"/>',
'<a href="?node=site&sub=edit&id=${id}" title="Edit">${name}</a>',
'${description}',
'${hosts}'
Expand Down Expand Up @@ -509,7 +509,7 @@ public function membershipHost()
echo '<form class="form-horizontal" method="post" action="'
. $this->formAction
. '">';
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
$notInMe = $meShow = 'host';
$meShow .= 'MeShow';
$notInMe .= 'NotInMe';
Expand Down Expand Up @@ -575,7 +575,7 @@ public function membershipHost()
);
$getter = 'hosts';
array_walk($items, $returnData);
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
echo '<div class="panel panel-warning">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
Expand Down Expand Up @@ -715,7 +715,7 @@ public function membership()
echo '<form class="form-horizontal" method="post" action="'
. $this->formAction
. '">';
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
$notInMe = $meShow = 'user';
$meShow .= 'MeShow';
$notInMe .= 'NotInMe';
Expand Down Expand Up @@ -783,7 +783,7 @@ public function membership()
);
$getter = 'users';
array_walk($items, $returnData);
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
echo '<div class="panel panel-warning">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public function membership()
echo '<form class="form-horizontal" method="post" action="'
. $this->formAction
. '">';
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
$notInMe = $meShow = 'image';
$meShow .= 'MeShow';
$notInMe .= 'NotInMe';
Expand Down Expand Up @@ -610,7 +610,7 @@ public function membership()
);
$getter = 'images';
array_walk($items, $returnData);
if (count($this->data) > 0) {
if (count((array)$this->data) > 0) {
echo '<div class="panel panel-warning">';
echo '<div class="panel-heading text-center">';
echo '<h4 class="title">';
Expand Down

0 comments on commit 2bf0e8c

Please sign in to comment.