-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclone.admin.inc
40 lines (36 loc) · 1.07 KB
/
clone.admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* @file
* Administration page callbacks for the myfile module.
*/
/**
* Form builder. Configure Clone.
*/
function clone_admin_settings() {
$form['clone_server_address'] = array(
'#type' => 'textfield',
'#title' => t('Server address'),
'#default_value' => variable_get('clone_server_address'),
'#description' => t('The public address of this drupal installation'),
'#size' => 40,
'#maxlength' => 256,
'#required' => TRUE,
);
$form['clone_allow_clone'] = array(
'#type' => 'checkbox',
'#title' => t('Allow clone requests.'),
'#default_value' => variable_get('clone_allow_clone', FALSE),
);
$form['#submit'][] = 'clone_admin_settings_submit'; // XXX
return system_settings_form($form);
}
/**
* Process Clone settings submission
*/
function clone_admin_settings_submit($form, &$form_state) {
watchdog('Clone', 'admin settings submitted');
variable_set('clone_server_address',
$form_state['values']['clone_server_address']);
variable_set('clone_allow_cloning',
$form_state['values']['clone_allow_clone']);
}