Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
c61f5d1972
6 changed files with 18 additions and 28 deletions
|
@ -73,13 +73,12 @@ class Application_Model_Datatables
|
|||
$orig2searchTerm[$index] = $d;
|
||||
}
|
||||
}
|
||||
// map that maps current column position to original position
|
||||
$current2orig = $librarySetting['ColReorder'];
|
||||
|
||||
// map that maps dbname to searchTerm
|
||||
$dbname2searchTerm = array();
|
||||
foreach ($current2dbname as $currentPos=>$dbname) {
|
||||
$dbname2searchTerm[$dbname] = $orig2searchTerm[$current2orig[$currentPos]];
|
||||
$dbname2searchTerm[$dbname] =
|
||||
$orig2searchTerm[$librarySetting($currentPos)];
|
||||
}
|
||||
|
||||
$where = array();
|
||||
|
|
|
@ -1130,6 +1130,13 @@ class Application_Model_Preference
|
|||
|
||||
public static function getCurrentLibraryTableSetting()
|
||||
{
|
||||
return unserialize(self::getValue("library_datatable"));
|
||||
$v = self::getValue("library_datatable");
|
||||
if( $v === '' ) {
|
||||
return function ($x) { return $x; };
|
||||
} else {
|
||||
$ds = unserialize($v);
|
||||
return function ($x) use ($ds) { return $ds['ColReorder'][$x]; } ;
|
||||
}
|
||||
//return unserialize(self::getValue("library_datatable"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Common {
|
||||
|
||||
public static function setTimeInSub($row, $col, $time)
|
||||
{
|
||||
$class = get_class($row).'Peer';
|
||||
|
||||
$con = Propel::getConnection($class::DATABASE_NAME);
|
||||
|
||||
$sql = 'UPDATE '.$class::TABLE_NAME
|
||||
. ' SET '.$col.' = :f1'
|
||||
. ' WHERE ' .$class::ID. ' = :p1';
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':f1', $time);
|
||||
$stmt->bindValue(':p1', $row->getDbId());
|
||||
$stmt->execute();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue