mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts: # application/transaction.class.inc.php # application/ui.extkeywidget.class.inc.php # composer.json # composer.lock # js/utils.js # lib/composer/InstalledVersions.php # lib/composer/installed.json # lib/composer/installed.php # lib/pear/archive_tar/Archive/Tar.php # lib/pear/archive_tar/package.xml # setup/wizardsteps.class.inc.php # sources/Controller/AjaxRenderController.php
This commit is contained in:
@@ -27,8 +27,6 @@ use Combodo\iTop\Application\Helper\Session;
|
||||
* @copyright Copyright (C) 2010-2021 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
class privUITransaction
|
||||
{
|
||||
/**
|
||||
@@ -271,27 +269,26 @@ class privUITransactionFile
|
||||
/**
|
||||
* Removes the transaction specified by its id
|
||||
* @param int $id The Identifier (as returned by GetNewTransactionId) of the transaction to be removed.
|
||||
* @return void
|
||||
* @return bool true if the token can be removed
|
||||
*/
|
||||
public static function RemoveTransaction($id)
|
||||
{
|
||||
$bSuccess = true;
|
||||
$sFilepath = APPROOT.'data/transactions/'.$id;
|
||||
clearstatcache(true, $sFilepath);
|
||||
if(!file_exists($sFilepath))
|
||||
{
|
||||
if (!file_exists($sFilepath)) {
|
||||
$bSuccess = false;
|
||||
self::Error("RemoveTransaction: Transaction '$id' not found. Pending transactions for this user:\n".implode("\n", self::GetPendingTransactions()));
|
||||
self::Error("RemoveTransaction: Transaction '$id' not found. Pending transactions for this user:\n"
|
||||
.implode("\n", self::GetPendingTransactions()));
|
||||
} else {
|
||||
$bSuccess = @unlink($sFilepath);
|
||||
}
|
||||
$bSuccess = @unlink($sFilepath);
|
||||
if (!$bSuccess)
|
||||
{
|
||||
|
||||
if (!$bSuccess) {
|
||||
self::Error('RemoveTransaction: FAILED to remove transaction '.$id);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
self::Info('RemoveTransaction: OK '.$id);
|
||||
}
|
||||
|
||||
return $bSuccess;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user