projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hide popup message if failure is handled - not sure what knock on effect this may...
[Pman.Core]
/
DataObjects
/
Core_project.php
diff --git
a/DataObjects/Core_project.php
b/DataObjects/Core_project.php
index
e25dc1b
..
92c202e
100644
(file)
--- a/
DataObjects/Core_project.php
+++ b/
DataObjects/Core_project.php
@@
-33,7
+33,7
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
###END_AUTOCODE
function getProjectManagers()
{
###END_AUTOCODE
function getProjectManagers()
{
- $c = DB_DataObject::factory('
Companies
');
+ $c = DB_DataObject::factory('
core_company
');
$c->isOwner = 1;
if (!$c->find(true)) {
return array();
$c->isOwner = 1;
if (!$c->find(true)) {
return array();
@@
-57,7
+57,7
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
}
$ret = array();
}
$ret = array();
- $p = DB_DataObject::factory('
P
erson');
+ $p = DB_DataObject::factory('
core_p
erson');
$p->whereAdd('id IN ('. implode(',', $pmids) .')');
$p->find();
while ($p->fetch()) {
$p->whereAdd('id IN ('. implode(',', $pmids) .')');
$p->find();
while ($p->fetch()) {
@@
-87,13
+87,18
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
*
*/
*
*/
- function applyFilters($q, $au)
+ function applyFilters($q, $au
, $roo
)
{
$tn = $this->tableName();
if (!empty($q['query']['project_search'])) {
$s = $this->escape($q['query']['project_search']);
{
$tn = $this->tableName();
if (!empty($q['query']['project_search'])) {
$s = $this->escape($q['query']['project_search']);
- $this->whereAdd(" ({$tn}.code LIKE '$s%') OR ({$tn}.name LIKE '%$s%')");
+ $this->whereAdd(" ({$tn}.code LIKE '$s%')
+ OR
+ ({$tn}.name LIKE '%$s%')
+ OR
+ join_client_id_id.name LIKE '%$s%'
+ ");
}
// types of project to list ... - default is only the open ones...
if (!empty($q['query']['project_indaterange'])) {
}
// types of project to list ... - default is only the open ones...
if (!empty($q['query']['project_indaterange'])) {
@@
-109,7
+114,9
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
}
}
}
}
- if (empty($q['query']['project_filter']) || $q['query']['project_filter'] != 'ALL') {
+ if (empty($q['_is_update_request']) &&
+
+ (empty($q['query']['project_filter']) || $q['query']['project_filter'] != 'ALL')) {
$pf = empty($q['query']['project_filter']) ? 'P,N,U' : $q['query']['project_filter'];
$pf = empty($q['query']['project_filter']) ? 'P,N,U' : $q['query']['project_filter'];
@@
-151,7
+158,7
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
// DB_DataObjecT::debuglevel(1);
$this->selectAdd();
$this->selectAdd('distinct(client_id)');
// DB_DataObjecT::debuglevel(1);
$this->selectAdd();
$this->selectAdd('distinct(client_id)');
- $this->selectAs(DB_DataObject::factory('
Companies
'), 'client_id_%s','join_client_id_id');
+ $this->selectAs(DB_DataObject::factory('
core_company
'), 'client_id_%s','join_client_id_id');
$this->groupBy('client_id');
}
$this->groupBy('client_id');
}
@@
-168,7
+175,7
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
}
}
- function onInsert()
+ function onInsert(
$request,$roo
)
{
$oo = clone($this);
if (empty($this->code)) {
{
$oo = clone($this);
if (empty($this->code)) {
@@
-179,7
+186,7
@@
class Pman_Core_DataObjects_Core_project extends DB_DataObject
}
}
}
}
- function onUpdate($old)
+ function onUpdate($old
, $request, $roo
)
{
$oo = clone($this);
if (empty($this->code)) {
{
$oo = clone($this);
if (empty($this->code)) {