Mechanism of porous-silicon luminescence