Changeset 21996


Ignore:
Timestamp:
04/03/13 20:48:42 (6 years ago)
Author:
LucMorizur
Message:

Compliance with Piwigo 2.5

Location:
extensions/event_cats
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/CHANGELOG.txt

    r10458 r21996  
     12013-04-02 1.2.7 
     2                  Complies with Piwigo 2.5 
     3 
    142011-04-18 1.2.6 
    25                  Fix bug 2267 and small improvements 
  • extensions/event_cats/include/evntcats_admin_funcs.inc.php

    r21652 r21996  
    137137    $t2 = 0; $t3 = false; $t4 = false; 
    138138    while ( // The check is executed once at minimum 
    139       !($t3 = pwg_db_fetch_row(pwg_query(" 
     139      (is_null($t3 = pwg_db_fetch_row(pwg_query(" 
    140140        SELECT `id` 
    141141        FROM `".GROUPS_TABLE."` 
    142142        WHERE `name` = '".$_POST['groupname']."'; 
    143       "))) and 
     143      "))) or !$t3) and 
    144144      $t2++ == 0 // The check is executed twice at maximum 
    145145    ) 
     
    615615    } 
    616616    else { 
     617      // There is an issue with pwg_db_insert_id() (actually with procedures 
     618      // used in pwg_db_insert_id()): if last entry has id 2, 
     619      // but entries 0 and 1 have been deleted, created entry gets id 3, 
     620      // but pwg_db_insert_id() returns 0. Thus is it necessary here to get 
     621      // the id another way. 
     622      $r = pwg_query(" 
     623        SELECT `id` 
     624        FROM `".EVNTCATS_TABLE."` 
     625        WHERE `code` = '".$ec_code."'" 
     626      ); 
     627      $t2 = pwg_db_fetch_row($r); 
     628       
    617629      build_ec_lists(); // Don't remember exactly why, but must be done here 
    618630      $forced = ($forced == 'false') ? '' : l10n('ec_cnfrm_forced'); 
    619631      $page['infos'][] = 
    620        sprintf(l10n('ec_entry_create_OK'), pwg_db_insert_id()). 
     632       sprintf(l10n('ec_entry_create_OK'), $t2[0]). 
    621633       $ec_code.' => '. 
    622634       $ec_lists['user_ids'][$ec_user_id].$forced 
  • extensions/event_cats/include/evntcats_main_funcs.inc.php

    r21652 r21996  
    8383     AND `image_id` = ".$img 
    8484  ); 
    85   return (bool)pwg_num_rows($r); 
     85  return (bool)pwg_db_num_rows($r); 
    8686} 
    8787 
  • extensions/event_cats/main.inc.php

    r21652 r21996  
    4444define( // ------------------------------------------------------------------- 
    4545  'EVNTCATS_INFO_VERSION', // VERSION HISTORY : 
    46    '1.2.6' // Fix bug 2267 « "Test" link in "autolog entries" admin page 
     46   '1.2.7' // Complies with Piwigo 2.5  
     47// '1.2.6' // Fix bug 2267 « "Test" link in "autolog entries" admin page 
    4748//            doesn't work », and small improvements 
    4849// '1.2.5' // Compatibility with Piwigo 2.2 (svn:10052) 
Note: See TracChangeset for help on using the changeset viewer.