Initial import of old legacy Zynapse Framework,

untouched since early 2008.
This commit is contained in:
2010-02-25 00:16:53 +02:00
commit 45aceab6b5
100 changed files with 7685 additions and 0 deletions

41
app/models/page.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
class Page extends ActiveRecord {
public $has_many = 'comments';
public $has_and_belongs_to_many = 'categories';
// public $has_many = array(
// 'comments' => array(
// 'class_name' => 'Comment',
// 'foreign_key' => 'page_id',
// 'conditions' => array('is_public' => 1),
// ),
// );
// public $table_name = 'whatever';
// public $primary_key = 'id';
// public $type = 'mysql';
// public $host = 'db.domain.com';
// public $database = 'librarious_db';
// public $username = 'root';
// public $password = '';
// public $persistent = false;
// public $table_prefix = 'znap_';
// public $table_name = 'collection';
function validate_title () {
if ( $this->title == '' ) {
$this->error_title = 'Title can not be empty.';
}
}
}
?>