Search method with structured query support added.
(http://bugs.campware.org/view.php?id=481) (+probably: http://bugs.campware.org/view.php?id=513) +solved: http://bugs.campware.org/view.php?id=522
This commit is contained in:
parent
7259599ce1
commit
0f1625db38
10 changed files with 310 additions and 104 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
Author : $Author: tomas $
|
||||
Version : $Revision: 1.12 $
|
||||
Version : $Revision: 1.13 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/StoredFile.php,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -550,6 +550,9 @@ class StoredFile{
|
|||
*/
|
||||
function _getExt()
|
||||
{
|
||||
$fname = $this->_getFileName();
|
||||
$ext = substr($fname, strrpos($fname, '.')+1);
|
||||
if($ext !== FALSE) return $ext;
|
||||
switch(strtolower($this->mime)){
|
||||
case"audio/mpeg":
|
||||
$ext="mp3"; break;
|
||||
|
@ -611,6 +614,21 @@ class StoredFile{
|
|||
");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mnemonic file name
|
||||
*
|
||||
* @param gunid string, optional, global unique id of file
|
||||
* @return string, see install()
|
||||
*/
|
||||
function _getFileName($gunid=NULL)
|
||||
{
|
||||
if(is_null($gunid)) $gunid = $this->gunid;
|
||||
return $this->dbc->getOne("
|
||||
SELECT name FROM {$this->filesTable}
|
||||
WHERE gunid=x'$gunid'::bigint
|
||||
");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and optionaly create subdirectory in real filesystem for storing
|
||||
* raw media data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue