MDL-10107 - First check-in of Messaging 2.0 code from Luis Rodrigues, GSOC student.
[moodle.git] / message / output / popup / db / upgrade.php
CommitLineData
3b120e46 1<?php
2
3///////////////////////////////////////////////////////////////////////////
4// //
5// NOTICE OF COPYRIGHT //
6// //
7// Moodle - Modular Object-Oriented Dynamic Learning Environment //
8// http://moodle.com //
9// //
10// Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
11// //
12// This program is free software; you can redistribute it and/or modify //
13// it under the terms of the GNU General Public License as published by //
14// the Free Software Foundation; either version 2 of the License, or //
15// (at your option) any later version. //
16// //
17// This program is distributed in the hope that it will be useful, //
18// but WITHOUT ANY WARRANTY; without even the implied warranty of //
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20// GNU General Public License for more details: //
21// //
22// http://www.gnu.org/copyleft/gpl.html //
23// //
24///////////////////////////////////////////////////////////////////////////
25
26/**
27 * Upgrade code for popup message processor
28 *
29 * @author Luis Rodrigues
30 * @version $Id$
31 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
32 * @package
33 */
34
35function xmldb_message_popup_upgrade($oldversion=0) {
36
37 global $CFG, $THEME, $DB;
38
39 $result = true;
40
41 if ($result && $oldversion < 2008072401) {
42 $processor = new object();
43 $processor->name = 'popup';
44 if (! $DB->record_exists('message_processors', array('name' => $processor->name))){
45 $result = $result && $DB->insert_record('message_processors', $processor);
46 }
47 }
48
49 return $result;
50}
51
52?>