← Back to team overview

mahara-contributors team mailing list archive

[Bug 1366622] A change has been merged

 

Reviewed:  https://reviews.mahara.org/3686
Committed: http://gitorious.org/mahara/mahara/commit/408229296c374679fa0b191d642bacba1787b3e0
Submitter: Son Nguyen (son.nguyen@xxxxxxxxxxxxxxx)
Branch:    master

commit 408229296c374679fa0b191d642bacba1787b3e0
Author: Bob Lyon <bob@xxxxxxxxxxxx>
Date:   Mon Sep 8 20:32:52 2014 +1200

Allowing for correctly saving the gallery width setting (Bug #1366622)

Currently it checks what width it should be on rendering but it
should also do this on saving to make sure a width of 0 is not set.

Change-Id: I7837c3120fa29e2a2dc5c9c63301dfa4543428a4
Signed-off-by: Bob Lyon <bob@xxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1366622

Title:
  width of gallery not set correctly

Status in Mahara ePortfolio:
  Confirmed
Status in Mahara 1.10 series:
  Confirmed
Status in Mahara 1.11 series:
  Fix Committed
Status in Mahara 1.9 series:
  Confirmed

Bug description:
  When creating an image gallery, a user can 'blank' out the 'Width'
  field.

  When the block is instantiated, the $configdata['width'] is set but
  it's empty.

  So, the $width is also empty.

  i.e. $width = isset($configdata['width']) ? $configdata['width'] : 75;

  I think the switch at the top should also check for '&&
  $configdata['width'] > 0':

  i.e.

  switch ($style) {
  case 0: // thumbnails
  $template = 'thumbnails';
  $width = isset($configdata['width']) && $configdata['width'] > 0 ? $configdata['width'] : 75;
  break;
  case 1: // slideshow
  $template = 'slideshow';
  $width = isset($configdata['width']) && $configdata['width'] > 0 ? $configdata['width'] : 400;
  break;
  case 2: // square thumbnails
  //default:
  $template = 'squarethumbs';
  $width = isset($configdata['width']) && $configdata['width'] > 0 ? $configdata['width'] : 75;
  break;
  }

  Hope that makes sense.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1366622/+subscriptions


References