Changeset 5959 for extensions/AMetaData/amd_aip.class.inc.php
- Timestamp:
- Apr 25, 2010, 1:22:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/amd_aip.class.inc.php
r5935 r5959 115 115 { 116 116 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); 117 GPCCss::applyGpcCss(); 117 118 } 118 119 … … 603 604 if($result) 604 605 { 605 while($row= mysql_fetch_assoc($result))606 while($row=pwg_db_fetch_assoc($result)) 606 607 { 607 608 if($row['groupId']==-1) … … 633 634 if($result) 634 635 { 635 while($row= mysql_fetch_assoc($result))636 while($row=pwg_db_fetch_assoc($result)) 636 637 { 637 638 $datas['groups'][]=Array( … … 732 733 733 734 $data=Array( 734 'sheetContent' => $this->BBtoHTML($lang['g003_help_'.$tab]),735 'sheetContent' => GPCCore::BBtoHTML($lang['g003_help_'.$tab]), 735 736 'title' => l10n('g003_help_tab_'.$tab), 736 737 ); … … 740 741 $template->assign_var_from_handle('AMD_BODY_PAGE', 'body_page'); 741 742 } 742 743 744 745 /**746 * convert (light) BB tag to HTML tag747 *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 convert757 * @return String : BB to HTML text758 */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 786 743 787 744 … … 827 784 828 785 $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'"; 830 789 } 831 790 … … 841 800 { 842 801 $i=0; 843 while($row= mysql_fetch_row($result))802 while($row=pwg_db_fetch_row($result)) 844 803 { 845 804 $returned.=$row[0]; … … 876 835 $returned=""; 877 836 878 if(count($list)>0 )837 if(count($list)>0 and trim($imagesList)!='') 879 838 { 880 839 // $path = path of piwigo's on the server filesystem … … 885 844 if($result) 886 845 { 887 while($row= mysql_fetch_assoc($result))846 while($row=pwg_db_fetch_assoc($result)) 888 847 { 889 848 /* … … 938 897 if($result) 939 898 { 940 while($row= mysql_fetch_row($result))899 while($row=pwg_db_fetch_row($result)) 941 900 { 942 901 $numOfPictures=$row[0]; … … 951 910 if($result) 952 911 { 953 while($row= mysql_fetch_row($result))912 while($row=pwg_db_fetch_row($result)) 954 913 { 955 914 $numOfPicturesNotAnalyzed=$row[0]; … … 962 921 if($result) 963 922 { 964 while($row= mysql_fetch_row($result))923 while($row=pwg_db_fetch_row($result)) 965 924 { 966 925 $numOfPicturesWithoutTags=$row[0]; … … 1051 1010 if($result) 1052 1011 { 1053 while($row= mysql_fetch_assoc($result))1012 while($row=pwg_db_fetch_assoc($result)) 1054 1013 { 1055 1014 $datas[]=array( … … 1110 1069 if($result) 1111 1070 { 1112 while($row= mysql_fetch_assoc($result))1071 while($row=pwg_db_fetch_assoc($result)) 1113 1072 { 1114 1073 $datas[]=array( … … 1148 1107 if($result) 1149 1108 { 1150 if( mysql_num_rows($result)==0)1109 if(pwg_db_num_rows($result)==0) 1151 1110 { 1152 1111 $sql="INSERT INTO ".$this->tables['selected_tags']." … … 1197 1156 { 1198 1157 $datas=Array(); 1199 while($row= mysql_fetch_assoc($result))1158 while($row=pwg_db_fetch_assoc($result)) 1200 1159 { 1201 1160 if($row['groupId']==$id) … … 1298 1257 { 1299 1258 $datas=Array(); 1300 while($row= mysql_fetch_assoc($result))1259 while($row=pwg_db_fetch_assoc($result)) 1301 1260 { 1302 1261 $datas[]=Array( … … 1410 1369 $sql="INSERT INTO ".$this->tables['groups']." VALUES('', 9999)"; 1411 1370 $result=pwg_query($sql); 1412 $groupId= mysql_insert_id();1371 $groupId=pwg_db_insert_id(); 1413 1372 } 1414 1373 … … 1470 1429 if($result) 1471 1430 { 1472 while($row= mysql_fetch_assoc($result))1431 while($row=pwg_db_fetch_assoc($result)) 1473 1432 { 1474 1433 if(array_key_exists($row['lang'], $datasLang['language_list'])) … … 1519 1478 if($result) 1520 1479 { 1521 while($row= mysql_fetch_assoc($result))1480 while($row=pwg_db_fetch_assoc($result)) 1522 1481 { 1523 1482 $datas['groups'][]=Array(
Note: See TracChangeset
for help on using the changeset viewer.