[Fusionforge-commits] FusionForge branch 6.0 updated. d9a4e1774e85f1d49141fb3eacc8e057ac348c65
Franck Villaume
nerville at fusionforge.org
Sun Mar 22 15:27:45 CET 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, 6.0 has been updated
via d9a4e1774e85f1d49141fb3eacc8e057ac348c65 (commit)
via b92cd6ec685dfd4de44727d7408a62292183a7df (commit)
from 5627dd6ab315f6878cf188ce7762aa165e478355 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d9a4e1774e85f1d49141fb3eacc8e057ac348c65
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Sun Mar 22 15:27:01 2015 +0100
fix weird sequence for layouts
diff --git a/src/db/20150322-set-layouts_seq.sql b/src/db/20150322-set-layouts_seq.sql
new file mode 100644
index 0000000..3434570
--- /dev/null
+++ b/src/db/20150322-set-layouts_seq.sql
@@ -0,0 +1,3 @@
+SELECT setval('layouts_pk_seq', (SELECT MAX(id) from layouts));
+SELECT setval('layouts_rows_pk_seq', (SELECT MAX(id) from layouts_rows));
+SELECT setval('layouts_rows_columns_pk_seq', (SELECT MAX(id) from layouts_rows_columns));
commit b92cd6ec685dfd4de44727d7408a62292183a7df
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Sun Mar 22 15:26:36 2015 +0100
clean-up
diff --git a/src/common/widget/WidgetLayoutManager.class.php b/src/common/widget/WidgetLayoutManager.class.php
index 1e159ad..3b929d2 100644
--- a/src/common/widget/WidgetLayoutManager.class.php
+++ b/src/common/widget/WidgetLayoutManager.class.php
@@ -43,7 +43,7 @@ class WidgetLayoutManager {
*
* Display the default layout for the "owner". It may be the home page, the project summary page or /my/ page.
*
- * @param int $owner_id
+ * @param int $owner_id
* @param string $owner_type
*/
function displayLayout($owner_id, $owner_type) {
@@ -105,7 +105,7 @@ class WidgetLayoutManager {
/**
* _currentUserCanUpdateLayout
*
- * @param int $owner_id
+ * @param int $owner_id
* @param string $owner_type
* @return boolean true if the user can update the layout (add/remove widget, collapse, set preferences, ...)
*/
@@ -231,9 +231,9 @@ class WidgetLayoutManager {
/**
* displayAvailableWidgets - Display all widgets that the user can add to the layout
*
- * @param int $owner_id
+ * @param int $owner_id
* @param string $owner_type
- * @param int $layout_id
+ * @param int $layout_id
*/
function displayAvailableWidgets($owner_id, $owner_type, $layout_id) {
global $HTML;
@@ -386,10 +386,10 @@ class WidgetLayoutManager {
AND o.owner_id = $2
AND o.is_default = 1
";
- $req = db_query_params($sql,array($owner_type,$owner_id));
+ $req = db_query_params($sql, array($owner_type, $owner_id));
if ($data = db_fetch_array($req)) {
if ($this->_currentUserCanUpdateLayout($owner_id, $owner_type)) {
- $old_scope = $data['scope'];
+ $old_scope = $data['scope'];
$old_layout_id = $data['id'];
$new_layout_id = null;
if ($layout == '-1' && is_array($custom_layout)) {
@@ -505,10 +505,10 @@ class WidgetLayoutManager {
/**
* _displayWidgetsSelectionForm - displays a widget selection form
*
- * @param title
- * @param widgets
- * @param used_widgets
- * @return string
+ * @param title $title
+ * @param widgets $widgets
+ * @param used_widgets $used_widgets
+ * @return string
*/
function _displayWidgetsSelectionForm($title, $widgets, $used_widgets) {
$hp = Codendi_HTMLPurifier::instance();
-----------------------------------------------------------------------
Summary of changes:
src/common/widget/WidgetLayoutManager.class.php | 20 ++++++++++----------
src/db/20150322-set-layouts_seq.sql | 3 +++
2 files changed, 13 insertions(+), 10 deletions(-)
create mode 100644 src/db/20150322-set-layouts_seq.sql
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list