Minor - Adapting code comments to phpdoc

skala
Yannick Warnier 14 years ago
parent b3bf43e64d
commit e09f6019a0
  1. 2
      main/cron/run.php
  2. 10
      main/metadata/doc/dcex.php
  3. 22
      main/metadata/doc/mdApiTest.php
  4. 28
      main/metadata/doc/testMiniDom.php
  5. 25
      main/metadata/doc/testXht.php
  6. 25
      main/metadata/importdocs.php
  7. 20
      main/metadata/importlinks.php
  8. 24
      main/metadata/importmanifest.php
  9. 36
      main/metadata/index.php
  10. 23
      main/metadata/md_funcs.php
  11. 58
      main/metadata/md_phpdig.php
  12. 27
      main/metadata/openobject.php
  13. 8
      main/metadata/phpdig/config.php
  14. 16
      main/metadata/phpdig/en-language.php
  15. 8
      main/metadata/phpdig/phpdig_functions.php
  16. 23
      main/metadata/phpdig/search.php
  17. 12
      main/metadata/phpdig/search_function.php
  18. 29
      main/metadata/playscormmdset.inc.php
  19. 33
      main/metadata/search.php
  20. 24
      main/metadata/statistics.php
  21. 24
      main/metadata/update_indexabletext.php
  22. 9
      main/social/index.php

@ -1,5 +1,5 @@
<?php
/*
/**
* This script should be called by a properly set cron process on your server.
* For more information, check the installation guide in the documentation
* folder.

@ -1,5 +1,11 @@
<?php
/**
* Test file for metadata
* @package chamilo.metadata
*/
/**
* Init
*/
require_once api_get_path(SYS_CODE_PATH).'metadata/md_funcs.php'; $mdStore = new mdstore(TRUE);
require_once api_get_path(LIBRARY_PATH) . 'xmd.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'xht.lib.php';
@ -14,4 +20,4 @@ if (is_array($dcelems = $mdStore->mds_get_dc_elements($mdObj))) {
}
// Store example:
$langMdCopyright = 'Provided the source is acknowledged';
$mdStore->mds_put_dc_elements($mdObj, array('Description'=>time()));
$mdStore->mds_put_dc_elements($mdObj, array('Description'=>time()));

@ -1,20 +1,14 @@
<?php /* <!-- mdApiTest.php -->
<!-- 2004/09/30 -->
<!-- Copyright (C) 2004 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* mdApiTest.php
* @date 2004/09/30
* @copyright 2004 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: MD API test and demo
*
* Chamilo Metadata: MD API test and demo
* The API allows other Dokeos scripts to define & manipulate metadata
*
* In this example, MD is defined for 'Document.1001', 1002, 1003
*
* @package dokeos.metadata
==============================================================================
*/
require("../md_funcs.php");

@ -1,20 +1,14 @@
<?php /* <!-- testMiniDom.php, 2005/03/16 -->
<!-- for XML MiniDom, 2005/03/16 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: XMD test and demo
*
* @package dokeos.metadata
==============================================================================
*/
* testMiniDom.php
* @date 2005/03/16
* @date for XML MiniDom, 2005/03/16
* @copyright (C) 2005 rene.haentjens@UGent.be
* @package chamilo.metadata
*/
/**
* Chamilo Metadata: XMD test and demo
*/
function file_get_contents_n($filename) // normalize \r and \r\n to \n
{
$fp = fopen($filename, 'rb');
@ -244,4 +238,4 @@ $seconds = getmicrotime() - $seconds;
showDoc('Time to restore from cache', $seconds);
showDoc('OK after restore');
?>
?>

@ -1,17 +1,14 @@
<?php /* <!-- testXht.php, 2005/03/16 -->
<!-- for XML HTML Templates, 2005/03/16 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be -->
*/
<?php
/**
* testXht.php,
* @date 2005/03/16
* @date for XML HTML Templates, 2005/03/16
* @copyright 2005 rene.haentjens@UGent.be -->
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: XHT test and demo
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo Metadata: XHT test and demo
*/
require('../../inc/lib/xmd.lib.php');
require('../../inc/lib/xht.lib.php');
@ -215,4 +212,4 @@ if ($xhtDoc->xht_dbgn) echo $xhtDoc->xht_dbgo;
// Note: XML document and templates would normally be fetched from (different)
// external sources, such as a file or a DB record...
?>
?>

@ -1,21 +1,14 @@
<?php /* <!-- Dokeos metadata/importdocs.php -->
<!-- 2005/09/20 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: index all course documents with PhpDig
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo metadata/importdocs.php
* 2005/09/20
* Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
* Chamilo Metadata: index all course documents with PhpDig
*/
// PRELIMS -------------------------------------------------------------------->
$getpostvars = array('dmo'); require('md_funcs.php');
define('EID_TYPE', 'Document'); define('AFTER_DOT', strlen(EID_TYPE) + 1);

@ -1,16 +1,12 @@
<?php /* <!-- Dokeos metadata/importlinks.php -->
<!-- 2006/12/15 -->
<!-- Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* Chamilo metadata/importlinks.php
* @date 2006/12/15
* Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: create table entries for a category of Link-type items
*
* @package dokeos.metadata
==============================================================================
* Chamilo Metadata: create table entries for a category of Link-type items
*/

@ -1,19 +1,13 @@
<?php /* <!-- Dokeos metadata/importmanifest.php -->
<!-- 2006/12/15 -->
<!-- Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* Chamilo metadata/importmanifest.php
* @date 2006/12/15
* Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: create and manage table entries for SCORM package
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo Metadata: create and manage table entries for SCORM package
*/
// PRELIMS -------------------------------------------------------------------->
$getpostvars = array('sdisub','workWith','sdi','smo'); require('md_funcs.php');

@ -1,25 +1,19 @@
<?php /* <!-- Dokeos metadata/index.php -->
<!-- 2005/05/19 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: view/edit metadata of a Dokeos course object
*
* URL parameters:
* - eid= entry-id = object-id = type.identifier, e.g. 'Document.12';
* - lfn= filename of a language file, default= 'md_' + type, e.g. 'md_doc';
* - htt= HTML template file (same dir as script), default= same as lfn;
* - dbg= debuginfo start number, e.g. 10000
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo metadata/index.php
* @date 2005/05/19
* @copyright 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
* Chamilo Metadata: view/edit metadata of a Chamilo course object
* URL parameters:
* - eid= entry-id = object-id = type.identifier, e.g. 'Document.12';
* - lfn= filename of a language file, default= 'md_' + type, e.g. 'md_doc';
* - htt= HTML template file (same dir as script), default= same as lfn;
* - dbg= debuginfo start number, e.g. 10000
*
*/
// PRELIMS -------------------------------------------------------------------->
require_once '../inc/global.inc.php';

@ -1,15 +1,14 @@
<?php /* <!-- Dokeos metadata/md_funcs.php -->
<!-- 2006/12/15 -->
<!-- Copyright (C) 2006 rene.haentjens@UGent.be - see note at end of text -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: common functions and mdstore class
* Chamilo metadata/md_funcs.php -->
* 2006/12/15
* Copyright (C) 2006 rene.haentjens@UGent.be - see note at end of text -->
* @package chamilo.metadata
*/
/**
* Chamilo Metadata: common functions and mdstore class
*
* This script requires xmd.lib.php and xht.lib.php (Dokeos inc/lib).
* This script requires xmd.lib.php and xht.lib.php (Chamilo inc/lib).
*
* Note on the funny characters used in mds_update_xml_and_mdt:
*
@ -25,11 +24,7 @@
* path1,path2,...;subpath=value for all elements in path1, path2, ...
* assign value to subpath (see also xmd_update_many)
*
* @package dokeos.metadata
==============================================================================
*/
// FETCH GET/POST-DATA; GENERAL FUNCTIONS ------------------------------------->
if (isset($getpostvars) && is_array($getpostvars))

@ -1,34 +1,32 @@
<?php /* <!-- Dokeos metadata/md_phpdig.php -->
<!-- 2005/03/24 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* Chamilo metadata/md_phpdig.php
* @date 2005/03/24
* @copyright 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*
*/
/**
==============================================================================
* Dokeos Metadata: PhpDig connection
*
* If PhpDig 1.8.3 is installed in a Dokeos course site, then MD items
* can be indexed for search (via PhpDig's search screen search.php).
*
* The functions below inject the words of metadata/indexabletext directly
* into PhpDig's tables. Affected tables:
*
* keywords: key_id, twoletters, keyword (lowercase, accents removed)
*
* sites: site_id, site_url (e.g. http://xx.yy.zz/), upddate, ...
*
* spider: spider_id, site_id, upddate, num_words, first_words,
* path (e.g. uu/vv/ww/), file (e.g. index.php?sid=xxx), ...
*
* engine: spider_id, key_id, weight
*
* Most of the function code is a simplified version of real PhpDig code
* released under the GNU GPL V2, see www.phpdig.net.
*
* @package dokeos.metadata
==============================================================================
* Chamilo Metadata: PhpDig connection
*
* If PhpDig 1.8.3 is installed in a Chamilo course site, then MD items
* can be indexed for search (via PhpDig's search screen search.php).
*
* The functions below inject the words of metadata/indexabletext directly
* into PhpDig's tables. Affected tables:
*
* keywords: key_id, twoletters, keyword (lowercase, accents removed)
*
* sites: site_id, site_url (e.g. http://xx.yy.zz/), upddate, ...
*
* spider: spider_id, site_id, upddate, num_words, first_words,
* path (e.g. uu/vv/ww/), file (e.g. index.php?sid=xxx), ...
*
* engine: spider_id, key_id, weight
*
* Most of the function code is a simplified version of real PhpDig code
* released under the GNU GPL V2, see www.phpdig.net.
*
*/

@ -1,20 +1,15 @@
<?php /* <!-- Dokeos metadata/openobject.php -->
<!-- 2004/08/27 -->
<!-- Copyright (C) 2004 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* Chamilo metadata/openobject.php
* @date 2004/08/27
* Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: general script for opening an object
*
* URL parameters:
* - eid= entry-id = object-id = type.identifier, e.g. 'Document.12';
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo Metadata: general script for opening an object
* URL parameters:
* - eid= entry-id = object-id = type.identifier, e.g. 'Document.12';
*/
require("md_funcs.php");

@ -14,7 +14,13 @@ Do NOT edit or remove this copyright or licence information upon redistribution.
If you modify code and redistribute, you may ADD your copyright to this notice.
----------------------------------------------------------------------------------
*/
/**
* phpDig config file
* @package chamilo.metadata
*/
/**
* Init
*/
//---------DEFAULT VALUES
// error_reporting(E_ALL);

@ -1,9 +1,13 @@
<?php
//English messages for PhpDig
//Antoine Bajolet - fr - bajolet@toiletoine.net
//Corrections by Brien Louque
/**
* English messages for PhpDig
* @author Antoine Bajolet - fr - bajolet@toiletoine.net
* @author Corrections by Brien Louque
* @package chamilo.metadata
*/
/**
* Definitions
*/
//'keyword' => 'translation'
$phpdig_mess = array (
'one_per_line' =>'Enter one link per line',
@ -192,4 +196,4 @@ Click on the green sign to reindex it',
// SEARCH_FUNCTION
'noresults' =>'No results'
);
?>
?>

@ -14,7 +14,13 @@ Do NOT edit or remove this copyright or licence information upon redistribution.
If you modify code and redistribute, you may ADD your copyright to this notice.
----------------------------------------------------------------------------------
*/
/**
* PhpDig
* @package chamilo.metadata
*/
/**
* init
*/
define('CONFIG_CHECK','check'); // do not edit this line
//-------------UTILS FUNCTIONS

@ -1,8 +1,11 @@
<?php /* <!-- Dokeos phpdig/search.php -->
<!-- 2006/12/14 -->
<!-- Copyright (C) 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
<?php
/**
* Chamilo phpdig/search.php
* @date 2006/12/14
* @copyright 2006 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/*
--------------------------------------------------------------------------------
PhpDig Version 1.8.6 is provided WITHOUT warranty under the GNU/GPL license.
See the LICENSE file for more information about the GNU/GPL license.
@ -16,15 +19,9 @@ Do NOT edit or remove this copyright or licence information upon redistribution.
If you modify code and redistribute, you may ADD your copyright to this notice.
--------------------------------------------------------------------------------
*/
/**
==============================================================================
* Dokeos Metadata: search Dokeos course objects via PhpDig 1.8.6
*
* customized search.php 1.8.6 for Dokeos 1.6 assumes $template == "array"
*
* @package dokeos.metadata
==============================================================================
* Chamilo Metadata: search Chamilo course objects via PhpDig 1.8.6
* customized search.php 1.8.6 for Chamilo 1.6 assumes $template == "array"
*/
// name of the language file that needs to be included

@ -14,10 +14,14 @@ Do NOT edit or remove this copyright or licence information upon redistribution.
If you modify code and redistribute, you may ADD your copyright to this notice.
----------------------------------------------------------------------------------
*/
//===============================================
// do the search and display the results
// can be called in any page
/**
* phpDig search functions
* @package chamilo.metadata
*/
/**
* do the search and display the results
* can be called in any page
*/
function phpdigSearch($id_connect, $query_string, $option='start', $refine=0,
$refine_url='', $lim_start=0, $limite=10, $browse=0,
$site=0, $path='', $relative_script_path = '.', $template='', $adlog_flag=0, $rssdf='', $template_demo='')

@ -1,22 +1,15 @@
<?php /* <!-- Dokeos metadata/playscormmdset.inc.php -->
<!-- 2005/11/16 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
* Chamilo metadata/playscormmdset.inc.php
* @date 2005/11/16
* Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
==============================================================================
* Dokeos Metadata: include file for accessing Scorm metadata
*
* This script is to be included from /coursedir/scorm/dir.../index.php,
* after setting $scormid (Dokeos document root).
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo Metadata: include file for accessing Scorm metadata
* This script is to be included from /coursedir/scorm/dir.../index.php,
* after setting $scormid (Chamilo document root).
*/
// PRELIMS -------------------------------------------------------------------->
if (!isset($scormid)) exit();

@ -1,24 +1,17 @@
<?php /* <!-- Dokeos metadata/search.php -->
<!-- 2005/09/20 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: search Dokeos course objects via their metadata
*
* URL parameters:
* - type= type, must be 'Mix' (currently: Document + Scorm + Link)
* - lfn= filename of a language file, e.g. 'md_doc', default= 'md_' + type;
* - htt= HTML template file (same dir as script), default= 'mds_' + type.
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo metadata/search.php
* @date 2005/09/20
* @copyright 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package dokeos.metadata
*/
/**
* Chamilo Metadata: search Chamilo course objects via their metadata
* URL parameters:
* - type= type, must be 'Mix' (currently: Document + Scorm + Link)
* - lfn= filename of a language file, e.g. 'md_doc', default= 'md_' + type;
* - htt= HTML template file (same dir as script), default= 'mds_' + type.
*/
// PRELIMS -------------------------------------------------------------------->
require("md_funcs.php");

@ -1,19 +1,13 @@
<?php /* <!-- Dokeos metadata/statistics.php -->
<!-- 2005/02/02 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: statistics about metadata
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo metadata/statistics.php
* @date 2005/02/02
* @copyright 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
* @package chamilo.metadata
*/
/**
* Chamilo Metadata: statistics about metadata
*/
// PRELIMS -------------------------------------------------------------------->
require('md_funcs.php');

@ -1,19 +1,13 @@
<?php /* <!-- Dokeos metadata/udate_indexableText.php -->
<!-- 2005/03/16 -->
<!-- Copyright (C) 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php -->
*/
<?php
/**
==============================================================================
* Dokeos Metadata: update indexabletext for all eid_type records
*
* @package dokeos.metadata
==============================================================================
*/
* Chamilo metadata/udate_indexableText.php
* @date 2005/03/16
* @copyright 2005 rene.haentjens@UGent.be - see metadata/md_funcs.php
*/
/**
* Chamilo Metadata: update indexabletext for all eid_type records
* @package chamilo.metadata
*/
// PRELIMS -------------------------------------------------------------------->
require('md_funcs.php');

@ -1,6 +1,11 @@
<?php
/* For licensing terms, see /chamilo_license.txt */
/**
* Redirect file for social network default page
* @package chamilo.social
*/
/**
* Redirect
*/
header('Location: profile.php');
exit();
?>
Loading…
Cancel
Save