Changeset 21238


Ignore:
Timestamp:
Mar 6, 2013, 1:54:04 PM (11 years ago)
Author:
plg
Message:

compatibility with Piwigo 2.5: replace functions mysql_* with pwg_db_* equivalent

switch version to "auto"

use the new $template->add_index_button function

Location:
extensions/piclens
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/piclens/admin/functions.inc.php

    r3645 r21238  
    5757
    5858$ext = array();
    59   while ($row = mysql_fetch_assoc($result))
     59  while ($row = pwg_db_fetch_assoc($result))
    6060  {
    6161    if (empty($row['tn_ext']))
  • extensions/piclens/admin/piclenswallconfig.php

    r8780 r21238  
    4343        if (!empty($result))
    4444        {
    45                 while ($row = mysql_fetch_assoc($result))
     45                while ($row = pwg_db_fetch_assoc($result))
    4646                        array_push($categories, $row);                 
    4747        }
     
    6767  $me->my_config['piclens_wall_nav'] = isset($_POST['piclens_wall_nav']);
    6868  $me->my_config['piclens_wall_cat_nav_replace'] = isset($_POST['categories_nav']) ?
    69                           array_map("mysql_escape_string", $_POST['categories_nav']) :
     69                          array_map("pwg_db_real_escape_string", $_POST['categories_nav']) :
    7070                          array();
    7171  $me->my_config['piclens_wall_specif'] =   $_POST['piclens_wall_specif'];
     
    124124if (!empty($result))
    125125{
    126         while ($row = mysql_fetch_assoc($result))
     126        while ($row = pwg_db_fetch_assoc($result))
    127127                array_push($categories, $row);
    128128}
     
    157157if (!empty($result))
    158158{
    159         while ($row = mysql_fetch_assoc($result))
     159        while ($row = pwg_db_fetch_assoc($result))
    160160                array_push($categories, $row);
    161161}
  • extensions/piclens/admin/rssfeed.php

    r18642 r21238  
    3535 
    3636  $included_file_types = isset($_POST['file_types']) ?
    37                           array_map("mysql_escape_string", $_POST['file_types']) :
     37                          array_map("pwg_db_real_escape_string", $_POST['file_types']) :
    3838                          array();
    3939  $me->my_config['included_file_types'] = $included_file_types;
  • extensions/piclens/generate_rss.php

    r18935 r21238  
    251251                                        $result = pwg_query($query);
    252252
    253                                         while ($row = mysql_fetch_assoc($result))
     253                                        while ($row = pwg_db_fetch_assoc($result))
    254254                                        {
    255255                                                if (!(in_array($row['id'], explode(',', $user['forbidden_categories']))))
     
    386386                        $result = pwg_query($query);
    387387                       
    388                         while ($row = mysql_fetch_assoc($result))
     388                        while ($row = pwg_db_fetch_assoc($result))
    389389                        {
    390390                                // Plugin Extended Description present et active
     
    756756                $first = true;
    757757
    758                 while ($row = mysql_fetch_array($result))
     758                while ($row = pwg_db_fetch_assoc($result))
    759759                {
    760760               
  • extensions/piclens/include/Piclens.class.php

    r9448 r21238  
    8484                                                $piclnkMaster='';
    8585                                                $result = pwg_query($query);
    86                                                 while ($row = mysql_fetch_assoc($result))
     86                                                while ($row = pwg_db_fetch_assoc($result))
    8787                                                {
    8888                                                        // Gestion des permalinks
     
    150150                                                        $result = pwg_query($query);
    151151
    152                                                         while ($row = mysql_fetch_assoc($result))
     152                                                        while ($row = pwg_db_fetch_assoc($result))
    153153                                                        {
    154154                                                                if (!(in_array($row['id'], explode(',', $user['forbidden_categories']))))
     
    193193                                                        $result = pwg_query($query);
    194194
    195                                                         while ($row = mysql_fetch_array($result))
     195                                                        while ($row = pwg_db_fetch_assoc($result))
    196196                                                        {
    197197                                                                $piclnkMaster.='<link rel="alternate"'
     
    283283                                                $tpl_code='<li><img src="'.$this->root_site_piclens.PICLENS_IMG_PATH.'cooliris-icon-black.png" NAME="but1" class="button" alt="'.l10n('piclens_button').'" width="24" height="24"></a></li>';
    284284                                }
     285       
    285286                                if (isset($tpl_code))
    286                                         $template->concat('PLUGIN_INDEX_ACTIONS', $tpl_code."\n");
     287        {
     288          $template->add_index_button($tpl_code, 100);
     289        }
    287290                        }
    288291                       
     
    318321            if($result)
    319322                {
    320                      $row = mysql_fetch_row($result);
     323                     $row = pwg_db_fetch_row($result);
    321324                     if(is_string($row[0]))
    322325                         {
  • extensions/piclens/main.inc.php

    r9448 r21238  
    22/*
    33 * Plugin Name: CoolIris-Piclens
    4  * Version: 0.4.4
     4 * Version: auto
    55 * Description: Cooliris/Piclens activation
    66 * Plugin URI: http://piwigo.org/ext/extension_view.php?eid=234
  • extensions/piclens/maintain.inc.php

    r3651 r21238  
    2626        if($result)
    2727        {
    28                  $row = mysql_fetch_row($result);
     28                 $row = pwg_db_fetch_row($result);
    2929                 if(is_string($row[0]))
    3030                 {
Note: See TracChangeset for help on using the changeset viewer.