mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
commit
86a6322287
2
.github/workflows/pr-18-autolabel.yaml
vendored
2
.github/workflows/pr-18-autolabel.yaml
vendored
|
|
@ -18,4 +18,4 @@ jobs:
|
|||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/changed-lines-count-labeler.yml
|
||||
continue-on-error: true
|
||||
continue-on-error: true
|
||||
|
|
|
|||
19
.github/workflows/pr-18.yaml
vendored
19
.github/workflows/pr-18.yaml
vendored
|
|
@ -20,12 +20,21 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install GitHub CLI
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install gh -y
|
||||
#- name: Install GitHub CLI
|
||||
# run: |
|
||||
# sudo apt update
|
||||
# sudo apt install gh -y
|
||||
|
||||
- name: Assign reviewer
|
||||
- name: Assign reviewer method 1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
gh pr edit "$url" --add-assignee rycks --add-reviewer rycks
|
||||
gh pr merge "$url" --merge --auto
|
||||
|
||||
|
||||
- name: Assign reviewer method 2
|
||||
env:
|
||||
#REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||
REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer
|
||||
|
|
|
|||
21
.github/workflows/test.yaml
vendored
21
.github/workflows/test.yaml
vendored
|
|
@ -9,10 +9,9 @@ on:
|
|||
env:
|
||||
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
|
||||
ENVGHU: ${{ github.token }}
|
||||
VARAAA: ${{ vars.AAA }}
|
||||
SECBBB: ${{ secrets.BBB }}
|
||||
VARREPORGCCC: ${{ vars.CCC }}
|
||||
ENVFIX: "abc"
|
||||
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
|
||||
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
|
||||
ENVLOCAL: "varenvlocal"
|
||||
|
||||
jobs:
|
||||
testjob:
|
||||
|
|
@ -25,14 +24,6 @@ jobs:
|
|||
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
|
||||
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
|
||||
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
|
||||
echo "variable org: ${{vars.AAA}}"
|
||||
echo "env prg: ${{env.AAA}}"
|
||||
echo "env prg: ${{env.VARAAA}}"
|
||||
echo "secret org: ${{secrets.BBB}}"
|
||||
echo "variable repository of orga: ${{vars.CCC}}"
|
||||
echo "ENVGHT: ${{env.ENVGHT}}"
|
||||
echo "ENVGHU: ${{env.ENVGHU}}"
|
||||
echo "VARAAA: ${{vars.AAA}}"
|
||||
echo "ENVAAA: ${{env.VARAAA}}"
|
||||
echo "VARREPORGCCC: ${{env.VARREPORGCCC}}"
|
||||
echo "ENVFIX: ${{env.ENVFIX}}"
|
||||
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
|
||||
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
|
||||
echo "ENVLOCAL: ${{env.ENVLOCAL}}"
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ if (!$sortorder) {
|
|||
$sortorder = "ASC";
|
||||
}
|
||||
if (!$sortfield) {
|
||||
$sortfield = "p.name";
|
||||
$sortfield = "p.lastname";
|
||||
}
|
||||
if ($page < 0) {
|
||||
$page = 0;
|
||||
|
|
@ -81,7 +81,7 @@ if ($type == "f") {
|
|||
*/
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom as name, st.libelle as stcomm";
|
||||
$sql .= ", p.rowid as cidp, p.name, p.firstname, p.email, p.phone";
|
||||
$sql .= ", p.rowid as cidp, p.lastname, p.firstname, p.email, p.phone";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st,";
|
||||
if (!$user->hasRight('societe', 'client', 'voir') && !$socid) {
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
|
||||
|
|
@ -106,7 +106,7 @@ if ($socid) {
|
|||
$sql .= " AND s.rowid = ".((int) $socid);
|
||||
}
|
||||
if (!empty($search_lastname)) {
|
||||
$sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'";
|
||||
$sql .= " AND p.lastname LIKE '%".$db->escape($search_lastname)."%'";
|
||||
}
|
||||
if (!empty($search_firstname)) {
|
||||
$sql .= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'";
|
||||
|
|
@ -115,8 +115,8 @@ if (!empty($search_company)) {
|
|||
$sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'";
|
||||
}
|
||||
if (!empty($contactname)) { // acces a partir du module de recherche
|
||||
$sql .= " AND (p.name LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') ";
|
||||
$sortfield = "p.name";
|
||||
$sql .= " AND (p.lastname LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') ";
|
||||
$sortfield = "p.lastname";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ if ($resql) {
|
|||
|
||||
print '<table class="liste centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.name", $begin, $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.lastname", $begin, $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "p.firstname", $begin, $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", $begin, $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Email");
|
||||
|
|
|
|||
|
|
@ -1903,8 +1903,10 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
|||
if (!empty($message)) {
|
||||
// Test log level
|
||||
$logLevels = array(LOG_EMERG=>'EMERG', LOG_ALERT=>'ALERT', LOG_CRIT=>'CRITICAL', LOG_ERR=>'ERR', LOG_WARNING=>'WARN', LOG_NOTICE=>'NOTICE', LOG_INFO=>'INFO', LOG_DEBUG=>'DEBUG');
|
||||
|
||||
if (!array_key_exists($level, $logLevels)) {
|
||||
throw new Exception('Incorrect log level');
|
||||
dol_syslog('Error Bad Log Level '.$level, LOG_ERR);
|
||||
$level = $logLevels[LOG_ERR];
|
||||
}
|
||||
if ($level > getDolGlobalInt('SYSLOG_LEVEL')) {
|
||||
return;
|
||||
|
|
@ -10874,13 +10876,14 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param
|
|||
// old behavior, return a string
|
||||
if ($isAllowedForPreview) {
|
||||
$tmpurl = DOL_URL_ROOT.'/document.php?modulepart='.urlencode($modulepart).'&attachment=0&file='.urlencode($relativepath).($param ? '&'.$param : '');
|
||||
|
||||
$title = $langs->trans("Preview");
|
||||
//$title = '%27-alert(document.domain)-%27';
|
||||
//$tmpurl = 'file='.urlencode("'-alert(document.domain)-'_small.jpg");
|
||||
|
||||
// We need to urlencode the parameter after the dol_escape_js($tmpurl) because $tmpurl may contain n url with param file=abc%27def if file has a ' inside.
|
||||
// and when we click on href with this javascript string, a urlcode is done by browser, converted the %27 of file param
|
||||
return 'javascript:document_preview(\''.urlencode(dol_escape_js($tmpurl)).'\', \''.urlencode(dol_mimetype($relativepath)).'\', \''.urlencode(dol_escape_js($title)).'\')';
|
||||
return 'javascript:document_preview(\''.urlencode(dol_escape_js($tmpurl)).'\', \''.urlencode(dol_mimetype($relativepath)).'\', \''.rawurlencode(dol_escape_js($title)).'\')';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if (!$sortorder) {
|
|||
$sortorder = "ASC";
|
||||
}
|
||||
if (!$sortfield) {
|
||||
$sortfield = "p.name";
|
||||
$sortfield = "p.lastname";
|
||||
}
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
||||
|
|
@ -85,12 +85,12 @@ if (dol_strlen($stcomm)) {
|
|||
}
|
||||
|
||||
if (dol_strlen($begin)) {
|
||||
$sql .= " AND p.name LIKE '$begin%'";
|
||||
$sql .= " AND p.lastname LIKE '$begin%'";
|
||||
}
|
||||
|
||||
if ($contactname) {
|
||||
$sql .= " AND p.name LIKE '%".strtolower($contactname)."%'";
|
||||
$sortfield = "p.name";
|
||||
$sql .= " AND p.lastname LIKE '%".strtolower($contactname)."%'";
|
||||
$sortfield = "p.lastname";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ if ($result) {
|
|||
|
||||
print '<table class="liste centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.name", $begin, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "p.lastname", $begin, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "p.firstname", $begin, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", $begin, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Email");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user