-class Watch {
- var $_uid;
- var $_promos;
- var $_nonins;
- var $_cats = Array();
- var $_subs;
- var $watch_contacts;
- var $watch_mail;
-
- function Watch($uid) {
- global $globals;
- $this->_uid = $uid;
- $this->_promos = new PromoNotifs($uid);
- $this->_nonins = new NoninsNotifs($uid);
- $this->_subs = new WatchSub($uid);
- $res = $globals->xdb->query("SELECT FIND_IN_SET('contacts',watch_flags),FIND_IN_SET('mail',watch_flags)
- FROM auth_user_quick
- WHERE user_id={?}", $uid);
- list($this->watch_contacts,$this->watch_mail) = $res->fetchOneRow();
-
- $res = $globals->xdb->iterator("SELECT * FROM watch_cat");
- while($tmp = $res->next()) {
+class Watch
+{
+ public $_uid;
+ public $_promos;
+ public $_nonins;
+ public $_cats = Array();
+ public $_subs;
+ public $watch_contacts;
+ public $watch_mail;
+
+ public function __construct($uid)
+ {
+ $this->_uid = $uid;
+ $this->_promos = new PromoNotifs($uid);
+ $this->_nonins = new NoninsNotifs($uid);
+ $this->_subs = new WatchSub($uid);
+ $res = XDB::query("SELECT FIND_IN_SET('contacts',watch_flags),FIND_IN_SET('mail',watch_flags)
+ FROM auth_user_quick
+ WHERE user_id={?}", $uid);
+ list($this->watch_contacts,$this->watch_mail) = $res->fetchOneRow();
+
+ $res = XDB::iterator("SELECT * FROM watch_cat");
+ while($tmp = $res->next()) {