User:Leucosticte/Junkyard


 * Could some database settings be changed to arrays, in order to store different wikis' stuff on different db servers while maintaining the structure of one big database? Or is there some other way to mitigate/get around that problem? E.g. task-based servers? Leucosticte (talk) 20:01, 14 August 2012 (UTC)

Hi Jonathan, I'm experiencing some problems trying to get Extension:SacredText to work on MW 1.19. I noted them at Extension talk:SacredText. I get the impression there's some sort of minor breaking change that was made to MediaWiki that caused this extension to not work anymore, but I wasn't able to figure out exactly what it might be. I looked at parser->setHook; is that supposed to take an array as parameter 2, or should it take a public static function like SacredTextLookup::hookBible? I made those changes and it still didn't work, and in reviewing the rest of the code, I couldn't figure out where the glitch might be. I've tried this on a few different v1.19 MediaWiki installations and it hasn't worked properly on any of them. Leucosticte (talk) 23:30, 15 October 2012 (UTC)

if ( $chapternum == $secondChapterNum ) { $where = array ( "{$dbr->tableName( 'st_chapter_num' )}=$chapternum			AND {$dbr->tableName ( 'st_verse_num' )}>=$versenums[0]			AND {$dbr->tableName ( 'st_verse_num' )}<=$secondVerseNum" ); } else { $where = array ( "(({dbr->tableName ( 'st_chapter_num' )}=$chapternum			AND {$dbr->tableName ( 'st_verse_num' )}>=$versenum[0])			OR ({$dbr->tableName ( 'st_chapter_num' )}=$secondChapterNum			AND {$dbr->tableName ( 'st_verse_num' )}<=$secondVerseNum)" );		$chapterArray = range ( $chapternum, $secondChapterNum );		foreach ( $chapterArray as $thisChapter ) {			if ( $thisChapter != $chapternum && $thisChapter != $secondChapterNum ) {				$where .= " OR {$dbr->tableName ( 'st_chapter_num' )}=$thisChapter";			}		}		$where .= ')'; }

if ( $res ) { $numRows = $dbr->numRows( $res ); for ( $count = 0; $count < $numRows - 1; $count++ ) { $retArray[ $count ] = $dbr->fetchRow( $res ); }           }