Changeset 26909 for trunk/admin/include


Ignore:
Timestamp:
Jan 22, 2014, 10:21:37 PM (10 years ago)
Author:
mistic100
Message:

Display "Activate it now" link when installing a new plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/plugins.class.php

    r26461 r26909  
    510510    * @param string - plugin id or extension id
    511511   */
    512   function extract_plugin_files($action, $revision, $dest)
     512  function extract_plugin_files($action, $revision, $dest, &$plugin_id=null)
    513513  {
    514514    if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip'))
     
    542542            if ($action == 'upgrade')
    543543            {
    544               $extract_path = PHPWG_PLUGINS_PATH . $dest;
     544              $plugin_id = $dest;
    545545            }
    546546            else
    547547            {
    548               $extract_path = PHPWG_PLUGINS_PATH
    549                   . ($root == '.' ? 'extension_' . $dest : basename($root));
     548              $plugin_id = ($root == '.' ? 'extension_' . $dest : basename($root));
    550549            }
     550            $extract_path = PHPWG_PLUGINS_PATH . $plugin_id;
     551
    551552            if($result = $zip->extract(PCLZIP_OPT_PATH, $extract_path,
    552553                                       PCLZIP_OPT_REMOVE_PATH, $root,
Note: See TracChangeset for help on using the changeset viewer.