Vogel asked the visiting District Court judge to sentence him to 21 days of confinement so he could deal with his drug habit.
The judge agreed, even though the sentence was longer than the legal limit of 15 days in confinement.
Vogel was confined to his cell for 23 hours a day, with only one hour to shower and exercise, and no access to visitors, a telephone, radio or television.
In the High Court, Vogel argued his confinement was in breach of the Bill of Rights Act, which holds that prisoners should be treated with humanity and respect for their inherent dignity.
He also argued he was not regularly visited by doctors and the prison's superintendent, and instead received daily visits from prison guards and nurses, which breached the Penal Institutions Act.
Vogel gave evidence that his mental health had suffered, describing his confinement as stressful and "maddening".
"I think when I came out I was one or two degrees more mad."
The High Court rejected his claim, finding that while his confinement was excessive, it was not disproportionately severe, particularly considering the circumstances in which the sentence was imposed.
Vogel appealed to the Court of Appeal, which found his confinement was in breach of the Bill of Rights Act and the Penal Institutions Act.
"The unlawful sentence had the consequence that Mr Vogel was not treated with humanity and respect for his inherent dignity."
But the court declined to award damages, noting compensation legislation required him to make use of all the complaints mechanisms available to him.
Vogel had requested to meet the Ombudsman, but withdrew the request without explanation and took no further steps.
The court awarded Vogel reimbursement of legal costs, to be set by the High Court.