Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/support/3.0' into develop
# Conflicts: # application/twigextension.class.inc.php # datamodels/2.x/authent-cas/composer.json # datamodels/2.x/authent-cas/composer.lock # datamodels/2.x/authent-cas/main.php # datamodels/2.x/authent-cas/vendor/apereo/phpcas/composer.json # datamodels/2.x/authent-cas/vendor/composer/ClassLoader.php # datamodels/2.x/authent-cas/vendor/composer/autoload_classmap.php # datamodels/2.x/authent-cas/vendor/composer/autoload_psr4.php # datamodels/2.x/authent-cas/vendor/composer/autoload_real.php # datamodels/2.x/authent-cas/vendor/composer/autoload_static.php # datamodels/2.x/authent-cas/vendor/composer/installed.json # datamodels/2.x/itop-portal-base/portal/src/Twig/AppExtension.php # lib/apereo/phpcas/source/CAS.php # lib/apereo/phpcas/source/CAS/Client.php # lib/apereo/phpcas/source/CAS/Languages/Galego.php # lib/apereo/phpcas/source/CAS/Languages/Portuguese.php # lib/symfony/cache-contracts/InstalledVersions.php # lib/symfony/cache-contracts/installed.php # lib/symfony/cache-contracts/platform_check.php # sources/Application/UI/Base/Layout/NavigationMenu/NavigationMenu.php # sources/application/TwigBase/Twig/Extension.php
- Loading branch information
Showing
46 changed files
with
1,685 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"config" : { | ||
"classmap-authoritative" : true | ||
}, | ||
"autoload" : { | ||
"psr-4" : { | ||
"Combodo\\iTop\\Cas\\" : "src" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (C) 2010-2022 Combodo SARL | ||
* @license http://opensource.org/licenses/AGPL-3.0 | ||
*/ | ||
|
||
namespace Combodo\iTop\Cas; | ||
|
||
use LogAPI; | ||
|
||
class CASLog extends LogAPI | ||
{ | ||
const CHANNEL_DEFAULT = 'CASLog'; | ||
|
||
protected static $m_oFileLog = null; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
/** | ||
* @copyright Copyright (C) 2010-2022 Combodo SARL | ||
* @license http://opensource.org/licenses/AGPL-3.0 | ||
*/ | ||
|
||
namespace Combodo\iTop\Cas; | ||
|
||
use IssueLog; | ||
use LogAPI; | ||
use Psr\Log\LoggerInterface; | ||
use Psr\Log\LogLevel; | ||
|
||
class CASLogger implements LoggerInterface | ||
{ | ||
public function __construct($sDebugFile) | ||
{ | ||
CASLog::Enable($sDebugFile); | ||
} | ||
|
||
const LEVEL_COMPAT = [ | ||
LogLevel::EMERGENCY => LogAPI::LEVEL_ERROR, | ||
LogLevel::ALERT => LogAPI::LEVEL_ERROR, | ||
LogLevel::CRITICAL => LogAPI::LEVEL_ERROR, | ||
LogLevel::ERROR => LogAPI::LEVEL_ERROR, | ||
LogLevel::WARNING => LogAPI::LEVEL_WARNING, | ||
LogLevel::NOTICE => LogAPI::LEVEL_INFO, | ||
LogLevel::INFO => LogAPI::LEVEL_INFO, | ||
LogLevel::DEBUG => LogAPI::LEVEL_DEBUG, | ||
]; | ||
|
||
public function emergency($message, array $context = array()) | ||
{ | ||
CASLog::Error('EMERGENCY: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
IssueLog::Error('EMERGENCY: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function alert($message, array $context = array()) | ||
{ | ||
CASLog::Error('ALERT: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
IssueLog::Error('ALERT: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function critical($message, array $context = array()) | ||
{ | ||
CASLog::Error('CRITICAL: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
IssueLog::Error('CRITICAL: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function error($message, array $context = array()) | ||
{ | ||
CASLog::Error('ERROR: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
IssueLog::Error('ERROR: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function warning($message, array $context = array()) | ||
{ | ||
CASLog::Warning('WARNING: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function notice($message, array $context = array()) | ||
{ | ||
CASLog::Info('NOTICE: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function info($message, array $context = array()) | ||
{ | ||
CASLog::Info('INFO: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function debug($message, array $context = array()) | ||
{ | ||
CASLog::Debug('DEBUG: '.$message, CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
|
||
public function log($level, $message, array $context = array()) | ||
{ | ||
$sLevel = self::LEVEL_COMPAT[$level] ?? LogAPI::LEVEL_ERROR; | ||
CASLog::Log($sLevel, strtoupper($level).": $message", CASLog::CHANNEL_DEFAULT, $context); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
// autoload.php @generated by Composer | ||
|
||
require_once __DIR__ . '/composer/autoload_real.php'; | ||
|
||
return ComposerAutoloaderInit1878ad96115c3aa0fa5e9fd9807f5db0::getLoader(); |
Oops, something went wrong.