[Fusionforge-commits] FusionForge branch master updated. 83e43c6dc7231ef54975274b2c8179ff7f713725

Franck Villaume nerville at fusionforge.org
Sun Nov 16 20:10:27 CET 2014


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  83e43c6dc7231ef54975274b2c8179ff7f713725 (commit)
      from  d21da25a6e2fde6e40ec71d42f5dd2d1818f69d4 (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 83e43c6dc7231ef54975274b2c8179ff7f713725
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Nov 16 20:10:08 2014 +0100

    use HTML helpers

diff --git a/src/plugins/headermenu/common/headermenuPlugin.class.php b/src/plugins/headermenu/common/headermenuPlugin.class.php
index 0721d7a..ceba933 100644
--- a/src/plugins/headermenu/common/headermenuPlugin.class.php
+++ b/src/plugins/headermenu/common/headermenuPlugin.class.php
@@ -51,7 +51,7 @@ titles and links.");
 				break;
 			}
 			case 'site_admin_option_hook': {
-				echo '<li>'.$this->getAdminOptionLink().'</li>';
+				echo html_e('li', array(), $this->getAdminOptionLink());
 				break;
 			}
 			case 'groupmenu': {
@@ -66,8 +66,8 @@ titles and links.");
 				$group_id = $params['group_id'];
 				$project = group_get_object($group_id);
 				if ($project->usesPlugin($this->name)) {
-					echo '<p>'.util_make_link('/plugins/'.$this->name.'/?type=projectadmin&group_id='.$group_id,
-					     _('Menu Tabs Manager Admin'), array('title' => _('Add/Remove/Activate/Desactivate tabs'))) . '</p>';
+					echo hmtl_e('p', array(), util_make_link('/plugins/'.$this->name.'/?type=projectadmin&group_id='.$group_id,
+					     _('Menu Tabs Manager Admin'), array('title' => _('Add/Remove/Activate/Desactivate tabs'))));
 				}
 				break;
 			}
diff --git a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
index edfc126..78b6c27 100644
--- a/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
+++ b/src/plugins/headermenu/view/admin/viewProjectConfiguration.php
@@ -71,13 +71,14 @@ if (sizeof($linksArray)) {
 		$cells[][] = htmlspecialchars($link['description']);
 		if ($link['is_enable']) {
 			$cells[][] = html_image('docman/validate.png', 22, 22, array('alt'=>_('link is on'), 'title'=>_('link is on')));
-			$cells[][] = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0', html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))), array('title' => _('Desactivate this link')));
+			$actionsLinks = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=0', html_image('docman/release-document.png', 22, 22, array('alt'=>_('Desactivate this link'))), array('title' => _('Desactivate this link')));
 		} else {
 			$cells[][] = html_image('docman/delete-directory.png', 22, 22, array('alt'=>_('link is off'), 'title'=>_('link is off')));
-			$cells[][] = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1', html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))), array('title' => _('Activate this link')));
+			$actionsLinks = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=updateLinkStatus&linkid='.$link['id_headermenu'].'&linkstatus=1', html_image('docman/reserve-document.png', 22, 22, array('alt'=>_('Activate this link'))), array('title' => _('Activate this link')));
 		}
-		$cells[][] = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&view=updateLinkValue&linkid='.$link['id_headermenu'], html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))), array('title' => _('Edit this link')));
-		$cells[][] = util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=deleteLink&linkid='.$link['id_headermenu'], html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))), array('title' => _('Delete this link')));
+		$actionsLinks .= util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&view=updateLinkValue&linkid='.$link['id_headermenu'], html_image('docman/edit-file.png',22,22, array('alt'=>_('Edit this link'))), array('title' => _('Edit this link')));
+		$actionsLinks .= util_make_link('/plugins/'.$headermenu->name.'?type=projectadmin&group_id='.$group_id.'&action=deleteLink&linkid='.$link['id_headermenu'], html_image('docman/trash-empty.png',22,22, array('alt'=>_('Delete this link'))), array('title' => _('Delete this link')));
+		$cells[][] = $actionsLinks;
 		echo $HTML->multiTableRow(array('id' => $link['id_headermenu']), $cells);
 	}
 	echo $HTML->listTableBottom();
@@ -91,27 +92,13 @@ echo $HTML->openForm(array('method' => 'POST', 'name' => 'addLink', 'action' =>
 echo $HTML->listTableTop();
 $cells = array();
 $cells[] = array(_('Displayed Name').utils_requiredField()._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input required="required" name="name" type="text" maxlength="255" />';
+$cells[][] = html_e('input', array('required' => 'required', 'name' => 'name', 'type' => 'text', 'maxlength' => 255));
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
 $cells[] = array(_('Description')._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input name="description" type="text" maxlength="255" />';
+$cells[][] = html_e('input', array('name' => 'description', 'type' => 'text', 'maxlength' => 255));
 echo $HTML->multiTableRow(array(), $cells);
-$cells = array();$params['name'] = 'htmlcode';$params['name'] = 'htmlcode';
-$params['body'] = _('Just paste your code here...');;
-$params['width'] = "800";
-$params['height'] = "500";
-$params['user_id'] = user_getid();
-$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
-plugin_hook("text_editor", $params);
-$cells[][] = $params['content'];
-$params['body'] = _('Just paste your code here...');;
-$params['width'] = "800";
-$params['height'] = "500";
-$params['user_id'] = user_getid();
-$params['content'] = '<textarea name="htmlcode" rows="5" cols="80">'.$params['body'].'</textarea>';
-plugin_hook("text_editor", $params);
-$cells[][] = $params['content'];
+$cells = array();
 $cells[] = array(_('Tab Type')._(':'), 'style' => 'text-align:right');
 $texts = array('URL', 'HTML Page');
 $vals = array('url', 'htmlcode');
@@ -130,13 +117,14 @@ $cells[][] = $params['content'];
 echo $HTML->multiTableRow(array('id' => 'trhtmlcode', 'class' => 'hide'), $cells);
 $cells = array();
 $cells[] = array(_('URL').utils_requiredField()._(':'), 'style' => 'text-align:right');
-$cells[][] = '<input name="link" type="text" maxlength="255" />';
+$cells[][] = html_e('input', array('name' => 'link', 'type' => 'url', 'maxlength' => 255));
 echo $HTML->multiTableRow(array('id' => 'urlcode'), $cells);
 $cells = array();
-$cells[] = array('<input name="iframeview" type="checkbox" value="1" />'._('Display URL as iframe'), 'colspan' => 2);
+$cells[] = array(_('Display URL as iframe')._(':'), 'style' => 'text-align:right');
+$cells[][] = html_e('input', array('name' => 'iframeview', 'type' => 'checkbox', 'value' => 1));
 echo $HTML->multiTableRow(array('id' => 'iframe'), $cells);
 $cells = array();
-$cells[] = array('<input type="hidden" name="linkmenu" value="groupmenu" /><input type="submit" value="'. _('Add') .'" />', 'colspan' => 2);
+$cells[] = array(html_e('input', array('type' => 'hidden', 'name' => 'linkmenu', 'value' => 'groupmenu')).html_e('input', array('type' => 'submit', 'value' => _('Add'))), 'colspan' => 2);
 echo $HTML->multiTableRow(array(), $cells);
 echo $HTML->listTableBottom();
 echo $HTML->closeForm();

-----------------------------------------------------------------------

Summary of changes:
 .../headermenu/common/headermenuPlugin.class.php   |    6 ++--
 .../view/admin/viewProjectConfiguration.php        |   36 +++++++-------------
 2 files changed, 15 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list