Merge branch 'master' of https://github.com/arslancb/clipbucket
# Conflicts: # upload/includes/classes/collections.class.php
This commit is contained in:
commit
208d116ec2
17 changed files with 133 additions and 156 deletions
|
@ -1228,7 +1228,7 @@ ALTER TABLE `{tbl_prefix}video` ADD INDEX(`comments_count`);
|
|||
ALTER TABLE `{tbl_prefix}video` ADD INDEX(`last_viewed`);
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `video_files` text(33) NOT NULL;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `re_conv_status` text(33) NOT NULL;
|
||||
#ALTER TABLE `{tbl_prefix}video` ADD `conv_progress` int(33) NOT NULL;
|
||||
ALTER TABLE `{tbl_prefix}video` ADD `conv_progress` TEXT NOT NULL;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ class ClipBucket
|
|||
var $cbinfo = array();
|
||||
var $search_types = array();
|
||||
var $theUploaderDetails = array();
|
||||
# var $version = VERSION;
|
||||
|
||||
/**
|
||||
* All Functions that are called
|
||||
|
@ -209,7 +210,7 @@ class ClipBucket
|
|||
function get_anchor_function_list($place)
|
||||
{
|
||||
//Geting list of functions
|
||||
$list = $this->anchor_function_list[$place];
|
||||
$list = isset($this->anchor_function_list[$place]) ? $this->anchor_function_list[$place] : false;
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
|
@ -1151,18 +1151,18 @@ class cbactions
|
|||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= "playlists.privacy = 'public'";
|
||||
} else {
|
||||
if ( $params[ 'privacy' ] ) {
|
||||
if ( isset($params[ 'privacy' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= " playlists.privacy = '".mysql_clean( $params[ 'privacy' ] )."' ";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $params[ 'category' ] ) {
|
||||
if ( isset($params[ 'category' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= " playlists.category = '".$params[ 'category' ]."' ";
|
||||
}
|
||||
|
||||
if ( $params[ 'include' ] ) {
|
||||
if ( isset($params[ 'include' ]) ) {
|
||||
$ids = is_array( $params[ 'include' ] ) ? $params[ 'include' ] : explode( ',', $params[ 'include' ] );
|
||||
|
||||
if ( is_array( $ids ) and !empty( $ids ) ) {
|
||||
|
@ -1172,7 +1172,7 @@ class cbactions
|
|||
}
|
||||
}
|
||||
|
||||
if ( $params[ 'exclude' ] ) {
|
||||
if ( isset($params[ 'exclude' ]) ) {
|
||||
$ids = is_array( $params[ 'exclude' ] ) ? $params[ 'exclude' ] : explode( ',', $params[ 'exclude' ] );
|
||||
|
||||
if ( is_array( $ids) and !empty( $ids ) ) {
|
||||
|
@ -1182,29 +1182,29 @@ class cbactions
|
|||
}
|
||||
}
|
||||
|
||||
if ( $params[ 'date_span' ] ) {
|
||||
if ( isset($params[ 'date_span' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$column = ( $params[ 'date_span_column' ] ) ? trim( $params[ 'date_span_column' ] ) : 'playlists.date_added';
|
||||
|
||||
$condition .= cbsearch::date_margin( $column, $params['date_span'] );
|
||||
}
|
||||
|
||||
if ( $params[ 'last_update' ] ) {
|
||||
if ( isset($params[ 'last_update' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= cbsearch::date_margin( 'playlists.last_update', $params['last_update'] );
|
||||
}
|
||||
|
||||
if( $params[ 'user' ] ) {
|
||||
if( isset($params[ 'user' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= " playlists.userid = '".$params[ 'user' ]."' ";
|
||||
}
|
||||
|
||||
if ( $params[ 'has_items' ] ) {
|
||||
if ( isset($params[ 'has_items' ]) ) {
|
||||
$condition .= ( $condition ) ? " AND " : "";
|
||||
$condition .= " playlists.total_items > '0' ";
|
||||
}
|
||||
|
||||
if($params['count_only']){
|
||||
if(isset($params['count_only'])){
|
||||
$result = $db->count( cb_sql_table('playlists') , 'playlist_id' );
|
||||
return $result;
|
||||
}
|
||||
|
|
|
@ -71,21 +71,21 @@ class cbpage
|
|||
$limit = NULL;
|
||||
$conds = array();
|
||||
$cond = false;
|
||||
if($params['order'])
|
||||
if(isset($params['order']))
|
||||
{
|
||||
$order = $params['order'];
|
||||
}
|
||||
if($params['limit'])
|
||||
if(isset($params['limit']))
|
||||
{
|
||||
$limit = $params['limit'];
|
||||
}
|
||||
|
||||
if($params['active'])
|
||||
if(isset($params['active']))
|
||||
{
|
||||
$conds[] = " active='".$params['active']."'";
|
||||
}
|
||||
|
||||
if($params['display_only'])
|
||||
if(isset($params['display_only']))
|
||||
{
|
||||
$conds[] = " display='yes' ";
|
||||
}
|
||||
|
|
|
@ -298,16 +298,16 @@ class Collections extends CBCategory
|
|||
|
||||
if(!has_access('admin_access',TRUE) && $p['user'] != userid())
|
||||
$cond .= " ".tbl('collections.active')." = 'yes'";
|
||||
elseif($p['user'] == userid())
|
||||
elseif(isset($p['user']) && $p['user'] == userid())
|
||||
$cond .= " ".tbl('collections.active')." = 'yes'";
|
||||
else
|
||||
{
|
||||
if($p['active'])
|
||||
if(isset($p['active']))
|
||||
{
|
||||
$cond .= " ".tbl('collections.active')." = '".$p['active']."'";
|
||||
}
|
||||
|
||||
if($p['broadcast'])
|
||||
if(isset($p['broadcast']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
|
@ -315,7 +315,7 @@ class Collections extends CBCategory
|
|||
}
|
||||
}
|
||||
|
||||
if($p['category'])
|
||||
if(isset($p['category']))
|
||||
{
|
||||
$get_all = false;
|
||||
if(!is_array($p['category']))
|
||||
|
@ -345,20 +345,21 @@ class Collections extends CBCategory
|
|||
}
|
||||
}
|
||||
|
||||
if($p['date_span'])
|
||||
if(isset($p['date_span']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
$cond .= " ".cbsearch::date_margin("date_added",$p['date_span']);
|
||||
}
|
||||
if($p['type'])
|
||||
|
||||
if(isset($p['type']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
$cond .= " ".tbl('collections.type')." = '".$p['type']."'";
|
||||
}
|
||||
|
||||
if($p['user'])
|
||||
if(isset($p['user']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
|
@ -368,7 +369,7 @@ class Collections extends CBCategory
|
|||
//$cond .=')';
|
||||
}
|
||||
|
||||
if($p['featured'])
|
||||
if(isset($p['featured']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
|
@ -376,7 +377,7 @@ class Collections extends CBCategory
|
|||
}
|
||||
|
||||
//$user_public_upload =
|
||||
if($p['public_upload'])
|
||||
if(isset($p['public_upload']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " OR ";
|
||||
|
@ -386,14 +387,14 @@ class Collections extends CBCategory
|
|||
$cond.=")";
|
||||
}
|
||||
|
||||
if($p['exclude'])
|
||||
if(isset($p['exclude']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
$cond .= " ".tbl('collections.collection_id')." <> '".$p['exclude']."'";
|
||||
}
|
||||
|
||||
if($p['cid'])
|
||||
if(isset($p['cid']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
|
@ -403,7 +404,7 @@ class Collections extends CBCategory
|
|||
|
||||
|
||||
/** Get only with those who have items **/
|
||||
if($p['has_items'] )
|
||||
if(isset($p['has_items']))
|
||||
{
|
||||
if($cond != '')
|
||||
$cond .= " AND ";
|
||||
|
@ -419,12 +420,12 @@ class Collections extends CBCategory
|
|||
|
||||
$title_tag = '';
|
||||
|
||||
if($p['name'])
|
||||
if(isset($p['name']))
|
||||
{
|
||||
$title_tag .= " ".tbl('collections.collection_name')." LIKE '%".$p['name']."%'";
|
||||
}
|
||||
|
||||
if($p['tags'])
|
||||
if(isset($p['tags']))
|
||||
{
|
||||
$tags = explode(",",$p['tags']);
|
||||
if(count($tags)>0)
|
||||
|
@ -455,7 +456,7 @@ class Collections extends CBCategory
|
|||
}
|
||||
|
||||
|
||||
if(!$p['count_only'])
|
||||
if(!isset($p['count_only']))
|
||||
{
|
||||
if($cond != "")
|
||||
$cond .= " AND ";
|
||||
|
@ -467,13 +468,13 @@ class Collections extends CBCategory
|
|||
}
|
||||
|
||||
|
||||
if($p['count_only'])
|
||||
if(isset($p['count_only']))
|
||||
{
|
||||
return $result = $db->count(tbl("collections"),"collection_id",$cond);
|
||||
//echo $db->db_query;
|
||||
}
|
||||
|
||||
if($p['assign'])
|
||||
if(isset($p['assign']))
|
||||
assign($p['assign'],$result);
|
||||
else
|
||||
return $result;
|
||||
|
|
|
@ -192,7 +192,7 @@ class CBPlugin extends ClipBucket
|
|||
}
|
||||
}*/
|
||||
|
||||
return $plug_array;
|
||||
return isset($plug_array) ? $plug_array : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -179,13 +179,13 @@ class CBTemplate {
|
|||
preg_match('/<smarty_version>(.*)<\/smarty_version>/',$content,$smarty_version);
|
||||
|
||||
|
||||
$name = $name[1];
|
||||
$author = $author[1];
|
||||
$version = $version[1];
|
||||
$released = $released[1];
|
||||
$description = $description[1];
|
||||
$min_version = $min_version[1];
|
||||
$smarty_version = $smarty_version[1];
|
||||
$name = isset($name[1]) ? $name[1] : false;
|
||||
$author = isset($author[1]) ? $author[1] : false;
|
||||
$version = isset($version[1]) ? $version[1] : false;
|
||||
$released = isset($released[1]) ? $released[1] : false;
|
||||
$description = isset($description[1]) ? $description[1] : false;
|
||||
$min_version = isset($min_version[1]) ? $min_version[1] : false;
|
||||
$smarty_version = isset($smarty_version[1]) ? $smarty_version[1] : false;
|
||||
|
||||
$website = array('title'=>$website_arr[1],'link'=>$website_arr[2]);
|
||||
|
||||
|
|
|
@ -84,28 +84,7 @@ class userquery extends CBCategory{
|
|||
{
|
||||
$this->userid = $this->sessions['smart_sess']['session_user'];
|
||||
}
|
||||
//$this->level = $sess->get('level');
|
||||
|
||||
//Setting Access
|
||||
//Get list Of permission
|
||||
//$perms = $this->get_permissions();
|
||||
//foreach($perms as $perm)
|
||||
//{
|
||||
// $this->add_access_type($perm['permission_code'],$perm['permission_name']);
|
||||
//}
|
||||
|
||||
/*$this->add_access_type('admin_access','Admin Access');
|
||||
$this->add_access_type('upload_access','Upload Access');
|
||||
$this->add_access_type('channel_access','Channel Access');
|
||||
$this->add_access_type('mod_access','Moderator Access');*/
|
||||
|
||||
//Fetching List Of User Levels
|
||||
/*$levels = $this->get_levels();
|
||||
foreach($levels as $level)
|
||||
{
|
||||
$this->usr_levels[$level['user_level_id']]=$level["user_level_name"];
|
||||
}
|
||||
*/
|
||||
|
||||
$udetails = "";
|
||||
|
||||
if($this->userid)
|
||||
|
@ -124,7 +103,7 @@ class userquery extends CBCategory{
|
|||
//exit();
|
||||
|
||||
//Calling Logout Functions
|
||||
$funcs = $this->init_login_functions;
|
||||
$funcs = isset($this->init_login_functions) ? $this->init_login_functions : false;
|
||||
if(is_array($funcs) && count($funcs)>0)
|
||||
{
|
||||
foreach($funcs as $func)
|
||||
|
@ -295,13 +274,6 @@ class userquery extends CBCategory{
|
|||
|
||||
$log_array['level'] = $level = $udetails['level'];
|
||||
|
||||
//Adding Sessing In Database
|
||||
//$sess->add_session($userid,'logged_in');
|
||||
|
||||
//$sess->set('username',$username);
|
||||
//$sess->set('userid',$userid);
|
||||
|
||||
//Setting Timeout
|
||||
if($remember)
|
||||
$sess->timeout = 86400*REMBER_DAYS;
|
||||
|
||||
|
@ -314,21 +286,6 @@ class userquery extends CBCategory{
|
|||
|
||||
$db->delete(tbl("sessions"),array("session","session_string"),array($sess->id,"guest"));
|
||||
$sess->add_session($userid,'smart_sess',$smart_sess);
|
||||
|
||||
//$sess->set('user_sess',$smart_sess);
|
||||
|
||||
//$sess->set('user_session_key',$udetails['user_session_key']);
|
||||
//$sess->set('user_session_code',$udetails['user_session_code']);
|
||||
|
||||
//local client ip access - only works on linux : is it really useful ??
|
||||
/*$ip = $cblog->get_local_ipv4();
|
||||
|
||||
if( isset($ip['eth0']) ){
|
||||
$ipv = $ip['eth0'];
|
||||
}
|
||||
if( isset($ip['wlan0']) ){
|
||||
$ipv = $ip['wlan0'];
|
||||
}*/
|
||||
|
||||
$ipv = $_SERVER["REMOTE_ADDR"];
|
||||
|
||||
|
@ -1622,7 +1579,7 @@ class userquery extends CBCategory{
|
|||
$thumb = USER_THUMBS_URL.'/'.$file.'-'.$size.'.'.$ext;
|
||||
$thumb_path = $file.'.'.$ext;
|
||||
}
|
||||
elseif(!$thumb)
|
||||
elseif(!isset($thumb) || !$thumb)
|
||||
{
|
||||
$thumb = USER_THUMBS_URL.'/'.$file.'.'.$ext;
|
||||
$thumb_path = "";
|
||||
|
@ -1802,11 +1759,11 @@ class userquery extends CBCategory{
|
|||
}
|
||||
else
|
||||
{
|
||||
$level = $this->udetails['level'];
|
||||
$level = isset($this->udetails['level']) ? $this->udetails['level'] : false;
|
||||
}
|
||||
|
||||
if ( $level == userid() or $level == $this->udetails[ 'level' ] ) {
|
||||
if ( $this->permission ) {
|
||||
if ( isset($this->permission) ) {
|
||||
return $this->permission;
|
||||
}
|
||||
}
|
||||
|
@ -1831,7 +1788,7 @@ class userquery extends CBCategory{
|
|||
$a_results = $access_results[0];*/
|
||||
|
||||
//Now Merging the two arrays
|
||||
$user_level = $result[0];
|
||||
$user_level = isset($result[0]) ? $result[0] : false;
|
||||
//pr($user_level);
|
||||
return $user_level;
|
||||
}
|
||||
|
@ -3892,18 +3849,18 @@ class userquery extends CBCategory{
|
|||
{
|
||||
global $db;
|
||||
|
||||
$limit = $params['limit'];
|
||||
$order = $params['order'];
|
||||
$limit = isset($params['limit']);
|
||||
$order = isset($params['order']);
|
||||
|
||||
$cond = "";
|
||||
if(!has_access('admin_access',TRUE) && !$force_admin)
|
||||
$cond .= " users.usr_status='Ok' AND users.ban_status ='no' ";
|
||||
else
|
||||
{
|
||||
if($params['ban'])
|
||||
if(isset($params['ban']))
|
||||
$cond .= " users.ban_status ='".$params['ban']."'";
|
||||
|
||||
if($params['status'])
|
||||
if(isset($params['status']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .=" AND ";
|
||||
|
@ -3913,17 +3870,17 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Setting Category Condition
|
||||
if(!is_array($params['category']))
|
||||
if(isset($params['category']) && !is_array($params['category']))
|
||||
$is_all = strtolower($params['category']);
|
||||
|
||||
if($params['category'] && $is_all!='all')
|
||||
if(isset($params['category']) && $is_all!='all')
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
||||
$cond .= " (";
|
||||
|
||||
if(!is_array($params['category']))
|
||||
if(isset($params['category']) && !is_array($params['category']))
|
||||
{
|
||||
$cats = explode(',',$params['category']);
|
||||
}else
|
||||
|
@ -3943,7 +3900,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//date span
|
||||
if($params['date_span'])
|
||||
if(isset($params['date_span']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4001,7 +3958,7 @@ class userquery extends CBCategory{
|
|||
}*/
|
||||
|
||||
//FEATURED
|
||||
if($params['featured'])
|
||||
if(isset($params['featured']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4009,7 +3966,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Email
|
||||
if($params['username'])
|
||||
if(isset($params['username']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4017,7 +3974,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Email
|
||||
if($params['email'])
|
||||
if(isset($params['email']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4025,7 +3982,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Exclude Users
|
||||
if($params['exclude'])
|
||||
if(isset($params['exclude']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4033,7 +3990,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Getting specific User
|
||||
if($params['userid'])
|
||||
if(isset($params['userid']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4041,7 +3998,7 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Sex
|
||||
if($params['gender'])
|
||||
if(isset($params['gender']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4049,14 +4006,14 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
//Level
|
||||
if($params['level'])
|
||||
if(isset($params['level']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
$cond .= " users.level = '".$params['level']."' ";
|
||||
}
|
||||
|
||||
if($params['cond'])
|
||||
if(isset($params['cond']))
|
||||
{
|
||||
if($cond!='')
|
||||
$cond .= ' AND ';
|
||||
|
@ -4066,7 +4023,7 @@ class userquery extends CBCategory{
|
|||
|
||||
|
||||
|
||||
if(!$params['count_only'])
|
||||
if(isset($params['count_only']) && !$params['count_only'])
|
||||
{
|
||||
|
||||
$fields = array(
|
||||
|
@ -4095,17 +4052,17 @@ class userquery extends CBCategory{
|
|||
}
|
||||
|
||||
|
||||
if($params['count_only']){
|
||||
if(isset($params['count_only'])){
|
||||
|
||||
//$cond= substr($cond,8);
|
||||
$result = $db->count(tbl('users')." AS users ",'userid',$cond);
|
||||
//echo $cond;
|
||||
//return $result;
|
||||
}
|
||||
if($params['assign'])
|
||||
if(isset($params['assign']))
|
||||
assign($params['assign'],$result);
|
||||
else
|
||||
return $result;
|
||||
return isset($result) ? $result : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @author[s]: Arslan Hassan, Fawaz Tahir, Fahad Abbass, Awais Tariq, Saqib Razzaq
|
||||
* @copyright: (c) 2008 - 2016 ClipBucket / PHPBucket
|
||||
* @notice: Please maintain this section
|
||||
* @modified: March 4th, 2016 ClipBucket 2.8.1
|
||||
* @modified: { January 6th, 2016 } { ClipBucket 2.8.2 } { fixed styling, cleaned notices, added function documentation } { Saqib Razzaq }
|
||||
*/
|
||||
|
||||
define("SHOW_COUNTRY_FLAG",TRUE);
|
||||
|
@ -269,8 +269,8 @@
|
|||
}
|
||||
//for srever thumb files
|
||||
$parts = parse_url($file);
|
||||
parse_str($parts['query'], $query);
|
||||
$get_file_name = $query['src'];
|
||||
$query = isset($query) ? parse_str($parts['query'], $query) : false;
|
||||
$get_file_name = isset($query['src']) ? $query['src'] : false;
|
||||
$path = explode('.',$get_file_name);
|
||||
$server_thumb_name = $path[0];
|
||||
if (!empty($server_thumb_name)) {
|
||||
|
@ -665,10 +665,10 @@
|
|||
function getAd($params) {
|
||||
global $adsObj;
|
||||
$data = '';
|
||||
if($params['style'] || $params['class'] || $params['align'])
|
||||
if(isset($params['style']) || isset($params['class']) || isset($params['align']))
|
||||
$data .= '<div style="'.$params['style'].'" class="'.$params['class'].'" align="'.$params['align'].'">';
|
||||
$data .= ad($adsObj->getAd($params['place']));
|
||||
if($params['style'] || $params['class'] || $params['align'])
|
||||
if(isset($params['style']) || isset($params['class']) || isset($params['align']))
|
||||
$data .= '</div>';
|
||||
return $data;
|
||||
}
|
||||
|
@ -867,8 +867,9 @@
|
|||
*/
|
||||
|
||||
function cbRocks() {
|
||||
define("isCBSecured",TRUE);
|
||||
//echo cbSecured(CB_SIGN);
|
||||
if (!defined('isCBSecured')) {
|
||||
define("isCBSecured",TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1664,7 +1665,7 @@
|
|||
|
||||
function get_form_val($val,$filter=false) {
|
||||
if($filter) {
|
||||
return form_val($_GET[$val]);
|
||||
return isset($_GET[$val]) ? form_val($_GET[$val]) : false;
|
||||
} else {
|
||||
return $_GET[$val];
|
||||
}
|
||||
|
@ -1705,8 +1706,8 @@
|
|||
return $_REQUEST[$val];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function used to return LANG variable
|
||||
*/
|
||||
|
@ -1714,7 +1715,7 @@
|
|||
function lang($var,$sprintf=false) {
|
||||
global $LANG,$Cbucket;
|
||||
$array_str = array( '{title}');
|
||||
$array_replace = array( $Cbucket->configs['site_title'] );
|
||||
$array_replace = array( "Title" );
|
||||
if(isset($LANG[$var])) {
|
||||
$phrase = str_replace($array_str,$array_replace,$LANG[$var]);
|
||||
} else {
|
||||
|
@ -1753,7 +1754,7 @@
|
|||
if(getArrayValue($param, 'assign')=='') {
|
||||
return lang($param['code'],getArrayValue($param, 'sprintf'));
|
||||
} else {
|
||||
assign($param['assign'],lang($param['code'],$param['sprintf']));
|
||||
assign($param['assign'],lang($param['code'],isset($param['sprintf']) ? $param['sprintf'] : false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1816,7 +1817,7 @@
|
|||
return BASEURL.'/search_result.php?category[]='.$params['category'].'&type='.$params['type'];
|
||||
}
|
||||
|
||||
if (SEO!='yes') {
|
||||
if (defined('SEO') && SEO !='yes') {
|
||||
preg_match('/http:\/\//',$ClipBucket->links[$name][0],$matches);
|
||||
if($matches) {
|
||||
$link = $ClipBucket->links[$name][0];
|
||||
|
@ -1824,11 +1825,15 @@
|
|||
$link = BASEURL.'/'.$ClipBucket->links[$name][0];
|
||||
}
|
||||
} else {
|
||||
preg_match('/http:\/\//',$ClipBucket->links[$name][1],$matches);
|
||||
if($matches) {
|
||||
$link = $ClipBucket->links[$name][1];
|
||||
if (isset($ClipBucket->links[$name])) {
|
||||
preg_match('/http:\/\//',$ClipBucket->links[$name][1],$matches);
|
||||
if($matches) {
|
||||
$link = $ClipBucket->links[$name][1];
|
||||
} else {
|
||||
$link = BASEURL.'/'.$ClipBucket->links[$name][1];
|
||||
}
|
||||
} else {
|
||||
$link = BASEURL.'/'.$ClipBucket->links[$name][1];
|
||||
$link = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5637,6 +5642,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns smarty values to an array
|
||||
* @param : { array } { $vals } { an associative array to assign vals }
|
||||
*/
|
||||
|
||||
function array_val_assign($vals) {
|
||||
if (is_array($vals)) {
|
||||
$total_vars = count($vals);
|
||||
|
@ -5702,6 +5712,10 @@
|
|||
return $vid_cond;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows admin to upload logo via admin area
|
||||
*/
|
||||
|
||||
function upload_logo() {
|
||||
global $Cbucket;
|
||||
|
@ -5758,8 +5772,9 @@
|
|||
}//end AutoLinkUrls
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* Generates a random characters (strings only) string
|
||||
* @param : { integer } { $length } { length of random string to generate }
|
||||
*/
|
||||
|
||||
function charsRandomStr($length = 5) {
|
||||
|
@ -5815,23 +5830,24 @@
|
|||
* @return : { boolean } { true or false matching pattern }
|
||||
*/
|
||||
|
||||
function is_url_exist($url){
|
||||
try{
|
||||
function is_url_exist($url) {
|
||||
try {
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
if($code == 200){
|
||||
|
||||
if($code == 200) {
|
||||
$status = true;
|
||||
}else{
|
||||
} else {
|
||||
$status = false;
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
return $status;
|
||||
}catch(Exception $e){
|
||||
} catch(Exception $e) {
|
||||
echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
function config($input) {
|
||||
global $Cbucket;
|
||||
return $Cbucket->configs[$input];
|
||||
return isset($Cbucket->configs[$input]) ? $Cbucket->configs[$input] : false;
|
||||
}
|
||||
|
||||
function get_config($input){ return config($input); }
|
||||
|
|
|
@ -156,9 +156,9 @@ function get_image_file( $params ) {
|
|||
global $cbphoto, $Cbucket;
|
||||
//var_dump($params);
|
||||
$details = $params[ 'details' ];
|
||||
$output = $params[ 'output' ];
|
||||
$output = isset($params[ 'output' ]) ? $params[ 'output' ] : false;
|
||||
$size = $params[ 'size' ];
|
||||
$static = $params['static'];
|
||||
$static = isset($params['static']) ? $params['static'] : false;
|
||||
$default = array( 't', 'm', 'l', 'o' );
|
||||
$thumbs = array();
|
||||
if( !$details ) {
|
||||
|
@ -187,7 +187,7 @@ function get_image_file( $params ) {
|
|||
|
||||
$params[ 'photo' ] = $photo;
|
||||
|
||||
if( count( $Cbucket->custom_get_photo_funcs ) > 0 ) {
|
||||
if( isset($Cbucket->custom_get_photo_funcs) && count( $Cbucket->custom_get_photo_funcs ) > 0 ) {
|
||||
$functions = $Cbucket->custom_get_photo_funcs;
|
||||
foreach( $functions as $func ) {
|
||||
if( function_exists( $func ) ) {
|
||||
|
@ -202,7 +202,7 @@ function get_image_file( $params ) {
|
|||
$path = PHOTOS_DIR;
|
||||
$directory = get_photo_date_folder( $photo );
|
||||
$with_path = $params['with_path'] = ( $params['with_path'] === false ) ? false : true;
|
||||
$with_original = $params[ 'with_orig' ];
|
||||
$with_original = isset($params[ 'with_orig' ]) ? $params[ 'with_orig' ] : false;
|
||||
|
||||
$size = ( !in_array( $size, $default ) or !$size ) ? 't' : $size;
|
||||
|
||||
|
@ -235,9 +235,9 @@ function get_image_file( $params ) {
|
|||
|
||||
if ( empty( $output ) or $output == 'non_html' ) {
|
||||
|
||||
if ( $params[ 'assign' ] and $params[ 'multi' ] ) {
|
||||
if ( isset($params[ 'assign' ]) && isset($params[ 'multi' ]) ) {
|
||||
assign( $params[ 'assign' ], $thumbs );
|
||||
} else if( ( $params[ 'multi' ] ) ) {
|
||||
} else if( ( isset($params[ 'multi' ]) ) ) {
|
||||
return $thumbs;
|
||||
} else {
|
||||
|
||||
|
@ -249,7 +249,7 @@ function get_image_file( $params ) {
|
|||
return get_photo_default_thumb( $size, $output );
|
||||
} else {
|
||||
|
||||
if( $params[ 'assign' ] ) {
|
||||
if( isset($params[ 'assign' ]) ) {
|
||||
assign( $params[ 'assign' ], $return_thumb );
|
||||
} else {
|
||||
return $return_thumb;
|
||||
|
|
|
@ -1913,7 +1913,7 @@
|
|||
$cookie = 'fast_qlist';
|
||||
}
|
||||
|
||||
$raw_cookies = $_COOKIE[$cookie];
|
||||
$raw_cookies = isset($_COOKIE[$cookie]) ? $_COOKIE[$cookie] : false;
|
||||
$clean_cookies = str_replace(array("[","]"), "", $raw_cookies);
|
||||
$vids = explode(",", $clean_cookies);
|
||||
assign("qlist_vids", $vids);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- This Condition is for view photo ajax mode-->
|
||||
{if ($smarty.get['moto'] != 'ajax')}
|
||||
{if (!isset($smarty.get['moto']) || $smarty.get['moto'] != 'ajax')}
|
||||
{include file="$style_dir/global_header.html"}
|
||||
{/if}
|
||||
<body>
|
||||
|
@ -8,7 +8,7 @@
|
|||
{ANCHOR place="cb_floating_box"}
|
||||
{ANCHOR place='premium_button'}
|
||||
<!-- This Condition is added for view photo ajx based request -->
|
||||
{if ($smarty.get['moto'] != 'ajax')}
|
||||
{if (!isset($smarty.get['moto']) || $smarty.get['moto'] != 'ajax')}
|
||||
{include file="$style_dir/header.html"}
|
||||
{/if}
|
||||
<!-- Message -->
|
||||
|
@ -19,7 +19,7 @@
|
|||
{/foreach}
|
||||
|
||||
<!-- This Condition is for view photo ajax mode-->
|
||||
{if ($smarty.get['moto'] != 'ajax')}
|
||||
{if (!isset($smarty.get['moto']) || $smarty.get['moto'] != 'ajax')}
|
||||
{include file="$style_dir/footer.html" }
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<!-- RSS FEEDS -->
|
||||
{rss_feeds link_tag=true}
|
||||
{if $ninja_fighting}
|
||||
{if isset($ninja_fighting)}
|
||||
{ANCHOR place='seo_ninja'}
|
||||
{else}
|
||||
<meta name="keywords" content="{$Cbucket->configs.keywords}">
|
||||
|
@ -39,7 +39,7 @@
|
|||
{*/if*}
|
||||
|
||||
<script src="{$theme}/js/jquery-1.11.3.min.js"></script>
|
||||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<link rel="stylesheet" href="{$baseurl}/styles/global/jquery_ui.css">
|
||||
{else}
|
||||
<link rel="stylesheet" href="{$baseurl}/styles/global/jquery_ui.min.css">
|
||||
|
@ -52,7 +52,7 @@
|
|||
userid = "{userid()}",
|
||||
THIS_PAGE = "{$smarty.const.THIS_PAGE}";
|
||||
</script>
|
||||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<script src="{$theme}/js/custom.js"></script>
|
||||
{else}
|
||||
<script src="{$theme}/js/custom.min.js"></script>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<script src="{$theme}/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="{$theme}/js/ui_plugins.js"></script>
|
||||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<script src="{$baseurl}/js/clipbucket.js"></script>
|
||||
{else}
|
||||
<script src="{$baseurl}/js/clipbucket.min.js"></script>
|
||||
|
@ -78,15 +78,17 @@
|
|||
{assign var=qlist_videos value=get_fast_qlist()}
|
||||
{assign var=litems_count value=$qlist_videos|@count}
|
||||
{if $litems_count >= 1}
|
||||
{assign var=got_qlitems value="yes"}
|
||||
{assign var=got_qlitems value="yes"}
|
||||
{else}
|
||||
{assign var=got_qlitems value="false"}
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
var fastQitems = "{$got_qlitems}";
|
||||
$(document).ready(function(){
|
||||
var quicklist_videos = '{$quicklist}';
|
||||
/*var quicklist_videos = '{$quicklist}';
|
||||
if (quicklist_videos)
|
||||
quicklist_videos_check(quicklist_videos);
|
||||
quicklist_videos_check(quicklist_videos);*/
|
||||
|
||||
loading = '<i class="glyphicon glyphicon-refresh animate-spin"></i> {lang code="loading"}...';
|
||||
$( 'ul#photos li:visible' ).each( function( i ){
|
||||
|
@ -96,7 +98,7 @@
|
|||
var pageNow = "{$smarty.const.THIS_PAGE}";
|
||||
</script>
|
||||
{include file="$style_dir/blocks/quicklist/qlist_main.html"}
|
||||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<script type="text/javascript" src="{$theme}/js/fast_qlist.js"></script>
|
||||
{else}
|
||||
<script type="text/javascript" src="{$theme}/js/fast_qlist.min.js"></script>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
<div class="tab-pane fade in clearfix" id="cb-item-share">
|
||||
<ul class="social-share">
|
||||
<li>
|
||||
<a class="btn-fb icon-facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]={videoLink($photo)|urlencode}&p[images][0]={get_thumb vdetails=$photo}&p[title]={$photo.photo_title|title|urlencode}&p[summary]={$photo.photo_description|description|urlencode}" target="_blank">
|
||||
<a class="btn-fb icon-facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]={videoLink($photo)|urlencode}&p[images][0]={get_photo_file($photo.photo_id,l)}&p[title]={$photo.photo_title|title|urlencode}&p[summary]={$photo.photo_description|description|urlencode}" target="_blank">
|
||||
<span>Facebook</span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<div class="container">
|
||||
<div id="alldata">
|
||||
<div id="allqus">
|
||||
|
|
|
@ -40,7 +40,7 @@ function switchEmbedCode(type)
|
|||
|
||||
|
||||
<!-- Including JS Files-->
|
||||
{if $__devmsgs}
|
||||
{if isset($__devmsgs)}
|
||||
<script type="text/javascript" src="{$baseurl}/js/jquery_plugs/cookie.js"></script>
|
||||
<script type="text/javascript" src="{$baseurl}/js/functions.js"></script>
|
||||
{else}
|
||||
|
|
Loading…
Add table
Reference in a new issue