+ $name = $credits['name'];
+
+ // If someone is loading the same thing twice, throw
+ // a nice error (T121493)
+ if ( isset( $this->credits[$name] ) ) {
+ $firstPath = $this->credits[$name]['path'];
+ $secondPath = $credits['path'];
+ throw new Exception( "It was attempted to load $name twice, from $firstPath and $secondPath." );
+ }
+
+ $this->credits[$name] = $credits;
+ $this->globals['wgExtensionCredits'][$credits['type']][] = $credits;