forked from fnagel/generic-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass.ext_update.php
40 lines (37 loc) · 910 Bytes
/
class.ext_update.php
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
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Class ext_update.
*
* Performs update tasks for extension genericgallery
*/
class ext_update
{
/**
* Main function, returning the HTML content of the module.
*
* @return string HTML
*/
public function main()
{
$GLOBALS['TYPO3_DB']->exec_UPDATEquery(
'tt_content',
'list_type = "generic_gallery_pi1"',
array(
'list_type' => 'genericgallery_pi1',
)
);
return $GLOBALS['TYPO3_DB']->sql_affected_rows().' rows have been updated.';
}
/**
* Checks how many rows are found and returns true if there are any
* (this function is called from the extension manager).
*
* @param string $what : what should be updated
*
* @return bool
*/
public function access($what = 'all')
{
return $GLOBALS['BE_USER']->isAdmin();
}
}