diff --git a/.gitattributes b/.gitattributes
index a3bb194f..2670aafb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,3 +6,4 @@ travis/ export-ignore
.travis.yml export-ignore
phpunit.xml.* export-ignore
README.md export-ignore
+git-tools/ export-ignore
diff --git a/acp/portal_module.php b/acp/portal_module.php
index 2898eaa6..cbbeed2d 100644
--- a/acp/portal_module.php
+++ b/acp/portal_module.php
@@ -313,7 +313,7 @@ class portal_module
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('
', $error),
- 'U_ACTION' => $this->u_action . (($module_id) ? '&module_id=' . $module_id : ''),
+ 'B3P_U_ACTION' => $this->get_module_link('config', $module_id),
'B3P_ACP_ROOT' => $this->root_path,
));
@@ -671,7 +671,7 @@ class portal_module
'MODULE_IMAGE' => ($row['module_image_src']) ? '' : '',
'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_DELETE' => $this->get_module_link('modules', $row['module_id']) . '&action=delete&module_classname=' . $row['module_classname'],
'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',
@@ -841,6 +841,12 @@ class portal_module
}
$this->cache->destroy('portal_modules');
+
+ if ($this->request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array('success' => true));
+ }
redirect($this->u_action); // redirect in order to get rid of excessive URL parameters
}
@@ -874,6 +880,7 @@ class portal_module
*/
public function move_module_up($module_id)
{
+ $updated = false;
$module_data = $this->get_move_module_data($module_id);
if (($module_data !== false) && ($module_data['module_order'] > 1))
@@ -904,6 +911,7 @@ class portal_module
*/
public function move_module_down($module_id)
{
+ $updated = false;
$module_data = $this->get_move_module_data($module_id);
if ($module_data !== false && $this->get_last_module_order($module_data['module_column']) != $module_data['module_order'])
@@ -1159,6 +1167,15 @@ class portal_module
$this->cache->purge(); // make sure we don't get errors after re-adding a module
+ if ($this->request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => true,
+ 'MESSAGE_TITLE' => $this->user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $this->user->lang['SUCCESS_DELETE'],
+ ));
+ }
trigger_error($this->user->lang['SUCCESS_DELETE'] . adm_back_link($this->u_action));
}
else
@@ -1191,7 +1208,7 @@ class portal_module
*/
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;
+ return preg_replace(array('/i=[0-9]+/', '/mode=[a-zA-Z0-9_]+/'), array('i=%5C' . str_replace('\\', '%5C', __CLASS__), 'mode=' . $mode), $this->u_action) . (($module_id) ? '&module_id=' . $module_id : '');
}
/**
diff --git a/adm/style/portal/acp_portal.js b/adm/style/portal/acp_editor.js
similarity index 99%
rename from adm/style/portal/acp_portal.js
rename to adm/style/portal/acp_editor.js
index 306f7452..5b3b687b 100644
--- a/adm/style/portal/acp_portal.js
+++ b/adm/style/portal/acp_editor.js
@@ -436,4 +436,4 @@ function getCaretPosition(txtarea)
}
return caretPos;
-}
\ No newline at end of file
+}
diff --git a/adm/style/portal/acp_portal_calendar.html b/adm/style/portal/acp_portal_calendar.html
index fabd8944..cf23e633 100644
--- a/adm/style/portal/acp_portal_calendar.html
+++ b/adm/style/portal/acp_portal_calendar.html
@@ -14,7 +14,7 @@
-