Permalink
Browse files

Merge branch 'JOINDIN-283-remove'

  • Loading branch information...
2 parents 287e62a + 8371145 commit e9e9386ca2bba4290ddb1622d6241204d1248e45 @dstockto dstockto committed Apr 3, 2013
Showing with 0 additions and 74 deletions.
  1. +0 −10 src/system/application/controllers/user.php
  2. +0 −64 src/system/application/models/user_model.php
@@ -469,16 +469,6 @@ function view($uid)
$arr['pending_evt'] = array();
}
- $block = array(
- 'title' => 'Other Speakers',
- 'content' => $this->user_model->getOtherUserAtEvt($uid),
- 'udata' => $arr['details'],
- 'has_talks' => (count($arr['talks']) == 0) ? false : true
- );
-
- if (!empty($block['content'])) {
- $this->template->write_view('sidebar2', 'user/_other-speakers', $block);
- }
$this->template->write_view('content', 'user/view', $arr);
$this->template->render();
}
@@ -391,70 +391,6 @@ public function countAllUsers()
}
/**
- * Find other users of the system that were speakers at events the given user
- * was a speaker at too
- *
- * @param integer $uid User ID
- * @param integer $limit [optional] integer Limit the number of results returned
- *
- * @return array Return array of user's information
- * (user_id, event_id, username, full_name)
- *
- * @throws Exception
- */
- public function getOtherUserAtEvt($uid, $limit = 15)
- {
- if (!ctype_digit((string)$limit)) {
- throw new Exception(
- 'Expected $limit to be a number but received ' . $limit
- );
- }
-
- // find speakers (users attending too?) that have spoken at
- // conferences this speaker did too
- $other_speakers = array();
- $sql = sprintf(
- "
- select
- distinct u.ID as user_id,
- t.event_id,
- u.username,
- u.full_name
- from
- user u,
- talks t,
- talk_speaker ts
- where
- u.ID <> %s and
- u.ID = ts.speaker_id and
- t.ID = ts.talk_id and
- ts.status != 'pending' and
- t.event_id in (
- select
- distinct t.event_id
- from
- talk_speaker ts,
- talks t
- where
- ts.speaker_id = %s and
- t.ID = ts.talk_id and
- ts.status != 'pending'
- )
- order by rand()
- limit %s
- ", $uid, $uid, $limit
- );
- $query = $this->db->query($sql);
- $speakers = $query->result();
-
- foreach ($speakers as $speaker) {
- $other_speakers[$speaker->user_id] = $speaker;
- }
-
- return $other_speakers;
- }
-
- /**
* Search the user information by a string on username and full name fields
*
* @param string $term string Search string

0 comments on commit e9e9386

Please sign in to comment.