(h)
Transfer of prisonersNothing in this section shall prohibit the transfer of prisoners otherwise authorized by law or prevent a judge from changing the place of confinement between State and county facilities to the extent that the judge would have such discretion at the time of imposition of sentence or recommitment.
(i) Prohibition.--Notwithstanding any other provision of law, no person sentenced to total or partial confinement after the effective date of this subsection shall be committed to the Department of Corrections unless:
(1) The aggregate sentence consists of a conviction for an offense graded as a misdemeanor of the second degree or higher; or
(2) the Secretary of Corrections or the secretary's designee has consented to the commitment.
(j) Applicability.--18 Pa.C.S. § 106(b)(8) and (9) (relating to classes of offenses) applies to subsection (i).