transparency
[lhc/web/wiklou.git] / includes / ChangesList.php
1 <?php
2
3 class ChangesList {
4 # Called by history lists and recent changes
5 #
6
7 function ChangesList( &$skin ) {
8 $this->skin =& $skin;
9 }
10
11 # Returns text for the start of the tabular part of RC
12 function beginRecentChangesList() {
13 $this->rc_cache = array() ;
14 $this->rcMoveIndex = 0;
15 $this->rcCacheIndex = 0 ;
16 $this->lastdate = '';
17 $this->rclistOpen = false;
18 return '';
19 }
20
21 /**
22 * Returns text for the end of RC
23 * If enhanced RC is in use, returns pretty much all the text
24 */
25 function endRecentChangesList() {
26 $s = $this->recentChangesBlock() ;
27 if( $this->rclistOpen ) {
28 $s .= "</ul>\n";
29 }
30 return $s;
31 }
32
33 /**
34 * Enhanced RC ungrouped line
35 */
36 function recentChangesBlockLine ( $rcObj ) {
37 global $wgStylePath, $wgContLang ;
38
39 # Get rc_xxxx variables
40 extract( $rcObj->mAttribs ) ;
41 $curIdEq = 'curid='.$rc_cur_id;
42
43 # Spacer image
44 $r = '' ;
45
46 $r .= '<img src="'.$wgStylePath.'/common/images/Arr_.png" width="12" height="12" border="0" />' ;
47 $r .= '<tt>' ;
48
49 if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
50 $r .= '&nbsp;&nbsp;';
51 } else {
52 # M, N and !
53 $M = wfMsg( 'minoreditletter' );
54 $N = wfMsg( 'newpageletter' );
55
56 if ( $rc_type == RC_NEW ) {
57 $r .= $N ;
58 } else {
59 $r .= '&nbsp;' ;
60 }
61 if ( $rc_minor ) {
62 $r .= $M ;
63 } else {
64 $r .= '&nbsp;' ;
65 }
66 if ( $rcObj->unpatrolled ) {
67 $r .= '!';
68 } else {
69 $r .= '&nbsp;';
70 }
71 }
72
73 # Timestamp
74 $r .= ' '.$rcObj->timestamp.' ' ;
75 $r .= '</tt>' ;
76
77 # Article link
78 $link = $rcObj->link ;
79 if ( $rcObj->watched ) $link = '<strong>'.$link.'</strong>' ;
80 $r .= $link ;
81
82 if ($rcObj->notificationtimestamp) {
83 $r .= wfMsg( 'updatedmarker' );
84 }
85
86 # Diff
87 $r .= ' (' ;
88 $r .= $rcObj->difflink ;
89 $r .= '; ' ;
90
91 # Hist
92 $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' );
93
94 # User/talk
95 $r .= ') . . '.$rcObj->userlink ;
96 $r .= $rcObj->usertalklink ;
97
98 # Comment
99 if ( $rc_comment != '' && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
100 $rc_comment=$this->skin->formatComment($rc_comment, $rcObj->getTitle());
101 $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' );
102 }
103
104 if ($rcObj->numberofWatchingusers > 0) {
105 $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rcObj->numberofWatchingusers));
106 }
107
108 $r .= "<br />\n" ;
109 return $r ;
110 }
111
112 /**
113 * Enhanced RC group
114 */
115 function recentChangesBlockGroup ( $block ) {
116 global $wgStylePath, $wgContLang ;
117
118 $r = '' ;
119 $M = wfMsg( 'minoreditletter' );
120 $N = wfMsg( 'newpageletter' );
121
122 # Collate list of users
123 $isnew = false ;
124 $unpatrolled = false;
125 $userlinks = array () ;
126 foreach ( $block AS $rcObj ) {
127 $oldid = $rcObj->mAttribs['rc_last_oldid'];
128 if ( $rcObj->mAttribs['rc_new'] ) {
129 $isnew = true ;
130 }
131 $u = $rcObj->userlink ;
132 if ( !isset ( $userlinks[$u] ) ) {
133 $userlinks[$u] = 0 ;
134 }
135 if ( $rcObj->unpatrolled ) {
136 $unpatrolled = true;
137 }
138 $userlinks[$u]++ ;
139 }
140
141 # Sort the list and convert to text
142 krsort ( $userlinks ) ;
143 asort ( $userlinks ) ;
144 $users = array () ;
145 foreach ( $userlinks as $userlink => $count) {
146 $text = $userlink ;
147 if ( $count > 1 ) $text .= " ({$count}&times;)" ;
148 array_push ( $users , $text ) ;
149 }
150 $users = ' <font size="-1">['.implode('; ',$users).']</font>' ;
151
152 # Arrow
153 $rci = 'RCI'.$this->rcCacheIndex ;
154 $rcl = 'RCL'.$this->rcCacheIndex ;
155 $rcm = 'RCM'.$this->rcCacheIndex ;
156 $toggleLink = "javascript:toggleVisibility('$rci','$rcm','$rcl')" ;
157 $arrowdir = $wgContLang->isRTL() ? 'l' : 'r';
158 $tl = '<span id="'.$rcm.'"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_'.$arrowdir.'.png" width="12" height="12" alt="+" /></a></span>' ;
159 $tl .= '<span id="'.$rcl.'" style="display:none"><a href="'.$toggleLink.'"><img src="'.$wgStylePath.'/common/images/Arr_d.png" width="12" height="12" alt="-" /></a></span>' ;
160 $r .= $tl ;
161
162 # Main line
163 # M/N
164 $r .= '<tt>' ;
165 if ( $isnew ) $r .= $N ;
166 else $r .= '&nbsp;' ;
167 $r .= '&nbsp;' ; # Minor
168 if ( $unpatrolled ) {
169 $r .= '!';
170 } else {
171 $r .= '&nbsp;';
172 }
173
174 # Timestamp
175 $r .= ' '.$block[0]->timestamp.' ' ;
176 $r .= '</tt>' ;
177
178 # Article link
179 $link = $block[0]->link ;
180 if ( $block[0]->watched ) $link = '<strong>'.$link.'</strong>' ;
181 $r .= $link ;
182
183 if ($block[0]->notificationtimestamp) {
184 $r .= wfMsg( 'updatedmarker' );
185 }
186
187 $curIdEq = 'curid=' . $block[0]->mAttribs['rc_cur_id'];
188 if ( $block[0]->mAttribs['rc_type'] != RC_LOG ) {
189 # Changes
190 $r .= ' ('.count($block).' ' ;
191 if ( $isnew ) $r .= wfMsg('changes');
192 else $r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle() , wfMsg('changes') ,
193 $curIdEq.'&diff=0&oldid='.$oldid ) ;
194 $r .= '; ' ;
195
196 # History
197 $r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle(), wfMsg( 'history' ), $curIdEq.'&action=history' );
198 $r .= ')' ;
199 }
200
201 $r .= $users ;
202
203 if ($block[0]->numberofWatchingusers > 0) {
204 $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($block[0]->numberofWatchingusers));
205 }
206 $r .= "<br />\n" ;
207
208 # Sub-entries
209 $r .= '<div id="'.$rci.'" style="display:none">' ;
210 foreach ( $block AS $rcObj ) {
211 # Get rc_xxxx variables
212 extract( $rcObj->mAttribs );
213
214 $r .= '<img src="'.$wgStylePath.'/common/images/Arr_.png" width="12" height="12" />';
215 $r .= '<tt>&nbsp; &nbsp; &nbsp; &nbsp;' ;
216 if ( $rc_new ) {
217 $r .= $N ;
218 } else {
219 $r .= '&nbsp;' ;
220 }
221
222 if ( $rc_minor ) {
223 $r .= $M ;
224 } else {
225 $r .= '&nbsp;' ;
226 }
227
228 if ( $rcObj->unpatrolled ) {
229 $r .= '!';
230 } else {
231 $r .= '&nbsp;';
232 }
233
234 $r .= '&nbsp;</tt>' ;
235
236 $o = '' ;
237 if ( $rc_last_oldid != 0 ) {
238 $o = 'oldid='.$rc_last_oldid ;
239 }
240 if ( $rc_type == RC_LOG ) {
241 $link = $rcObj->timestamp ;
242 } else {
243 $link = $this->skin->makeKnownLinkObj( $rcObj->getTitle(), $rcObj->timestamp , "{$curIdEq}&$o" ) ;
244 }
245 $link = '<tt>'.$link.'</tt>' ;
246
247 $r .= $link ;
248 $r .= ' (' ;
249 $r .= $rcObj->curlink ;
250 $r .= '; ' ;
251 $r .= $rcObj->lastlink ;
252 $r .= ') . . '.$rcObj->userlink ;
253 $r .= $rcObj->usertalklink ;
254 if ( $rc_comment != '' ) {
255 $rc_comment=$this->skin->formatComment($rc_comment, $rcObj->getTitle());
256 $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' ) ;
257 }
258 $r .= "<br />\n" ;
259 }
260 $r .= "</div>\n" ;
261
262 $this->rcCacheIndex++ ;
263 return $r ;
264 }
265
266 /**
267 * If enhanced RC is in use, this function takes the previously cached
268 * RC lines, arranges them, and outputs the HTML
269 */
270 function recentChangesBlock () {
271 global $wgStylePath ;
272 if ( count ( $this->rc_cache ) == 0 ) return '' ;
273 $blockOut = '';
274 foreach ( $this->rc_cache AS $secureName => $block ) {
275 if ( count ( $block ) < 2 ) {
276 $blockOut .= $this->recentChangesBlockLine ( array_shift ( $block ) ) ;
277 } else {
278 $blockOut .= $this->recentChangesBlockGroup ( $block ) ;
279 }
280 }
281
282 return '<div>'.$blockOut.'</div>' ;
283 }
284
285 /**
286 * Called in a loop over all displayed RC entries
287 * Either returns the line, or caches it for later use
288 */
289 function recentChangesLine( &$rc, $watched = false ) {
290 global $wgUser;
291 $usenew = $wgUser->getOption( 'usenewrc' );
292 if ( $usenew )
293 $line = $this->recentChangesLineNew ( $rc, $watched ) ;
294 else
295 $line = $this->recentChangesLineOld ( $rc, $watched ) ;
296 return $line ;
297 }
298
299
300 function recentChangesLineOld( &$rc, $watched = false ) {
301 $fname = 'Skin::recentChangesLineOld';
302 wfProfileIn( $fname );
303
304 global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds, $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
305
306 static $message;
307 if( !isset( $message ) ) {
308 foreach( explode(' ', 'diff hist minoreditletter newpageletter blocklink' ) as $msg ) {
309 $message[$msg] = wfMsg( $msg );
310 }
311 }
312
313 # Extract DB fields into local scope
314 extract( $rc->mAttribs );
315 $curIdEq = 'curid=' . $rc_cur_id;
316
317 # Should patrol-related stuff be shown?
318 $unpatrolled = $wgUseRCPatrol && $wgUser->getID() != 0 &&
319 ( !$wgOnlySysopsCanPatrol || $wgUser->isAllowed('patrol') ) && $rc_patrolled == 0;
320
321 # Make date header if necessary
322 $date = $wgLang->date( $rc_timestamp, true);
323 $s = '';
324 if ( $date != $this->lastdate ) {
325 if ( '' != $this->lastdate ) { $s .= "</ul>\n"; }
326 $s .= "<h4>{$date}</h4>\n<ul class=\"special\">";
327 $this->lastdate = $date;
328 $this->rclistOpen = true;
329 }
330
331 $s .= '<li>';
332
333 if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
334 # Diff
335 $s .= '(' . $message['diff'] . ') (';
336 # Hist
337 $s .= $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), $message['hist'], 'action=history' ) .
338 ') . . ';
339
340 # "[[x]] moved to [[y]]"
341 $msg = ( $rc_type == RC_MOVE ) ? '1movedto2' : '1movedto2_redir';
342 $s .= wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
343 $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
344 } elseif( $rc_namespace == NS_SPECIAL && preg_match( '!^Log/(.*)$!', $rc_title, $matches ) ) {
345 # Log updates, etc
346 $logtype = $matches[1];
347 $logname = LogPage::logName( $logtype );
348 $s .= '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
349 } else {
350 wfProfileIn("$fname-page");
351 # Diff link
352 if ( $rc_type == RC_NEW || $rc_type == RC_LOG ) {
353 $diffLink = $message['diff'];
354 } else {
355 if ( $unpatrolled )
356 $rcidparam = "&rcid={$rc_id}";
357 else
358 $rcidparam = "";
359 $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'],
360 "{$curIdEq}&diff={$rc_this_oldid}&oldid={$rc_last_oldid}{$rcidparam}",
361 '', '', ' tabindex="'.$rc->counter.'"');
362 }
363 $s .= '('.$diffLink.') (';
364
365 # History link
366 $s .= $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['hist'], $curIdEq.'&action=history' );
367 $s .= ') . . ';
368
369 # M, N and ! (minor, new and unpatrolled)
370 if ( $rc_minor ) { $s .= ' <span class="minoreditletter">'.$message["minoreditletter"].'</span>'; }
371 if ( $rc_type == RC_NEW ) { $s .= '<span class="newpageletter">'.$message["newpageletter"].'</span>'; }
372 if ( !$rc_patrolled ) { $s .= ' <span class="unpatrolled">!</span>'; }
373
374 # Article link
375 # If it's a new article, there is no diff link, but if it hasn't been
376 # patrolled yet, we need to give users a way to do so
377 if ( $unpatrolled && $rc_type == RC_NEW )
378 $articleLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
379 else
380 $articleLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '' );
381
382 if ( $watched ) {
383 $articleLink = '<strong>'.$articleLink.'</strong>';
384 }
385
386 if ($rc->notificationtimestamp) {
387 $articleLink .= wfMsg( 'updatedmarker' );
388 }
389
390 $s .= ' '.$articleLink;
391 wfProfileOut("$fname-page");
392 }
393
394 wfProfileIn( "$fname-rest" );
395 # Timestamp
396 $s .= '; ' . $wgLang->time( $rc_timestamp, true, $wgRCSeconds ) . ' . . ';
397
398 # User link (or contributions for unregistered users)
399 if ( 0 == $rc_user ) {
400 $contribsPage =& Title::makeTitle( NS_SPECIAL, 'Contributions' );
401 $userLink = $this->skin->makeKnownLinkObj( $contribsPage,
402 $rc_user_text, 'target=' . $rc_user_text );
403 } else {
404 $userPage =& Title::makeTitle( NS_USER, $rc_user_text );
405 $userLink = $this->skin->makeLinkObj( $userPage, $rc_user_text );
406 }
407 $s .= $userLink;
408
409 # User talk link
410 $talkname = $wgContLang->getNsText(NS_TALK); # use the shorter name
411 global $wgDisableAnonTalk;
412 if( 0 == $rc_user && $wgDisableAnonTalk ) {
413 $userTalkLink = '';
414 } else {
415 $userTalkPage =& Title::makeTitle( NS_USER_TALK, $rc_user_text );
416 $userTalkLink= $this->skin->makeLinkObj( $userTalkPage, $talkname );
417 }
418 # Block link
419 $blockLink='';
420 if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
421 $blockLinkPage = Title::makeTitle( NS_SPECIAL, 'Blockip' );
422 $blockLink = $this->skin->makeKnownLinkObj( $blockLinkPage,
423 $message['blocklink'], 'ip='.$rc_user_text );
424
425 }
426 if($blockLink) {
427 if($userTalkLink) $userTalkLink .= ' | ';
428 $userTalkLink .= $blockLink;
429 }
430 if($userTalkLink) $s.=' ('.$userTalkLink.')';
431
432 # Add comment
433 if ( '' != $rc_comment && '*' != $rc_comment && $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) {
434 $rc_comment = $this->skin->formatComment($rc_comment,$rc->getTitle());
435 $s .= $wgContLang->emphasize(' (' . $rc_comment . ')');
436 }
437
438 if ($rc->numberofWatchingusers > 0) {
439 $s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers));
440 }
441
442 $s .= "</li>\n";
443
444 wfProfileOut( "$fname-rest" );
445 wfProfileOut( $fname );
446 return $s;
447 }
448
449 function recentChangesLineNew( &$baseRC, $watched = false ) {
450 global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgRCSeconds;
451 global $wgUseRCPatrol, $wgOnlySysopsCanPatrol;
452
453 static $message;
454 if( !isset( $message ) ) {
455 foreach( explode(' ', 'cur diff hist minoreditletter newpageletter last blocklink' ) as $msg ) {
456 $message[$msg] = wfMsg( $msg );
457 }
458 }
459
460 # Create a specialised object
461 $rc = RCCacheEntry::newFromParent( $baseRC ) ;
462
463 # Extract fields from DB into the function scope (rc_xxxx variables)
464 extract( $rc->mAttribs );
465 $curIdEq = 'curid=' . $rc_cur_id;
466
467 # If it's a new day, add the headline and flush the cache
468 $date = $wgLang->date( $rc_timestamp, true);
469 $ret = '';
470 if ( $date != $this->lastdate ) {
471 # Process current cache
472 $ret = $this->recentChangesBlock () ;
473 $this->rc_cache = array() ;
474 $ret .= "<h4>{$date}</h4>\n";
475 $this->lastdate = $date;
476 }
477
478 # Should patrol-related stuff be shown?
479 if ( $wgUseRCPatrol && $wgUser->getID() != 0 &&
480 ( !$wgOnlySysopsCanPatrol || $wgUser->isAllowed('patrol') )) {
481 $rc->unpatrolled = !$rc_patrolled;
482 } else {
483 $rc->unpatrolled = false;
484 }
485
486 # Make article link
487 if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
488 $msg = ( $rc_type == RC_MOVE ) ? "1movedto2" : "1movedto2_redir";
489 $clink = wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
490 $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
491 } elseif( $rc_namespace == NS_SPECIAL && preg_match( '!^Log/(.*)$!', $rc_title, $matches ) ) {
492 # Log updates, etc
493 $logtype = $matches[1];
494 $logname = LogPage::logName( $logtype );
495 $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
496 } elseif ( $rc->unpatrolled && $rc_type == RC_NEW ) {
497 # Unpatrolled new page, give rc_id in query
498 $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
499 } else {
500 $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '' ) ;
501 }
502
503 $time = $wgContLang->time( $rc_timestamp, true, $wgRCSeconds );
504 $rc->watched = $watched ;
505 $rc->link = $clink ;
506 $rc->timestamp = $time;
507 $rc->notificationtimestamp = $baseRC->notificationtimestamp;
508 $rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
509
510 # Make "cur" and "diff" links
511 $titleObj = $rc->getTitle();
512 if ( $rc->unpatrolled ) {
513 $rcIdQuery = "&rcid={$rc_id}";
514 } else {
515 $rcIdQuery = '';
516 }
517 if ( ( $rc_type == RC_NEW && $rc_this_oldid == 0 ) || $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
518 $curLink = $message['cur'];
519 $diffLink = $message['diff'];
520 } else {
521 $query = $curIdEq.'&diff=0&oldid='.$rc_this_oldid;
522 $aprops = ' tabindex="'.$baseRC->counter.'"';
523 $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['cur'], $query, '' ,'' , $aprops );
524 $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'], $query . $rcIdQuery, '' ,'' , $aprops );
525 }
526
527 # Make "last" link
528 if ( $rc_last_oldid == 0 || $rc_type == RC_LOG || $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
529 $lastLink = $message['last'];
530 } else {
531 $lastLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['last'],
532 $curIdEq.'&diff='.$rc_this_oldid.'&oldid='.$rc_last_oldid . $rcIdQuery );
533 }
534
535 # Make user link (or user contributions for unregistered users)
536 if ( $rc_user == 0 ) {
537 $contribsPage =& Title::makeTitle( NS_SPECIAL, 'Contributions' );
538 $userLink = $this->skin->makeKnownLinkObj( $contribsPage,
539 $rc_user_text, 'target=' . $rc_user_text );
540 } else {
541 $userPage =& Title::makeTitle( NS_USER, $rc_user_text );
542 $userLink = $this->skin->makeLinkObj( $userPage, $rc_user_text );
543 }
544
545 $rc->userlink = $userLink;
546 $rc->lastlink = $lastLink;
547 $rc->curlink = $curLink;
548 $rc->difflink = $diffLink;
549
550 # Make user talk link
551 $talkname = $wgContLang->getNsText( NS_TALK ); # use the shorter name
552 $userTalkPage =& Title::makeTitle( NS_USER_TALK, $rc_user_text );
553 $userTalkLink = $this->skin->makeLinkObj( $userTalkPage, $talkname );
554
555 global $wgDisableAnonTalk;
556 if ( ( 0 == $rc_user ) && $wgUser->isAllowed('block') ) {
557 $blockPage =& Title::makeTitle( NS_SPECIAL, 'Blockip' );
558 $blockLink = $this->skin->makeKnownLinkObj( $blockPage,
559 $message['blocklink'], 'ip='.$rc_user_text );
560 if( $wgDisableAnonTalk )
561 $rc->usertalklink = ' ('.$blockLink.')';
562 else
563 $rc->usertalklink = ' ('.$userTalkLink.' | '.$blockLink.')';
564 } else {
565 if( $wgDisableAnonTalk && ($rc_user == 0) )
566 $rc->usertalklink = '';
567 else
568 $rc->usertalklink = ' ('.$userTalkLink.')';
569 }
570
571 # Put accumulated information into the cache, for later display
572 # Page moves go on their own line
573 $title = $rc->getTitle();
574 $secureName = $title->getPrefixedDBkey();
575 if ( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
576 # Use an @ character to prevent collision with page names
577 $this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
578 } else {
579 if ( !isset ( $this->rc_cache[$secureName] ) ) $this->rc_cache[$secureName] = array() ;
580 array_push ( $this->rc_cache[$secureName] , $rc ) ;
581 }
582 return $ret;
583 }
584
585 }
586
587
588 ?>