Files
zoneminder/web/app/Controller/BandwidthController.php
Kyle Johnson e3db6e0edc Moved the zmBandwidth option from a cookie to global Configure:: option
In addition I'm no longer passing this option around, instead calling it
where needed.  This _might_ fix #175 as the variable is being set very early on
in bootstrap.php
2013-10-02 08:09:30 -04:00

21 lines
556 B
PHP

<?php
class BandwidthController extends AppController {
public function index() {
if (!empty($this->request->data)) {
$bandwidth = $this->request->data['Bandwidth']['Bandwidth'];
Configure::write('zmBandwidth', $bandwidth);
$this->set('bandwidth', $bandwidth);
if (Configure::read('zmBandwidth') == $bandwidth) {
$this->Session->setFlash('Successfully updated bandwidth');
} else {
$this->Session->setFlash('Failed to update bandwidth');
}
} else {
$this->set('bandwidth', Configure::read('zmBandwidth'));
}
}
}
?>