Skip to content
Merged
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
3 changes: 2 additions & 1 deletion core/modules/modPrune.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

// Possible values for version are: 'development', 'experimental', 'dolibarr',
// 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = '1.2.0';
$this->version = '1.2.1';

// Url to the file with your last numberversion of this module
$url = 'https://wiki.netlogic.fr/versionmodule.php?module=' . strtolower($this->name) . '&number=' . $this->numero . '&version=' . $this->version . '&dolversion=' . DOL_VERSION;
Expand Down Expand Up @@ -249,6 +249,7 @@

// remove vendor content
$count = 0;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';

Check failure on line 252 in core/modules/modPrune.class.php

View workflow job for this annotation

GitHub Actions / build

Expected at least 1 space after "."; 0 found

Check failure on line 252 in core/modules/modPrune.class.php

View workflow job for this annotation

GitHub Actions / build

Expected at least 1 space before "."; 0 found
dol_delete_dir_recursive(dol_buildpath('/prune/vendor/', 0), 0, 0, 1, $count, 0, 1);

return $this->_remove($sql, $options);
Expand Down
6 changes: 1 addition & 5 deletions lib/prune.lib.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2015-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015-2026 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -152,7 +152,6 @@ function retrieveAccessToken($service, $userid, $email = null)
// if we don't have a userid, we use the email field (if not null)
if (!empty($email)) {
$sql .= " AND email='" . $db->escape($email) . "'";
$sql .= " AND entity IN (" . getEntity('user') . ")";
}

$resql = $db->query($sql);
Expand Down Expand Up @@ -185,7 +184,6 @@ function retrieveRefreshTokenBackup($service, $userid, $email = null)
// if we don't have a userid, we use the email field (if not null)
if (!empty($email)) {
$sql .= " AND email='" . $db->escape($email) . "'";
$sql .= " AND entity IN (" . getEntity('user') . ")";
}

$resql = $db->query($sql);
Expand Down Expand Up @@ -221,7 +219,6 @@ function storeAccessToken($service, $token, $refreshtoken, $userid, $email = nul
$sql .= " AND fk_user=" . (int) $userid;
if (!empty($email)) {
$sql .= " AND email='" . $db->escape($email) . "'";
$sql .= " AND entity IN (" . getEntity('user') . ")";
}
$resql = $db->query($sql);
if (!$resql) {
Expand Down Expand Up @@ -270,7 +267,6 @@ function clearToken($service, $userid, $email = null)
$sql .= " AND fk_user=" . (int) $userid;
if (!empty($email)) {
$sql .= " AND email='" . $db->escape($email) . "'";
$sql .= " AND entity (" . getEntity('user') . ")";
}
$resql = $db->query($sql);
if (!$resql) {
Expand Down
Loading