Changeset 2182:eaaf345b04f3 for admin/plugins.php
- Timestamp:
- 10/01/13 09:44:02 (12 years ago)
- Branch:
- dcRepo
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/plugins.php
r2175 r2182 63 63 )); 64 64 65 # -- Check for module configuration --66 $conf_file = false;67 if (!empty($_REQUEST['conf']) && !empty($_REQUEST['module'])) {68 if (!$core->plugins->moduleExists($_REQUEST['module'])) {69 $core->error->add(__('Unknow module ID'));70 }71 else {72 $module = $core->plugins->getModules($_REQUEST['module']);73 $module = adminModulesList::parseModuleInfo($_REQUEST['module'], $module);74 75 if (!file_exists(path::real($module['root'].'/_config.php'))) {76 $core->error->add(__('This module has no configuration file.'));77 }78 else {79 $conf_file = path::real($module['root'].'/_config.php');80 }81 }82 }83 84 65 # -- Display module configuration page -- 85 if ($conf_file) { 66 if ($list->setConfigurationFile($core->plugins)) { 67 68 # Get content before page headers 69 include $list->getConfigurationFile(); 70 71 # Gather content 72 $list->setConfigurationContent(); 73 74 # Display page 86 75 dcPage::open(__('Plugins management'), 87 76 88 77 # --BEHAVIOR-- pluginsToolsHeaders 89 $core->callBehavior('pluginsToolsHeaders', $core, $module['id']),78 $core->callBehavior('pluginsToolsHeaders', $core, true), 90 79 91 80 dcPage::breadcrumb( … … 97 86 ); 98 87 88 # Message 99 89 if (!empty($_GET['done'])){ 100 90 dcPage::success(__('Plugin successfully configured.')); 101 91 } 102 92 103 try { 104 if (!$module['standalone_config']) { 105 echo 106 '<form id="module_config" action="'.$list->getPageURL('conf=1').'" method="post" enctype="multipart/form-data">'. 107 '<h3>'.sprintf(__('Configure plugin "%s"'), html::escapeHTML($module['name'])).'</h3>'. 108 '<p><a class="back" href="'.$list->getPageURL().'#plugins">'.__('Back').'</a></p>'; 109 } 110 define('DC_CONTEXT_PLUGIN', true); 111 112 include $conf_file; 113 114 if (!$module['standalone_config']) { 115 echo 116 '<p class="clear"><input type="submit" name="save" value="'.__('Save').'" />'. 117 form::hidden('module', $module['id']). 118 $core->formNonce().'</p>'. 119 '</form>'; 120 } 121 } 122 catch (Exception $e) { 123 echo '<div class="error"><p>'.$e->getMessage().'</p></div>'; 124 } 93 # Display previously gathered content 94 $list->getConfigurationContent(); 125 95 126 96 dcPage::close();
Note: See TracChangeset
for help on using the changeset viewer.