// ------------ROO HOOKS------------------------------------
function applyFilters($q, $au ,$roo)
{
-
$tn = $this->tableName();
-
// if not empty on_table
if(!empty($q['person_table'])){
$jt = DB_DataObject::factory($q['person_table']);
$this->selectAs($jt, 'person_id_%s', 'join_person_id_id');
+ } else {
+ $jt = DB_DataObject::factory('Person');
+ $this->whereAdd("
+ person_table = '{$jt->tableName()}'
+ OR
+ person_table = ''
+ OR person_table IS NULL"
+ ); // default to our standard.. - unless otherwise requested..
}
$p = empty($_POST) ? array() : $_POST;
foreach(array('passwd', 'password', 'passwd2', 'password2') as $rm) {
if (isset($p[$rm])) {
- $p['passwd'] = '******';
+ $p[$rm] = '******';
}
}
+
+
$i=0;
$files = array();
+
+ $i = 0;
foreach ($_FILES as $k=>$f){
+ // does not handle any other file[] arrary very well..
if (empty($f['tmp_name']) || !file_exists($f['tmp_name'])) {
continue;
}
$i++;
$files[$k] = $f;
- $files[$k]['tmp_name'] = $this->id . '.file_'. $i.'.jpg';
- $nf = $ff->Pman['event_log_dir']. '/'. $this->id . ".file_$i.jpg";
+
+
+ $files[$k]['tmp_name'] = $this->id . '-'. $i;
+ $nf = $ff->Pman['event_log_dir']. '/'. $user. date('/Y/m/d/'). $files[$k]['tmp_name'];
if (!copy($f['tmp_name'], $nf)) {
print_r("failed to copy {$f['tmp_name']}...\n");
}