Changeset 29946


Ignore:
Timestamp:
Oct 9, 2014, 1:30:41 PM (10 years ago)
Author:
JanisV
Message:

Improve picture page replacement for modus theme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/main.inc.php

    r29945 r29946  
    3333}
    3434
     35function Fotorama_is_replace_picture()
     36{
     37  global $conf;
     38
     39  return ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])));
     40}
     41
    3542function Fotorama_init()
    3643{
    37   global $conf;
    38  
     44  global $conf, $user;
     45
    3946  load_language('plugin.lang', FOTORAMA_PATH);
    4047
     
    6269    $conf['Fotorama']['square_thumb'] = true;
    6370  }
    64 }
    65 
    66 function Fotorama_is_replace_picture()
    67 {
    68   global $conf;
    69 
    70   return ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])));
     71
     72  if ($user['theme'] == 'modus' and Fotorama_is_replace_picture())
     73  {
     74    remove_event_handler('loc_begin_picture', 'modus_loc_begin_picture');
     75  }
    7176}
    7277
Note: See TracChangeset for help on using the changeset viewer.