Mercurial > defr > drupal > core
comparison includes/install.inc @ 11:589fb7c02327 6.5
Drupal 6.5
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Tue, 23 Dec 2008 14:32:19 +0100 |
| parents | c1f4ac30525a |
| children |
comparison
equal
deleted
inserted
replaced
| 10:6f15c9d74937 | 11:589fb7c02327 |
|---|---|
| 1 <?php | 1 <?php |
| 2 // $Id: install.inc,v 1.56.2.2 2008/02/11 15:10:26 goba Exp $ | 2 // $Id: install.inc,v 1.56.2.3 2008/08/14 09:26:43 dries Exp $ |
| 3 | 3 |
| 4 define('SCHEMA_UNINSTALLED', -1); | 4 define('SCHEMA_UNINSTALLED', -1); |
| 5 define('SCHEMA_INSTALLED', 0); | 5 define('SCHEMA_INSTALLED', 0); |
| 6 | 6 |
| 7 define('REQUIREMENT_INFO', -1); | 7 define('REQUIREMENT_INFO', -1); |
| 33 * Returns an array of available schema versions for a module. | 33 * Returns an array of available schema versions for a module. |
| 34 * | 34 * |
| 35 * @param $module | 35 * @param $module |
| 36 * A module name. | 36 * A module name. |
| 37 * @return | 37 * @return |
| 38 * If the module has updates, an array of available updates. Otherwise, | 38 * If the module has updates, an array of available updates sorted by version. |
| 39 * FALSE. | 39 * Otherwise, FALSE. |
| 40 */ | 40 */ |
| 41 function drupal_get_schema_versions($module) { | 41 function drupal_get_schema_versions($module) { |
| 42 $updates = array(); | 42 $updates = array(); |
| 43 $functions = get_defined_functions(); | 43 $functions = get_defined_functions(); |
| 44 foreach ($functions['user'] as $function) { | 44 foreach ($functions['user'] as $function) { |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 if (count($updates) == 0) { | 52 if (count($updates) == 0) { |
| 53 return FALSE; | 53 return FALSE; |
| 54 } | 54 } |
| 55 sort($updates, SORT_NUMERIC); | |
| 55 return $updates; | 56 return $updates; |
| 56 } | 57 } |
| 57 | 58 |
| 58 /** | 59 /** |
| 59 * Returns the currently installed schema version for a module. | 60 * Returns the currently installed schema version for a module. |
