comparison Flag.inc @ 91:1d4c980f4255

Change the way headers are set. Disabled validation for non-html pages.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 18 Oct 2012 00:28:48 +0200
parents b9654b9c4a66
children f468365813c9
comparison
equal deleted inserted replaced
90:aafc23919e79 91:1d4c980f4255
64 function mayCompress() 64 function mayCompress()
65 { 65 {
66 return false; 66 return false;
67 } 67 }
68 68
69 function mayValidate()
70 {
71 return false;
72 }
73
74
69 /** 75 /**
70 * Produce the actual content 76 * Produce the actual content
71 */ 77 */
72 function generateContent() 78 function generateContent()
73 { 79 {
77 if (floatval($flag) < 0) { 83 if (floatval($flag) < 0) {
78 errorPage('Resource not found', 404); 84 errorPage('Resource not found', 404);
79 } 85 }
80 else { 86 else {
81 $flag = new PageContent($flag); 87 $flag = new PageContent($flag);
82 $flag->addHeader("Content-Type: image/png"); 88 $flag->setHeader('Content-Type', 'image/png');
83 return $flag; 89 return $flag;
84 } 90 }
85 } 91 }
86 } 92 }