public function updateExtensionMap($get, $post)
 {
     if (isset($get['update_extension_map'])) {
         $msg = sprintf('Extension maps update entered');
         WPRC_Functions::log($msg, 'controller', 'controller.log');
         // clear cache
         delete_transient('wprc_update_extensions_maps');
         $result = WPRC_Installer::wprc_update_extensions_maps();
         echo json_encode(array('result' => $result));
         $msg = sprintf('Extension maps update complete');
         WPRC_Functions::log($msg, 'controller', 'controller.log');
         exit;
     }
     exit;
 }
<?php

if (!defined('ABSPATH')) {
    die('Security check');
}
// prepare fields values for the form in the template
$site_id = WPRC_Installer::getSiteId();
// get lists of extensions
$em = WPRC_Loader::getModel('extensions');
$extension_keys = array();
$bulk_deactivate = 0;
$bulk_data = array();
// get extenstions to deactivate
if (array_key_exists('checked', $_POST)) {
    // bulk deactivation
    // bulk deactivation accessible for plugins only
    $extension_type = 'plugin';
    $extension_keys = $_POST['checked'];
    $bulk_deactivate = 1;
    $bulk_data['_wpnonce'] = $_POST['_wpnonce'];
    $bulk_data['_wp_http_referer'] = $_POST['_wp_http_referer'];
    $bulk_data['checked'] = $_POST['checked'];
    $bulk_data['action'] = $_POST['action'];
    $bulk_data['action2'] = $_POST['action2'];
    $url = admin_url('plugins.php');
} else {
    // single extension deactivation
    $url = $_SERVER['REQUEST_URI'];
    $extension = WPRC_UrlAnalyzer::getExtensionFromUrl($url);
    $extension_type = $extension['type'];
    $extension_path = $extension['name'];
 /**
  * AJAX function that deletes the search cache
  */
 public static function clear_extension_search_cache()
 {
     WPRC_Installer::clear_all_cache();
     _e('The cache has been cleaned up. Reloading page...', 'installer');
     die;
 }
 /**
  * Get site information for the reports
  *
  * @param bool get enviroment information only (without site id)
  */
 protected function getSiteInfo($get_enviroment_only = false)
 {
     return WPRC_Installer::getSiteInfo($get_enviroment_only);
 }
Beispiel #5
0
function wprc_is_logged_to_repo($repo_url)
{
    return WPRC_Installer::isLoggedToRepo($repo_url);
}