Ejemplo n.º 1
0
 /**
  * @author Inez Korczynski <*****@*****.**>
  */
 private function getLines($message_key)
 {
     $revision = Revision::newFromTitle(Title::newFromText($message_key, NS_MEDIAWIKI));
     if (is_object($revision)) {
         if (trim($revision->getText()) != '') {
             $temp = MonacoSidebar::getMessageAsArray($message_key);
             if (count($temp) > 0) {
                 wfDebugLog('monaco', sprintf('Get LOCAL %s, which contains %s lines', $message_key, count($temp)));
                 $lines = $temp;
             }
         }
     }
     if (empty($lines)) {
         $lines = MonacoSidebar::getMessageAsArray($message_key);
         wfDebugLog('monaco', sprintf('Get %s, which contains %s lines', $message_key, count($lines)));
     }
     return $lines;
 }
 public function getMenuLines()
 {
     /*		# if a local copy exists, try to use that first
     		$revision = Revision::newFromTitle(Title::newFromText('Monaco-sidebar', NS_MEDIAWIKI));
     		if(is_object($revision) && trim($revision->getText()) != '') {
     			$lines = MonacoSidebar::getMessageAsArray('Monaco-sidebar');
     		}
     */
     # if we STILL have no menu lines, fall back to just loading the default from the message system
     if (empty($lines)) {
         $lines = MonacoSidebar::getMessageAsArray('Monaco-sidebar');
     }
     return $lines;
 }