Ignore:
Timestamp:
Jan 27, 2013, 9:56:07 PM (11 years ago)
Author:
julien1311
Message:

[piwecard] Some code documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/install/functions.inc.php

    r20202 r20431  
    11<?php
     2/**
     3 * Create the piwecard table in the database
     4 * @param String name of the table
     5 */
    26function piwecard_db_create($table) {
    37        $query = 'CREATE TABLE ' . $table . ' (
     
    1822}
    1923
     24/**
     25 * Delete the piwecard table in the database
     26 * @param String name of the table
     27 */
    2028function piwecard_db_delete($table) {
    2129        $query = 'DROP TABLE ' . $table . ';';
     
    2331}
    2432
     33/**
     34 * Update the piwecard table in the database from Piwecard version 2.3
     35 * @param String old table name
     36 * @param String new table name
     37 */
    2538function piwecard_db_update_from_2_3($old_table, $new_table) {
    2639        $query = 'SELECT * FROM '.$old_table.';';
     
    4962}
    5063
     64/**
     65 * Update the piwecard table in the database from Piwecard version 2.4.a.b3
     66 * @param String table name
     67 */
    5168function piwecard_db_update_from_2_4a_b3($table) {
    5269        $query = 'ALTER TABLE '.$table.' DROP PRIMARY KEY;';
     
    5875}
    5976
     77/**
     78 * Create the piwecard entry in the config table of the database
     79 * @param String entry name
     80 */
    6081function piwecard_conf_create($name) {
    6182        $query = 'INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("'.$name.'","","'.ucfirst($name).' configuration");';
     
    6384}
    6485
     86/**
     87 * Delete the piwecard entry in the config table of the database
     88 * @param String entry name
     89 */
    6590function piwecard_conf_delete($name){
    6691        $query = 'DELETE FROM '.CONFIG_TABLE.' WHERE param="'.$name.'";';
     
    6893}
    6994
     95/**
     96 * Rename the piwecard entry in the config table of the database
     97 * @param String old name
     98 * @param String new name
     99 */
    70100function piwecard_conf_rename($old_name, $new_name){
    71101        $query = 'UPDATE '.CONFIG_TABLE.' SET param="'.$new_name.'" WHERE param="'.$old_name.'";';
Note: See TracChangeset for help on using the changeset viewer.