User:Leucosticte/Junkyard

function fetch_all( $resulttype = MYSQLI_NUM ) { if ( method_exists( 'mysqli_result', 'fetch_all' ) ) { # Compatibility layer with PHP < 5.3 $res = parent::fetch_all( $resulttype ); } else { for ( $res = array; $tmp = $this->fetch_array( $resulttype ); ) { $res[] = $tmp; }     return $res; }

$ret = $wiki->query ( '?action=createaccount&format=php'     . '&rcid=' . $row['mbrcq_rc_id']      . '&logid=' . $row['mbrcq_rc_logid']      . '&pageid=' . $row['mbrcq_rc_cur_id']      . '&pagenamespace=' . $row['mbrcq_rc_namespace']      . '&pagetitle=' . $row['mbrcq_rc_title']      . '&type=' . $row['mbrcq_rc_logtype']      . '&logaction=' . $row['mbrcq_rc_log_action']      . '&user=' . $row['mbrcq_rc_user_text']      . '&userid=' . $row['mbrcq_rc_user']      . '&timestamp=' . $row['mbrcq_rc_timestamp']      . '&comment=' . $row['mbrcq_rc_comment']      . '&tags=' . $row['mbrcq_tags']      . '&token=' . $token     , true ); // Post

$wgAutoloadClasses['MirrorEditPage'] = $dir. 'MirrorTools.classes.php';

$r['username'] = $params['user'];

public function getResultProperties { return array(			'createaccount' => array( 'result' => array(					ApiBase::PROP_TYPE => array( 'success', 'warning', 'needtoken' )				),				'username' => array(					ApiBase::PROP_TYPE => 'string',					ApiBase::PROP_NULLABLE => true				), 'userid' => array(					ApiBase::PROP_TYPE => 'int',					ApiBase::PROP_NULLABLE => true				), 'token' => array(					ApiBase::PROP_TYPE => 'string',					ApiBase::PROP_NULLABLE => true				), )		);	} die ( "Allowable options: rc, rev, us\n" );