Fixed styling, added comments

This commit is contained in:
Saqib Razzaq 2017-01-06 13:31:00 +05:00
parent 8e61765a70
commit 2e35865811

View file

@ -8,7 +8,7 @@
* @author[s]: Arslan Hassan, Fawaz Tahir, Fahad Abbass, Awais Tariq, Saqib Razzaq * @author[s]: Arslan Hassan, Fawaz Tahir, Fahad Abbass, Awais Tariq, Saqib Razzaq
* @copyright: (c) 2008 - 2016 ClipBucket / PHPBucket * @copyright: (c) 2008 - 2016 ClipBucket / PHPBucket
* @notice: Please maintain this section * @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); define("SHOW_COUNTRY_FLAG",TRUE);
@ -5609,6 +5609,11 @@
} }
} }
/**
* Assigns smarty values to an array
* @param : { array } { $vals } { an associative array to assign vals }
*/
function array_val_assign($vals) { function array_val_assign($vals) {
if (is_array($vals)) { if (is_array($vals)) {
$total_vars = count($vals); $total_vars = count($vals);
@ -5675,6 +5680,10 @@
} }
} }
/**
* Allows admin to upload logo via admin area
*/
function upload_logo() { function upload_logo() {
global $Cbucket; global $Cbucket;
$active_template = $Cbucket->configs['template_dir']; $active_template = $Cbucket->configs['template_dir'];
@ -5730,8 +5739,9 @@
}//end AutoLinkUrls }//end AutoLinkUrls
/* /**
* Generates a random characters (strings only) string * Generates a random characters (strings only) string
* @param : { integer } { $length } { length of random string to generate }
*/ */
function charsRandomStr($length = 5) { function charsRandomStr($length = 5) {
@ -5793,17 +5803,18 @@
curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch); curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($code == 200) { if($code == 200) {
$status = true; $status = true;
} else { } else {
$status = false; $status = false;
} }
curl_close($ch); curl_close($ch);
return $status; return $status;
} catch(Exception $e) { } catch(Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n"; echo 'Caught exception: ', $e->getMessage(), "\n";
} }
} }