protected function _process( array $stmts )
	{
		$this->_msg( 'Fixing order email status values', 0 );

		if( $this->_schema->tableExists( 'mshop_order_status' ) === true )
		{
			$this->_execute( $stmts['update'] );

			$mapping = array(
				0 => 'email-deleted',
				1 => 'email-pending',
				2 => 'email-progress',
				3 => 'email-dispatched',
				4 => 'email-delivered',
				5 => 'email-lost',
				6 => 'email-refused',
				7 => 'email-returned',
			);

			$cntRows = 0;
			foreach( $mapping as $value => $type )
			{
				$stmt = $this->_conn->create( $stmts['change'] );
				$stmt->bind( 1, $value, MW_DB_Statement_Abstract::PARAM_INT );
				$stmt->bind( 2, $type );

				$result = $stmt->execute();
				$cntRows += $result->affectedRows();
				$result->finish();
			}

			if( $cntRows > 0 ) {
				$this->_status( sprintf( 'migrated (%1$d)', $cntRows ) );
			} else {
				$this->_status( 'OK' );
			}
		}
		else
		{
			$this->_status( 'OK' );
		}

	}
protected function _process( array $stmts )
	{
		$this->_msg( 'Fixing order email status values', 0 );

		if( $this->_schema->tableExists( 'mshop_order_status' ) === true )
		{
			$this->_execute( $stmts['update'] );

			$mapping = array(
				0 => 'email-deleted',
				1 => 'email-pending',
				2 => 'email-progress',
				3 => 'email-dispatched',
				4 => 'email-delivered',
				5 => 'email-lost',
				6 => 'email-refused',
				7 => 'email-returned',
			);

			$cntRows = 0;
			foreach( $mapping as $value => $type )
			{
				$stmt = $this->_conn->create( $stmts['change'] );
				$stmt->bind( 1, $value, MW_DB_Statement_Abstract::PARAM_INT );
				$stmt->bind( 2, $type );

				$result = $stmt->execute();
				$cntRows += $result->affectedRows();
				$result->finish();
			}

			if( $cntRows > 0 ) {
				$this->_status( sprintf( 'migrated (%1$d)', $cntRows ) );
			} else {
				$this->_status( 'OK' );
			}
		}
		else
		{
			$this->_status( 'OK' );
		}

	}
protected function _process ( array $ stmts ) { $ this -> _msg ( 'Fixing order email status values' , 0 ) ; if ( $ this -> _schema -> tableExists ( 'mshop_order_status' ) === true ) { $ this -> _execute ( $ stmts [ 'update' ] ) ; $ mapping = array ( 0 => 'email-deleted' , 1 => 'email-pending' , 2 => 'email-progress' , 3 => 'email-dispatched' , 4 => 'email-delivered' , 5 => 'email-lost' , 6 => 'email-refused' , 7 => 'email-returned' , ) ; $ cntRows = 0 ; foreach ( $ mapping as $ value => $ type ) { $ stmt = $ this -> _conn -> create ( $ stmts [ 'change' ] ) ; $ stmt -> bind ( 1 , $ value , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 2 , $ type ) ; $ result = $ stmt -> execute ( ) ; $ cntRows += $ result -> affectedRows ( ) ; $ result -> finish ( ) ; } if ( $ cntRows > 0 ) { $ this -> _status ( sprintf ( 'migrated (%1$d)' , $ cntRows ) ) ; } else { $ this -> _status ( 'OK' ) ; } } else { $ this -> _status ( 'OK' ) ; } }
Migrates the emailflag status values in order table to the order status table.

@param array $stmts Associative array of tables names and lists of SQL statements to execute.
Migrates the emailflag status values in order table to the order status table .