[ansel] (no subject)
Ryu
ryu at ryux.org
Wed Nov 2 20:46:00 UTC 2011
Le mercredi 2 novembre 2011 12:38:56 Michael J Rubinsky a écrit :
>
> This is *exactly* the case I put the recent browser check in Ansel for.
>
> If you use the new uploader, and view the source from within firefox
> 3.6, you should see a block of code similar to this towards the top of
> the file:
>
> var uploader = new Horde_Uploader({
> 'target': "/horde/ansel/img/upload.php?gallery=3526",
> drop_target: "filelist",
> swf_path: '/horde/js/plupload/plupload.flash.swf',
> xap_path: '/horde/js/plupload/plupload.silverlight.xap',
> container: 'anseluploader',
> text: { start: 'Upload',
> add: 'Add Images',
> header: 'Upload to gallery',
> returnButton: 'View Gallery',
> subheader: 'Add files to the upload queue and
> click the start button.',
> size: 'File size error.',
> type: 'File type error.'
> },
> header_class: 'hordeUploaderHeader',
> container_class: 'uploaderContainer',
> return_target: 'xxxxx',
> multipart: false
> },
>
> Can you see what the value of the 'multipart' parameter is? For FF <=
> 4.x it should be "true". If it is not, the browser detection is
> failing for some reason.
This is the source...
var uploader = new Horde_Uploader({
'target': "/ansel/img/upload.php?gallery=1",
drop_target: "filelist",
swf_path: '/js/plupload/plupload.flash.swf',
xap_path: '/js/plupload/plupload.silverlight.xap',
container: 'anseluploader',
text: { start: 'Transférer',
add: 'Add Images',
header: 'Upload to gallery',
returnButton: 'View Gallery',
subheader: 'Add files to the upload queue and click the
start button.',
size: 'File size error.',
type: 'File type error.'
},
header_class: 'hordeUploaderHeader',
container_class: 'uploaderContainer',
return_target: 'yyyyy',
multipart: false
},
After deep search, I finally found that in 'lib/View/Upload.php', line 87
$GLOBALS['browser']->getBrowser() = mozilla
$GLOBALS['browser']->getMajor() = 5 !!!!!
My UserAgent is "Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.23)
Gecko/20110927 Fedora/3.6.23-1.fc14 Firefox/3.6.23 (fedora 14 default
browser)"
I have suspected the detection to mix the Mozilla version and the Firefox
version... It seems to not be the same.
Horde/Browser.php, line 566 : } elseif (preg_match('|Mozilla/([0-9.]+)|',
$agent, $version)) {
...
list($this->_majorVersion, $this->_minorVersion) = explode('.', $version[1]);
But Mozilla is always 5 =>
(https://developer.mozilla.org/en/User_Agent_Strings_Reference)
I think than we must separate Firefox from Mozilla to get a "Firefox" browser
in Horde...
Finally, I changed my UserAgent with Firefox User Agent Switcher and changed
the version of Mozilla to 4.0. The transfert completed sucessfully !
Ryu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.horde.org/archives/ansel/attachments/20111102/769a7311/attachment.bin>
More information about the ansel
mailing list