Changeset 122989 in spip-zone


Ignore:
Timestamp:
Mar 17, 2020, 2:03:12 PM (3 weeks ago)
Author:
Cerdic
Message:

Permettre d'enlever le parent d'une organisation qui en a deja un :p

Location:
_plugins_/contacts_et_organisations/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/contacts_et_organisations/trunk

    • Property subgit:lock:c701c1685cdb4edbac3e62b766b4e4408a9a47c0 deleted
    • Property subgit:lock:78f715c5197ae2876cea6b7be108fa63cf65609a set to 2020-03-17T15:03:22.141
  • _plugins_/contacts_et_organisations/trunk/action/editer_organisation.php

    r99766 r122989  
    155155        // du parent actuel
    156156        if (isset($c['id_parent'])
    157                 and $id_parent = intval($c['id_parent'])
    158                 and $id_parent != $id_parent_actuel
    159                 and sql_countsel('spip_organisations', 'id_organisation='.intval($id_parent))) {
     157                and !is_null($id_parent = $c['id_parent'])
     158                and intval($id_parent) != $id_parent_actuel
     159                and (!($id_parent = intval($id_parent)) or sql_countsel('spip_organisations', 'id_organisation='.intval($id_parent)))) {
    160160                $champs['id_parent'] = $id_parent;
    161161        }
  • _plugins_/contacts_et_organisations/trunk/paquet.xml

    r121578 r122989  
    22        prefix="contacts"
    33        categorie="auteur"
    4         version="4.0.2"
     4        version="4.0.3"
    55        etat="test"
    66        compatibilite="[3.0.0;3.2.*]"
Note: See TracChangeset for help on using the changeset viewer.