aboutsummaryrefslogtreecommitdiff
path: root/mod/lightpics/upgrades/2009082901.php
blob: dfbdf79f4dc0f99604f3e370086aa10799abbb2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

/********************************************
 *
 * Upgrade from Tidypics 1.5 to 1.6
 *
 *********************************************/

global $CONFIG;

// add image class
$id = get_subtype_id("object", "image");
if ($id != 0) {
	$table = $CONFIG->dbprefix . 'entity_subtypes';
	$result = update_data("UPDATE {$table} set class='TidypicsImage' where id={$id}");
	if (!$result) {
		register_error('unable to update tidypics image class');
	}
}

// add album class
$id = get_subtype_id("object", "album");
if ($id != 0) {
	$table = $CONFIG->dbprefix . 'entity_subtypes';
	$result = update_data("UPDATE {$table} set class='TidypicsAlbum' where id={$id}");
	if (!$result) {
		register_error('unable to update tidypics album class');
	}
}