You are here

function drd_server_drd_server_actions in Drupal Remote Dashboard Server 6.2

Same name and namespace in other branches
  1. 7.2 drd_server.module \drd_server_drd_server_actions()

Implements hook_drd_server_actions().

File

./drd_server.module, line 61

Code

function drd_server_drd_server_actions() {
  return array(
    'drd.server.install' => array(
      'category' => t('Domain'),
      'label' => t('DRD: remotely install/uninstall'),
      'callback' => 'drd_install_drd_server',
      'mode' => 'domain',
      'remote' => FALSE,
      'queue' => TRUE,
      'fields' => array(
        'attention' => array(
          '#markup' => t('ATTENTION: This will flush all caches on your remote site, so please be aware and use this with care, especially if you have a lot of traffic on your remote site.'),
        ),
        'reset' => array(
          '#type' => 'checkbox',
          '#title' => t('Install'),
          '#default_value' => TRUE,
        ),
      ),
    ),
    'drd.server.domains' => array(
      'category' => t('Server'),
      'label' => t('Update server domains'),
      'callback' => 'drd_server_server_domains',
      'mode' => 'server',
      'remote' => TRUE,
      'queue' => TRUE,
      'follower' => array(
        'a' => 'drd.actions',
      ),
    ),
    'drd.info' => array(
      'label' => t('Update info'),
      'callback' => 'drd_server_domain_info',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'refresh' => TRUE,
    ),
    'drd.cache.flush' => array(
      'label' => t('Flush Cache'),
      'callback' => 'drd_server_domain_flush_cache',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
    ),
    'drd.run.cron' => array(
      'label' => t('Run Cron'),
      'callback' => 'drd_server_domain_run_cron',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'follower' => array(
        'a' => 'drd.info',
      ),
    ),
    'drd.switch.maintenance' => array(
      'label' => t('Maintenance Mode'),
      'callback' => 'drd_server_domain_switch_maintenance',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'fields' => array(
        'maintenancemode' => array(
          '#type' => 'checkbox',
          '#title' => t('On'),
          '#default_value' => TRUE,
        ),
      ),
    ),
    'drd.list.updates' => array(
      'label' => t('List new modules and themes'),
      'callback' => 'drd_server_domain_list_updates',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'follower' => array(
        'a' => 'drd.info',
      ),
    ),
    'drd.run.update' => array(
      'label' => t('Run Database Updates'),
      'callback' => 'drd_server_domain_run_update',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'follower' => array(
        'a' => 'drd.info',
      ),
    ),
    'drd.update.translation' => array(
      'label' => t('Update Translations'),
      'callback' => 'drd_server_domain_update_translation',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'follower' => array(
        'a' => 'drd.info',
      ),
    ),
    'drd.server.php.error.log' => array(
      'category' => t('Server'),
      'label' => t('PHP Error Log'),
      'callback' => 'drd_server_server_php_error_log',
      'mode' => 'server',
      'remote' => TRUE,
      'queue' => TRUE,
    ),
    'drd.set.user1' => array(
      'label' => t('Reset User 1 Credentials'),
      'callback' => 'drd_server_domain_reset_user1',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => FALSE,
      'fields' => array(
        'username' => array(
          '#type' => 'textfield',
          '#title' => t('Username'),
          '#default_value' => '',
        ),
        'userpass' => array(
          '#type' => 'password',
          '#title' => t('Password'),
          '#default_value' => '',
        ),
        'userpassrepeat' => array(
          '#type' => 'password',
          '#title' => t('Repeat password'),
          '#default_value' => '',
        ),
      ),
    ),
    'drd.php' => array(
      'label' => t('Execute PHP code'),
      'callback' => 'drd_server_domain_php',
      'mode' => 'domain',
      'remote' => TRUE,
      'queue' => TRUE,
      'fields' => array(
        'php' => array(
          '#type' => 'textarea',
          '#title' => t('PHP-Code'),
          '#default_value' => '',
          '#description' => t('The PHP code to be executed wrapper in php tags.'),
        ),
      ),
    ),
  );
}