Commit 657b85e8 authored by sun's avatar sun

#294879 by sun: Changed include file inclusion.

parent 5a479a4a
......@@ -6,6 +6,7 @@ Demo x.x-x.x, xxxx-xx-xx
Demo 5.x-1.x, xxxx-xx-xx
------------------------
#294879 by sun: Changed include file inclusion.
#496620 by evoltech: Fixed paths in README.txt.
by smk-ka: Added admin_menu cache table to exclude list.
#489666 by stella: Added hook invocation after successful reset.
......
......@@ -11,7 +11,7 @@
*/
define('DEMO_DUMP_VERSION', '1.1');
function _demo_admin_settings() {
function demo_admin_settings() {
global $base_url;
$form['status'] = array(
......@@ -77,7 +77,7 @@ function demo_admin_settings_submit($form_id, $values) {
drupal_set_message(t('The configuration options have been saved.'));
}
function _demo_manage() {
function demo_manage() {
$form['dump'] = array(
'#type' => 'fieldset',
'#title' => t('Available snapshots'),
......@@ -105,7 +105,7 @@ function demo_manage_submit($form_id, $values) {
}
}
function _demo_delete_confirm($filename = '') {
function demo_delete_confirm($filename = '') {
$fileconfig = demo_get_fileconfig($filename);
if (!file_exists($fileconfig['infofile'])) {
return drupal_access_denied();
......@@ -126,7 +126,7 @@ function demo_delete_confirm_submit($form_id, $values) {
return 'admin/build/demo/manage';
}
function _demo_dump() {
function demo_dump() {
$form = array();
$form['dump']['filename'] = array(
'#title' => t('File name'),
......@@ -196,7 +196,7 @@ function demo_dump_submit($form_id, $values) {
drupal_goto('admin/build/demo/manage');
}
function _demo_reset_confirm() {
function demo_reset_confirm() {
$form['dump'] = array(
'#type' => 'fieldset',
'#title' => t('Available snapshots'),
......@@ -519,7 +519,7 @@ function demo_enum_tables() {
* Retrieve a pipe delimited string of autocomplete suggestions for existing
* snapshot names.
*/
function _demo_autocomplete($string = '') {
function demo_autocomplete($string = '') {
$matches = array();
if ($string && $fileconfig = demo_get_fileconfig()) {
$string = preg_quote($string);
......
......@@ -77,6 +77,9 @@ function demo_menu($may_cache) {
'type' => MENU_CALLBACK,
);
}
else if (strpos($_GET['q'], 'admin/build/demo') === 0 || strpos($_GET['q'], 'demo') === 0) {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
}
return $items;
}
......@@ -137,33 +140,3 @@ function demo_cron() {
}
}
function demo_admin_settings() {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_admin_settings();
}
function demo_manage() {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_manage();
}
function demo_dump() {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_dump();
}
function demo_reset_confirm() {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_reset_confirm();
}
function demo_delete_confirm($filename) {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_delete_confirm($filename);
}
function demo_autocomplete($string = '') {
require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
return _demo_autocomplete($string);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment