Bilder vises ikke i nyhet.php

Bug #507982 reported by Thomas Misund
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
studentersamfundet.no
Fix Released
Critical
Paal Braathen

Bug Description

Division by zero-feil i imageResize.php.

Related branches

Thomas Misund (misund)
Changed in studentersamfundet-web:
importance: Undecided → Critical
Revision history for this message
Paal Braathen (paalbra) wrote :

Tror to linjer løser problemet.

Får ikke bzr'a no herfra, men vedlagt fil skal så vidt jeg vet funke.

Revision history for this message
Thomas Misund (misund) wrote : Re: [Bug 507982] Re: Bilder vises ikke i nyhet.php

Her er det ikke bare to linjer som er endra, men alle. Hvorfor er fila full
av windows-newlines?

--
Thomas Misund
--
http://hemmeligadresse.com/

On Fri, Jan 15, 2010 at 17:56, Paal Braathen <email address hidden>wrote:

> Tror to linjer løser problemet.
>
> Får ikke bzr'a no herfra, men vedlagt fil skal så vidt jeg vet funke.
>
> ** Attachment added: "imageResize.php"
> http://launchpadlibrarian.net/37928426/imageResize.php
>
> --
> Bilder vises ikke i nyhet.php
> https://bugs.launchpad.net/bugs/507982
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in studentersamfundet.no: New
>
> Bug description:
> Division by zero-feil i imageResize.php.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/studentersamfundet-web/+bug/507982/+subscribe
>

Changed in studentersamfundet-web:
status: New → Incomplete
assignee: nobody → Paal Braathen (paalbra)
Revision history for this message
Thomas Misund (misund) wrote :

Endringen virker.

Jeg kan committe den hvis du sender meg en diff eller en beskrivelse av hvilke to linjer som skal inn hvor.

Revision history for this message
Thomas Misund (misund) wrote :

(Altså, vi har ikke lyst på en diff hvor ALLE linjene er bytta ut, men en hvor det er lagt til to nye.)

Revision history for this message
Paal Braathen (paalbra) wrote :

2010/1/16 Thomas Misund <email address hidden>

> Endringen virker.
>
> Jeg kan committe den hvis du sender meg en diff eller en beskrivelse av
> hvilke to linjer som skal inn hvor.
>

Gjort det sånn at om maxwidth eller maxheight ikke settes i url så settes
den/de til den orginale bredden/høyden til bildet.

Lagt til 2 + stokka litt på noen linjer. F.o.m linje 30:

Gammel:
$filename = $_GET['pic'];
if (isset($_GET['maxwidth']))
    $maxwidth = $_GET['maxwidth'];
if (isset($_GET['maxheight']))
    $maxheight = $_GET['maxheight'];

list($width, $height, $format) = getimagesize($filename);

Ny:
$filename = $_GET['pic'];
list($width, $height, $format) = getimagesize($filename);

if (isset($_GET['maxwidth']))
    $maxwidth = $_GET['maxwidth'];
else $maxwidth = $width;
if (isset($_GET['maxheight']))
    $maxheight = $_GET['maxheight'];
else $maxheight = $height;

--
Paal

Thomas Misund (misund)
Changed in studentersamfundet-web:
milestone: none → 1.1.1
Thomas Misund (misund)
Changed in studentersamfundet-web:
status: Incomplete → Fix Committed
Revision history for this message
Paal Braathen (paalbra) wrote :

Denne er da også released, eller failer mine launchpadskills?

Thomas Misund (misund)
Changed in studentersamfundet-web:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.