Moving to Git - Re-add modules as submodules, upgrade Kohana version

This commit is contained in:
Daniel15 2011-01-16 15:53:12 +11:00
parent 7071b70279
commit 2a4a5681a8
10 changed files with 46 additions and 5 deletions

12
.gitmodules vendored
View File

@ -1,3 +1,15 @@
[submodule "system"]
path = system
url = https://github.com/kohana/core.git
[submodule "modules/auth"]
path = modules/auth
url = https://github.com/kohana/auth.git
[submodule "modules/database"]
path = modules/database
url = https://github.com/kohana/database.git
[submodule "modules/orm"]
path = modules/orm
url = https://github.com/kohana/orm.git
[submodule "modules/pagination"]
path = modules/pagination
url = https://github.com/kohana/pagination.git

View File

@ -1,7 +1,7 @@
<?php
defined('SYSPATH') or die('No direct script access.');
class Date
class Date extends Kohana_Date
{
/**
* Format a date using the user's timezone

View File

@ -144,7 +144,7 @@ class Model_Url extends ORM
$records = $records->execute($this->_db)
->get('records_found');
$this->_reset();
//$this->_reset();
// Return the total number of records in a table
return $records;

View File

@ -3,6 +3,31 @@ defined('SYSPATH') or die('No direct access allowed.');
class Model_User extends Model_Auth_User
{
// Validation rules
protected $_rules = array(
'username' => array(
'not_empty' => NULL,
// Changed the min_length
'min_length' => array(1),
'max_length' => array(32),
'regex' => array('/^[-\pL\pN_.]++$/uD'),
),
'password' => array(
'not_empty' => NULL,
'min_length' => array(5),
'max_length' => array(42),
),
'password_confirm' => array(
'matches' => array('password'),
),
'email' => array(
'not_empty' => NULL,
'min_length' => array(4),
'max_length' => array(127),
'email' => NULL,
),
);
protected $_has_many = array
(
'user_tokens' => array('model' => 'user_token'),

1
modules/auth Submodule

@ -0,0 +1 @@
Subproject commit 653963a21292365447925f9b32826154fa86969c

1
modules/database Submodule

@ -0,0 +1 @@
Subproject commit 5b522aebc59b1ae77481db5b89502b495770097b

1
modules/orm Submodule

@ -0,0 +1 @@
Subproject commit 7edd666dc248c9521aff9730d2883a0f89347418

1
modules/pagination Submodule

@ -0,0 +1 @@
Subproject commit eceed49f290ebb632d11dfb4f1f1adc0f6f2eeff

2
system

@ -1 +1 @@
Subproject commit 29fa43354cd2335da507c9fe7557f8100008ebd6
Subproject commit c8c10189dcffeb3ffe997ad69766e9320d86eb76

View File

@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS `hits` (
`browser_version` varchar(10) NOT NULL,
`ip_address` varchar(15) NOT NULL,
`country` char(2) NOT NULL,
`referrer` text NOT NULL,
`referrer` text NULL,
`referrer_domain` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `url_id` (`url_id`)
@ -105,7 +105,7 @@ CREATE TABLE IF NOT EXISTS `urls` (
`url_domain` varchar(255) NOT NULL,
`created_date` int(11) unsigned NOT NULL,
`created_ip` varchar(15) NOT NULL,
`created_ip2` varchar(100) NOT NULL,
`created_ip2` varchar(100) NULL,
`complaints` int(11) NOT NULL DEFAULT '0',
`last_complaint` int(11) unsigned DEFAULT NULL,
`last_check` int(11) unsigned DEFAULT NULL,