[Fusionforge-commits] r18346 - in trunk/src/www: forum include snippet
Marc-Etienne VARGENAU
vargenau at fusionforge.org
Wed Oct 30 17:14:43 CET 2013
Author: vargenau
Date: 2013-10-30 17:14:43 +0100 (Wed, 30 Oct 2013)
New Revision: 18346
Modified:
trunk/src/www/forum/attachment.php
trunk/src/www/include/Layout.class.php
trunk/src/www/include/note.php
trunk/src/www/include/project_summary.php
trunk/src/www/include/tool_reports.php
trunk/src/www/include/vote_function.php
trunk/src/www/snippet/browse.php
trunk/src/www/snippet/index.php
Log:
Update PHP Doc
Modified: trunk/src/www/forum/attachment.php
===================================================================
--- trunk/src/www/forum/attachment.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/forum/attachment.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -34,7 +34,7 @@
/**
* goodbye - Just prints a message and a close button.
*
- * @param string The message.
+ * @param string $msg The message.
*/
function goodbye($msg) {
Modified: trunk/src/www/include/Layout.class.php
===================================================================
--- trunk/src/www/include/Layout.class.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/include/Layout.class.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -450,20 +450,20 @@
<td></td>
</tr>
- <tr>
- <td align="left" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topleft.png" height="9" width="9" alt="" /></td>
- <td class="toptab" width="30"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="30" height="1" alt="" /></td>
- <td class="toptab"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="1" height="1" alt="" /></td>
- <td class="toptab" width="30"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="30" height="1" alt="" /></td>
- <td align="right" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topright.png" height="9" width="9" alt="" /></td>
- </tr>
+ <tr>
+ <td align="left" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topleft.png" height="9" width="9" alt="" /></td>
+ <td class="toptab" width="30"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="30" height="1" alt="" /></td>
+ <td class="toptab"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="1" height="1" alt="" /></td>
+ <td class="toptab" width="30"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="30" height="1" alt="" /></td>
+ <td align="right" class="toptab" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/topright.png" height="9" width="9" alt="" /></td>
+ </tr>
<tr>
<!-- Outer body row -->
- <td class="toptab"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="10" height="1" alt="" /></td>
- <td valign="top" width="99%" class="toptab" colspan="3">
+ <td class="toptab"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="10" height="1" alt="" /></td>
+ <td valign="top" width="99%" class="toptab" colspan="3">
<!-- Inner Tabs / Shell -->
@@ -516,19 +516,19 @@
</tr>
</table>
- <!-- end inner body row -->
+ <!-- end inner body row -->
- </td>
- <td width="10" class="footer2"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="2" height="1" alt="" /></td>
- </tr>
- <tr>
- <td align="left" class="footer2" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/bottomleft.png" height="9" width="9" alt="" /></td>
- <td class="footer2" colspan="3"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="1" height="1" alt="" /></td>
- <td align="right" class="footer2" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/bottomright.png" height="9" width="9" alt="" /></td>
- </tr>
- </table>
- <?php
- $this->footerEnd($params);
+ </td>
+ <td width="10" class="footer2"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="2" height="1" alt="" /></td>
+ </tr>
+ <tr>
+ <td align="left" class="footer2" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/bottomleft.png" height="9" width="9" alt="" /></td>
+ <td class="footer2" colspan="3"><img src="<?php echo $this->imgbaseurl; ?>clear.png" width="1" height="1" alt="" /></td>
+ <td align="right" class="footer2" width="9"><img src="<?php echo $this->imgbaseurl; ?>tabs/bottomright.png" height="9" width="9" alt="" /></td>
+ </tr>
+</table>
+<?php
+ $this->footerEnd($params);
}
function footerEnd($params) { ?>
@@ -541,13 +541,12 @@
<?php echo $this->navigation->getShowSource();
plugin_hook('webanalytics_url', array());
+?>
- ?>
+</body>
+</html>
+<?php
- </body>
- </html>
- <?php
-
}
function getRootIndex() {
@@ -843,7 +842,6 @@
}
$return .= '</tr>';
-
return $return.'
</table>
@@ -908,9 +906,9 @@
/**
* subMenu() - Takes two array of titles and links and build a menu.
*
- * @param array The array of titles.
- * @param array The array of title links.
- * @param array The array of string for title attributes.
+ * @param array $title_arr The array of titles.
+ * @param array $links_arr The array of title links.
+ * @param array $attr_arr The array of string for title attributes.
* @return string Html to build a submenu.
*/
function subMenu($title_arr, $links_arr, $attr_arr = false) {
@@ -921,15 +919,15 @@
}
/**
- * multiTableRow() - create a mutlilevel row in a table
+ * multiTableRow() - create a multilevel row in a table
*
- * @param string the row attributes
- * @param array the array of cell data, each element is an array,
+ * @param string $row_attr the row attributes
+ * @param array $cell_data the array of cell data, each element is an array,
* the first item being the text,
* the subsequent items are attributes (dont include
* the bgcolor for the title here, that will be
* handled by $istitle
- * @param boolean is this row part of the title ?
+ * @param bool $istitle is this row part of the title ?
* @return string the html code
*/
function multiTableRow($row_attr, $cell_data, $istitle) {
@@ -964,7 +962,7 @@
/**
* feedback() - returns the htmlized feedback string when an action is performed.
*
- * @param string feedback string
+ * @param string $feedback feedback string
* @return string htmlized feedback
*/
function feedback($feedback) {
@@ -978,7 +976,7 @@
/**
* warning_msg() - returns the htmlized warning string when an action is performed.
*
- * @param string msg string
+ * @param string $msg msg string
* @return string htmlized warning
*/
function warning_msg($msg) {
@@ -993,7 +991,7 @@
/**
* error_msg() - returns the htmlized error string when an action is performed.
*
- * @param string msg string
+ * @param string $msg msg string
* @return string htmlized error
*/
function error_msg($msg) {
@@ -1010,7 +1008,7 @@
/**
* information() - returns the htmlized information string.
*
- * @param string msg string
+ * @param string $msg msg string
* @return string htmlized information
*/
function information($msg) {
@@ -1025,8 +1023,8 @@
/**
* getThemeIdFromName()
*
- * @param string the dirname of the theme
- * @return integer the theme id
+ * @param string $dirname the dirname of the theme
+ * @return int the theme id
*/
function getThemeIdFromName($dirname) {
$res = db_query_params ('SELECT theme_id FROM themes WHERE dirname=$1',
@@ -1306,9 +1304,9 @@
/**
* toSlug() - protect a string to be used as a link or an anchor
*
- * @param string $string the string used as a link or an anchor
- * @param string $space the caracter used as a replacement for a space
- * @return a protected string with only alphanumeric caracters
+ * @param string $string the string used as a link or an anchor
+ * @param string $space the character used as a replacement for a space
+ * @return string a protected string with only alphanumeric characters
*/
function toSlug($string, $space = "-") {
if (function_exists('iconv')) {
Modified: trunk/src/www/include/note.php
===================================================================
--- trunk/src/www/include/note.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/include/note.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -28,11 +28,11 @@
/**
* editor_button_raw() - Open an Editor dialog window
*
- * @param str Anchor string
- * @param form Form name
- * @param int wrap
- * @param int rows
- * @param int cols
+ * @param string $str Anchor string
+ * @param string $form Form name
+ * @param int $wrap
+ * @param int $rows
+ * @param int $cols
*/
function notepad_button_raw($str, $form, $wrap, $rows, $cols) {
$anchor = '<a href="javascript:notepad_window_param(\''.htmlspecialchars($form).'\',\''.
Modified: trunk/src/www/include/project_summary.php
===================================================================
--- trunk/src/www/include/project_summary.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/include/project_summary.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -27,7 +27,7 @@
/**
* project_setup_agg() - Set up a project aggregate array.
*
- * @param int Project ID
+ * @param int $group_id Project ID
* @access private
*/
function project_setup_agg($group_id) {
@@ -46,12 +46,12 @@
/**
* project_getaggvalue() - Get a projects aggregate value for a specific type
*
- * @param int The group ID
- * @param string The type
- * @return string
+ * @param int $group_id The group ID
+ * @param string $type The type
+ * @return string
* @access private
*/
-function project_getaggvalue($group_id,$type) {
+function project_getaggvalue($group_id, $type) {
global $project_agg_arr,$project_agg_arr_is_set;
if (!$project_agg_arr_is_set) {
project_setup_agg($group_id);
@@ -67,7 +67,7 @@
/**
* project_get_mail_list_count() - Get the number of mailing lists for a project.
*
- * @param int The group ID
+ * @param int $group_id The group ID
*/
function project_get_mail_list_count($group_id) {
return project_getaggvalue($group_id,'mail');
@@ -76,7 +76,7 @@
/**
* project_get_survey_count() - Get the number of surveys for a project.
*
- * @param int The group ID
+ * @param int $group_id The group ID
*/
function project_get_survey_count($group_id) {
return project_getaggvalue($group_id,'surv');
@@ -85,11 +85,11 @@
/**
* project_summary() - Build a project summary box that projects can insert into their project pages
*
- * @param int The group ID
- * @param string How to return the results.
- * @param bool Whether to return the results within an HTML table or not
+ * @param int $group_id The group ID
+ * @param string $mode How to return the results.
+ * @param bool $no_table Whether to return the results within an HTML table or not
*/
-function project_summary($group_id,$mode,$no_table) {
+function project_summary($group_id, $mode, $no_table) {
if (!$group_id) {
return 'Error: No Project ID';
}
@@ -108,7 +108,7 @@
if (!$no_table) {
$return = '
- <table border=0 width="100%"><tr><td class="tablecontent">';
+ <table border="0" width="100%"><tr><td class="tablecontent">';
}
// ################## ArtifactTypes
Modified: trunk/src/www/include/tool_reports.php
===================================================================
--- trunk/src/www/include/tool_reports.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/include/tool_reports.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -26,12 +26,12 @@
/**
* reports_quick_graph() - Show a quick graph of data.
*
- * @param string Graph title
- * @param int First query resource ID
- * @param int Second query resource ID
- * @param string The bar colors
+ * @param string $title Graph title
+ * @param int $qpa1 First query resource ID
+ * @param int $qpa2 Second query resource ID
+ * @param string $bar_colors The bar colors
*/
-function reports_quick_graph($title,$qpa1,$qpa2,$bar_colors) {
+function reports_quick_graph($title, $qpa1, $qpa2, $bar_colors) {
$result1 = db_query_qpa($qpa1);
$result2 = db_query_qpa($qpa2);
if ($result1 && $result2 && db_numrows($result2) > 0) {
@@ -63,10 +63,10 @@
/**
* reports_header() - Show the reports header
*
- * @param int The group ID
- * @param array Array of select box values
- * @param string The select box title
- * @param string Any additional HTML
+ * @param int $group_id The group ID
+ * @param array $vals Array of select box values
+ * @param string $titles The select box title
+ * @param string $html Any additional HTML
*/
function reports_header($group_id, $vals, $titles, $html='') {
global $what;
Modified: trunk/src/www/include/vote_function.php
===================================================================
--- trunk/src/www/include/vote_function.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/include/vote_function.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -26,7 +26,7 @@
/**
* vote_number_to_stars() - Turns vote results into *'s
*
- * @param int Raw value
+ * @param int $raw Raw value
* @return string
*/
function vote_number_to_stars($raw) {
@@ -51,10 +51,10 @@
/**
* vote_show_thumbs() - Show vote stars
*
- * @param int The survey ID
- * @param string The rating type
+ * @param int $id The survey ID
+ * @param string $flag The rating type
*/
-function vote_show_thumbs($id,$flag) {
+function vote_show_thumbs($id, $flag) {
/*
$flag
project - 1
@@ -73,10 +73,10 @@
/**
* vote_get_rating() - Get a vote rating
*
- * @param int The survey ID
- * @param string The rating type
+ * @param int $id The survey ID
+ * @param string $flag The rating type
*/
-function vote_get_rating ($id,$flag) {
+function vote_get_rating ($id, $flag) {
$result = db_query_params ('SELECT response FROM survey_rating_aggregate WHERE type=$1 AND id=$2',
array ($flag,
$id));
@@ -90,10 +90,10 @@
/**
* vote_show_release_radios() - Show release radio buttons
*
- * @param int Survey ID
- * @param string The rating type
+ * @param int $vote_on_id The survey ID
+ * @param string $flag The rating type
*/
-function vote_show_release_radios ($vote_on_id,$flag) {
+function vote_show_release_radios ($vote_on_id, $flag) {
/*
$flag
project - 1
@@ -140,10 +140,10 @@
/**
* show_survey() - Select and show a specific survey from the database
*
- * @param int The group ID
- * @param int The survey ID
+ * @param int $group_id The group ID
+ * @param int $survey_id The survey ID
*/
-function show_survey ($group_id,$survey_id) {
+function show_survey ($group_id, $survey_id) {
/*
Select this survey from the database
*/
@@ -298,10 +298,10 @@
/**
* Show a single question for the new user rating system
*
- * @param string The question to show
- * @param string The array element
+ * @param string $question The question to show
+ * @param string $element_name The array element
*/
-function vote_show_a_question ($question,$element_name) {
+function vote_show_a_question ($question, $element_name) {
echo '
<tr><td colspan="2" style="white-space: nowrap;">
<input type="radio" name="Q_'. $element_name .'" value="-3">
@@ -385,8 +385,8 @@
/**
* vote_show_user_rate_box() - Show user rating box
*
- * @param int The user ID
- * @param int The user ID of the user who is rating $user_id
+ * @param int $user_id The user ID
+ * @param int $by_id The user ID of the user who is rating $user_id
*/
function vote_show_user_rate_box ($user_id, $by_id=0) {
if ($by_id) {
@@ -435,7 +435,7 @@
/**
* vote_show_user_rating() - Show a user rating
*
- * @param int The user ID
+ * @param int $user_id The user ID
*/
function vote_show_user_rating($user_id) {
global $USER_RATING_QUESTIONS;
Modified: trunk/src/www/snippet/browse.php
===================================================================
--- trunk/src/www/snippet/browse.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/snippet/browse.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -38,8 +38,8 @@
/**
* createPackageQuery - Creates the SQL query for loading data about packages
*
- * @param string clause - the last part of the where clause
- * @return string
+ * @param string $clause - the last part of the where clause
+ * @return string
*/
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;
Modified: trunk/src/www/snippet/index.php
===================================================================
--- trunk/src/www/snippet/index.php 2013-10-30 13:42:40 UTC (rev 18345)
+++ trunk/src/www/snippet/index.php 2013-10-30 16:14:43 UTC (rev 18346)
@@ -28,9 +28,9 @@
/**
* create_snippet_hash() - A little utility function to reduce duplicated code in snippet_mainpage()
*
- * @param qpa Array A query+parameter array
- * @param field String The field name - either 'language' or 'category'
- * @return An associative array filled with the results of the SQL query
+ * @param array $qpa A query+parameter array
+ * @param string $field The field name - either 'language' or 'category'
+ * @return array An associative array filled with the results of the SQL query
*/
function create_snippet_hash($qpa, $field) {
$res = db_query_qpa($qpa);
More information about the Fusionforge-commits
mailing list