Changeset 26055


Ignore:
Timestamp:
Dec 20, 2013, 4:21:43 PM (10 years ago)
Author:
mistic100
Message:

use of undefined constant, retard mobile detection

Location:
extensions/UserCollections
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/include/UserCollection.class.php

    r25678 r26055  
    7373      else
    7474      {
    75         throw new Exception(l10n('Invalid collection'), WS_ERR_INVALID_PARAM);
     75        throw new Exception(l10n('Invalid collection'));
    7676      }
    7777    }
  • extensions/UserCollections/main.inc.php

    r25678 r26055  
    1010
    1111defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    12 
    13 if (mobile_theme())
    14 {
    15   return;
    16 }
    1712
    1813global $conf, $prefixeTable;
     
    2924add_event_handler('init', 'user_collections_init');
    3025
    31 add_event_handler('ws_add_methods', 'user_collections_ws_add_methods');
    32 
    33 if (defined('IN_ADMIN'))
    34 {
    35   add_event_handler('get_admin_plugin_menu_links', 'user_collections_admin_menu');
    36 }
    37 else
    38 {
    39   // collections page
    40   add_event_handler('loc_end_section_init', 'user_collections_section_init');
    41   add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10);
    42 
    43   // thumbnails actions
    44   add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2);
    45 
    46   // picture action
    47   add_event_handler('loc_end_picture', 'user_collections_picture_page');
    48 }
    49 
    50 // menu
    51 add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock');
    52 add_event_handler('blockmanager_apply', 'user_collections_applymenu');
    53 
    54 require_once(USER_COLLEC_PATH . 'include/ws_functions.inc.php');
    55 require_once(USER_COLLEC_PATH . 'include/functions.inc.php');
    56 require_once(USER_COLLEC_PATH . 'include/UserCollection.class.php');
    57 require_once(USER_COLLEC_PATH . 'include/events.inc.php');
    58 
    5926
    6027/**
     
    6330function user_collections_init()
    6431{
    65   global $conf;
    66 
    6732  include_once(USER_COLLEC_PATH . 'maintain.inc.php');
    6833  $maintain = new UserCollections_maintain(USER_COLLEC_ID);
    6934  $maintain->autoUpdate(USER_COLLEC_VERSION, 'install');
     35 
     36  if (mobile_theme())
     37  {
     38    return;
     39  }
    7040
    7141  load_language('plugin.lang', USER_COLLEC_PATH);
    7242
     43  global $conf;
    7344  $conf['user_collections'] = unserialize($conf['user_collections']);
     45 
     46  require_once(USER_COLLEC_PATH . 'include/ws_functions.inc.php');
     47  require_once(USER_COLLEC_PATH . 'include/functions.inc.php');
     48  require_once(USER_COLLEC_PATH . 'include/UserCollection.class.php');
     49  require_once(USER_COLLEC_PATH . 'include/events.inc.php');
     50 
     51  add_event_handler('ws_add_methods', 'user_collections_ws_add_methods');
     52
     53  if (defined('IN_ADMIN'))
     54  {
     55    add_event_handler('get_admin_plugin_menu_links', 'user_collections_admin_menu');
     56  }
     57  else
     58  {
     59    // collections page
     60    add_event_handler('loc_end_section_init', 'user_collections_section_init');
     61    add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10);
     62
     63    // thumbnails actions
     64    add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2);
     65
     66    // picture action
     67    add_event_handler('loc_end_picture', 'user_collections_picture_page');
     68  }
     69
     70  // menu
     71  add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock');
     72  add_event_handler('blockmanager_apply', 'user_collections_applymenu');
    7473}
    7574
  • extensions/UserCollections/maintain.inc.php

    r25678 r26055  
    103103      pwg_query('ALTER TABLE `'.$prefixeTable.'collections` DROP `public`, DROP `public_id`;');
    104104    }
     105   
     106    $this->installed = true;
    105107  }
    106108
Note: See TracChangeset for help on using the changeset viewer.