1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +00:00

Fix SMS Mapper

This commit is contained in:
Loïc Blot (@U-Exp) 2014-09-12 16:16:32 +02:00
parent ed8d6afb15
commit 43d122a6b8
2 changed files with 4 additions and 6 deletions

View File

@ -74,7 +74,7 @@ class SmsController extends Controller {
// @ TODO: test address and body ? // @ TODO: test address and body ?
} }
$smsMgr = new SmsMgr(); $smsMgr = new SmsMapper();
$smsMgr->saveAll($smsDAtas); $smsMgr->saveAll($smsDAtas);
return "OK"; return "OK";
} }

View File

@ -16,11 +16,9 @@ use \OCP\IDb;
use \OCP\AppFramework\Db\Mapper; use \OCP\AppFramework\Db\Mapper;
class SmsMapper extends Mapper { class SmsMapper extends Mapper {
private $db; public function __construct(IDb $db) {
parent::__construct($db, 'ocsms_smsdatas');
public function __construct(IDb $db) { }
$this->db = $db;
}
// @TODO // @TODO
public function saveAll($smsList) { public function saveAll($smsList) {