| | |
| | | $this->debug('C: ' . $log); |
| | | } |
| | | |
| | | $res = fwrite($this->fp, $string . ($endln ? "\r\n" : '')); |
| | | if ($endln) { |
| | | $string .= "\r\n"; |
| | | } |
| | | |
| | | $res = fwrite($this->fp, $string); |
| | | |
| | | if ($res === false) { |
| | | @fclose($this->fp); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $res; |
| | | } |
| | | |
| | |
| | | if (!is_array($entries)) { |
| | | $entries = array($entries); |
| | | } |
| | | |
| | | // create entries string |
| | | // ANNOTATEMORE drafts before version 08 require quoted parameters |
| | | foreach ($entries as $idx => $name) { |
| | |
| | | if (!is_array($attribs)) { |
| | | $attribs = array($attribs); |
| | | } |
| | | // create entries string |
| | | |
| | | // create attributes string |
| | | foreach ($attribs as $idx => $name) { |
| | | $attribs[$idx] = $this->escape($name, true); |
| | | } |