You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
544 B
PHP
22 lines
544 B
PHP
<?php
|
|
|
|
namespace OCA\Office;
|
|
|
|
class Session {
|
|
public static function getSession($id){
|
|
$query = \OCP\DB::prepare('SELECT * FROM `*PREFIX*office_session` WHERE `es_id`= ?');
|
|
$result = $query->execute(array($id));
|
|
return $result->fetchRow();
|
|
}
|
|
|
|
public function setMockSession(){
|
|
$query = \OCP\DB::prepare('INSERT INTO `*PREFIX*office_session` (`es_id`, `genesis_url`, `genesis_hash`, `owner`) VALUES (?, ?, ?, ?) ');
|
|
$result = $query->execute(array(
|
|
'dev0',
|
|
'/welcome.odt',
|
|
'0xdeadbeef',
|
|
\OCP\User::getUser()
|
|
));
|
|
}
|
|
}
|