Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php8 support #175

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions actions/assign_usergrouptoaccesspath.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
$selpaths = get_request_var('selected_accesspaths');
$selperm = get_request_var('permission'); // TODO: There is no check, whether this var is given!

if (count($selusers) == 1 && empty($selusers[0]))
if ($selusers != NULL && count($selusers) == 1 && empty($selusers[0]))
$selusers = NULL;
if (count($selgroups) == 1 && empty($selgroups[0]))
if ($selgroups != NULL && count($selgroups) == 1 && empty($selgroups[0]))
$selgroups = NULL;
if (count($selpaths) == 1 && empty($selpaths[0]))
if ($selpaths != NULL && count($selpaths) == 1 && empty($selpaths[0]))
$selpaths = NULL;

if( $selpaths == NULL || ( $selusers == NULL && $selgroups == NULL ) )
Expand Down
27 changes: 27 additions & 0 deletions classes/providers/ldap/LdapUserViewProvider.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,33 @@ public function getGroups()
return $ret;
}

/**
* (non-PHPdoc)
* @see svnadmin\core\interfaces.IGroupViewProvider::getGroupsOfSubgroup()
*/
public function getGroupsOfSubgroup($objGroup)
{
throw new Exception('not implemented');
}

/**
* (non-PHPdoc)
* @see svnadmin\core\interfaces.IGroupViewProvider::getSubgroupsOfGroup()
*/
public function getSubgroupsOfGroup($objGroup)
{
throw new Exception('not implemented');
}

/**
* (non-PHPdoc)
* @see svnadmin\core\interfaces.IGroupViewProvider::getSubgroupsOfGroup()
*/
public function isSubgroupInGroup($objSubgroup, $objGroup)
{
throw new Exception('not implemented');
}

/**
* (non-PHPdoc)
* @see svnadmin\core\interfaces.IGroupViewProvider::groupExists()
Expand Down
22 changes: 2 additions & 20 deletions classes/util/global.func.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
<?php
function checkPHPVersion($minimumVersion)
{
$phpVersion = phpversion();
$phpVersionParts = explode(".", $phpVersion);
$minVersionParts = explode(".", $minimumVersion);
$minVersionPartsCount = count($minVersionParts);

$check = true;
if ($minVersionPartsCount >= 1)
if ($phpVersionParts[0] < $minVersionParts[0])
$check = false;

if ($minVersionPartsCount >= 2 && $phpVersionParts[0] == $minVersionParts[0])
if ($phpVersionParts[1] < $minVersionParts[1])
$check = false;

if ($minVersionPartsCount >= 3 && $phpVersionParts[0] == $minVersionParts[0] && $phpVersionParts[1] == $minVersionParts[1])
if ($phpVersionParts[2] < $minVersionParts[2])
$check = false;

return $check;
return version_compare(PHP_VERSION, $minimumVersion);
}

function exception_handler($exception)
Expand Down Expand Up @@ -271,4 +253,4 @@ function HtmlFilterBox($tableId, $columnIndex=0)
</div>
<?php
}
?>
?>
4 changes: 2 additions & 2 deletions include/ifcorelib/IF_HtPasswd.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ private function crypt_apr1_md5($plainpasswd, $salt = "")

for($i=$len; $i>0; $i>>=1)
{
$text.= ($i & 1) ? chr(0) : $plainpasswd{0};
$text.= ($i & 1) ? chr(0) : $plainpasswd[0];
}

$bin = pack("H32", md5($text));
Expand Down Expand Up @@ -449,4 +449,4 @@ private function crypt_apr1_md5($plainpasswd, $salt = "")
return "$"."apr1"."$".$salt."$".$tmp;
}
}
?>
?>
6 changes: 5 additions & 1 deletion include/ifcorelib/IF_IniFile.func.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ function if_write_ini_file( $dest_filename, $data )
}

$fh = fopen( $dest_filename, "w" );
if ( !is_resource( $fh ) )
{
return false; // failed to open file
}
flock( $fh, LOCK_EX );
foreach( $data as $section_name=>$section_data ) // iterate sections.
{
Expand Down Expand Up @@ -156,4 +160,4 @@ function if_backup_file( $filename, $backup_folder )
}
return $dest_backup_file;
}
?>
?>