Skip to content

Commit

Permalink
Merge pull request #14 from GigabyteIO/master
Browse files Browse the repository at this point in the history
Changed "piro" to proper field name "prio"
  • Loading branch information
mnaser committed Nov 14, 2013
2 parents 835e8aa + 4d542c4 commit 2a0610b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions class_cloudflare.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class cloudflare_api {
//Service mode values.
private static $MODE_SERVICE = array('A', 'AAAA', 'CNAME');

//Piro values.
private static $PIRO = array('MX', 'SRV');
//Prio values.
private static $PRIO = array('MX', 'SRV');

//Timeout for the API requests in seconds
const TIMEOUT = 5;
Expand Down Expand Up @@ -344,7 +344,7 @@ public function minify($domain, $mode) {
* This function creates a new DNS record for a zone.
* See http://www.cloudflare.com/docs/client-api.html#s5.1 for documentation.
*/
public function rec_new($domain, $type, $name, $content, $ttl = 1, $mode = 1, $piro = 1, $service = 1, $srvname = 1, $protocol = 1, $weight = 1, $port = 1, $target = 1) {
public function rec_new($domain, $type, $name, $content, $ttl = 1, $mode = 1, $prio = 1, $service = 1, $srvname = 1, $protocol = 1, $weight = 1, $port = 1, $target = 1) {
$data = array(
'a' => 'rec_new',
'z' => $domain,
Expand All @@ -355,8 +355,8 @@ public function rec_new($domain, $type, $name, $content, $ttl = 1, $mode = 1, $p
);
if (in_array($type, self::$MODE_SERVICE))
$data['service_mode'] = ($mode == true) ? 1 : 0;
else if (in_array($type, self::$PIRO)) {
$data['piro'] = $piro;
else if (in_array($type, self::$PRIO)) {
$data['prio'] = $prio;
if ($type == 'SRV') {
$data = array_merge($data, array(
'service' => $service,
Expand All @@ -376,7 +376,7 @@ public function rec_new($domain, $type, $name, $content, $ttl = 1, $mode = 1, $p
* This function edits a DNS record for a zone.
* See http://www.cloudflare.com/docs/client-api.html#s5.1 for documentation.
*/
public function rec_edit($domain, $type, $id, $name, $content, $ttl = 1, $mode = 1, $piro = 1, $service = 1, $srvname = 1, $protocol = 1, $weight = 1, $port = 1, $target = 1) {
public function rec_edit($domain, $type, $id, $name, $content, $ttl = 1, $mode = 1, $prio = 1, $service = 1, $srvname = 1, $protocol = 1, $weight = 1, $port = 1, $target = 1) {
$data = array(
'a' => 'rec_edit',
'z' => $domain,
Expand All @@ -388,8 +388,8 @@ public function rec_edit($domain, $type, $id, $name, $content, $ttl = 1, $mode =
);
if (in_array($type, self::$MODE_SERVICE))
$data['service_mode'] = ($mode == true) ? 1 : 0;
else if (in_array($type, self::$PIRO)) {
$data['piro'] = $piro;
else if (in_array($type, self::$PRIO)) {
$data['prio'] = $prio;
if ($type == 'SRV') {
$data = array_merge($data, array(
'service' => $service,
Expand Down

0 comments on commit 2a0610b

Please sign in to comment.