Changeset 4917 for extensions
- Timestamp:
- Feb 19, 2010, 9:11:02 PM (15 years ago)
- Location:
- extensions/AMetaData
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/admin/amd_database.tpl
r4905 r4917 138 138 }).responseText; 139 139 140 pct=100*(i+1)/ (list.length+2);140 pct=100*(i+1)/list.length; 141 141 $("#iprogressbar_bg").css("width", pct+"%"); 142 142 $("#iprogressbar_fg").html(Math.round(pct)+"%"); 143 143 } 144 144 145 for(j=0;j<3;j++) 146 { 147 tmp = $.ajax({ 148 type: "POST", 149 url: "{/literal}{$datas.urlRequest}{literal}", 150 async: false, 151 data: { ajaxfct:"makeStatsConsolidate", step:j } 152 }).responseText; 153 154 pct=100*(i+j+1)/(list.length+2); 155 $("#iprogressbar_bg").css("width", pct+"%"); 156 $("#iprogressbar_fg").html(Math.round(pct)+"%"); 157 } 145 tmp = $.ajax({ 146 type: "POST", 147 url: "{/literal}{$datas.urlRequest}{literal}", 148 async: false, 149 data: { ajaxfct:"makeStatsConsolidation" } 150 }).responseText; 151 158 152 159 153 timeEnd = new Date(); -
extensions/AMetaData/amd_aip.class.inc.php
r4916 r4917 149 149 case 'makeStatsDoAnalyze': 150 150 $result=$this->ajax_amd_makeStatsDoAnalyze($_REQUEST['imagesList']); 151 break; 152 case 'makeStatsConsolidation': 153 $result=$this->ajax_amd_makeStatsConsolidation(); 151 154 break; 152 155 case 'makeStatsGetStatus': … … 834 837 } 835 838 } 836 837 $sql="UPDATE ".$this->tables['used_tags']." ut,838 (SELECT COUNT(imageId) AS nb, numId839 FROM ".$this->tables['images_tags']."840 GROUP BY numId) nb841 SET ut.numOfImg = nb.nb842 WHERE ut.numId = nb.numId;";843 pwg_query($sql);844 845 839 return(trim($returned).";"); 846 840 } … … 897 891 898 892 /** 893 * do some consolidation on database to optimize other requests 894 * 895 */ 896 private function ajax_amd_makeStatsConsolidation() 897 { 898 899 $sql="UPDATE ".$this->tables['used_tags']." ut, 900 (SELECT COUNT(imageId) AS nb, numId 901 FROM ".$this->tables['images_tags']." 902 GROUP BY numId) nb 903 SET ut.numOfImg = nb.nb 904 WHERE ut.numId = nb.numId;"; 905 pwg_query($sql); 906 907 return($returned); 908 } 909 910 /** 899 911 * returns a list of formated string, separated with a semi-colon : 900 912 * - number of current analyzed pictures + number of current analyzed tags
Note: See TracChangeset
for help on using the changeset viewer.