- Timestamp:
- 02/24/10 13:28:02 (11 years ago)
- Location:
- trunk/server/www/app/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/www/app/models/request.php
r301 r302 360 360 361 361 // Save the Markdown version to file 362 $ root = $this->field('root');363 file_put_contents( FILES . $root . DS . 'description.txt', $this->data['Request']['description']);362 $path = FILES . $this->field('root') . DS . 'description.txt'; 363 file_put_contents($path, $this->data['Request']['description']); 364 364 } 365 365 -
trunk/server/www/app/models/validator.php
r285 r302 55 55 $this->Request->id = $this->data['Request']['id']; 56 56 $file = $this->Request->getPath(); 57 $destination = $this->data['Request']['path']; 57 58 } else { 58 59 $this->Result->id = $this->data['Result']['id']; 59 60 $file = $this->Result->getPath(); 61 $destination = $this->data['Result']['path']; 60 62 } 61 63 … … 68 70 $validator = new $className(); 69 71 $validator->run($file); 72 73 // Save the validator result to file 74 $destination = FILES . $destination . DS . strtolower($this->data['Validator']['name']) . '-validator.' . $validator->ext; 75 file_put_contents($destination, $validator->response); 76 77 // Save the validator result to the satabase 70 78 $this->data['Validator']['state'] = $validator->state; 71 79 $this->data['Validator']['response'] = $validator->response; … … 87 95 /** @var string Path to validator.pl */ 88 96 private $bin = false; 97 98 /** @var string file extension for the response */ 99 public $ext = 'txt'; 89 100 90 101 /** … … 165 176 public $response = false; 166 177 178 /** @var string file extension for the response */ 179 public $ext = 'html'; 180 167 181 /** 168 182 * Run the validator … … 232 246 /** @var string The validator's full response */ 233 247 public $response = false; 248 249 /** @var string file extension for the response */ 250 public $ext = 'txt'; 234 251 235 252 /**
Note: See TracChangeset
for help on using the changeset viewer.