Added : Photos Multiserver option with SubDirectory
Fixed : FFMPEG audio rate problem Fixed : Plugins Embed Code
This commit is contained in:
parent
ef1b86a05c
commit
7913a5c657
6 changed files with 21 additions and 7 deletions
|
@ -44,6 +44,7 @@ switch($mode)
|
|||
$_POST['photo_description'] = genTags(str_replace(array('_','-'),' ',$_POST['photo_description']));
|
||||
$_POST['photo_tags'] = genTags(str_replace(array(' ','_','-'),', ',$_POST['photo_tags']));
|
||||
$_POST['server_url'] = mysql_clean($_POST['server_url']);
|
||||
$_POST['folder'] = str_replace('..','',mysql_clean($_POST['folder']));
|
||||
|
||||
$insert_id = $cbphoto->insert_photo();
|
||||
|
||||
|
|
|
@ -193,7 +193,8 @@ class ffmpeg
|
|||
# audio bitrate
|
||||
if($p['use_audio_rate'])
|
||||
{
|
||||
if($this->input_details['audio_channels']>2 || !is_numeric($this->input_details['audio_channels']))
|
||||
if($this->input_details['audio_channels']>2 || !is_numeric($this->input_details['audio_channels'])
|
||||
&& is_numeric($i['audio_rate']))
|
||||
{
|
||||
$arate = $i['audio_rate'];
|
||||
$opt_av .= $arate_cmd = " -ar $arate ";
|
||||
|
|
|
@ -1226,6 +1226,12 @@ class CBPhotos
|
|||
$query_val[] = $array['server_url'];
|
||||
}
|
||||
|
||||
if($array['folder'] && $array['folder'] != "undefined")
|
||||
{
|
||||
$query_field[] = "file_directory";
|
||||
$query_val[] = $array['folder'];
|
||||
}
|
||||
|
||||
$insert_id = $db->insert(tbl($this->p_tbl),$query_field,$query_val);
|
||||
$photo = $this->get_photo($insert_id);
|
||||
$this->collection->add_collection_item($insert_id,$photo['collection_id']);
|
||||
|
|
|
@ -912,16 +912,21 @@ class CBvideo extends CBCategory
|
|||
$embed_code = false;
|
||||
|
||||
$funcs = $this->embed_func_list;
|
||||
|
||||
if(is_array($funcs))
|
||||
{
|
||||
foreach($funcs as $func)
|
||||
{
|
||||
if(@function_exists($func))
|
||||
$embed_code = $func($vdetails);
|
||||
|
||||
if($embed_code)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!$embed_code)
|
||||
{
|
||||
|
||||
|
|
|
@ -1066,7 +1066,7 @@
|
|||
{
|
||||
$disallow_array = array
|
||||
('of','is','no','on','off','a','the','why','how','what','in');
|
||||
if(!in_array($tag,$disallow_array))
|
||||
if(!in_array($tag,$disallow_array) && strlen($tag)>2)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -1076,7 +1076,7 @@
|
|||
/**
|
||||
* FUNCTION USED TO GET CATEGORY LIST
|
||||
*/
|
||||
function getCategoryList($params)
|
||||
function getCategoryList($params=false)
|
||||
{
|
||||
global $cats;
|
||||
$cats = "";
|
||||
|
|
|
@ -269,7 +269,7 @@ function QueueLimitError(message,fade)
|
|||
$("#QueueError").delay(5000).fadeOut('slow');
|
||||
}
|
||||
|
||||
function insertAjaxPhoto(ID,filename,extension,server_url)
|
||||
function insertAjaxPhoto(ID,filename,extension,server_url,folder)
|
||||
{
|
||||
|
||||
var photoFields = $("#Form"+ID).serialize();
|
||||
|
@ -277,7 +277,8 @@ function insertAjaxPhoto(ID,filename,extension,server_url)
|
|||
url : baseurl+'/actions/photo_uploader.php',
|
||||
type : 'POST',
|
||||
dataType : 'json',
|
||||
data : photoFields+"&filename="+filename+"&ext="+extension+"&insertPhoto=yes&server_url="+server_url,
|
||||
data : photoFields+"&filename="+filename+"&ext="+extension+"&insertPhoto=yes&server_url="+server_url+
|
||||
"&folder="+folder,
|
||||
beforeSend : function()
|
||||
{
|
||||
$("#cbSubmitUpload"+ID).html(ajaxImage+lang.savingData).attr('disabled','disabled');
|
||||
|
@ -424,7 +425,7 @@ $(document).ready(function() {
|
|||
var resObj = $.parseJSON(response);
|
||||
if(resObj.success == "yes")
|
||||
{
|
||||
insertAjaxPhoto(ID,resObj.filename,resObj.extension,resObj.server_url);
|
||||
insertAjaxPhoto(ID,resObj.filename,resObj.extension,resObj.server_url,resObj.folder);
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue