[Fusionforge-commits] FusionForge branch master updated. a9e5a9ae4bcb4b56c0e1fdc100653e62b78bb73c
Franck VILLAUME
nerville at fusionforge.org
Wed Feb 5 17:54:11 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 a9e5a9ae4bcb4b56c0e1fdc100653e62b78bb73c (commit)
via 498713f32e108f3c391bf86b8ddf40277c4e05a8 (commit)
from 5b3a24cc367efef0ebfd58cf5ed65884bae417b5 (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 a9e5a9ae4bcb4b56c0e1fdc100653e62b78bb73c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Wed Feb 5 17:43:23 2014 +0100
listTableTop: make first param default value
diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index af467a1..bbd453a 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -8,7 +8,7 @@
* Copyright 2010-2012, Alain Peyrat - Alcatel-Lucent
* Copyright © 2011 Thorsten Glaser – tarent GmbH
* Copyright 2011 - Marc-Etienne Vargenau, Alcatel-Lucent
- * Copyright 2012-2013, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
@@ -634,7 +634,7 @@ if (isset($params['group']) && $params['group']) {
* @param array $thTitleArray specific title for th column
* @return string the html code
*/
- function listTableTop($titleArray, $linksArray = array(), $class = '', $id = '', $thClassArray = array(), $thTitleArray = array()) {
+ function listTableTop($titleArray = array(), $linksArray = array(), $class = '', $id = '', $thClassArray = array(), $thTitleArray = array()) {
$args = '';
if ($class) {
$args .= ' class="listing '.$class.'"';
commit 498713f32e108f3c391bf86b8ddf40277c4e05a8
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Wed Feb 5 17:47:34 2014 +0100
merge Branch_5_3
diff --git a/src/www/snippet/add_snippet_to_package.php b/src/www/snippet/add_snippet_to_package.php
index db73fd0..008e846 100644
--- a/src/www/snippet/add_snippet_to_package.php
+++ b/src/www/snippet/add_snippet_to_package.php
@@ -65,8 +65,9 @@ if (session_loggedin()) {
check to see if they are the creator of this version
*/
$result=db_query_params("SELECT * FROM snippet_package_version ".
- "WHERE submitted_by=$1 AND ".
- "snippet_package_version_id=$2", array(user_getid(), $snippet_package_version_id));
+ "WHERE submitted_by=$1 AND ".
+ "snippet_package_version_id=$2",
+ array(user_getid(), $snippet_package_version_id));
if (!$result || db_numrows($result) < 1) {
echo '<p class="error">' ._('Error: Only the creator of a package version can add snippets to it.').'</p>';
handle_add_exit();
@@ -75,10 +76,10 @@ if (session_loggedin()) {
/*
make sure the snippet_version_id exists
*/
- $result=db_query_params ('SELECT * FROM snippet_version WHERE snippet_version_id=$1',
- array($snippet_version_id));
+ $result=db_query_params('SELECT * FROM snippet_version WHERE snippet_version_id=$1',
+ array($snippet_version_id));
if (!$result || db_numrows($result) < 1) {
- echo '<p class="error">' ._('Error: snippet doesn\'t exist').'</p>';
+ echo '<p class="error">' ._('Error: snippet does not exist').'</p>';
echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
handle_add_exit();
}
@@ -86,14 +87,14 @@ if (session_loggedin()) {
/*
make sure the snippet_version_id isn't already in this package
*/
- $result=db_query_params ('SELECT * FROM snippet_package_item
-WHERE snippet_package_version_id=$1
-AND snippet_version_id=$2',
- array($snippet_package_version_id,
- $snippet_version_id));
+ $result=db_query_params('SELECT * FROM snippet_package_item
+ WHERE snippet_package_version_id=$1
+ AND snippet_version_id=$2',
+ array($snippet_package_version_id,
+ $snippet_version_id));
if ($result && db_numrows($result) > 0) {
echo '<p class="error">'._('Error: That snippet was already added to this package.').'</p>';
- echo util_make_url ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
+ echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
handle_add_exit();
}
@@ -101,10 +102,10 @@ AND snippet_version_id=$2',
create the snippet version
*/
$result=db_query_params("INSERT INTO snippet_package_item (snippet_package_version_id,snippet_version_id)
-VALUES ($1, $2)", array($snippet_package_version_id, $snippet_version_id));
+ VALUES ($1, $2)", array($snippet_package_version_id, $snippet_version_id));
if (!$result) {
- $feedback .= _('Error doing snippet version insert').' '.db_error();
+ $error_msg .= _('Error doing snippet version insert').' '.db_error();
} else {
$feedback .= _('Snippet Version Added Successfully.');
}
@@ -113,14 +114,13 @@ VALUES ($1, $2)", array($snippet_package_version_id, $snippet_version_id));
echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back To Add Page'));
handle_add_exit();
}
-
}
$result=db_query_params ('SELECT snippet_package.name,snippet_package_version.version
-FROM snippet_package,snippet_package_version
-WHERE snippet_package.snippet_package_id=snippet_package_version.snippet_package_id
-AND snippet_package_version.snippet_package_version_id=$1',
- array($snippet_package_version_id));
+ FROM snippet_package,snippet_package_version
+ WHERE snippet_package.snippet_package_id=snippet_package_version.snippet_package_id
+ AND snippet_package_version.snippet_package_version_id=$1',
+ array($snippet_package_version_id));
?>
<p>
@@ -137,20 +137,20 @@ AND snippet_package_version.snippet_package_version_id=$1',
<table>
<tr><td colspan="2" class="align-center">
<strong><?php echo _('Add This Snippet Version ID:'); ?></strong><br />
- <select name="snippet_version_id">
+ <select name="snippet_version_id">
<?php
$combolistresult = db_query_params ('SELECT myname,snippet_version.snippet_version_id
-FROM ( SELECT MAX(post_date) AS
-mydate,name AS myname,snippet.snippet_id AS myid
-FROM
-snippet,snippet_version
-WHERE
-snippet.snippet_id=snippet_version.snippet_id
-GROUP BY
-name,snippet.snippet_id ) AS foo,snippet_version
-WHERE
-snippet_version.post_date=mydate',array());
+ FROM ( SELECT MAX(post_date) AS
+ mydate,name AS myname,snippet.snippet_id AS myid
+ FROM
+ snippet,snippet_version
+ WHERE
+ snippet.snippet_id=snippet_version.snippet_id
+ GROUP BY
+ name,snippet.snippet_id ) AS foo,snippet_version
+ WHERE
+ snippet_version.post_date=mydate',array());
$combolistrows=db_numrows($combolistresult);
for ($i=0; $i<$combolistrows; $i++)
{
@@ -170,19 +170,20 @@ for ($i=0; $i<$combolistrows; $i++)
/*
Show the snippets in this package
*/
- $result=db_query_params ('SELECT snippet_package_item.snippet_version_id, snippet_version.version, snippet.name
-FROM snippet,snippet_version,snippet_package_item
-WHERE snippet.snippet_id=snippet_version.snippet_id
-AND snippet_version.snippet_version_id=snippet_package_item.snippet_version_id
-AND snippet_package_item.snippet_package_version_id=$1',
- array($snippet_package_version_id));
+ $result=db_query_params('SELECT snippet_package_item.snippet_version_id, snippet_version.version, snippet.name
+ FROM snippet,snippet_version,snippet_package_item
+ WHERE snippet.snippet_id=snippet_version.snippet_id
+ AND snippet_version.snippet_version_id=snippet_package_item.snippet_version_id
+ AND snippet_package_item.snippet_package_version_id=$1',
+ array($snippet_package_version_id));
$rows=db_numrows($result);
if (!$result || $rows < 1) {
echo db_error();
echo '
- <p>' ._('No Snippets Are In This Package Yet').'</p>';
+ <p class="information" >' ._('No Snippets Are In This Package Yet').'</p>';
} else {
echo $HTML->boxTop(_('Snippets In This Package'));
+ echo $HTML->listTableTop();
for ($i=0; $i<$rows; $i++) {
echo '
<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td class="align-center">
@@ -192,6 +193,7 @@ AND snippet_package_item.snippet_package_version_id=$1',
$last_group=db_result($result,$i,'group_id');
}
+ echo $HTML->listTableBottom();
echo $HTML->boxBottom();
}
diff --git a/src/www/snippet/addversion.php b/src/www/snippet/addversion.php
index 302360f..53fa584 100644
--- a/src/www/snippet/addversion.php
+++ b/src/www/snippet/addversion.php
@@ -37,7 +37,7 @@ if (session_loggedin()) {
$result=db_query_params ('SELECT * FROM snippet WHERE snippet_id=$1',
array($id));
if (!$result || db_numrows($result) < 1) {
- exit_error(_('Error: snippet doesn\'t exist'));
+ exit_error(_('Error: snippet does not exist'));
}
/*
@@ -123,9 +123,9 @@ if (session_loggedin()) {
See if the package exists first
*/
$result=db_query_params ('SELECT * FROM snippet_package WHERE snippet_package_id=$1',
- array($id));
+ array($id));
if (!$result || db_numrows($result) < 1) {
- exit_error(_('Error: snippet_package doesn\'t exist'));
+ exit_error(_('Error: snippet_package does not exist'));
}
if (getStringFromRequest('post_changes')) {
@@ -172,7 +172,7 @@ if (session_loggedin()) {
<script type="text/javascript">/* <![CDATA[ */
function show_add_snippet_box() {
- var newWindow = open("","occursDialog","height=500,width=300,scrollbars=yes,resizable=yes");
+ var newWindow = open('','occursDialog','height=500,width=300,scrollbars=yes,resizable=yes');
newWindow.location=('/snippet/add_snippet_to_package.php?snippet_package_version_id=<?php
echo $snippet_package_version_id; ?>');
}
diff --git a/src/www/snippet/browse.php b/src/www/snippet/browse.php
index 2f0158c..ccc779a 100644
--- a/src/www/snippet/browse.php
+++ b/src/www/snippet/browse.php
@@ -46,7 +46,7 @@ function createPackageQuery($clause) {
return "SELECT users.realname,users.user_name,users.user_id,snippet_package.description,snippet_package.snippet_package_id,snippet_package.name FROM snippet_package,users WHERE users.user_id=snippet_package.created_by AND ".$clause;
}
-snippet_header(array('title'=>_('Snippet Library'), 'header'=>''));
+snippet_header(array('title'=>_('Snippet Library')));
$by = getStringFromRequest('by');
diff --git a/src/www/snippet/delete.php b/src/www/snippet/delete.php
index a449341..18b222a 100644
--- a/src/www/snippet/delete.php
+++ b/src/www/snippet/delete.php
@@ -30,7 +30,7 @@ require_once $gfwww.'snippet/snippet_utils.php';
*/
if (session_loggedin()) {
- snippet_header(array('title'=>'Delete Snippets'));
+ snippet_header(array('title' => _('Delete Snippets')));
$type = getStringFromRequest('type');
$snippet_version_id = getIntFromRequest('snippet_version_id');
$snippet_package_version_id = getIntFromRequest('snippet_package_version_id');
@@ -42,26 +42,27 @@ if (session_loggedin()) {
//Check to see if they are the creator of this package_version
$result=db_query_params("SELECT * FROM snippet_package_version ".
- "WHERE submitted_by=$1 AND ".
- "snippet_package_version_id=$2", array(user_getid(), $snippet_package_version_id));
+ "WHERE submitted_by=$1 AND ".
+ "snippet_package_version_id=$2",
+ array(user_getid(), $snippet_package_version_id));
if (!$result || db_numrows($result) < 1) {
- echo '<p class="error">Error: Only the creator of a package version can delete snippets from it.</p>';
+ echo '<p class="error">'._('Error: Only the creator of a package version can delete snippets from it.').'</p>';
snippet_footer();
exit;
} else {
//Remove the item from the package
$result=db_query_params ('DELETE FROM snippet_package_item
-WHERE snippet_version_id=$1
-AND snippet_package_version_id=$2',
- array($snippet_version_id,
- $snippet_package_version_id));
+ WHERE snippet_version_id=$1
+ AND snippet_package_version_id=$2',
+ array($snippet_version_id,
+ $snippet_package_version_id));
if (!$result || db_affected_rows($result) < 1) {
- echo '<p class="error">Error: That snippet doesn\'t exist in this package.</p>';
+ echo '<p class="error">'._('Error: That snippet does not exist in this package.').'</p>';
snippet_footer();
exit;
} else {
- echo '<p class="feedback">Item Removed From Package</p>';
+ echo '<p class="feedback">'._('Item Removed From Package').'</p>';
snippet_footer();
exit;
}
@@ -74,9 +75,10 @@ AND snippet_package_version_id=$2',
//find this snippet id and make sure the current user created it
$result=db_query_params("SELECT * FROM snippet_version ".
- "WHERE snippet_version_id=$1 AND submitted_by=$2", array($snippet_version_id, user_getid()));
+ "WHERE snippet_version_id=$1 AND submitted_by=$2",
+ array($snippet_version_id, user_getid()));
if (!$result || db_numrows($result) < 1) {
- echo '<p class="error">Error: That snippet doesn\'t exist.</p>';
+ echo '<p class="error">'._('Error: That snippet does not exist.').'</p>';
snippet_footer();
exit;
} else {
@@ -84,7 +86,8 @@ AND snippet_package_version_id=$2',
//do the delete
$result=db_query_params("DELETE FROM snippet_version ".
- "WHERE snippet_version_id=$1 AND submitted_by=$2", array($snippet_version_id, user_getid()));
+ "WHERE snippet_version_id=$1 AND submitted_by=$2",
+ array($snippet_version_id, user_getid()));
//see if any versions of this snippet are left
$result=db_query_params("SELECT * FROM snippet_version WHERE snippet_id=$1", array($snippet_id));
@@ -94,7 +97,7 @@ AND snippet_package_version_id=$2',
$result=db_query_params("DELETE FROM snippet WHERE snippet_id=$1",array($snippet_id));
}
- echo '<class="feedback">Snippet Removed</p>';
+ echo '<p class="feedback">'._('Snippet Removed').'</p>';
snippet_footer();
exit;
}
@@ -107,11 +110,12 @@ AND snippet_package_version_id=$2',
//make sure they own this version of the package
$result=db_query_params("SELECT * FROM snippet_package_version ".
- "WHERE submitted_by=$1 AND ".
- "snippet_package_version_id=$2", array(user_getid(), $snippet_package_version_id));
+ "WHERE submitted_by=$1 AND ".
+ "snippet_package_version_id=$2",
+ array(user_getid(), $snippet_package_version_id));
if (!$result || db_numrows($result) < 1) {
//they don't own it or it's not found
- echo '<p class="error">Error: Only the creator of a package version can delete it.</p>';
+ echo '<p class="error">'._('Error: Only the creator of a package version can delete it.').'</p>';
snippet_footer();
exit;
} else {
@@ -119,22 +123,25 @@ AND snippet_package_version_id=$2',
//do the version delete
$result=db_query_params("DELETE FROM snippet_package_version ".
- "WHERE submitted_by=$1 AND ".
- "snippet_package_version_id=$2", array(user_getid(), $snippet_package_version_id));
+ "WHERE submitted_by=$1 AND ".
+ "snippet_package_version_id=$2",
+ array(user_getid(), $snippet_package_version_id));
//delete snippet_package_items
$result=db_query_params("DELETE FROM snippet_package_item ".
- "WHERE snippet_package_version_id=$1", array($snippet_package_version_id));
+ "WHERE snippet_package_version_id=$1",
+ array($snippet_package_version_id));
//see if any versions of this package remain
$result=db_query_params("SELECT * FROM snippet_package_version ".
- "WHERE snippet_package_id=$1", array($snippet_package_id));
+ "WHERE snippet_package_id=$1",
+ array($snippet_package_id));
if (!$result || db_numrows($result) < 1) {
//since no versions of this package remain,
//delete the main package even if the user didn't create it
$result=db_query_params("DELETE FROM snippet_package WHERE snippet_package_id=$1", array($snippet_package_id));
}
- echo '<p class="feedback">Package Removed</p>';
+ echo '<p class="feedback">'._('Package Removed').'</p>';
snippet_footer();
exit;
}
diff --git a/src/www/snippet/detail.php b/src/www/snippet/detail.php
index 15cd554..7498e9a 100644
--- a/src/www/snippet/detail.php
+++ b/src/www/snippet/detail.php
@@ -48,9 +48,9 @@ if ($type=='snippet') {
Get all the versions of this snippet
*/
$result=db_query_params("SELECT users.realname,users.user_name,users.user_id,snippet_version.snippet_version_id,snippet_version.version,snippet_version.post_date,snippet_version.changes
-FROM snippet_version,users
-WHERE users.user_id=snippet_version.submitted_by AND snippet_id=$1
-ORDER BY snippet_version.snippet_version_id DESC", array($id));
+ FROM snippet_version,users
+ WHERE users.user_id=snippet_version.submitted_by AND snippet_id=$1
+ ORDER BY snippet_version.snippet_version_id DESC", array($id));
$rows=db_numrows($result);
if (!$result || $rows < 1) {
@@ -112,7 +112,7 @@ ORDER BY snippet_version.snippet_version_id DESC", array($id));
Show a link so you can add a new version of this snippet
*/
echo '
- <h3><a href="'.util_make_url ('/snippet/addversion.php?type=snippet&id='.htmlspecialchars($id)).'"><span class="important">'._('Submit a new version').'</span></a></h3>
+ <h3><a href="'.util_make_url ('/snippet/addversion.php?type=snippet&id='.htmlspecialchars($id)).'"><span class="information">'._('Submit a new version').'</span></a></h3>
<p>' ._('You can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others.').'.</p>';
}
@@ -120,27 +120,22 @@ ORDER BY snippet_version.snippet_version_id DESC", array($id));
} elseif ($type=='package') {
/*
-
-
View a package and show its versions
Expand and show the snippets for the latest version
-
-
*/
snippet_header(array('title'=>_('Snippet Library')));
-
snippet_show_package_details($id);
/*
Get all the versions of this package
*/
$result = db_query_params ('SELECT users.realname,users.user_name,users.user_id,snippet_package_version.snippet_package_version_id,
-snippet_package_version.version,snippet_package_version.post_date
-FROM snippet_package_version,users
-WHERE users.user_id=snippet_package_version.submitted_by AND snippet_package_id=$1
-ORDER BY snippet_package_version.snippet_package_version_id DESC',
- array($id));
+ snippet_package_version.version,snippet_package_version.post_date
+ FROM snippet_package_version,users
+ WHERE users.user_id=snippet_package_version.submitted_by AND snippet_package_id=$1
+ ORDER BY snippet_package_version.snippet_package_version_id DESC',
+ array($id));
$rows=db_numrows($result);
if (!$result || $rows < 1) {
@@ -182,25 +177,25 @@ ORDER BY snippet_package_version.snippet_package_version_id DESC',
</p><p>'._('Download a raw-text version of this code by clicking on “Download Version”').'
</p>';
- /*
- show the latest version of the package
- and its snippets
- */
+ /*
+ show the latest version of the package
+ and its snippets
+ */
- echo '
- <p> </p>
- <hr />
- <h2>' ._('Latest Package Version: ').db_result($result,0,'version').'</h2>
- <p> </p>
- <p> </p>';
- snippet_show_package_snippets($newest_version);
+ echo '
+ <p> </p>
+ <hr />
+ <h2>' ._('Latest Package Version: ').db_result($result,0,'version').'</h2>
+ <p> </p>
+ <p> </p>';
+ snippet_show_package_snippets($newest_version);
- /*
- Show a form so you can add a new version of this package
- */
- echo '
- <h3><a href="'.util_make_url ('/snippet/addversion.php?type=package&id='.$id).'"><span class="important">' ._('Submit a new version').'</span></a></h3>
- <p>' ._('You can submit a new version of this package if you have modified it and you feel it is appropriate to share with others.').'.</p>';
+ /*
+ Show a form so you can add a new version of this package
+ */
+ echo '
+ <h3><a href="'.util_make_url ('/snippet/addversion.php?type=package&id='.$id).'"><span class="information">' ._('Submit a new version').'</span></a></h3>
+ <p>' ._('You can submit a new version of this package if you have modified it and you feel it is appropriate to share with others.').'.</p>';
}
snippet_footer();
@@ -211,11 +206,8 @@ ORDER BY snippet_package_version.snippet_package_version_id DESC',
*/
snippet_header(array('title'=>_('Snippet Library')));
-
snippet_show_package_details($id);
-
snippet_show_package_snippets($id);
-
snippet_footer();
} else {
diff --git a/src/www/snippet/index.php b/src/www/snippet/index.php
index 4d3b7f7..7e3f654 100644
--- a/src/www/snippet/index.php
+++ b/src/www/snippet/index.php
@@ -98,7 +98,7 @@ function snippet_mainpage() {
return $return;
}
-snippet_header(array('title'=>_('Snippet Library'), 'header'=>'Snippet Library'));
+snippet_header(array('title'=>_('Snippet Library')));
echo snippet_mainpage();
snippet_footer();
diff --git a/src/www/snippet/package.php b/src/www/snippet/package.php
index eac9fa6..c6e8e86 100644
--- a/src/www/snippet/package.php
+++ b/src/www/snippet/package.php
@@ -94,7 +94,7 @@ if (session_loggedin()) {
<script type="text/javascript">/* <![CDATA[ */
function show_add_snippet_box() {
- var newWindow = open("","occursDialog","height=500,width=300,scrollbars=yes,resizable=yes");
+ var newWindow = open('','occursDialog','height=500,width=300,scrollbars=yes,resizable=yes');
newWindow.location=('/snippet/add_snippet_to_package.php?suppress_nav=1&snippet_package_version_id=<?php
echo $snippet_package_version_id; ?>');
}
@@ -106,7 +106,7 @@ function show_add_snippet_box() {
<p>
<?php echo _('If a new window opened, use it to add snippets to your package. If a new window did not open, use the following link to add to your package BEFORE you leave this page.'); ?></p>
-<p><?php echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Add snippets to package'),array('target'=>'_blank')); ?></p>
+<p><?php echo util_make_link ('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Add snippets to package')); ?></p>
<p>
<?php echo _('<strong>Browse the library</strong> to find the snippets you want to add, then add them using the new window link shown above.'); ?>
@@ -140,7 +140,7 @@ function show_add_snippet_box() {
<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
<input type="hidden" name="post_changes" value="y" />
- <input type="hidden" name="changes" value="First Posted Version" />
+ <input type="hidden" name="changes" value="<?php echo _('First Posted Version') ?>" />
<table>
diff --git a/src/www/snippet/snippet_utils.php b/src/www/snippet/snippet_utils.php
index cdb48e7..3ed7ca1 100644
--- a/src/www/snippet/snippet_utils.php
+++ b/src/www/snippet/snippet_utils.php
@@ -129,11 +129,11 @@ function snippet_footer($params = array()) {
function snippet_show_package_snippets($version) {
//show the latest version
$result=db_query_params("SELECT users.realname,users.user_id,snippet_package_item.snippet_version_id, snippet_version.version,snippet.name,users.user_name
-FROM snippet,snippet_version,snippet_package_item,users
-WHERE snippet.snippet_id=snippet_version.snippet_id
-AND users.user_id=snippet_version.submitted_by
-AND snippet_version.snippet_version_id=snippet_package_item.snippet_version_id
-AND snippet_package_item.snippet_package_version_id=$1", array($version));
+ FROM snippet,snippet_version,snippet_package_item,users
+ WHERE snippet.snippet_id=snippet_version.snippet_id
+ AND users.user_id=snippet_version.submitted_by
+ AND snippet_version.snippet_version_id=snippet_package_item.snippet_version_id
+ AND snippet_package_item.snippet_package_version_id=$1", array($version));
$rows=db_numrows($result);
echo '<h3>' ._('Snippets In This Package').'</h3>';
@@ -144,14 +144,12 @@ AND snippet_package_item.snippet_package_version_id=$1", array($version));
$title_arr[]= _('Title');
$title_arr[]= _('Author');
- echo $GLOBALS['HTML']->listTableTop($title_arr);
-
if (!$result || $rows < 1) {
echo db_error();
echo '
- <tr><td colspan="4"><h3>' ._('No Snippets Are In This Package Yet').'</h3></td></tr>';
+ <div class="warning_msg">'._('No Snippets Are In This Package Yet').'</div>';
} else {
-
+ echo $GLOBALS['HTML']->listTableTop($title_arr);
//get the newest version, so we can display it's code
$newest_version=db_result($result,0,'snippet_version_id');
@@ -164,10 +162,8 @@ AND snippet_package_item.snippet_package_version_id=$1", array($version));
db_result($result,$i,'name').'</td><td>'.
util_make_link_u(db_result($result, $i, 'user_name'), db_result($result, $i, 'user_id'),db_result($result, $i, 'realname')).'</td></tr>';
}
+ echo $GLOBALS['HTML']->listTableBottom();
}
-
- echo $GLOBALS['HTML']->listTableBottom();
-
}
function snippet_show_package_details($id) {
-----------------------------------------------------------------------
Summary of changes:
src/www/include/Layout.class.php | 4 +-
src/www/snippet/add_snippet_to_package.php | 74 ++++++++++++++--------------
src/www/snippet/addversion.php | 8 +--
src/www/snippet/browse.php | 2 +-
src/www/snippet/delete.php | 51 ++++++++++---------
src/www/snippet/detail.php | 60 ++++++++++------------
src/www/snippet/index.php | 2 +-
src/www/snippet/package.php | 6 +--
src/www/snippet/snippet_utils.php | 20 +++-----
9 files changed, 112 insertions(+), 115 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list