变更集57267
图例:
未修改 补充 远离的
-
trunk/src/wp-admin/includes/image.php 56743兰特 57267兰特 864 864 } 865 865 866 $exif_description=“”; 867 $exif_usercomment=“”; 866 868 if(!空($exif['ImageDescription'])){ 869 $exif_description=修剪($exif['ImageDescription']); 870 } 871 872 if(!空($exif['COMPUTED']['UserComment'])){ 873 $exif_usercomment=trim($exif['COMPUTED']['usercomment']); 874 } 875 876 if($exif_description){ 867 877 mbstring_binary_safe_encoding(); 868 $description_length=字符串($exif [“图像描述”] ); 878 $description_length=字符串($exif _说明 ); 869 879 重置删除编码(); 870 871 880 if(空($meta['title'])&&$description_length<80){ 872 881 //假设标题存储在ImageDescription中。 873 $meta['title']=修剪($exif['ImageDescription']); 874 } 875 876 if(空($meta['caption'])&&! 空($exif['COMPUTED']['UserComment']){ 877 $meta['caption']=修剪($exif['COMPUTED']['UserComment']); 882 $meta['title']=$exif_description; 883 } 884 885 //如果同时存在用户注释和描述。 886 if(空($meta['caption'])&&$exif_description&&$exif_usercomment){ 887 if(!空($meta['title'])&&$exif_description===$meta['title']){ 888 $caption=$exif_usercomment; 889 }其他{ 890 if($exif_description===$exif_usercomment){ 891 $caption=$exif_description; 892 }其他{ 893 $caption=修剪($exif_description.''.$exif_usercomment); 894 } 895 } 896 $meta['caption']=$caption; 897 } 898 899 if(空($meta['caption'])&&$exif_usercomment){ 900 $meta['caption']=$exif_usercomment; 878 901 } 879 902 880 903 if(空($meta['caption']){ 881 $meta['caption']=修剪($exif['ImageDescription']); 904 $meta['caption']=$exif_description; 905 } 906 }elseif(空($meta['caption'])&&$exif_usercomment){ 907 $meta['caption']=$exif_usercomment; 908 $description_length=字符串($exif_usercomment); 909 if(空($meta['title'])&&$description_length<80){ 910 $meta['title']=修剪($exif_usercomment); 882 911 } 883 912 }elseif(空($meta['caption'])&&! 空($exif[注释]){ -
trunk/tests/phpunit/tests/image/meta.php 52269兰特 57267兰特 52 52 $this->assertSame('',$out['credit'],'credit value not the same’); 53 53 $this->assertSame('NIKON D70',$out['camera'],'camera value not same'); 54 $this->资产相同(' ',$out['caption'],'字幕值不一样'); 54 $this->assertSame(' Alex Shiels版权所有 ',$out['caption'],'字幕值不一样'); 55 55 $this->assertEquals(strtotime('2007-06-17 21:18:00'),$out['created_timestamp'],'timestamp value not equivalent'); 56 56 $this->assertSame(“”,$out['copyright'],'版权价值不同'); … … 58 58 $this->assertEquals(0,$out['iso'],'iso值不等价');// 有趣-尼康迷? 59 59 $this->assertEquals(1/500,$out['shutter_speed'],'快门速度值不相等'); 60 $this->资产相同(' ',$out['title'],'标题值不同'); 60 $this->资产相同(' Alex Shiels版权所有 ',$out['title'],'标题值不同'); 61 61 //$this->assertSame(数组('Flowers'),$out['keywords']); 62 62 }