You are here

function sms_valid_get_all_rulesets in SMS Framework 6

Same name and namespace in other branches
  1. 6.2 modules/sms_valid/sms_valid.module \sms_valid_get_all_rulesets()
  2. 7 modules/sms_valid/sms_valid.module \sms_valid_get_all_rulesets()

Get all rulesets

Return value

Array of rulesets.

2 calls to sms_valid_get_all_rulesets()
sms_valid_admin_rulesets_form in modules/sms_valid/sms_valid.admin.inc
Validation rulesets list form
sms_valid_get_rulesets_for_form in modules/sms_valid/sms_valid.module
Get country codes for form options

File

modules/sms_valid/sms_valid.module, line 140
Number validation feature module for Drupal SMS Framework.

Code

function sms_valid_get_all_rulesets() {
  $result = db_query("SELECT * FROM {sms_valid_rules}");
  $rulesets = array();
  while ($row = db_fetch_array($result)) {
    $prefix = $row['prefix'];
    $rulesets[$prefix] = $row;
    $rulesets[$prefix]['rules'] = unserialize($row['rules']);
  }
  return $rulesets;
}