Ignore:
Timestamp:
Apr 25, 2010, 1:22:40 AM (14 years ago)
Author:
grum
Message:

Some changes on release 0.4b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/amd_aip.class.inc.php

    r5935 r5959  
    115115  {
    116116    add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));
     117    GPCCss::applyGpcCss();
    117118  }
    118119
     
    603604    if($result)
    604605    {
    605       while($row=mysql_fetch_assoc($result))
     606      while($row=pwg_db_fetch_assoc($result))
    606607      {
    607608        if($row['groupId']==-1)
     
    633634    if($result)
    634635    {
    635       while($row=mysql_fetch_assoc($result))
     636      while($row=pwg_db_fetch_assoc($result))
    636637      {
    637638        $datas['groups'][]=Array(
     
    732733
    733734    $data=Array(
    734       'sheetContent' => $this->BBtoHTML($lang['g003_help_'.$tab]),
     735      'sheetContent' => GPCCore::BBtoHTML($lang['g003_help_'.$tab]),
    735736      'title' => l10n('g003_help_tab_'.$tab),
    736737    );
     
    740741    $template->assign_var_from_handle('AMD_BODY_PAGE', 'body_page');
    741742  }
    742 
    743 
    744 
    745   /**
    746    * convert (light) BB tag to HTML tag
    747    *
    748    * all BB codes are not recognized, only :
    749    *  - [ul] [/ul]
    750    *  - [li] [/li]
    751    *  - [b] [/b]
    752    *  - [i] [/i]
    753    *  - [url] [/url]
    754    *  - carriage return is replaced by a <br>
    755    *
    756    * @param String $text : text to convert
    757    * @return String : BB to HTML text
    758    */
    759   protected function BBtoHTML($text)
    760   {
    761     $patterns = Array(
    762       '/\[li\](.*?)\[\/li\]\n*/im',
    763       '/\[b\](.*?)\[\/b\]/ism',
    764       '/\[i\](.*?)\[\/i\]/ism',
    765       '/\[url\]([\w]+?:\/\/[^ \"\n\r\t<]*?)\[\/url\]/ism',
    766       '/\[url=([\w]+?:\/\/[^ \"\n\r\t<]*?)\](.*?)\[\/url\]/ism',
    767       '/\n{0,1}\[ul\]\n{0,1}/im',
    768       '/\n{0,1}\[\/ul\]\n{0,1}/im',
    769       '/\n/im',
    770     );
    771     $replacements = Array(
    772       '<li>\1</li>',
    773       '<b>\1</b>',
    774       '<i>\1</i>',
    775       '<a href="\1">\1</a>',
    776       '<a href="\1">\2</a>',
    777       '<ul>',
    778       '</ul>',
    779       '<br>',
    780     );
    781 
    782     return(preg_replace($patterns, $replacements, $text));
    783   }
    784 
    785 
    786743
    787744
     
    827784
    828785      $sql.=" LEFT JOIN ".CADDIE_TABLE." ct ON ait.imageId = ct.element_id
    829             WHERE ct.user_id = ".$user['id'].";";
     786            WHERE ct.user_id = ".$user['id']." ";
     787
     788      if($mode=="caddieAdd") $sql.=" AND ait.analyzed='n'";
    830789    }
    831790
     
    841800    {
    842801      $i=0;
    843       while($row=mysql_fetch_row($result))
     802      while($row=pwg_db_fetch_row($result))
    844803      {
    845804        $returned.=$row[0];
     
    876835    $returned="";
    877836
    878     if(count($list)>0)
     837    if(count($list)>0 and trim($imagesList)!='')
    879838    {
    880839      // $path = path of piwigo's on the server filesystem
     
    885844      if($result)
    886845      {
    887         while($row=mysql_fetch_assoc($result))
     846        while($row=pwg_db_fetch_assoc($result))
    888847        {
    889848          /*
     
    938897    if($result)
    939898    {
    940       while($row=mysql_fetch_row($result))
     899      while($row=pwg_db_fetch_row($result))
    941900      {
    942901        $numOfPictures=$row[0];
     
    951910    if($result)
    952911    {
    953       while($row=mysql_fetch_row($result))
     912      while($row=pwg_db_fetch_row($result))
    954913      {
    955914        $numOfPicturesNotAnalyzed=$row[0];
     
    962921    if($result)
    963922    {
    964       while($row=mysql_fetch_row($result))
     923      while($row=pwg_db_fetch_row($result))
    965924      {
    966925        $numOfPicturesWithoutTags=$row[0];
     
    10511010    if($result)
    10521011    {
    1053       while($row=mysql_fetch_assoc($result))
     1012      while($row=pwg_db_fetch_assoc($result))
    10541013      {
    10551014        $datas[]=array(
     
    11101069    if($result)
    11111070    {
    1112       while($row=mysql_fetch_assoc($result))
     1071      while($row=pwg_db_fetch_assoc($result))
    11131072      {
    11141073        $datas[]=array(
     
    11481107      if($result)
    11491108      {
    1150         if(mysql_num_rows($result)==0)
     1109        if(pwg_db_num_rows($result)==0)
    11511110        {
    11521111          $sql="INSERT INTO ".$this->tables['selected_tags']."
     
    11971156      {
    11981157        $datas=Array();
    1199         while($row=mysql_fetch_assoc($result))
     1158        while($row=pwg_db_fetch_assoc($result))
    12001159        {
    12011160          if($row['groupId']==$id)
     
    12981257      {
    12991258        $datas=Array();
    1300         while($row=mysql_fetch_assoc($result))
     1259        while($row=pwg_db_fetch_assoc($result))
    13011260        {
    13021261          $datas[]=Array(
     
    14101369      $sql="INSERT INTO ".$this->tables['groups']." VALUES('', 9999)";
    14111370      $result=pwg_query($sql);
    1412       $groupId=mysql_insert_id();
     1371      $groupId=pwg_db_insert_id();
    14131372    }
    14141373
     
    14701429      if($result)
    14711430      {
    1472         while($row=mysql_fetch_assoc($result))
     1431        while($row=pwg_db_fetch_assoc($result))
    14731432        {
    14741433          if(array_key_exists($row['lang'], $datasLang['language_list']))
     
    15191478    if($result)
    15201479    {
    1521       while($row=mysql_fetch_assoc($result))
     1480      while($row=pwg_db_fetch_assoc($result))
    15221481      {
    15231482        $datas['groups'][]=Array(
Note: See TracChangeset for help on using the changeset viewer.