diff --git a/acp/portal_module.php b/acp/portal_module.php index 4f8c88fe..f2a07d34 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -126,7 +126,7 @@ class portal_module 'MODULE_IMAGE' => $module_data['module_image_src'], 'MODULE_IMAGE_WIDTH' => $module_data['module_image_width'], 'MODULE_IMAGE_HEIGHT' => $module_data['module_image_height'], - 'MODULE_IMAGE_SRC' => ($module_data['module_image_src']) ? $this->root_path . 'styles/' . $this->user->theme['theme_path'] . '/theme/images/portal/' . $module_data['module_image_src'] : '', + 'MODULE_IMAGE_SRC' => ($module_data['module_image_src']) ? $this->root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $module_data['module_image_src'] : '', 'MODULE_ENABLED' => ($module_data['module_status']) ? true : false, 'MODULE_SHOW_IMAGE' => (in_array(column_num_string($module_data['module_column']), array('center', 'top', 'bottom'))) ? false : true, )); @@ -299,6 +299,7 @@ class portal_module 'ERROR_MSG' => implode('
', $error), 'U_ACTION' => $this->u_action . (($module_id) ? '&module_id=' . $module_id : ''), + 'B3P_ACP_ROOT' => $this->root_path, )); // Output relevant page @@ -498,7 +499,7 @@ class portal_module trigger_error($error_output . adm_back_link($this->u_action)); } - meta_refresh(3, append_sid("{$this->phpbb_admin_path}index.{$this->php_ex}", 'i=portal&mode=config&module_id=' . $module_id)); + meta_refresh(3, $this->get_module_link('config', $module_id)); trigger_error($this->user->lang['SUCCESS_ADD'] . adm_back_link($this->u_action)); } @@ -690,7 +691,7 @@ class portal_module 'MODULE_ENABLED' => ($row['module_status']) ? true : false, 'U_DELETE' => $this->u_action . '&module_id=' . $row['module_id'] . '&module_classname=' . $row['module_classname'] . '&action=delete', - 'U_EDIT' => append_sid("{$this->phpbb_admin_path}index.{$this->php_ex}", 'i=portal&mode=config&module_id=' . $row['module_id']), + 'U_EDIT' => $this->get_module_link('config', $row['module_id']), 'U_MOVE_UP' => $this->u_action . '&module_id=' . $row['module_id'] . '&action=move_up', 'U_MOVE_DOWN' => $this->u_action . '&module_id=' . $row['module_id'] . '&action=move_down', 'U_MOVE_RIGHT' => ($move_right) ? $this->u_action . '&module_id=' . $row['module_id'] . '&action=move_right' : '', @@ -1185,4 +1186,17 @@ class portal_module $this->cache->destroy('portal_modules'); } + + /** + * Get link to module settings with specified ID and portal_module mode + * + * @param string $mode portal_module mode + * @param int $module_id Module ID + * + * @return string Link to module settings + */ + protected function get_module_link($mode, $module_id) + { + return preg_replace(array('/i=[0-9]+/', '/mode=[a-zA-Z0-9_]+/'), array('i=\\' . __CLASS__, 'mode=' . $mode), $this->u_action) . '&module_id=' . $module_id; + } } diff --git a/adm/style/portal/acp_portal_welcome.html b/adm/style/portal/acp_portal_welcome.html index 4ceaf518..0914a16e 100644 --- a/adm/style/portal/acp_portal_welcome.html +++ b/adm/style/portal/acp_portal_welcome.html @@ -1,6 +1,6 @@ - +