Kill some more mysql 4 related things from the installer
[lhc/web/wiklou.git] / includes / LogEventsList.php
index a18d849..e73d0a6 100644 (file)
@@ -74,13 +74,16 @@ class LogEventsList {
        /**
         * Set page title and show header for this log type
         * @param $type Array
+        * @deprecated in 1.19
         */
        public function showHeader( $type ) {
+               wfDeprecated( __METHOD__ );
                // If only one log type is used, then show a special message...
                $headerType = (count($type) == 1) ? $type[0] : '';
                if( LogPage::isLogType( $headerType ) ) {
-                       $this->out->setPageTitle( LogPage::logName( $headerType ) );
-                       $this->out->addHTML( LogPage::logHeader( $headerType ) );
+                       $page = new LogPage( $headerType );
+                       $this->out->setPageTitle( $page->getName()->text() );
+                       $this->out->addHTML( $page->getDescription()->parseAsBlock() );
                } else {
                        $this->out->addHTML( wfMsgExt('alllogstext',array('parseinline')) );
                }
@@ -210,52 +213,54 @@ class LogEventsList {
                return $this->out->getTitle();
        }
 
+       public function getContext() {
+               return $this->out->getContext();
+       }
+
        /**
         * @param $queryTypes Array
         * @return String: Formatted HTML
         */
        private function getTypeMenu( $queryTypes ) {
-               global $wgLogRestrictions, $wgUser;
+               $queryType = count($queryTypes) == 1 ? $queryTypes[0] : '';
+               $selector = $this->getTypeSelector();
+               $selector->setDefault( $queryType );
+               return $selector->getHtml();
+       }
 
-               $html = "<select name='type'>\n";
+       /**
+        * Returns log page selector.
+        * @param $default string The default selection
+        * @return XmlSelect
+        * @since 1.19
+        */
+       public function getTypeSelector() {
+               global $wgUser;
 
-               $validTypes = LogPage::validTypes();
                $typesByName = array(); // Temporary array
-
                // First pass to load the log names
-               foreach( $validTypes as $type ) {
-                       $text = LogPage::logName( $type );
-                       $typesByName[$type] = $text;
+               foreach(  LogPage::validTypes() as $type ) {
+                       $page = new LogPage( $type );
+                       $restriction = $page->getRestriction();
+                       if ( $wgUser->isAllowed( $restriction ) ) {
+                               $typesByName[$type] = $page->getName()->text();
+                       }
                }
 
                // Second pass to sort by name
                asort($typesByName);
 
-               // Note the query type
-               $queryType = count($queryTypes) == 1 ? $queryTypes[0] : '';
-
                // Always put "All public logs" on top
-               if ( isset( $typesByName[''] ) ) {
-                       $all = $typesByName[''];
-                       unset( $typesByName[''] );
-                       $typesByName = array( '' => $all ) + $typesByName;
-               }
+               $public = $typesByName[''];
+               unset( $typesByName[''] );
+               $typesByName = array( '' => $public ) + $typesByName;
 
-               // Third pass generates sorted XHTML content
-               foreach( $typesByName as $type => $text ) {
-                       $selected = ($type == $queryType);
-                       // Restricted types
-                       if ( isset($wgLogRestrictions[$type]) ) {
-                               if ( $wgUser->isAllowed( $wgLogRestrictions[$type] ) ) {
-                                       $html .= Xml::option( $text, $type, $selected ) . "\n";
-                               }
-                       } else {
-                               $html .= Xml::option( $text, $type, $selected ) . "\n";
-                       }
+               $select = new XmlSelect( 'type' );
+               foreach( $typesByName as $type => $name ) {
+                       $select->addOption( $name, $type );
                }
 
-               $html .= '</select>';
-               return $html;
+               return $select;
        }
 
        /**
@@ -279,7 +284,8 @@ class LogEventsList {
        }
 
        /**
-        * @return boolean Checkbox
+        * @param $pattern
+        * @return string Checkbox
         */
        private function getTitlePattern( $pattern ) {
                return '<span style="white-space: nowrap">' .
@@ -287,6 +293,10 @@ class LogEventsList {
                        '</span>';
        }
 
+       /**
+        * @param $types
+        * @return string
+        */
        private function getExtraInputs( $types ) {
                global $wgRequest;
                $offender = $wgRequest->getVal('offender');
@@ -301,10 +311,16 @@ class LogEventsList {
                return '';
        }
 
+       /**
+        * @return string
+        */
        public function beginLogEventsList() {
                return "<ul>\n";
        }
 
+       /**
+        * @return string
+        */
        public function endLogEventsList() {
                return "</ul>\n";
        }
@@ -314,18 +330,19 @@ class LogEventsList {
         * @return String: Formatted HTML list item
         */
        public function logLine( $row ) {
-               $classes = array( 'mw-logline-' . $row->log_type );
-               $title = Title::makeTitle( $row->log_namespace, $row->log_title );
-               // Log time
-               $time = $this->logTimestamp( $row );
-               // User links
-               $userLink = $this->logUserLinks( $row );
+               $entry = DatabaseLogEntry::newFromRow( $row );
+               $formatter = LogFormatter::newFromEntry( $entry );
+               $formatter->setShowUserToolLinks( !( $this->flags & self::NO_EXTRA_USER_LINKS ) );
+
+               $action = $formatter->getActionText();
+               $comment = $formatter->getComment();
+
+               $classes = array( 'mw-logline-' . $entry->getType() );
+               $title = $entry->getTarget();
+               $time = $this->logTimestamp( $entry );
+
                // Extract extra parameters
                $paramArray = LogPage::extractParams( $row->log_params );
-               // Event description
-               $action = $this->logAction( $row, $title, $paramArray );
-               // Log comment
-               $comment = $this->logComment( $row );
                // Add review/revert links and such...
                $revert = $this->logActionLinks( $row, $title, $paramArray, $comment );
 
@@ -338,53 +355,15 @@ class LogEventsList {
                $classes = array_merge( $classes, $newClasses );
 
                return Xml::tags( 'li', array( "class" => implode( ' ', $classes ) ),
-                       $del . "$time $userLink $action $comment $revert $tagDisplay" ) . "\n";
+                       $del . "$time $action $comment $revert $tagDisplay" ) . "\n";
        }
 
-       private function logTimestamp( $row ) {
+       private function logTimestamp( LogEntry $entry ) {
                global $wgLang;
-               $time = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->log_timestamp ), true );
+               $time = $wgLang->timeanddate( wfTimestamp( TS_MW, $entry->getTimestamp() ), true );
                return htmlspecialchars( $time );
        }
 
-       private function logUserLinks( $row ) {
-               if( self::isDeleted( $row, LogPage::DELETED_USER ) ) {
-                       $userLinks = '<span class="history-deleted">' .
-                               wfMsgHtml( 'rev-deleted-user' ) . '</span>';
-               } else {
-                       $userLinks = Linker::userLink( $row->log_user, $row->user_name );
-                       // Talk|Contribs links...
-                       if( !( $this->flags & self::NO_EXTRA_USER_LINKS ) ) {
-                               $userLinks .= Linker::userToolLinks(
-                                       $row->log_user, $row->user_name, true, 0, $row->user_editcount );
-                       }
-               }
-               return $userLinks;
-       }
-
-       private function logAction( $row, $title, $paramArray ) {
-               if( self::isDeleted( $row, LogPage::DELETED_ACTION ) ) {
-                       $action = '<span class="history-deleted">' .
-                               wfMsgHtml( 'rev-deleted-event' ) . '</span>';
-               } else {
-                       $action = LogPage::actionText(
-                               $row->log_type, $row->log_action, $title, $this->skin, $paramArray, true );
-               }
-               return $action;
-       }
-
-       private function logComment( $row ) {
-               if( self::isDeleted( $row, LogPage::DELETED_COMMENT ) ) {
-                       $comment = '<span class="history-deleted">' .
-                               wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
-               } else {
-                       global $wgLang;
-                       $comment = $wgLang->getDirMark() .
-                               Linker::commentBlock( $row->log_comment );
-               }
-               return $comment;
-       }
-
        /**
         * @TODO: split up!
         *
@@ -487,7 +466,7 @@ class LogEventsList {
                // If an edit was hidden from a page give a review link to the history
                } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'revision', 'deletedhistory' ) ) {
                        $revert = RevisionDeleter::getLogLinks( $title, $paramArray,
-                                                               $this->skin, $this->message );
+                                                               $this->message );
                // Hidden log items, give review link
                } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'event', 'deletedhistory' ) ) {
                        if( count($paramArray) >= 1 ) {
@@ -507,19 +486,6 @@ class LogEventsList {
                                        array( 'known', 'noclasses' )
                                ) . ')';
                        }
-               // Self-created users
-               } elseif( self::typeAction( $row, 'newusers', 'create2' ) ) {
-                       if( isset( $paramArray[0] ) ) {
-                               $revert = Linker::userToolLinks( $paramArray[0], $title->getDBkey(), true );
-                       } else {
-                               # Fall back to a blue contributions link
-                               $revert = Linker::userToolLinks( 1, $title->getDBkey() );
-                       }
-                       if( wfTimestamp( TS_MW, $row->log_timestamp ) < '20080129000000' ) {
-                               # Suppress $comment from old entries (before 2008-01-29),
-                               # not needed and can contain incorrect links
-                               $comment = '';
-                       }
                // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
                } else {
                        wfRunHooks( 'LogLine', array( $row->log_type, $row->log_action, $title, $paramArray,
@@ -543,7 +509,7 @@ class LogEventsList {
                }
                $del = '';
                // Don't show useless link to people who cannot hide revisions
-               if( $wgUser->isAllowed( 'deletedhistory' ) && !$wgUser->isBlocked() ) {
+               if( $wgUser->isAllowed( 'deletedhistory' ) ) {
                        if( $row->log_deleted || $wgUser->isAllowed( 'deleterevision' ) ) {
                                $canHide = $wgUser->isAllowed( 'deleterevision' );
                                // If event was hidden from sysops
@@ -591,10 +557,11 @@ class LogEventsList {
         *
         * @param $row Row
         * @param $field Integer
+        * @param $user User object to check, or null to use $wgUser
         * @return Boolean
         */
-       public static function userCan( $row, $field ) {
-               return self::userCanBitfield( $row->log_deleted, $field );
+       public static function userCan( $row, $field, User $user = null ) {
+               return self::userCanBitfield( $row->log_deleted, $field, $user );
        }
 
        /**
@@ -603,19 +570,22 @@ class LogEventsList {
         *
         * @param $bitfield Integer (current field)
         * @param $field Integer
+        * @param $user User object to check, or null to use $wgUser
         * @return Boolean
         */
-       public static function userCanBitfield( $bitfield, $field ) {
+       public static function userCanBitfield( $bitfield, $field, User $user = null ) {
                if( $bitfield & $field ) {
-                       global $wgUser;
-
                        if ( $bitfield & LogPage::DELETED_RESTRICTED ) {
                                $permission = 'suppressrevision';
                        } else {
                                $permission = 'deletedhistory';
                        }
                        wfDebug( "Checking for $permission due to $field match on $bitfield\n" );
-                       return $wgUser->isAllowed( $permission );
+                       if ( $user === null ) {
+                               global $wgUser;
+                               $user = $wgUser;
+                       }
+                       return $user->isAllowed( $permission );
                } else {
                        return true;
                }
@@ -634,8 +604,8 @@ class LogEventsList {
         * Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey)
         *
         * @param $out OutputPage|String-by-reference
-        * @param $types String or Array
-        * @param $page String The page title to show log entries for
+        * @param $types String|Array Log types to show
+        * @param $page String|Title The page title to show log entries for
         * @param $user String The user who made the log entries
         * @param $param Associative Array with the following additional options:
         * - lim Integer Limit of items to show, default is 50
@@ -654,7 +624,6 @@ class LogEventsList {
        public static function showLogExtract(
                &$out, $types=array(), $page='', $user='', $param = array()
        ) {
-               global $wgUser, $wgOut;
                $defaultParameters = array(
                        'lim' => 25,
                        'conds' => array(),
@@ -676,8 +645,15 @@ class LogEventsList {
                if ( !is_array( $msgKey ) ) {
                        $msgKey = array( $msgKey );
                }
+
+               if ( $out instanceof OutputPage ) {
+                       $context = $out->getContext();
+               } else {
+                       $context = RequestContext::getMain();
+               }
+
                # Insert list of top 50 (or top $lim) items
-               $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, $flags );
+               $loglist = new LogEventsList( $context->getSkin(), $context->getOutput(), $flags );
                $pager = new LogPager( $loglist, $types, $user, $page, '', $conds );
                if ( isset( $param['offset'] ) ) { # Tell pager to ignore $wgRequest offset
                        $pager->setOffset( $param['offset'] );
@@ -701,14 +677,18 @@ class LogEventsList {
                                 $logBody .
                                 $loglist->endLogEventsList();
                } else {
-                       if ( $showIfEmpty )
+                       if ( $showIfEmpty ) {
                                $s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ),
                                        wfMsgExt( 'logempty', array( 'parseinline' ) ) );
+                       }
                }
                if( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link
                        $urlParam = array();
-                       if ( $page != '')
+                       if ( $page instanceof Title ) {
+                               $urlParam['page'] = $page->getPrefixedDBkey();
+                       } elseif ( $page != '' ) {
                                $urlParam['page'] = $page;
+                       }
                        if ( $user != '')
                                $urlParam['user'] = $user;
                        if ( !is_array( $types ) ) # Make it an array, if it isn't
@@ -727,23 +707,27 @@ class LogEventsList {
                        $s .= '</div>';
                }
 
-               if ( $wrap!='' ) { // Wrap message in html
+               if ( $wrap != '' ) { // Wrap message in html
                        $s = str_replace( '$1', $s, $wrap );
                }
 
-               // $out can be either an OutputPage object or a String-by-reference
-               if( $out instanceof OutputPage ){
-                       $out->addHTML( $s );
-               } else {
-                       $out = $s;
+               /* hook can return false, if we don't want the message to be emitted (Wikia BugId:7093) */
+               if ( wfRunHooks( 'LogEventsListShowLogExtract', array( &$s, $types, $page, $user, $param ) ) ) {
+                       // $out can be either an OutputPage object or a String-by-reference
+                       if ( $out instanceof OutputPage ){
+                               $out->addHTML( $s );
+                       } else {
+                               $out = $s;
+                       }
                }
+
                return $pager->getNumRows();
        }
 
        /**
         * SQL clause to skip forbidden log types for this user
         *
-        * @param $db Database
+        * @param $db DatabaseBase
         * @param $audience string, public/user
         * @return Mixed: string or false
         */
@@ -765,13 +749,13 @@ class LogEventsList {
                }
                return false;
        }
-}
+ }
 
 /**
  * @ingroup Pager
  */
 class LogPager extends ReverseChronologicalPager {
-       private $types = array(), $user = '', $title = '', $pattern = '';
+       private $types = array(), $performer = '', $title = '', $pattern = '';
        private $typeCGI = '';
        public $mLogEventsList;
 
@@ -780,23 +764,23 @@ class LogPager extends ReverseChronologicalPager {
         *
         * @param $list LogEventsList
         * @param $types String or Array: log types to show
-        * @param $user String: the user who made the log entries
-        * @param $title String: the page title the log entries are for
+        * @param $performer String: the user who made the log entries
+        * @param $title String|Title: the page title the log entries are for
         * @param $pattern String: do a prefix search rather than an exact title match
         * @param $conds Array: extra conditions for the query
         * @param $year Integer: the year to start from
         * @param $month Integer: the month to start from
         * @param $tagFilter String: tag
         */
-       public function __construct( $list, $types = array(), $user = '', $title = '', $pattern = '',
+       public function __construct( $list, $types = array(), $performer = '', $title = '', $pattern = '',
                $conds = array(), $year = false, $month = false, $tagFilter = '' ) {
-               parent::__construct();
+               parent::__construct( $list->getContext() );
                $this->mConds = $conds;
 
                $this->mLogEventsList = $list;
 
                $this->limitType( $types ); // also excludes hidden types
-               $this->limitUser( $user );
+               $this->limitPerformer( $performer );
                $this->limitTitle( $title, $pattern );
                $this->getDateCond( $year, $month );
                $this->mTagFilter = $tagFilter;
@@ -805,27 +789,23 @@ class LogPager extends ReverseChronologicalPager {
        public function getDefaultQuery() {
                $query = parent::getDefaultQuery();
                $query['type'] = $this->typeCGI; // arrays won't work here
-               $query['user'] = $this->user;
+               $query['user'] = $this->performer;
                $query['month'] = $this->mMonth;
                $query['year'] = $this->mYear;
                return $query;
        }
 
-       function getTitle() {
-               return $this->mLogEventsList->getDisplayTitle();
-       }
-
        // Call ONLY after calling $this->limitType() already!
        public function getFilterParams() {
-               global $wgFilterLogTypes, $wgUser, $wgRequest;
+               global $wgFilterLogTypes;
                $filters = array();
                if( count($this->types) ) {
                        return $filters;
                }
                foreach( $wgFilterLogTypes as $type => $default ) {
                        // Avoid silly filtering
-                       if( $type !== 'patrol' || $wgUser->useNPPatrol() ) {
-                               $hide = $wgRequest->getInt( "hide_{$type}_log", $default );
+                       if( $type !== 'patrol' || $this->getUser()->useNPPatrol() ) {
+                               $hide = $this->getRequest()->getInt( "hide_{$type}_log", $default );
                                $filters[$type] = $hide;
                                if( $hide )
                                        $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type );
@@ -842,13 +822,13 @@ class LogPager extends ReverseChronologicalPager {
         *   empty string means no restriction
         */
        private function limitType( $types ) {
-               global $wgLogRestrictions, $wgUser;
+               global $wgLogRestrictions;
                // If $types is not an array, make it an array
                $types = ($types === '') ? array() : (array)$types;
                // Don't even show header for private logs; don't recognize it...
                foreach ( $types as $type ) {
                        if( isset( $wgLogRestrictions[$type] )
-                               && !$wgUser->isAllowed($wgLogRestrictions[$type])
+                               && !$this->getUser()->isAllowed($wgLogRestrictions[$type])
                        ) {
                                $types = array_diff( $types, array( $type ) );
                        }
@@ -873,7 +853,7 @@ class LogPager extends ReverseChronologicalPager {
         *
         * @param $name String: (In)valid user name
         */
-       private function limitUser( $name ) {
+       private function limitPerformer( $name ) {
                if( $name == '' ) {
                        return false;
                }
@@ -888,16 +868,16 @@ class LogPager extends ReverseChronologicalPager {
                           but for now it won't pass anywhere behind the optimizer */
                        $this->mConds[] = "NULL";
                } else {
-                       global $wgUser;
                        $this->mConds['log_user'] = $userid;
                        // Paranoia: avoid brute force searches (bug 17342)
-                       if( !$wgUser->isAllowed( 'deletedhistory' ) || $wgUser->isBlocked() ) {
+                       $user = $this->getUser();
+                       if( !$user->isAllowed( 'deletedhistory' ) ) {
                                $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::DELETED_USER) . ' = 0';
-                       } elseif( !$wgUser->isAllowed( 'suppressrevision' ) || $wgUser->isBlocked() ) {
+                       } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
                                $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::SUPPRESSED_USER) .
                                        ' != ' . LogPage::SUPPRESSED_USER;
                        }
-                       $this->user = $usertitle->getText();
+                       $this->performer = $usertitle->getText();
                }
        }
 
@@ -905,15 +885,19 @@ class LogPager extends ReverseChronologicalPager {
         * Set the log reader to return only entries affecting the given page.
         * (For the block and rights logs, this is a user page.)
         *
-        * @param $page String: Title name as text
+        * @param $page String or Title object: Title name
         * @param $pattern String
         */
        private function limitTitle( $page, $pattern ) {
-               global $wgMiserMode, $wgUser;
+               global $wgMiserMode;
 
-               $title = Title::newFromText( $page );
-               if( strlen( $page ) == 0 || !$title instanceof Title ) {
-                       return false;
+               if ( $page instanceof Title ) {
+                       $title = $page;
+               } else {
+                       $title = Title::newFromText( $page );
+                       if( strlen( $page ) == 0 || !$title instanceof Title ) {
+                               return false;
+                       }
                }
 
                $this->title = $title->getPrefixedText();
@@ -940,19 +924,30 @@ class LogPager extends ReverseChronologicalPager {
                        $this->mConds['log_title'] = $title->getDBkey();
                }
                // Paranoia: avoid brute force searches (bug 17342)
-               if( !$wgUser->isAllowed( 'deletedhistory' ) || $wgUser->isBlocked() ) {
+               $user = $this->getUser();
+               if( !$user->isAllowed( 'deletedhistory' ) ) {
                        $this->mConds[] = $db->bitAnd('log_deleted', LogPage::DELETED_ACTION) . ' = 0';
-               } elseif( !$wgUser->isAllowed( 'suppressrevision' ) || $wgUser->isBlocked() ) {
+               } elseif( !$user->isAllowed( 'suppressrevision' ) ) {
                        $this->mConds[] = $db->bitAnd('log_deleted', LogPage::SUPPRESSED_ACTION) .
                                ' != ' . LogPage::SUPPRESSED_ACTION;
                }
        }
 
+       /**
+        * Constructs the most part of the query. Extra conditions are sprinkled in
+        * all over this class.
+        * @return array
+        */
        public function getQueryInfo() {
-               $tables = array( 'logging', 'user' );
-               $this->mConds[] = 'user_id = log_user';
+               $basic = DatabaseLogEntry::getSelectQueryData();
+
+               $tables = $basic['tables'];
+               $fields = $basic['fields'];
+               $conds = $basic['conds'];
+               $options = $basic['options'];
+               $joins = $basic['join_conds'];
+
                $index = array();
-               $options = array();
                # Add log_search table if there are conditions on it.
                # This filters the results to only include log rows that have
                # log_search records with the specified ls_field and ls_value values.
@@ -971,7 +966,7 @@ class LogPager extends ReverseChronologicalPager {
                # Avoid usage of the wrong index by limiting
                # the choices of available indexes. This mainly
                # avoids site-breaking filesorts.
-               } elseif( $this->title || $this->pattern || $this->user ) {
+               } elseif( $this->title || $this->pattern || $this->performer ) {
                        $index['logging'] = array( 'page_time', 'user_time' );
                        if( count($this->types) == 1 ) {
                                $index['logging'][] = 'log_user_type_time';
@@ -983,17 +978,14 @@ class LogPager extends ReverseChronologicalPager {
                }
                $options['USE INDEX'] = $index;
                # Don't show duplicate rows when using log_search
+               $joins['log_search'] = array( 'INNER JOIN', 'ls_log_id=log_id' );
+
                $info = array(
                        'tables'     => $tables,
-                       'fields'     => array( 'log_type', 'log_action', 'log_user', 'log_namespace',
-                               'log_title', 'log_params', 'log_comment', 'log_id', 'log_deleted',
-                               'log_timestamp', 'user_name', 'user_editcount' ),
-                       'conds'      => $this->mConds,
+                       'fields'     => $fields,
+                       'conds'      => array_merge( $conds, $this->mConds ),
                        'options'    => $options,
-                       'join_conds' => array(
-                               'user'           => array( 'INNER JOIN', 'user_id=log_user' ),
-                               'log_search' => array( 'INNER JOIN', 'ls_log_id=log_id' )
-                       )
+                       'join_conds' => $joins,
                );
                # Add ChangeTags filter query
                ChangeTags::modifyDisplayQuery( $info['tables'], $info['fields'], $info['conds'],
@@ -1001,7 +993,11 @@ class LogPager extends ReverseChronologicalPager {
                return $info;
        }
 
-       // Checks if $this->mConds has $field matched to a *single* value
+       /**
+        * Checks if $this->mConds has $field matched to a *single* value
+        * @param $field
+        * @return bool
+        */
        protected function hasEqualsClause( $field ) {
                return (
                        array_key_exists( $field, $this->mConds ) &&
@@ -1038,10 +1034,16 @@ class LogPager extends ReverseChronologicalPager {
                return $this->types;
        }
 
-       public function getUser() {
-               return $this->user;
+       /**
+        * @return string
+        */
+       public function getPerformer() {
+               return $this->performer;
        }
 
+       /**
+        * @return string
+        */
        public function getPage() {
                return $this->title;
        }