| @@ 92-98 (lines=7) @@ | ||
| 89 | $dom->documentElement->appendChild($new_snippet); |
|
| 90 | $dom->save($this->xml_file); |
|
| 91 | $this->getSnippets(); |
|
| 92 | if (true == $this->script_found) { |
|
| 93 | return 'script_forbidden'; |
|
| 94 | } elseif (true == $this->php_found) { |
|
| 95 | return 'php_forbidden'; |
|
| 96 | } else { |
|
| 97 | return true; |
|
| 98 | } |
|
| 99 | } else { |
|
| 100 | return false; |
|
| 101 | } |
|
| @@ 134-140 (lines=7) @@ | ||
| 131 | $dom->documentElement->replaceChild($new_snippet, $old_snippet); |
|
| 132 | $dom->save($this->xml_file); |
|
| 133 | $this->getSnippets(); |
|
| 134 | if (true == $this->script_found) { |
|
| 135 | return 'script_forbidden'; |
|
| 136 | } elseif (true == $this->php_found) { |
|
| 137 | return 'php_forbidden'; |
|
| 138 | } else { |
|
| 139 | return true; |
|
| 140 | } |
|
| 141 | } |
|
| 142 | ||
| 143 | public function deleteSnippet($index) |
|