function RemoteInstallConfirmed($type = 'plugin')
 {
     $_POST += array('order' => '');
     includeFile('admin/admin_addon_installer.php');
     $installer = new admin_addon_installer();
     $installer->code_folder_name = $this->code_folder_name;
     $installer->config_index = $this->config_index;
     $installer->can_install_links = $this->can_install_links;
     $installer->InstallRemote($type, $_POST['id'], $_POST['order']);
     $installer->OutputMessages();
     return $installer;
 }
 /**
  * Remove a layout from $gp_titles and $gpLayouts
  *
  */
 function RmLayout($layout)
 {
     global $gp_titles, $gpLayouts, $langmessage;
     $gpLayoutsBefore = $gpLayouts;
     $this->RmLayoutPrep($layout);
     //determine if code in /data/_theme should be removed
     $layout_info = $gpLayouts[$layout];
     $rm_addon = false;
     if (isset($layout_info['addon_key'])) {
         $rm_addon = $gpLayouts[$layout]['addon_key'];
         //don't remove if there are other layouts using the same code
         foreach ($gpLayouts as $layout_id => $info) {
             if ($layout_id == $layout) {
                 continue;
             }
             if (!array_key_exists('addon_key', $info)) {
                 continue;
             }
             if ($info['addon_key'] == $rm_addon) {
                 $rm_addon = false;
             }
         }
     }
     unset($gpLayouts[$layout]);
     //delete and save
     if ($rm_addon) {
         includeFile('admin/admin_addon_installer.php');
         $installer = new admin_addon_installer();
         $installer->rm_folders = false;
         if (!$installer->Uninstall($rm_addon)) {
             $gpLayouts = $gpLayoutsBefore;
         }
         $installer->OutputMessages();
     } elseif (!admin_tools::SavePagesPHP()) {
         $gpLayouts = $gpLayoutsBefore;
         message($langmessage['OOPS'] . ' (s1)');
         return false;
     } else {
         message($langmessage['SAVED']);
     }
     //remove custom css
     $this->RemoveCSS($layout);
 }
示例#3
0
 /**
  * Install Local Packages
  *
  */
 function LocalInstall()
 {
     global $dataDir;
     includeFile('admin/admin_addon_installer.php');
     $_REQUEST += array('source' => '');
     if (strpos($_REQUEST['source'], '/') !== false || strpos($_REQUEST['source'], '\\') !== false) {
         message($langmessage['OOPS'] . ' (Invalid Request)');
         return false;
     }
     $installer = new admin_addon_installer();
     $installer->source = $dataDir . '/addons/' . $_REQUEST['source'];
     $installer->Install();
     $installer->OutputMessages();
 }
示例#4
0
 /**
  * Install Local Packages
  *
  */
 function LocalInstall()
 {
     global $dataDir;
     $_REQUEST += array('source' => '', 'mode' => '');
     includeFile('admin/admin_addon_installer.php');
     $installer = new admin_addon_installer();
     $installer->source = $dataDir . '/addons/' . $_REQUEST['source'];
     $installer->Install();
     $installer->OutputMessages();
 }