| 1 |
<?php |
| 2 |
// $Revision: 1.4 $ // |
| 3 |
// ------------------------------------------------------------------------ // |
| 4 |
// // |
| 5 |
// OAI-PMH based Institutional Repository Introduction Module // |
| 6 |
// Copyright (C) 2005 Kazutsuna YAMAJI. All rights reserved. // |
| 7 |
// // |
| 8 |
// ------------------------------------------------------------------------ // |
| 9 |
// This program is free software; you can redistribute it and/or modify // |
| 10 |
// it under the terms of the GNU General Public License as published by // |
| 11 |
// the Free Software Foundation; either version 2 of the License, or // |
| 12 |
// (at your option) any later version. // |
| 13 |
// // |
| 14 |
// You may not change or alter any portion of this comment or credits // |
| 15 |
// of supporting developers from this source code or any supporting // |
| 16 |
// source code which is considered copyrighted (c) material of the // |
| 17 |
// original comment or credit authors. // |
| 18 |
// // |
| 19 |
// This program is distributed in the hope that it will be useful, // |
| 20 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
| 21 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
| 22 |
// GNU General Public License for more details. // |
| 23 |
// // |
| 24 |
// You should have received a copy of the GNU General Public License // |
| 25 |
// along with this program; if not, write to the Free Software // |
| 26 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
| 27 |
// ------------------------------------------------------------------------ // |
| 28 |
|
| 29 |
function xoops_module_install_irview( $xoopsMod ) { |
| 30 |
global $xoopsDB; |
| 31 |
|
| 32 |
return true; |
| 33 |
} |
| 34 |
|
| 35 |
function xoops_module_uninstall_irview( $xoopsMod ) { |
| 36 |
global $xoopsDB; |
| 37 |
|
| 38 |
return true; |
| 39 |
} |
| 40 |
|
| 41 |
function xoops_module_update_irview( $xoopsMod, $oldversion) { |
| 42 |
global $xoopsDB; |
| 43 |
$table = $xoopsDB->prefix("irview_metadata"); |
| 44 |
|
| 45 |
switch ( $oldversion ) { |
| 46 |
//remember that version is multiplied with 100 to get an integer |
| 47 |
case 102: |
| 48 |
$sql = "ALTER TABLE $table ADD datestamp int(11) unsigned default NULL"; |
| 49 |
$result = $xoopsDB->query($sql); |
| 50 |
if( !$result ){ |
| 51 |
echo "ERROR: " . $xoopsDB->error(); |
| 52 |
return false; |
| 53 |
} |
| 54 |
|
| 55 |
default: |
| 56 |
return true; |
| 57 |
|
| 58 |
} |
| 59 |
return true; |
| 60 |
} |
| 61 |
?> |