From 94b6329544d2b5c92d2a3806839634ee38b4ce4a Mon Sep 17 00:00:00 2001 From: skodak <skodak> Date: Fri, 12 Jun 2009 08:44:49 +0000 Subject: [PATCH] MDL-14679 license header fixes --- lib/ddl/database_manager.php | 67 ++++++++++++++++-------------- lib/ddl/mssql_sql_generator.php | 52 ++++++++++++----------- lib/ddl/mysql_sql_generator.php | 52 ++++++++++++----------- lib/ddl/oracle_sql_generator.php | 52 ++++++++++++----------- lib/ddl/postgres_sql_generator.php | 52 ++++++++++++----------- lib/ddl/simpletest/testddl.php | 1 - lib/ddl/sql_generator.php | 67 ++++++++++++++++-------------- lib/ddl/sqlite_sql_generator.php | 51 ++++++++++++----------- lib/ddllib.php | 51 +++++++++-------------- 9 files changed, 223 insertions(+), 222 deletions(-) diff --git a/lib/ddl/database_manager.php b/lib/ddl/database_manager.php index 7337be6160..965b453064 100644 --- a/lib/ddl/database_manager.php +++ b/lib/ddl/database_manager.php @@ -1,35 +1,38 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// - -/// This class represent the base generator class where all the -/// needed functions to generate proper SQL are defined. - -/// The rest of classes will inherit, by default, the same logic. -/// Functions will be overriden as needed to generate correct SQL. - +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * Dtabase manager instance is responsible for all database structure + * modifications. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * 2008 Petr Skoda http://skodak.org + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Dtabase manager instance is responsible for all database structure + * modifications. It is using db specific generators to find out + * the correct SQL syntax to do that. + */ class database_manager { protected $mdb; diff --git a/lib/ddl/mssql_sql_generator.php b/lib/ddl/mssql_sql_generator.php index bf0a116cf9..fdf0e2f0a3 100644 --- a/lib/ddl/mssql_sql_generator.php +++ b/lib/ddl/mssql_sql_generator.php @@ -1,28 +1,30 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * MSSQL specific SQL code generator. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once($CFG->libdir.'/ddl/sql_generator.php'); diff --git a/lib/ddl/mysql_sql_generator.php b/lib/ddl/mysql_sql_generator.php index e0197724a7..add0173728 100644 --- a/lib/ddl/mysql_sql_generator.php +++ b/lib/ddl/mysql_sql_generator.php @@ -1,28 +1,30 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * Mysql specific SQL code generator. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once($CFG->libdir.'/ddl/sql_generator.php'); diff --git a/lib/ddl/oracle_sql_generator.php b/lib/ddl/oracle_sql_generator.php index f54ee6f920..207d0d7497 100644 --- a/lib/ddl/oracle_sql_generator.php +++ b/lib/ddl/oracle_sql_generator.php @@ -1,28 +1,30 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * Oracle specific SQL code generator. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once($CFG->libdir.'/ddl/sql_generator.php'); diff --git a/lib/ddl/postgres_sql_generator.php b/lib/ddl/postgres_sql_generator.php index 963256fff4..89ef7990c7 100644 --- a/lib/ddl/postgres_sql_generator.php +++ b/lib/ddl/postgres_sql_generator.php @@ -1,28 +1,30 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * PostgreSQL specific SQL code generator. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once($CFG->libdir.'/ddl/sql_generator.php'); diff --git a/lib/ddl/simpletest/testddl.php b/lib/ddl/simpletest/testddl.php index 7b6792ac72..2161a10075 100755 --- a/lib/ddl/simpletest/testddl.php +++ b/lib/ddl/simpletest/testddl.php @@ -2,7 +2,6 @@ /** * Unit tests for (some of) ddl lib. * @license http://www.gnu.org/copyleft/gpl.html GNU Public License - * @package moodlecore */ if (!defined('MOODLE_INTERNAL')) { diff --git a/lib/ddl/sql_generator.php b/lib/ddl/sql_generator.php index fe922c9eeb..9896f78144 100644 --- a/lib/ddl/sql_generator.php +++ b/lib/ddl/sql_generator.php @@ -1,35 +1,38 @@ -<?php // $Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// - -/// This class represent the base generator class where all the -/// needed functions to generate proper SQL are defined. - -/// The rest of classes will inherit, by default, the same logic. -/// Functions will be overriden as needed to generate correct SQL. - +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * This class represent the base generator class where all the + * needed functions to generate proper SQL are defined. + * + * The rest of classes will inherit, by default, the same logic. + * Functions will be overriden as needed to generate correct SQL. + * + * @package moodlecore + * @subpackage DDL + * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com + * 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Abstract sql generator class, base for all bd specific implementations. + */ abstract class sql_generator { /// Please, avoid editing this defaults in this base class! diff --git a/lib/ddl/sqlite_sql_generator.php b/lib/ddl/sqlite_sql_generator.php index 307c399b4b..8850c1f0c6 100644 --- a/lib/ddl/sqlite_sql_generator.php +++ b/lib/ddl/sqlite_sql_generator.php @@ -1,28 +1,29 @@ -<?php //$Id$ - -/////////////////////////////////////////////////////////////////////////// -// // -// NOTICE OF COPYRIGHT // -// // -// Moodle - Modular Object-Oriented Dynamic Learning Environment // -// http://moodle.com // -// // -// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // -// (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details: // -// // -// http://www.gnu.org/copyleft/gpl.html // -// // -/////////////////////////////////////////////////////////////////////////// +<?php + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see <http://www.gnu.org/licenses/>. + + +/** + * Experimental SQLite specific SQL code generator. + * + * @package moodlecore + * @subpackage DDL + * @copyright 2008 Andrei Bautu + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ require_once($CFG->libdir.'/ddl/sql_generator.php'); diff --git a/lib/ddllib.php b/lib/ddllib.php index 6b8c365d92..d61c6953ba 100644 --- a/lib/ddllib.php +++ b/lib/ddllib.php @@ -1,7 +1,7 @@ <?php -// This file is part of Moodle - http://moodle.org/ -// +// This file is part of Moodle - http://moodle.org/ +// // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or @@ -11,10 +11,11 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. + /** * This library includes all the required functions used to handle the DB * structure (DDL) independently of the underlying RDBMS in use. @@ -33,32 +34,34 @@ * * For further documentation, visit {@link http://docs.moodle.org/en/DDL_functions} * - * @package moodlecore - * @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package moodlecore + * @subpackage DDL + * @copyright 2001-3001 Eloy Lafuente (stronk7) http://contiento.com + * 2008 Petr Skoda http://skodak.org + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -/** Add required library */ +// Add required library require_once($CFG->libdir.'/xmlize.php'); -/** Add required XMLDB constants */ +// Add required XMLDB constants require_once($CFG->libdir.'/xmldb/xmldb_constants.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_object.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_file.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_structure.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_table.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_field.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_key.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_index.php'); -/** Add required XMLDB DB classes */ +// Add required XMLDB DB classes require_once($CFG->libdir.'/xmldb/xmldb_statement.php'); require_once($CFG->libdir.'/ddl/sql_generator.php'); @@ -68,10 +71,6 @@ require_once($CFG->libdir.'/ddl/database_manager.php'); /** * DDL exception class, use instead of error() and "return false;" in ddl code. - * - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package moodlecore */ class ddl_exception extends moodle_exception { /** @@ -85,10 +84,6 @@ class ddl_exception extends moodle_exception { /** * Table does not exist problem exception - * - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package moodlecore */ class ddl_table_missing_exception extends ddl_exception { /** @@ -102,10 +97,6 @@ class ddl_table_missing_exception extends ddl_exception { /** * Table does not exist problem exception - * - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package moodlecore */ class ddl_field_missing_exception extends ddl_exception { /** @@ -123,10 +114,6 @@ class ddl_field_missing_exception extends ddl_exception { /** * Error during changing db structure - * - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - * @package moodlecore */ class ddl_change_structure_exception extends ddl_exception { /** @var string */ -- 2.39.5