diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-11-20 21:18:00 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-11-20 21:18:00 +0100 |
commit | 08f8737a13a14530e53426aa1ee9959de6d2c8ca (patch) | |
tree | f4d3fb5a0df3384dc821c658a408a75e56a26b97 /ratatoeskr/sys | |
parent | c0db2cbf6262ddd50390a93bc45b3e886ab0bc7e (diff) | |
download | ratatoeskr-cms-08f8737a13a14530e53426aa1ee9959de6d2c8ca.tar.gz ratatoeskr-cms-08f8737a13a14530e53426aa1ee9959de6d2c8ca.tar.bz2 ratatoeskr-cms-08f8737a13a14530e53426aa1ee9959de6d2c8ca.zip |
Added Style::all function.
Diffstat (limited to 'ratatoeskr/sys')
-rw-r--r-- | ratatoeskr/sys/models.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index 78ef270..892fd2e 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -1097,6 +1097,22 @@ class Style } /* + * Constructor: all + * Get all styles + * + * Returns: + * Array of Style objects + */ + public static function all() + { + $rv = array(); + $result = qdb("SELECT `id` FROM `PREFIX_styles` WHERE 1"); + while($sqlrow = mysql_fetch_assoc($result)) + $rv[] = self::by_id($sqlrow["id"]); + return $rv; + } + + /* * Function: save * Save changes to database. */ |