Fix adobe issue

This commit is contained in:
gamonoid
2017-09-24 20:13:11 +02:00
parent 7424471a60
commit 5b1b087f01
4 changed files with 73806 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ services:
before_script:
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('dev') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
install:
- rm $TRAVIS_BUILD_DIR/tools/phpunit
- composer require --dev phpunit/phpunit ^5.7
- $TRAVIS_BUILD_DIR/vendor/bin/phpunit --version
- cp $TRAVIS_BUILD_DIR/vendor/bin/phpunit $TRAVIS_BUILD_DIR/tools
@@ -12,4 +13,6 @@ language: php
php:
- '5.6'
- '7.0'
- '7.1'
- 'nightly'
after_failure: "cat /tmp/icehrm.test.log"

View File

@@ -128,9 +128,10 @@ class ADODB_Active_Record {
$db = $pkeyarr;
$pkeyarr = false;
}
if (!$table) {
if (!empty($this->_table)) $table = $this->_table;
if (!$table) {
if (!empty($this->table)) $table = $this->table;
else if (!empty($this->_table)) $table = $this->_table;
else $table = $this->_pluralize(get_class($this));
}
$this->foreignName = strtolower(get_class($this)); // CFR: default foreign name
@@ -1058,4 +1059,4 @@ function adodb_GetActiveRecordsClass2(&$db, $class, $table, $qry, $bindarr, $pri
return $arr;
}
?>
?>

View File

@@ -111,9 +111,7 @@ class ApprovalStatus
public function updateApprovalStatus($type, $id, $currentEmployee, $status)
{
LogManager::getInstance()->error('updateApprovalStatus 1');
if (!$this->approvalChainExists($type, $id)) {
LogManager::getInstance()->error('updateApprovalStatus 2');
return new IceResponse(IceResponse::SUCCESS, array(null, null));
}
@@ -136,8 +134,6 @@ class ApprovalStatus
}
}
LogManager::getInstance()->error('level '.$level);
$currentAL = null;
if ($level > 0) {
$currentAL = new EmployeeApproval();
@@ -149,7 +145,6 @@ class ApprovalStatus
$nextAL = new EmployeeApproval();
$nextAL->Load("type = ? and element = ? and level = ?", array($type, $id, intval($level)+1));
LogManager::getInstance()->error('next AL '.print_r($nextAL, true));
if (empty($nextAL->id)) {
$nextAL = null;
}

73798
tools/phpunit Executable file

File diff suppressed because one or more lines are too long