예제 #1
0
 /**
  * Install a previously downloaded module.
  *
  * @param	string	$path	Module package URL
  * @param	string	$path	Path to module package
  * @return	integer		1 = installed, 2 = update
  */
 public function install($path)
 {
     return dcModules::installPackage($path, $this->modules);
 }
예제 #2
0
        } else {
            $url = urldecode($_POST['pkg_url']);
            $dest = $core->blog->themes_path . '/' . basename($url);
            try {
                $client = netHttp::initClient($url, $path);
                $client->setUserAgent('Dotclear - http://www.dotclear.org/');
                $client->useGzip(false);
                $client->setPersistReferers(false);
                $client->setOutput($dest);
                $client->get($path);
            } catch (Exception $e) {
                throw new Exception(__('An error occurred while downloading the file.'));
            }
            unset($client);
        }
        $ret_code = dcModules::installPackage($dest, $core->themes);
        http::redirect('blog_theme.php?added=' . $ret_code);
    } catch (Exception $e) {
        $core->error->add($e->getMessage());
        $default_tab = 'add-theme';
    }
}
$theme_conf_mode = false;
if (!empty($_REQUEST['conf'])) {
    $theme_conf_file = path::real($core->blog->themes_path . '/' . $core->blog->settings->theme) . '/_config.php';
    if (file_exists($theme_conf_file)) {
        $theme_conf_mode = true;
    }
}
function display_theme_details($id, $details, $current)
{