Changeset 5431 for extensions/lmt


Ignore:
Timestamp:
Mar 28, 2010, 9:19:27 PM (14 years ago)
Author:
grum
Message:

Update the plugin for compatibility with Piwigo 2.1

Location:
extensions/lmt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/lmt/admin/lmt_admin.tpl

    r3396 r5431  
     1<h2 style="float:right;top:-24px;position:relative;height:auto;font-size:12px;font-weight:normal;">{$plugin.LMT_VERSION}</h2>
    12
    2 <div class="titrePage">
    3   <h2 style="position:absolute;right:0px;top:32px;height:auto;font-size:12px;font-weight:normal;">:: {$plugin.LMT_VERSION} ::</h2>
    4   <h2>{'lmt_title'|@translate} <span style="font-size:-1;font-weight:normal;">{$TABSHEET_TITLE}</span></h2>
     3<div style="position:relative;top:-24px;clear:right;">
    54
    6   {*{$tabsheet}*}
    75</div>
    86
    9 {*<h3>{$plugin.LMT_TITLE}</h3>*}
     7
     8
     9<h3>{$plugin.LMT_TITLE}</h3>
    1010
    1111{$LMT_BODY_PAGE}
  • extensions/lmt/lmt_aip.class.inc.php

    r4396 r5431  
    376376    $sql="SELECT count(element_id) FROM ".CADDIE_TABLE." WHERE user_id = '".$user['id']."'";
    377377    $result=pwg_query($sql);
    378     $nbphotos=mysql_fetch_array($result);
     378    $nbphotos=pwg_db_fetch_row($result);
    379379
    380380    $author_list_values = array(0);
     
    384384    if($result)
    385385    {
    386       while($row=mysql_fetch_array($result))
     386      while($row=pwg_db_fetch_assoc($result))
    387387      {
    388388        $author_list_values[]=$row['id'];
     
    511511    if($result)
    512512    {
    513       while($row=mysql_fetch_array($result))
     513      while($row=pwg_db_fetch_assoc($result))
    514514      {
    515515        $lmt_licence_default_author_values[]=$row['id'];
     
    616616      if($result)
    617617      {
    618         if(mysql_affected_rows()==1)
     618        if(pwg_db_changes()==1)
    619619        {
    620620          $this->display_result(l10n("lmt_author_deleted"), true);
     
    625625          if($result)
    626626          {
    627             $nbimages=mysql_affected_rows();
     627            $nbimages=pwg_db_changes();
    628628            if($nbimages>0)
    629629            {
     
    684684    if($result)
    685685    {
    686       while($row=mysql_fetch_array($result))
     686      while($row=pwg_db_fetch_assoc($result))
    687687      {
    688688        $datas["author_list"][]=array(
     
    715715      if($result)
    716716      {
    717         while($row=mysql_fetch_array($result))
     717        while($row=pwg_db_fecth_assoc($result))
    718718        {
    719719          $datas=array(
     
    879879    if($result)
    880880    {
    881       while($row = mysql_fetch_array($result))
     881      while($row = pwg_db_fetch_assoc($result))
    882882      {
    883883        $filenfo = pathinfo($row['path']);
     
    919919    $sql="select FOUND_ROWS()";
    920920    $result=pwg_query($sql);
    921     $nb=mysql_fetch_array($result);
     921    $nb=pwg_db_fetch_row($result);
    922922
    923923    $pages_navigation = new pages_navigation();
     
    982982    if($result)
    983983    {
    984       while($row = mysql_fetch_array($result))
     984      while($row = pwg_db_fetch_assoc($result))
    985985      {
    986986        $filenfo = pathinfo($row['path']);
     
    10211021    $sql="select FOUND_ROWS()";
    10221022    $result=pwg_query($sql);
    1023     $nb=mysql_fetch_array($result);
     1023    $nb=pwg_db_fetch_row($result);
    10241024
    10251025    $pages_navigation = new pages_navigation();
  • extensions/lmt/lmt_root.class.inc.php

    r4396 r5431  
    296296      if($result)
    297297      {
    298         while($row=mysql_fetch_array($result))
     298        while($row=pwg_db_fetch_assoc($result))
    299299        {
    300300          $return=array(
     
    321321        if($result)
    322322        {
    323           while($row=mysql_fetch_array($result))
     323          while($row=pwg_db_fetch_assoc($result))
    324324          {
    325325            $return["aut_text1"]=$row['text1'];
     
    345345      {
    346346        $returned=array();
    347         while($row=mysql_fetch_assoc($result))
     347        while($row=pwg_db_fetch_assoc($result))
    348348        {
    349349          array_push($returned, $row);
  • extensions/lmt/main.inc.php

    r4396 r5431  
    22/*
    33Plugin Name: LMT
    4 Version: 1.1.0
     4Version: 1.2.0
    55Description: Appliquer une licence sur ses photos / Apply a licence on photos
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=282
     
    4242|         |            | * mantis : feature 1295
    4343|         |            |   Compatibility with theme 'montblanc'
    44 |         |            |
     44| 1.2.0   | 2010/03/28 | * compatibility with Piwigo 2.1
    4545|         |            |
    4646|         |            |
     
    7676define('LMT_PATH' , PHPWG_PLUGINS_PATH . LMT_DIR . '/');
    7777
    78 define('LMT_VERSION' , '1.1.0'); // => ne pas oublier la version dans l'entête !!
     78define('LMT_VERSION' , '1.2.0'); // => ne pas oublier la version dans l'entête !!
    7979
    8080global $prefixeTable;
  • extensions/lmt/maintain.inc.php

    r3396 r5431  
    1414if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
    1515
    16 define('LMT_DIR' , basename(dirname(__FILE__)));
    17 define('LMT_PATH' , PHPWG_PLUGINS_PATH . LMT_DIR . '/');
     16if(!defined('LMT_DIR')) define('LMT_DIR' , basename(dirname(__FILE__)));
     17if(!defined('LMT_PATH')) define('LMT_PATH' , PHPWG_PLUGINS_PATH . LMT_DIR . '/');
    1818
    1919//ini_set('error_reporting', E_ALL);
     
    2929{
    3030  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php');
    31   // need GPC release greater or equal than 2.0.2
    32   if(checkGPCRelease(2,0,2))
     31  // need GPC release greater or equal than 2.0.5
     32  if(checkGPCRelease(2,0,5))
    3333  {
    3434    @include_once('lmt_install.class.inc.php');
     
    3939function gpcMsgError(&$errors)
    4040{
    41   array_push($errors, sprintf(l10n('lmt_gpc2_not_installed'), "2.0.2"));
     41  array_push($errors, sprintf(l10n('lmt_gpc2_not_installed'), "2.0.5"));
    4242}
    4343// -----------------------------------------------------------------------------
     
    4949
    5050
    51 function plugin_install($plugin_id, $plugin_version, &$errors) 
     51function plugin_install($plugin_id, $plugin_version, &$errors)
    5252{
    5353  global $prefixeTable, $gpc_installed;
Note: See TracChangeset for help on using the changeset viewer.