| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace MBSocial; |
| 3 | 3 | |
| 4 | +/** Remote Custom Network Class */ | |
| 4 | 5 | class customNetwork extends mbNetwork |
| 5 | 6 | { |
| 6 | 7 | |
| 7 | 8 | protected $priority = 'readmore'; |
| @@ -6,9 +7,8 @@ | ||
| 6 | 7 | |
| 7 | 8 | protected $priority = 'readmore'; |
| 8 | 9 | protected $is_native = false; |
| 9 | 10 | |
| 10 | - | |
| 11 | 11 | /** Function to set default for custom networks to the data that was imported from remote. |
| 12 | 12 | * |
| 13 | 13 | * Start state of custom network is all these defaults, but no save on the main settings branch |
| 14 | 14 | */ |
| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | public function get_all_defaults() |
| 16 | 16 | { |
| 17 | 17 | $network = MBSocial()->networks()->getNetworkSettings(); |
| 18 | - //var_dump($network); var_dump($this->network); | |
| 18 | + | |
| 19 | 19 | if (isset($network['custom'][$this->network])) |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | 22 | $settings = $network['custom'][$this->network]; |
| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | |
| 22 | 22 | $settings = $network['custom'][$this->network]; |
| 23 | 23 | |
| 24 | 24 | $all_options = $this->get_all_options(); |
| 25 | - // echo "<PRE>"; print_R($settings); print_r($all_options); | |
| 25 | + | |
| 26 | 26 | foreach($all_options as $option => $value) |
| 27 | 27 | { |
| 28 | 28 | if (isset($settings[$option])) |
| 29 | 29 | { |
| @@ -41,20 +41,6 @@ | ||
| 41 | 41 | if (isset($settings['name'])) |
| 42 | 42 | { |
| 43 | 43 | $this->network = $settings['name']; |
| 44 | 44 | } |
| 45 | - | |
| 46 | - /* foreach($fields as $name => $value) | |
| 47 | - { | |
| 48 | - if ($name == 'name') | |
| 49 | - $name = 'network'; | |
| 50 | - if ($name == 'popup') | |
| 51 | - $name = 'is_popup'; | |
| 52 | - | |
| 53 | - echo " $name - $value <BR>"; | |
| 54 | - | |
| 55 | - if ($value && strlen($value) > 0) | |
| 56 | - $this->{$name} = $value; | |
| 57 | - } | |
| 58 | -*/ | |
| 59 | 45 | } |
| 60 | 46 | } |