Fix notice caused by voip_prepaid:task when tables are not installed.

This commit is contained in:
abacab 2008-12-29 20:43:41 -05:00
parent a38c7a100e
commit 2aef892944

View File

@ -27,27 +27,30 @@ class voip_prepaid
$db =& DB(); $db =& DB();
$rs = $db->Execute(sqlSelect($db,"voip","prepaid_low_balance","id=::".DEFAULT_SITE."::")); $rs = $db->Execute(sqlSelect($db,"voip","prepaid_low_balance","id=::".DEFAULT_SITE."::"));
# e-mail user's once when balance reaches this amount: if ($rs && $rs->RecordCount() > 0)
$this->lowBalance = $rs->fields[0]; {
$this->pinLenth = 10; // up to 10 # e-mail user's once when balance reaches this amount:
$this->lowBalance = $rs->fields[0];
$this->pinLenth = 10; // up to 10
# name of this module: # name of this module:
$this->module = "voip_prepaid"; $this->module = "voip_prepaid";
# location of the construct XML file: # location of the construct XML file:
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml"; $this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
# open the construct file for parsing # open the construct file for parsing
$C_xml = new CORE_xml; $C_xml = new CORE_xml;
$construct = $C_xml->xml_to_array($this->xml_construct); $construct = $C_xml->xml_to_array($this->xml_construct);
$this->method = $construct["construct"]["method"]; $this->method = $construct["construct"]["method"];
$this->field = $construct["construct"]["field"]; $this->field = $construct["construct"]["field"];
$this->table = $construct["construct"]["table"]; $this->table = $construct["construct"]["table"];
$this->module = $construct["construct"]["module"]; $this->module = $construct["construct"]["module"];
$this->cache = $construct["construct"]["cache"]; $this->cache = $construct["construct"]["cache"];
$this->order_by = $construct["construct"]["order_by"]; $this->order_by = $construct["construct"]["order_by"];
$this->limit = $construct["construct"]["limit"]; $this->limit = $construct["construct"]["limit"];
}
} }
/** generate a new pin */ /** generate a new pin */