Changeset 25915


Ignore:
Timestamp:
Dec 10, 2013, 11:46:03 AM (11 years ago)
Author:
mistic100
Message:

various minor issues

Location:
extensions/AdminTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdminTools/include/MultiView.class.php

    r25818 r25915  
    212212    }
    213213  }
    214  
     214
    215215  /**
    216216   * Mark browser session cache for deletion
     
    222222    $conf['multiview_invalidate_cache'] = true;
    223223  }
    224  
     224
    225225  /**
    226226   * Register custom API methods
     
    229229  {
    230230    $service = &$arr[0];
    231    
     231
    232232    $service->addMethod(
    233233      'multiView.getData',
     
    239239      );
    240240  }
    241  
     241
    242242  /**
    243243   * API method
     
    247247  {
    248248    global $conf;
    249    
     249
    250250    // get users
    251251    $query = '
     
    277277        );
    278278    }
    279    
     279
    280280    conf_delete_param('multiview_invalidate_cache');
    281    
     281
    282282    return $out;
    283283  }
  • extensions/AdminTools/include/events.inc.php

    r25845 r25915  
    99{
    1010  global $MultiView, $conf, $template, $page, $user, $picture;
     11
     12  if (script_basename() == 'picture' and empty($picture['current']))
     13  {
     14    return;
     15  }
    1116
    1217  $url_root = get_root_url();
     
    186191  global $page, $conf, $MultiView, $user, $picture;
    187192
     193  if (!isset($_GET['delete']) and !isset($_POST['action']) and $_POST['action'] != 'quick_edit')
     194  {
     195    return;
     196  }
     197
    188198  $query = 'SELECT added_by FROM '. IMAGES_TABLE .' WHERE id = '. $page['image_id'] .';';
    189199  list($added_by) = pwg_db_fetch_row(pwg_query($query));
    190200
    191   if (!$MultiView->is_admin() && $user['id'] != $added_by)
     201  if (!$MultiView->is_admin() and $user['id'] != $added_by)
    192202  {
    193203    return;
     
    215225  }
    216226
    217   if (@$_POST['action'] == 'quick_edit')
     227  if ($_POST['action'] == 'quick_edit')
    218228  {
    219229    include_once(PHPWG_ROOT_PATH . 'admin/include/functions.php');
  • extensions/AdminTools/main.inc.php

    r25845 r25915  
    1515// | Plugin constants                                               |
    1616// +-----------------------------------------------------------------------+
    17 defined('ADMINTOOLS_ID') or define('ADMINTOOLS_ID', basename(dirname(__FILE__)));
    18 define('ADMINTOOLS_PATH' ,   PHPWG_PLUGINS_PATH . ADMINTOOLS_ID . '/');
    19 // define('ADMINTOOLS_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . ADMINTOOLS_ID);
    20 define('ADMINTOOLS_VERSION', 'auto');
     17define('ADMINTOOLS_ID',      basename(dirname(__FILE__)));
     18define('ADMINTOOLS_PATH' ,    './plugins/' . ADMINTOOLS_ID . '/');
     19// define('ADMINTOOLS_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . ADMINTOOLS_ID);
     20define('ADMINTOOLS_VERSION',  'auto');
    2121
    2222
Note: See TracChangeset for help on using the changeset viewer.