return $style;
}
+
+ function links()
+ {
+ $links = array();
+
+ $table = call_user_func(array(get_class($this), 'schemaDef'));
+
+ foreach ($table['foreign keys'] as $keyname => $keydef) {
+ if (count($keydef) == 2 && is_string($keydef[0]) && is_array($keydef[1]) && count($keydef[1]) == 1) {
+ $links[$keydef[1][0]] = $keydef[0].':'.$keydef[1][1];
+ }
+ }
+ return $links;
+ }
}
\ No newline at end of file
$tags->tagged = $this->id;
$lists->joinAdd($tags);
+
#@fixme: postgres (round(date_part('epoch', my_date)))
$lists->selectAdd('unix_timestamp(profile_tag.modified) as "cursor"');
$lists = new Profile_list();
$subs = new Profile_tag_subscription();
- $lists->joinAdd($subs);
+ $lists->joinAdd('id', 'profile_tag_subscription:profile_tag_id');
+
#@fixme: postgres (round(date_part('epoch', my_date)))
$lists->selectAdd('unix_timestamp(profile_tag_subscription.created) as "cursor"');
function getSubscribers($offset=0, $limit=null, $since=0, $upto=0)
{
$subs = new Profile();
- $sub = new Profile_tag_subscription();
- $sub->profile_tag_id = $this->id;
- $subs->joinAdd($sub);
+ $subs->joinAdd(array('id', 'profile_tag_subscription:profile_tag_id'));
+
$subs->selectAdd('unix_timestamp(profile_tag_subscription.' .
'created) as "cursor"');
'TagSub' => null,
'OpenID' => null,
'Directory' => null,
- 'ExtendedProfile' => null),
+ 'ExtendedProfile' => null,
+ 'Activity' => null),
'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
'server' => null,
'sslserver' => null,
$notice->selectAdd();
$notice->selectAdd('notice.id');
- $ptag = new Profile_tag();
- $ptag->tag = $this->profile_list->tag;
- $ptag->tagger = $this->profile_list->tagger;
- $notice->joinAdd($ptag);
+ $notice->joinAdd(array('profile_id', 'profile_tag:tagged'));
+
+ $notice->whereAdd(sprintf('profile_tag.tag = "%s"', $this->profile_list->tag));
+ $notice->whereAdd(sprintf('profile_tag.tagger = %d', $this->profile_list->tagger));
if ($since_id != 0) {
$notice->whereAdd('notice.id > ' . $since_id);