* Copyright: See COPYING files that comes with this distribution
********************************************************************************/
-if(!function_exists('_file_put_contents')) {
+if(!function_exists('file_put_contents')) {
function file_put_contents($filename, $data)
{
$fp = fopen($filename, 'w');
var $ids;
/** thread starts */
var $roots;
+ /** test validity */
+ var $valid = true;
/** constructor
* @param $_group STRING group name
global $banana;
$this->group = $_group;
$groupinfo = $banana->nntp->group($_group);
- if (!$groupinfo) { return ($this = null); }
+ if (!$groupinfo) {
+ $this->valid = false;
+ return null;
+ }
$this->_readFromFile();
{
$file = $this->_spoolfile();
if (file_exists($file)) {
- $this = unserialize(file_get_contents($file));
+ $temp = unserialize(file_get_contents($file));
+ foreach (get_object_vars($temp) as $key=>$val) {
+ $this->$key = $val;
+ }
}
}
if ($_index == $_ref) {
$res .= '<span class="cur">'.htmlentities($subject).'</span>';
} else {
- $res .= "<a href='?group={$this->group}&artid=$_id'>".htmlentities($subject).'</a>';
+ $res .= makeHREF(Array('group' => $this->group,
+ 'artid' => $_id),
+ htmlentities($subject));
}
$res .= "</td>\n<td class='from'>".formatFrom($this->overview[$_id]->from)."</td>\n</tr>";