mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-23 06:13:09 +00:00
First Commit. Datascheme is in tests
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* ownCloud - ocsms
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014
|
||||
*/
|
||||
|
||||
namespace OCA\OcSms\AppInfo;
|
||||
|
||||
|
||||
\OCP\App::addNavigationEntry(array(
|
||||
// the string under which your app will be referenced in owncloud
|
||||
'id' => 'ocsms',
|
||||
|
||||
// sorting weight for the navigation. The higher the number, the higher
|
||||
// will it be listed in the navigation
|
||||
'order' => 10,
|
||||
|
||||
// the route that will be shown on startup
|
||||
'href' => \OCP\Util::linkToRoute('ocsms.page.index'),
|
||||
|
||||
// the icon that will be shown in the navigation
|
||||
// this file needs to exist in img/
|
||||
'icon' => \OCP\Util::imagePath('ocsms', 'app.svg'),
|
||||
|
||||
// the title of your application. This will be used in the
|
||||
// navigation or on the settings page of your app
|
||||
'name' => \OC_L10N::get('ocsms')->t('Oc Sms')
|
||||
));
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* ownCloud - ocsms
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014
|
||||
*/
|
||||
|
||||
namespace OCA\OcSms\AppInfo;
|
||||
|
||||
|
||||
use \OCP\AppFramework\App;
|
||||
|
||||
use \OCA\OcSms\Controller\PageController;
|
||||
|
||||
|
||||
class Application extends App {
|
||||
|
||||
|
||||
public function __construct (array $urlParams=array()) {
|
||||
parent::__construct('ocsms', $urlParams);
|
||||
|
||||
$container = $this->getContainer();
|
||||
|
||||
/**
|
||||
* Controllers
|
||||
*/
|
||||
$container->registerService('PageController', function($c) {
|
||||
return new PageController(
|
||||
$c->query('AppName'),
|
||||
$c->query('Request'),
|
||||
$c->query('UserId')
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<database>
|
||||
<name>*dbname*</name>
|
||||
<create>true</create>
|
||||
<overwrite>false</overwrite>
|
||||
<charset>utf8</charset>
|
||||
|
||||
<table>
|
||||
<name>*dbprefix*ocsms_smsdatas</name>
|
||||
<declaration>
|
||||
<field>
|
||||
<name>id</name>
|
||||
<type>integer</type>
|
||||
<default>0</default>
|
||||
<notnull>true</notnull>
|
||||
<autoincrement>1</autoincrement>
|
||||
<length>10</length>
|
||||
<primary>true</primary>
|
||||
</field>
|
||||
<field>
|
||||
<name>user_id</name>
|
||||
<type>text</type>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>added</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<length>10</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_id</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<length>5</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_address</name>
|
||||
<type>text</type>
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_msg</name>
|
||||
<type>text</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_read</name>
|
||||
<type>boolean</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_date</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<length>10</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>lastmodified</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<length>10</length>
|
||||
</field>
|
||||
</declaration>
|
||||
</table>
|
||||
</database>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<info>
|
||||
<id>ocsms</id>
|
||||
<name>Oc Sms</name>
|
||||
<description>Owncloud SMS app</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Loic Blot</author>
|
||||
<version>0.0.7</version>
|
||||
<requiremin>7</requiremin>
|
||||
</info>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* ownCloud - ocsms
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later. See the COPYING file.
|
||||
*
|
||||
* @author Loic Blot <loic.blot@unix-experience.fr>
|
||||
* @copyright Loic Blot 2014
|
||||
*/
|
||||
|
||||
namespace OCA\OcSms\AppInfo;
|
||||
|
||||
/**
|
||||
* Create your routes in here. The name is the lowercase name of the controller
|
||||
* without the controller part, the stuff after the hash is the method.
|
||||
* e.g. page#index -> PageController->index()
|
||||
*
|
||||
* The controller class has to be registered in the application.php file since
|
||||
* it's instantiated in there
|
||||
*/
|
||||
$application = new Application();
|
||||
|
||||
$application->registerRoutes($this, array('routes' => array(
|
||||
array('name' => 'page#index', 'url' => '/', 'verb' => 'GET'),
|
||||
array('name' => 'page#do_echo', 'url' => '/echo', 'verb' => 'POST'),
|
||||
)));
|
||||
Reference in New Issue
Block a user