Skip to content

Commit

Permalink
Merge branch '18.0' into fix-email-notification-ticket-assignee-18
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Jan 5, 2025
2 parents 4c4b773 + 1866713 commit d01a99c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
gh pr edit "$url" --add-assignee rycks --add-reviewer rycks
gh pr merge "$url" --merge --auto
continue-on-error: true

- name: Assign reviewer method 2
env:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
branches:
- "18.0"
push:

env:
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions htdocs/comm/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
$sortorder = "ASC";
}
if (!$sortfield) {
$sortfield = "p.name";
$sortfield = "p.lastname";
}
if ($page < 0) {
$page = 0;
Expand Down Expand Up @@ -81,7 +81,7 @@
*/

$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 (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,";
Expand All @@ -106,7 +106,7 @@
$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)."%'";
Expand All @@ -115,8 +115,8 @@
$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";
}

Expand All @@ -136,7 +136,7 @@

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");
Expand Down
10 changes: 5 additions & 5 deletions htdocs/fourn/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$sortorder = "ASC";
}
if (!$sortfield) {
$sortfield = "p.name";
$sortfield = "p.lastname";
}
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;

Expand Down Expand Up @@ -85,12 +85,12 @@
}

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";
}

Expand All @@ -110,7 +110,7 @@

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");
Expand Down

0 comments on commit d01a99c

Please sign in to comment.