[jobberbase] r423 committed - changed: because jobs.spotlight must be either 1 or 0, it has now been...

1 view
Skip to first unread message

codesite...@google.com

unread,
Feb 6, 2010, 2:54:55 PM2/6/10
to jobbe...@googlegroups.com
Revision: 423
Author: putyp...@gmail.com
Date: Sat Feb 6 11:54:22 2010
Log: changed: because jobs.spotlight must be either 1 or 0, it has now been
made mandatory (not null in the table) to improve consistency
http://code.google.com/p/jobberbase/source/detail?r=423

Modified:
/trunk/db/jobberbase.sql
/trunk/public/_includes/class.Job.php
/trunk/public/admin/page_edit_post.php
/trunk/public/page_write.php

=======================================
--- /trunk/db/jobberbase.sql Mon Dec 14 09:22:31 2009
+++ /trunk/db/jobberbase.sql Sat Feb 6 11:54:22 2010
@@ -130,7 +130,7 @@
`outside_location` varchar(150) NOT NULL,
`poster_email` varchar(100) NOT NULL,
`apply_online` tinyint(4) NOT NULL,
- `spotlight` tinyint(4) default NULL,
+ `spotlight` tinyint(4) NOT NULL,
PRIMARY KEY (`id`),
KEY `type_id` (`type_id`),
KEY `category_id` (`category_id`)
=======================================
--- /trunk/public/_includes/class.Job.php Thu Feb 4 01:25:45 2010
+++ /trunk/public/_includes/class.Job.php Sat Feb 6 11:54:22 2010
@@ -884,7 +884,7 @@
$params['apply_online'] = 0;
}
$sql = 'INSERT INTO '.DB_PREFIX.'jobs (type_id, category_id, title,
description, company, city_id, url, apply, created_on, is_temp, is_active,
- views_count, auth, outside_location,
poster_email, apply_online)
+ views_count, auth, outside_location,
poster_email, apply_online, spotlight)
VALUES (' . $params['type_id'] . ',
' . $params['category_id'] . ',
"' . $params['title'] . '",
@@ -894,7 +894,8 @@
"' . $params['url'] . '",
"' . $params['apply'] . '",
NOW(), ' . $params['is_temp'] . ', '.
$params['is_active'] .', 0, "' . $this->GenerateAuthCode() . '",
- "' .
$params['location_outside_ro_where'] . '", "' .
$params['poster_email'] . '", ' . $params['apply_online'] . ')';
+ "' .
$params['location_outside_ro_where'] . '", "' .
$params['poster_email'] . '", ' . $params['apply_online'] . '
+ , ' . $params['spotlight'] . ')';
$result = $db->query($sql);
return $db->insert_id;
}
=======================================
--- /trunk/public/admin/page_edit_post.php Thu Feb 4 01:37:34 2010
+++ /trunk/public/admin/page_edit_post.php Sat Feb 6 11:54:22 2010
@@ -127,6 +127,7 @@
// a job posted by the admin is active from the beginning
$data['is_temp'] = 0;
$data['is_active'] = 1;
+ $data['spotlight'] = 0;

$job->Create($data);
}
=======================================
--- /trunk/public/page_write.php Thu Feb 4 01:37:34 2010
+++ /trunk/public/page_write.php Sat Feb 6 11:54:22 2010
@@ -133,7 +133,8 @@
'is_active' => 0,
'apply' => '',
'poster_email' => $poster_email,
- 'apply_online' => $apply_online);
+ 'apply_online' => apply_online,
+ 'spotlight' => 0);

$id = $job->Create($data);

Reply all
Reply to author
Forward
0 new messages