diff --git a/app.yaml b/app.yaml index aa2d565f1..857fe33a3 100644 --- a/app.yaml +++ b/app.yaml @@ -52,4 +52,4 @@ skip_files: - ^(.*/)?core/configs/.*\.local\.ini$ - ^(.*/)?(\.git|\.idea|\.vagrant|data|docs|env|log|provisioning|site|tests|tmp|utils)/.* - ^(.*/)?(core|modules/.*)/(database/(pgsql|sqlite)|tests)/.* -- ^(.*/)?modules/(archive|batchmake|dicom.*|example|javauploaddownload|metadataextractor|pvw|remoteprocessing|solr|statistics|visualize)/.* +- ^(.*/)?modules/(archive|batchmake|dicom.*|javauploaddownload|metadataextractor|pvw|remoteprocessing|solr|statistics|visualize)/.* diff --git a/modules/example/AppController.php b/modules/example/AppController.php deleted file mode 100644 index 61d1837e8..000000000 --- a/modules/example/AppController.php +++ /dev/null @@ -1,25 +0,0 @@ -view->header = 'Example Module Sample Controller View Action'; - $this->view->sampleList = array('sample 1', 'sample 2', 'sample 3'); - $this->view->json['json_sample'] = 'my_json_sample_value'; - // get userId 1 for now - $userDao = $this->User->load(1); // use a core model - $this->view->wallet = $this->Example_Wallet->createWallet($userDao, '10'); // use a model from this module - $this->view->wallet->setCreditCardCount(3); - } - - /** - * delete Action. - */ - public function deleteAction() - { - $this->view->header = 'Example Module Sample Controller Delete Action'; - } -} diff --git a/modules/example/database/mysql/1.0.0.sql b/modules/example/database/mysql/1.0.0.sql deleted file mode 100644 index bf2531209..000000000 --- a/modules/example/database/mysql/1.0.0.sql +++ /dev/null @@ -1,10 +0,0 @@ --- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. - --- MySQL database for the example module, version 1.0.0 - -CREATE TABLE IF NOT EXISTS `example_wallet` ( - `example_wallet_id` bigint(20) NOT NULL AUTO_INCREMENT, - `user_id` bigint(20) NOT NULL, - `dollars` bigint(20) NOT NULL, - PRIMARY KEY (`example_wallet_id`) -) DEFAULT CHARSET=utf8; diff --git a/modules/example/database/pgsql/1.0.0.sql b/modules/example/database/pgsql/1.0.0.sql deleted file mode 100644 index d7ac61861..000000000 --- a/modules/example/database/pgsql/1.0.0.sql +++ /dev/null @@ -1,12 +0,0 @@ --- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. - --- PostgreSQL database for the example module, version 1.0.0 - -SET client_encoding = 'UTF8'; -SET default_with_oids = FALSE; - -CREATE TABLE IF NOT EXISTS "example_wallet" ( - "example_wallet_id" serial PRIMARY KEY, - "user_id" bigint NOT NULL, - "dollars" bigint NOT NULL -); diff --git a/modules/example/database/sqlite/1.0.0.sql b/modules/example/database/sqlite/1.0.0.sql deleted file mode 100644 index a3690adb9..000000000 --- a/modules/example/database/sqlite/1.0.0.sql +++ /dev/null @@ -1,9 +0,0 @@ --- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. - --- SQLite database for the example module, version 1.0.0 - -CREATE TABLE IF NOT EXISTS "example_wallet" ( - "example_wallet_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - "user_id" INTEGER NOT NULL, - "dollars" INTEGER NOT NULL -); diff --git a/modules/example/database/upgrade/1.0.1.php b/modules/example/database/upgrade/1.0.1.php deleted file mode 100644 index 320039969..000000000 --- a/modules/example/database/upgrade/1.0.1.php +++ /dev/null @@ -1,41 +0,0 @@ -db->query("ALTER TABLE `example_wallet` ADD COLUMN `credit_card_count` int(10) NOT NULL DEFAULT '0';"); - } - - /** Upgrade a PostgreSQL database. */ - public function pgsql() - { - $this->db->query('ALTER TABLE example_wallet ADD COLUMN credit_card_count integer NOT NULL DEFAULT 0;'); - } - - /** Upgrade a SQLite database. */ - public function sqlite() - { - $this->db->query('ALTER TABLE example_wallet ADD COLUMN credit_card_count INTEGER NOT NULL DEFAULT 0;'); - } -} diff --git a/modules/example/models/AppDao.php b/modules/example/models/AppDao.php deleted file mode 100644 index 1dafad1fa..000000000 --- a/modules/example/models/AppDao.php +++ /dev/null @@ -1,26 +0,0 @@ -_name = 'example_wallet'; - $this->_key = 'example_wallet_id'; - - $this->_mainData = array( - 'example_wallet_id' => array('type' => MIDAS_DATA), - 'user_id' => array('type' => MIDAS_DATA), - 'dollars' => array('type' => MIDAS_DATA), - 'credit_card_count' => array('type' => MIDAS_DATA), - 'user' => array( - 'type' => MIDAS_MANY_TO_ONE, - 'model' => 'User', - 'parent_column' => 'user_id', - 'child_column' => 'user_id', - ), - ); - $this->initialize(); // required - } - - /** Create a wallet - * @return WalletDao - */ - public function createWallet($userDao, $dollars) - { - /** @var Example_WalletDao $wallet */ - $wallet = MidasLoader::newDao('WalletDao', 'example'); - $wallet->setUserId($userDao->getKey()); - $wallet->setDollars($dollars); - $this->save($wallet); - - return $wallet; - } -} diff --git a/modules/example/models/dao/WalletDao.php b/modules/example/models/dao/WalletDao.php deleted file mode 100644 index 7cca20585..000000000 --- a/modules/example/models/dao/WalletDao.php +++ /dev/null @@ -1,42 +0,0 @@ -headScript()->appendFile($this->moduleWebroot.'/public/js/sample/example.sample.view.js'); -?> -
'.$this->escape($sample).' |