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, master has been updated
via cb837e0cd9a3de151e99a1395a4931c9fb6a48fb (commit)
via c10c7e482dfc945732d77bd7997ca8ec05a900af (commit)
from 18e52843542240a26a4db57fc29abc4f0a849fa4 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=cb837e0cd9a3de151e99a1395a4931c9fb6a48fb
commit cb837e0cd9a3de151e99a1395a4931c9fb6a48fb
Author: Franck Villaume <[email protected]>
Date: Mon May 6 12:24:10 2019 +0200
diary: final use the view php oranisation
diff --git a/src/www/developer/diary.php b/src/www/developer/diary.php
deleted file mode 100644
index ea3d255..0000000
--- a/src/www/developer/diary.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * Developer's Diary Page
- *
- * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2010 (c) Franck Villaume
- * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2019, Franck Villaume - TrivialDev
- *
- * This file is part of FusionForge. FusionForge is free software;
- * you can redistribute it and/or modify it under the terms of the
- * GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the Licence, or (at your option)
- * any later version.
- *
- * FusionForge is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with FusionForge; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-require_once '../env.inc.php';
-require_once $gfcommon.'include/pre.php';
-require_once $gfwww.'include/vote_function.php';
-require_once $gfcommon.'diary/DiaryNoteFactory.class.php';
-
-global $HTML;
-
-if (!forge_get_config('use_diary')) {
- exit_disabled('home');
-}
-
-$diary_user = getIntFromRequest('diary_user');
-if ($diary_user) {
- $diary_id = getIntFromRequest('diary_id');
- $diaryNoteFactoryObject = new
diaryNoteFactory(user_get_object($diary_user));
-
- if (!$diaryNoteFactoryObject) {
- exit_error( _('Entry Not Found'), 'home');
- } elseif ($diaryNoteFactoryObject->isError()) {
- exit_error($diaryNoteFactoryObject->getErrorMessage(),'home');
- }
-
- $title = _('Diary and Notes for') . ' ' .
$diaryNoteFactoryObject->getUser()->getRealName();
- $HTML->header(array('title' => $title));
-
- echo '<div id="diary">
- <div id="diary_left">';
- if ($diary_id) {
- if
($diaryNoteFactoryObject->getDiaryNote($diary_id)->isPublic()) {
- echo
$HTML->boxTop($diaryNoteFactoryObject->getDiaryNote($diary_id)->getSummary());
- echo '<p>' . _('Posted on ') .
$diaryNoteFactoryObject->getDiaryNote($diary_id)->getDatePostedOn().'</p>';
- echo
$diaryNoteFactoryObject->getDiaryNote($diary_id)->getDetails();
- echo $HTML->boxBottom();
- } else {
- echo $HTML->error_msg(_('Entry Not Found For This
User'));
- }
- }
-
- /*
- List all diary entries
- */
- if ($diaryNoteFactoryObject->hasNotes(1)) {
- echo html_e('h2', array(), _('Existing Last 10 Diary and Notes
Entries'));
- echo $HTML->listTableTop();
- $cells = array();
- $cells[][] = _('Subject');
- $cells[][] = _('Date');
- echo $HTML->multiTableRow(array(), $cells, true);
- foreach ($diaryNoteFactoryObject->getDiaryNoteIDs(1, 10) as
$diarynoteid) {
- $cells = array();
- $cells[][] =
util_make_link('/developer/diary.php?diary_id='.$diarynoteid.'&diary_user='.
$diary_user, $diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getSummary());
- $cells[][] =
$diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getDatePostedOn();
- echo $HTML->multiTableRow(array(), $cells);
- }
- echo $HTML->listTableBottom();
- } else {
- echo $HTML->information(_('This User Has No Diary Entries'));
- }
- echo '</div>
- <div id="diary_right">';
- echo $HTML->boxTop(_('Archives'));
- echo $diaryNoteFactoryObject->getArchivesTree(1);
- echo $HTML->boxBottom();
- echo '</div></div>';
- $HTML->footer();
-
-} else {
- exit_error(_('No User Selected'), 'home');
-}
diff --git a/src/www/developer/index.php b/src/www/developer/index.php
new file mode 100644
index 0000000..b6f0b9f
--- /dev/null
+++ b/src/www/developer/index.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * FusionForge Diary aka Blog feature
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+require_once '../env.inc.php';
+require_once $gfcommon.'include/pre.php';
+require_once $gfwww.'include/vote_function.php';
+require_once $gfcommon.'diary/DiaryNoteFactory.class.php';
+
+global $HTML;
+
+if (!forge_get_config('use_diary')) {
+ exit_disabled('home');
+}
+
+/* get informations from request or $_POST */
+$diary_user = getIntFromRequest('diary_user');
+
+/* validate user */
+if (!$diary_user)
+ exit_no_user();
+
+$user = user_get_object($diary_user);
+if (!$user || !is_object($user) || !$user->isActive())
+ exit_no_user();
+
+/* everything sounds ok, now let's do the job */
+$action = getStringFromRequest('action');
+if
(file_exists(forge_get_config('source_path').'/common/diary/actions/'.$action.'.php'))
{
+
include(forge_get_config('source_path').'/common/diary/actions/'.$action.'.php');
+}
+
+$diaryNoteFactoryObject = new diaryNoteFactory(user_get_object($diary_user));
+
+if (!$diaryNoteFactoryObject) {
+ exit_error( _('Entry Not Found'), 'home');
+} elseif ($diaryNoteFactoryObject->isError()) {
+ exit_error($diaryNoteFactoryObject->getErrorMessage(),'home');
+}
+
+$title = _('Diary and Notes for') . ' ' .
$diaryNoteFactoryObject->getUser()->getRealName();
+$HTML->header(array('title' => $title));
+
+echo html_ao('div', array('id' => 'views'));
+include ($gfcommon.'diary/views/views.php');
+echo html_ac(html_ap() - 1);
+
+$HTML->footer();
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=c10c7e482dfc945732d77bd7997ca8ec05a900af
commit c10c7e482dfc945732d77bd7997ca8ec05a900af
Author: Franck Villaume <[email protected]>
Date: Mon May 6 12:23:29 2019 +0200
diary: use the view php organisation. add link to archives
diff --git a/src/common/diary/DiaryNoteFactory.class.php
b/src/common/diary/DiaryNoteFactory.class.php
index 798902e..31d9a76 100644
--- a/src/common/diary/DiaryNoteFactory.class.php
+++ b/src/common/diary/DiaryNoteFactory.class.php
@@ -73,6 +73,22 @@ class DiaryNoteFactory extends FFObject {
}
}
+ function getDIaryNoteIDsByYearAndMonth($year, $month, $public = 0,
$limit = 0) {
+ $qpa = false;
+ $qpa = db_construct_qpa($qpa, 'SELECT id FROM user_diary WHERE
user_id = $1 AND year = $2 AND month = $3', array($this->User->getID(), $year,
$month));
+ if ($public) {
+ $qpa = db_construct_qpa($qpa, ' AND is_public = $1',
array($public));
+ }
+ $qpa = db_construct_qpa($qpa, ' ORDER BY date_posted DESC',
array());
+ $res = db_query_qpa($qpa);
+ $yearmonthdiarynoteids = util_result_column_to_array($res);
+ if ($limit) {
+ return array_slice($yearmonthdiarynoteids, 0, $limit);
+ } else {
+ return $yearmonthdiarynoteids;
+ }
+ }
+
function hasNotes($public = 0) {
$this->getDiaryNoteIDs($public);
if (is_array($this->diarynoteids) &&
count($this->diarynoteids)) {
@@ -101,11 +117,25 @@ class DiaryNoteFactory extends FFObject {
if ($res && db_numrows($res)) {
$liElements = array();
while ($arr = db_fetch_array($res)) {
- $liElements[]['content'] =
$arr[1].'/'.$arr[2].' ('.$arr[0].')';
+ $liElements[]['content'] =
$arr[1].'/'.$arr[2].'
'.util_make_link('/developer/?view=archivelist&diary_user='.$this->User->getID().'&year='.$arr[1].'&month='.$arr[2],
'('.$arr[0].')');
}
return $HTML->html_list($liElements);
} else {
return $HTML->information(_('No archive available'));
}
}
+
+ function getLastDiaryID($public = 0) {
+ $qpa = false;
+ $qpa = db_construct_qpa($qpa, 'SELECT MAX(id) as lastid FROM
user_diary WHERE user_id = $1', array($this->User->getID()));
+ if ($public) {
+ $qpa = db_construct_qpa($qpa, ' AND is_public = $1',
array($public));
+ }
+ $res = db_query_qpa($qpa);
+ if ($res && db_numrows($res)) {
+ $arr = db_fetch_array($res);
+ return $arr['lastid'];
+ }
+ return false;
+ }
}
diff --git a/src/common/diary/views/archive.php
b/src/common/diary/views/archive.php
new file mode 100644
index 0000000..55fe8c8
--- /dev/null
+++ b/src/common/diary/views/archive.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+global $HTML;
+global $diaryNoteFactoryObject;
+
+echo $HTML->boxTop(_('Archives'));
+echo $diaryNoteFactoryObject->getArchivesTree(1);
+echo $HTML->boxBottom();
diff --git a/src/common/diary/views/archivelist.php
b/src/common/diary/views/archivelist.php
new file mode 100644
index 0000000..562937e
--- /dev/null
+++ b/src/common/diary/views/archivelist.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+
+global $diaryNoteFactoryObject;
+global $HTML;
+
+echo html_ao('div', array('id' => 'diary'));
+echo html_ao('div', array('id' => 'diary_left'));
+include ($gfcommon.'diary/views/listnotes.php');
+echo html_ac(html_ap() - 1);
+echo html_ao('div', array('id' => 'diary_right'));
+include ($gfcommon.'diary/views/archive.php');
+echo html_ac(html_ap() - 2);
diff --git a/src/common/diary/views/detail.php
b/src/common/diary/views/detail.php
new file mode 100644
index 0000000..79e8821
--- /dev/null
+++ b/src/common/diary/views/detail.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+
+global $diaryNoteFactoryObject;
+global $HTML;
+
+$diary_id = getIntFromRequest('diary_id');
+
+echo html_ao('div', array('id' => 'diary'));
+echo html_ao('div', array('id' => 'diary_left'));
+include ($gfcommon.'diary/views/detailnote.php');
+echo html_ac(html_ap() - 1);
+echo html_ao('div', array('id' => 'diary_right'));
+include ($gfcommon.'diary/views/archive.php');
+echo html_ac(html_ap() - 2);
diff --git a/src/common/diary/views/detailnote.php
b/src/common/diary/views/detailnote.php
new file mode 100644
index 0000000..fcd9d36
--- /dev/null
+++ b/src/common/diary/views/detailnote.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+
+global $diaryNoteFactoryObject;
+global $HTML;
+
+$diary_id = getIntFromRequest('diary_id');
+
+if (!$diary_id) {
+ $diary_id = $diaryNoteFactoryObject->getLastDiaryID(1);
+}
+
+if ($diary_id) {
+ if ($diaryNoteFactoryObject->getDiaryNote($diary_id)->isPublic()) {
+ echo
$HTML->boxTop($diaryNoteFactoryObject->getDiaryNote($diary_id)->getSummary());
+ echo '<p>' . _('Posted on ') .
$diaryNoteFactoryObject->getDiaryNote($diary_id)->getDatePostedOn().'</p>';
+ echo
$diaryNoteFactoryObject->getDiaryNote($diary_id)->getDetails();
+ echo $HTML->boxBottom();
+ } else {
+ echo $HTML->error_msg(_('Entry Not Found For This User'));
+ }
+}
diff --git a/src/common/diary/views/listnotes.php
b/src/common/diary/views/listnotes.php
new file mode 100644
index 0000000..c545a23
--- /dev/null
+++ b/src/common/diary/views/listnotes.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+global $HTML;
+global $diaryNoteFactoryObject;
+
+if ($diaryNoteFactoryObject->hasNotes(1)) {
+ $year = getIntFromRequest('year', 0);
+ $month = getIntFromRequest('month', 0);
+ if ($year && $month) {
+ echo html_e('h2', array(), _('Existing Diary and Notes Entries
for').' '.$year.'/'.$month);
+ } else {
+ echo html_e('h2', array(), _('Existing Last 10 Diary and Notes
Entries'));
+ }
+ echo $HTML->listTableTop();
+ $cells = array();
+ $cells[][] = _('Subject');
+ $cells[][] = _('Date');
+ echo $HTML->multiTableRow(array(), $cells, true);
+ if ($year && $month) {
+ foreach
($diaryNoteFactoryObject->getDIaryNoteIDsByYearAndMonth($year, $month, 1) as
$diarynoteid) {
+ $cells = array();
+ $cells[][] =
util_make_link('/developer/?view=detail&diary_id='.$diarynoteid.'&diary_user='.
$diary_user, $diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getSummary());
+ $cells[][] =
$diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getDatePostedOn();
+ echo $HTML->multiTableRow(array(), $cells);
+ }
+ } else {
+ foreach ($diaryNoteFactoryObject->getDiaryNoteIDs(1, 10) as
$diarynoteid) {
+ $cells = array();
+ $cells[][] =
util_make_link('/developer/?view=detail&diary_id='.$diarynoteid.'&diary_user='.
$diary_user, $diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getSummary());
+ $cells[][] =
$diaryNoteFactoryObject->getDiaryNote($diarynoteid)->getDatePostedOn();
+ echo $HTML->multiTableRow(array(), $cells);
+ }
+ }
+ echo $HTML->listTableBottom();
+} else {
+ echo $HTML->information(_('This User Has No Diary Entries'));
+}
diff --git a/src/common/diary/views/main.php b/src/common/diary/views/main.php
new file mode 100644
index 0000000..79f5f87
--- /dev/null
+++ b/src/common/diary/views/main.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+
+global $diaryNoteFactoryObject;
+global $HTML;
+
+$diary_id = getIntFromRequest('diary_id');
+
+echo html_ao('div', array('id' => 'diary'));
+echo html_ao('div', array('id' => 'diary_left'));
+include ($gfcommon.'diary/views/detailnote.php');
+include ($gfcommon.'diary/views/listnotes.php');
+echo html_ac(html_ap() - 1);
+echo html_ao('div', array('id' => 'diary_right'));
+include ($gfcommon.'diary/views/archive.php');
+echo html_ac(html_ap() - 2);
diff --git a/src/common/diary/views/views.php b/src/common/diary/views/views.php
new file mode 100644
index 0000000..e55ab84
--- /dev/null
+++ b/src/common/diary/views/views.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * FusionForge Diary aka blog
+ *
+ * Copyright 2019, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/diary/index.php to add require */
+
+$view = getStringFromRequest('view', 'main');
+switch ($view) {
+ case 'detail':
+ case 'archivelist':
+ case 'main': {
+ include ($gfcommon.'diary/views/'.$view.'.php');
+ break;
+ }
+}
diff --git a/src/common/include/exit.php b/src/common/include/exit.php
index 4cd122b..f759a5a 100644
--- a/src/common/include/exit.php
+++ b/src/common/include/exit.php
@@ -5,6 +5,7 @@
* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2010-2011, Franck Villaume - Capgemini
* Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2019, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -83,6 +84,13 @@ function exit_no_group() {
}
/**
+ * exit_no_user() - Exit with no user chosen error
+ */
+function exit_no_user() {
+ exit_error(_('No User Selected'), 'home');
+}
+
+/**
* exit_missing_param() - Exit with missing required parameters error
*
* @param string $url URL, usually $_SERVER['HTTP_REFERER']
diff --git a/src/common/include/utils_crossref.php
b/src/common/include/utils_crossref.php
index 871c56d..bec7542 100644
--- a/src/common/include/utils_crossref.php
+++ b/src/common/include/utils_crossref.php
@@ -164,7 +164,7 @@ function _diarynotesid2url($id) {
$text = '[N'.$id.']';
$dn = diarynote_get_object($id);
if ($dn && is_object($dn) && !$dn->isError() && $dn->isPublic()) {
- $url =
'/developer/diary.php?diary_id='.$id.'&diary_user='.$dn->getUser()->getID();
+ $url =
'/developer/?view=detail&diary_id='.$id.'&diary_user='.$dn->getUser()->getID();
$arg['title'] = $dn->getSummary();
return util_make_link($url, $text, $arg);
}
-----------------------------------------------------------------------
Summary of changes:
src/common/diary/DiaryNoteFactory.class.php | 32 +++++++-
.../diary/views/archive.php} | 11 ++-
.../diary/views/archivelist.php} | 16 +++-
.../diary/views/detail.php} | 18 ++++-
.../diary/views/detailnote.php} | 31 ++++---
src/common/diary/views/listnotes.php | 59 ++++++++++++++
.../diary/views/main.php} | 29 ++++---
.../unicode.php => common/diary/views/views.php} | 23 +++---
src/common/include/exit.php | 8 ++
src/common/include/utils_crossref.php | 2 +-
src/www/developer/diary.php | 94 ----------------------
src/www/developer/index.php | 67 +++++++++++++++
12 files changed, 242 insertions(+), 148 deletions(-)
copy src/{plugins/mantisbt/view/admin/StatPerMember.php =>
common/diary/views/archive.php} (73%)
copy src/{plugins/mantisbt/view/admin/StatPerMember.php =>
common/diary/views/archivelist.php} (62%)
copy src/{plugins/mantisbt/view/admin/StatPerMember.php =>
common/diary/views/detail.php} (60%)
copy src/{plugins/headermenu/action/validateOrder.php =>
common/diary/views/detailnote.php} (51%)
create mode 100644 src/common/diary/views/listnotes.php
copy src/{plugins/headermenu/action/validateOrder.php =>
common/diary/views/main.php} (58%)
copy src/{www/include/unicode.php => common/diary/views/views.php} (70%)
delete mode 100644 src/www/developer/diary.php
create mode 100644 src/www/developer/index.php
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits