Bladeren bron

Minor - Adapting code comments to phpdoc

Yannick Warnier 13 jaren geleden
bovenliggende
commit
b3bf43e64d

+ 2 - 1
plugin/bbb/bbb.lib.php

@@ -4,6 +4,7 @@
  * It is based on code written by Dual Code Inc in GNU/GPLv2
  * Copyright (C) 2010 Dual Code Inc. (www.dualcode.com)
  * Copyright (C) 2010 BeezNest Belgium SPRL (www.beeznest.com) - Yannick Warnier - y@beeznest.com
+ * @package chamilo.plugin.bigbluebutton
 */
 /**
  * Inserts an item into the plugin_bbb table
@@ -311,4 +312,4 @@ function wc_needUpgrade() {
       $returnValue = true;
   }
   return $returnValue;
-}
+}

+ 4 - 0
plugin/bbb/course_index.php

@@ -2,5 +2,9 @@
 /**
  * This script is included by the course_home.php script (indirectly) and is 
  * used to show the link to the plugin from inside the course's tools list
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Display course tool title
  */
 echo "Videoconference";

+ 4 - 0
plugin/bbb/course_install.php

@@ -1,6 +1,10 @@
 <?php
 /**
  * This script should be included by add_course.lib.inc.php when adding a new course
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Initialization
  */
 //$cdb is defined inside the fillDbCourse() function which is calling this script
 $t_course = Database::get_course_table(TABLE_COURSE_SETTING,$cdb);

+ 5 - 1
plugin/bbb/end.php

@@ -1,6 +1,10 @@
 <?php
 /**
  * This script closes a videoconference session, calling the BigBlueButton API
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Initialization
  */
 require_once '../../main/inc/global.inc.php';
 require_once 'bbb.lib.php';
@@ -42,4 +46,4 @@ if ($is_running == 'true' && $teacher) {
     wc_endMeeting($bbb_host,$bbb_salt,$meeting_name,$meeting_mod_pw);
 } else { //$is_running = false or 'false'
    header('location: '.api_get_path(WEB_COURSE_PATH).'/'.$ccode);
-}
+}

+ 5 - 2
plugin/bbb/index.php

@@ -1,3 +1,6 @@
 <?php
-// should contain the code to access the plugin from outside a course
-?>
+/**
+ * Placeholder file
+ * Should contain the code to access the plugin from outside a course
+ * @package chamilo.plugin.bigbluebutton
+ */

+ 7 - 0
plugin/bbb/install.php

@@ -2,9 +2,16 @@
 /**
  * This script is included by main/admin/settings.lib.php and generally 
  * includes things to execute in the main database (settings_current table)
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Initialization
  */
 $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
 $t_options  = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
+/**
+ * Queries
+ */
 $sql = "INSERT INTO $t_settings
     (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) 
     VALUES

+ 4 - 0
plugin/bbb/start.php

@@ -1,6 +1,10 @@
 <?php
 /**
  * This script initiates a videoconference session, calling the BigBlueButton API
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Initialization
  */
 require_once '../../main/inc/global.inc.php';
 require_once 'bbb.lib.php';

+ 5 - 1
plugin/bbb/uninstall.php

@@ -3,6 +3,10 @@
  * This script is included by main/admin/settings.lib.php when unselecting a plugin 
  * and is meant to remove things installed by the install.php script in both
  * the global database and the courses tables
+ * @package chamilo.plugin.bigbluebutton
+ */
+/**
+ * Queries
  */
 $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
 $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
@@ -33,4 +37,4 @@ while ($row = Database::fetch_assoc($res)) {
     $t_tool = Database::get_course_table(TABLE_TOOL_LIST,$row['db_name']);
     $sql_course = "DELETE FROM $t_tool WHERE link = '../../plugin/bbb/start.php'";
     $r = Database::query($sql_course);
-}
+}

+ 7 - 1
plugin/date/index.act.php

@@ -1,4 +1,11 @@
 <?php
+/**
+ * Action script for example date plugin
+ * @package chamilo.plugin.date
+ */
+/**
+ * Initialization
+ */
 $convert_lang_to_code = array(
   "english" => "en_US",
   "french"  => "fr_BE",
@@ -12,4 +19,3 @@ if(!empty($_SESSION['user_language_choice']) && !empty($convert_lang_to_code[$_S
   $locale = setlocale(LC_TIME,$code);
 }
 $date = strftime('%c');
-?>

+ 9 - 1
plugin/date/index.dsp.php

@@ -1 +1,9 @@
-  <?php echo strip_tags($date); ?>
+<?php
+/**
+ * Display script for example date plugin
+ * @package chamilo.plugin.date
+ */
+/**
+ * Display
+ */
+echo "  ".strip_tags($date); ?>

+ 7 - 1
plugin/date/index.php

@@ -1,4 +1,10 @@
 <?php
+/**
+ * Controller for example date plugin
+ * @package chamilo.plugin.date
+ */
+/**
+ * Code
+ */
 require('index.act.php');
 require('index.dsp.php');
-?>

+ 2 - 2
plugin/search/client/filter_user.lib.php

@@ -85,7 +85,7 @@ function access_check($url,$default=true){
  *
  * This function should only be used if needed by a funny course-name rule
  * @param	string	The string to transform
- * @result	string	The transformed string
+ * @return	string	The transformed string
  */
 function subst_course_code($string){
   $matches = array();
@@ -102,4 +102,4 @@ function subst_course_code($string){
   }
   return $string;
 }
-?>
+?>

+ 4 - 3
plugin/search/client/searchit.php

@@ -4,8 +4,8 @@
  * represents the list of results to the term searched.
  * It parses the XML document, checks user permissions and displays a set of results in a nice
  * format.
- * @package dokeos.search
- * @author Yannick Warnier <yannick.warnier@dokeos.com>
+ * @package chamilo.plugin.search
+ * @author Yannick Warnier <yannick.warnier@beeznest.com>
  */
 /**
  * Variables
@@ -46,7 +46,8 @@ else
  * @param	string	Result title
  * @param	string	Result URL
  * @param	string	Short excerpt of the result document
- * @param
+ * @param	string  Date
+ * @param	string  Rating
  */
 function result_output($id,$title,$url='',$excerpt='',$date='',$rating=''){
 	if(empty($id) OR empty($title)){return false;}

+ 5 - 1
plugin/search/client/www/indexer_login.php

@@ -3,6 +3,10 @@
  * This file has to be placed at the root level of your Dokeos portal and has
  * to be referenced inside the indexer.conf file on your indexing server, as the
  * first URL to index on your portal.
+ * @package chamilo.plugin.search
+ */
+/**
+ * Initialization
  */
 //the ip_address_of_search_server is the IP address from which your search
 // (or indexing) server will connect to your portal to index it
@@ -44,4 +48,4 @@ if($_SERVER['REMOTE_ADDR']==$ip_address_of_search_server
   require('main/inc/global.inc.php');
   require('user_portal.php');
 }
-?>
+?>

+ 1 - 0
plugin/search/server/www/common.inc

@@ -1,6 +1,7 @@
 <?php
 /**
  * Library for the common formatting functions
+ * @package chamilo.plugin.search
  */
 /**
  * Exit, dropping the temporary tables just before that

+ 7 - 1
plugin/search/server/www/config.inc

@@ -1,5 +1,11 @@
 <?php
-
+/**
+ * Mnogosearch plugin config file
+ * @package chamilo.plugin.search
+ */
+/**
+ * Settings
+ */
 // maximal page number to view
 $MAX_NP=1;
 

+ 2 - 2
plugin/search/server/www/init.inc

@@ -1,10 +1,10 @@
 <?php
-
 /**
  * Initialisation code + library of functions to process to the initialisation in
  * a varied set of ways.
  * This script is a modified version that can only be used with the php extension >= 3.2.32
  * and PHP version 4.2 or higher
+ * @package chamilo.plugin.search
  */
 /**
  * Faking the register_globals code - very bad thing - should escape all vars
@@ -541,4 +541,4 @@ function init_cc() {
 
 	udm_parse_query_string($udm_agent, $q_string);
 }
-?>
+?>

+ 6 - 3
plugin/search/server/www/search.php

@@ -1,11 +1,14 @@
 <?php
-
-/*   mnoGoSearch-php v.3.2.10
+/**
+ *   mnoGoSearch-php v.3.2.10
  *   for mnoGoSearch ( formely known as UdmSearch ) free web search engine
  *   (C) 2001 by Sergey Kartashoff <gluke@mail.ru>,
  *               mnoGoSearch Developers Team <devel@mnogosearch.org>
+ *   @package chamilo.plugin.search
+ */
+/**
+ * Initialization
  */
-
 if (!extension_loaded('mnogosearch')) {
 	print "<b>This script requires PHP4.3.0+ with mnoGoSearch extension</b>";
 	exit;

+ 7 - 0
plugin/search/server/www/search.xml.php

@@ -1,4 +1,11 @@
 <?php
+/**
+ * Template file for Mnogosearch
+ * @package chamilo.plugin.search
+ */
+/**
+ * Redirect if not loaded by expected script
+ */
 if(preg_match('/.*search\.htm/',$_SERVER['PHP_SELF'])){
   header('location:searchit.php');
 }

+ 1 - 0
plugin/search/server/www/template.inc

@@ -4,6 +4,7 @@
  * The functions declared here mainly read the template and write the
  * result output using this template.
  * Modified version - the PHP extension must be higher than 3.2.32 and PHP must be higher than 4.2
+ * @package chamilo.plugin.search
  */
 /**
  * Initialise arrays

+ 1 - 2
user.php

@@ -1,6 +1,5 @@
 <?php
 /* For licensing terms, see /license.txt */
-
 /**
  *  Clean URls for the Social Network
  *
@@ -11,7 +10,7 @@
  *  virtualhost configuration
  *
  *  More improvements will come in next versions of Chamilo maybe in the 1.8.8
- *
+ *  @package chamilo.main
  */
 /**
  * Variables definitions and inclusions

+ 11 - 7
whoisonlinesession.php

@@ -1,6 +1,12 @@
 <?php
 /* For licensing terms, see /dokeos_license.txt */
-
+/**
+ * Shows who is online in a specific session
+ * @package chamilo.main
+ */
+/**
+ * Initialization
+ */
 // name of the language file that needs to be included
 $language_file = array ('index', 'chat', 'tracking');
 
@@ -11,12 +17,10 @@ $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
 $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE);
 $tbl_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
 
-/*
------------------------------------------------------------
-	Header
-	include the HTTP, HTML headers plus the top banner
------------------------------------------------------------
-*/
+/**
+ * Header
+ * include the HTTP, HTML headers plus the top banner
+ */
 
 Display::display_header(get_lang('UserOnlineListSession'));
 ?>