Skip to content

Commit

Permalink
Rows and columns swapped on photos page
Browse files Browse the repository at this point in the history
Fixes issue#34
  • Loading branch information
jeroenrnl committed Jan 19, 2013
1 parent 0796029 commit 6c3005b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions php/edit_photos.php
Expand Up @@ -26,8 +26,8 @@
die("Illegal characters in _order");
}

if (!$_cols) { $_cols = $user->prefs->get("num_rows"); }
if (!$_rows) { $_rows = $user->prefs->get("num_cols"); }
if (!$_cols) { $_cols = $user->prefs->get("num_cols"); }
if (!$_rows) { $_rows = $user->prefs->get("num_rows"); }
if (!$_off) { $_off = 0; }

if (!$_order) { $_order = conf::get("interface.sort.order"); }
Expand Down
5 changes: 2 additions & 3 deletions php/photo.php
Expand Up @@ -16,7 +16,6 @@
* along with Zoph; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

require_once("include.inc.php");
$photo_id = getvar("photo_id");
$_off = getvar("_off");
Expand Down Expand Up @@ -91,8 +90,8 @@
$_rows = (int) getvar("_rows");
$_off = (int) getvar("_off");

if (!$_cols) { $_cols = $user->prefs->get("num_rows"); }
if (!$_rows) { $_rows = $user->prefs->get("num_cols"); }
if (!$_cols) { $_cols = $user->prefs->get("num_cols"); }
if (!$_rows) { $_rows = $user->prefs->get("num_rows"); }
if (!$_off) { $_off = 0; }

$cells = $_cols * $_rows;
Expand Down
4 changes: 2 additions & 2 deletions php/photos.php
Expand Up @@ -30,8 +30,8 @@
die("Illegal characters in _order");
}

if (!$_cols) { $_cols = $user->prefs->get("num_rows"); }
if (!$_rows) { $_rows = $user->prefs->get("num_cols"); }
if (!$_cols) { $_cols = $user->prefs->get("num_cols"); }
if (!$_rows) { $_rows = $user->prefs->get("num_rows"); }
if (!$_off) { $_off = 0; }

if (!$_order) { $_order = conf::get("interface.sort.order"); }
Expand Down

1 comment on commit 6c3005b

@jeroenrnl
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #34

Please sign in to comment.