An ideal Bose-gas confined in a harmonic potential is studied. The thermodynamic properties of the said system are obtained in a general case of D dimensions, where D can be fractional (this corresponds to, e.g., porous medium). For the critical temperature, expansions with respect to the number of particles in the system are obtained. Numerical study is made for D = ln 8/ ln 3 corresponding to the dimensionality of the so-called Sierpiński carpet.