1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 01:39:28 +02:00

Update code style script with new checks

This commit is contained in:
Afterster 2015-11-18 22:39:49 +01:00
parent bfc68feff0
commit a340c30872
44 changed files with 71 additions and 71 deletions

View file

@ -22,7 +22,7 @@
require_once '../lib/init.php';
if (!Access::check('interface',100) OR AmpConfig::get('demo_mode')) {
if (!Access::check('interface',100) or AmpConfig::get('demo_mode')) {
UI::access_denied();
exit();
}

View file

@ -59,7 +59,7 @@ if ($channel->is_private) {
Preference::init();
if (AmpConfig::get('access_control')) {
if (!Access::check_network('stream',$GLOBALS['user']->id,'25') AND
if (!Access::check_network('stream',$GLOBALS['user']->id,'25') and
!Access::check_network('network',$GLOBALS['user']->id,'25')) {
debug_event('UI::access_denied', "Streaming Access Denied: " . $_SERVER['REMOTE_ADDR'] . " does not have stream level access",'3');
UI::access_denied();

View file

@ -290,7 +290,7 @@ class Access
debug_event('access', 'ZLIB extension not loaded, batch download disabled', 3);
return false;
}
if (AmpConfig::get('allow_zip_download') AND $GLOBALS['user']->has_access('5')) {
if (AmpConfig::get('allow_zip_download') and $GLOBALS['user']->has_access('5')) {
return make_bool(AmpConfig::get('download'));
}
break;

View file

@ -249,7 +249,7 @@ class Album extends database_object implements library_item
public static function build_cache(array $ids)
{
// Nothing to do if they pass us nothing
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -636,19 +636,19 @@ class Art extends database_object
}
// Check and make sure we can resize what you've asked us to
if (($type == 'jpg' OR $type == 'jpeg') AND !(imagetypes() & IMG_JPG)) {
if (($type == 'jpg' or $type == 'jpeg') and !(imagetypes() & IMG_JPG)) {
debug_event('Art','PHP-GD Does not support JPGs - unable to resize',1);
return false;
}
if ($type == 'png' AND !imagetypes() & IMG_PNG) {
if ($type == 'png' and !imagetypes() & IMG_PNG) {
debug_event('Art','PHP-GD Does not support PNGs - unable to resize',1);
return false;
}
if ($type == 'gif' AND !imagetypes() & IMG_GIF) {
if ($type == 'gif' and !imagetypes() & IMG_GIF) {
debug_event('Art','PHP-GD Does not support GIFs - unable to resize',1);
return false;
}
if ($type == 'bmp' AND !imagetypes() & IMG_WBMP) {
if ($type == 'bmp' and !imagetypes() & IMG_WBMP) {
debug_event('Art','PHP-GD Does not support BMPs - unable to resize',1);
return false;
}

View file

@ -196,7 +196,7 @@ class Artist extends database_object implements library_item
*/
public static function build_cache($ids, $extra=false, $limit_threshold = '')
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -321,7 +321,7 @@ class Graph
$myPicture = new CpChart\Classes\pImage($width,$height,$MyData);
/* Turn of Antialiasing */
$myPicture->Antialias = FALSE;
$myPicture->Antialias = false;
/* Draw a background */
$Settings = array("R"=>90, "G"=>90, "B"=>90, "Dash"=>1, "DashR"=>120, "DashG"=>120, "DashB"=>120);
@ -347,14 +347,14 @@ class Graph
$myPicture->setGraphArea(60,40,$width-20,$height-50);
/* Draw the scale */
$scaleSettings = array("XMargin"=>10,"YMargin"=>10,"Floating"=>TRUE,"GridR"=>200,"GridG"=>200,"GridB"=>200,"RemoveSkippedAxis"=>TRUE,"DrawSubTicks"=>FALSE,"Mode"=>SCALE_MODE_START0,"LabelRotation"=>45,"LabelingMethod"=>LABELING_DIFFERENT);
$scaleSettings = array("XMargin"=>10,"YMargin"=>10,"Floating"=>true,"GridR"=>200,"GridG"=>200,"GridB"=>200,"RemoveSkippedAxis"=>true,"DrawSubTicks"=>false,"Mode"=>SCALE_MODE_START0,"LabelRotation"=>45,"LabelingMethod"=>LABELING_DIFFERENT);
$myPicture->drawScale($scaleSettings);
/* Turn on Antialiasing */
$myPicture->Antialias = TRUE;
$myPicture->Antialias = true;
/* Draw the line chart */
$myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
$myPicture->setShadow(true,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
$myPicture->drawLineChart();
/* Write a label over the chart */

View file

@ -345,7 +345,7 @@ class Localplay
{
$data = $this->_player->get();
if (!count($data) OR !is_array($data)) {
if (!count($data) or !is_array($data)) {
debug_event('localplay','Error Unable to get song info, check ' . $this->type . ' controller','1');
return array();
}
@ -365,7 +365,7 @@ class Localplay
$value = int($value);
/* Make sure that it's between 0 and 100 */
if ($value > 100 OR $value < 0) {
if ($value > 100 or $value < 0) {
return false;
}

View file

@ -312,7 +312,7 @@ class Playlist extends playlist_object
*/
private function _update_item($field,$value,$level)
{
if ($GLOBALS['user']->id != $this->user AND !Access::check('interface',$level)) {
if ($GLOBALS['user']->id != $this->user and !Access::check('interface',$level)) {
return false;
}

View file

@ -81,7 +81,7 @@ class Preference extends database_object
$name = self::name_from_id($preference);
$id = $preference;
}
if ($applytoall AND Access::check('interface','100')) {
if ($applytoall and Access::check('interface','100')) {
$user_check = "";
} else {
$user_check = " AND `user`='$user_id'";
@ -91,7 +91,7 @@ class Preference extends database_object
$value = implode(',', $value);
}
if ($applytodefault AND Access::check('interface', '100')) {
if ($applytodefault and Access::check('interface', '100')) {
$sql = "UPDATE `preference` SET `value`='$value' WHERE `id`='$id'";
Dba::write($sql);
}
@ -390,7 +390,7 @@ class Preference extends database_object
*/
public static function load_from_session($uid=-1)
{
if (isset($_SESSION['userdata']['preferences']) && is_array($_SESSION['userdata']['preferences']) AND $_SESSION['userdata']['uid'] == $uid) {
if (isset($_SESSION['userdata']['preferences']) && is_array($_SESSION['userdata']['preferences']) and $_SESSION['userdata']['uid'] == $uid) {
AmpConfig::set_by_array($_SESSION['userdata']['preferences'], true);
return true;
}

View file

@ -540,7 +540,7 @@ class Query
*/
public function reset_base()
{
$this->_state['base'] = NULL;
$this->_state['base'] = null;
} // reset_base
/**

View file

@ -75,7 +75,7 @@ class Rating extends database_object
*/
public static function build_cache($type, $ids)
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -69,7 +69,7 @@ class Tag extends database_object implements library_item
*/
public static function build_cache($ids)
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}
@ -91,7 +91,7 @@ class Tag extends database_object implements library_item
*/
public static function build_map_cache($type, $ids)
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -63,7 +63,7 @@ class Upload
}
$targetdir = realpath($targetdir);
if (strpos($targetdir, $rootdir) === FALSE) {
if (strpos($targetdir, $rootdir) === false) {
debug_event('upload', 'Something wrong with final upload path.', '1');
return self::rerror();
}

View file

@ -302,7 +302,7 @@ class Upnp_Api
#$ndUpdateID = $doc->createElement('UpdateID', (string) mt_rand(); # seems to be ignored by the WDTVL
$ndBrowseResp->appendChild($ndUpdateID);
Return $doc;
return $doc;
}
public static function _musicMetadata($prmPath, $prmQuery = '')

View file

@ -538,7 +538,7 @@ class User extends database_object
$db_results = Dba::read($sql);
if ($row = Dba::fetch_assoc($db_results)) {
$ip = $row['ip'] ? $row['ip'] : NULL;
$ip = $row['ip'] ? $row['ip'] : null;
return $ip;
}
@ -593,7 +593,7 @@ class User extends database_object
Error::add('username', T_('Error Username Required'));
}
if ($data['password1'] != $data['password2'] AND !empty($data['password1'])) {
if ($data['password1'] != $data['password2'] and !empty($data['password1'])) {
Error::add('password', T_("Error Passwords don't match"));
}

View file

@ -64,7 +64,7 @@ class Useractivity extends database_object
*/
public static function build_cache($ids)
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -52,7 +52,7 @@ class Userflag extends database_object
*/
public static function build_cache($type, $ids, $user_id = null)
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -227,7 +227,7 @@ class Video extends database_object implements media, library_item
*/
public static function build_cache($ids=array())
{
if (!is_array($ids) OR !count($ids)) {
if (!is_array($ids) or !count($ids)) {
return false;
}

View file

@ -227,7 +227,7 @@ class XML_Data
foreach ($array as $key=>$value) {
$attribute = '';
// See if the key has attributes
if (is_array($value) AND isset($value['<attributes>'])) {
if (is_array($value) and isset($value['<attributes>'])) {
$attribute = ' ' . $value['<attributes>'];
$key = $value['value'];
}
@ -258,7 +258,7 @@ class XML_Data
*/
public static function tags($tags)
{
if (count($tags) > self::$limit OR self::$offset > 0) {
if (count($tags) > self::$limit or self::$offset > 0) {
$tags = array_splice($tags,self::$offset,self::$limit);
}
@ -294,7 +294,7 @@ class XML_Data
*/
public static function artists($artists)
{
if (count($artists) > self::$limit OR self::$offset > 0) {
if (count($artists) > self::$limit or self::$offset > 0) {
$artists = array_splice($artists,self::$offset,self::$limit);
}
@ -339,7 +339,7 @@ class XML_Data
*/
public static function albums($albums)
{
if (count($albums) > self::$limit OR self::$offset > 0) {
if (count($albums) > self::$limit or self::$offset > 0) {
$albums = array_splice($albums,self::$offset,self::$limit);
}
@ -392,7 +392,7 @@ class XML_Data
*/
public static function playlists($playlists)
{
if (count($playlists) > self::$limit OR self::$offset > 0) {
if (count($playlists) > self::$limit or self::$offset > 0) {
$playlists = array_slice($playlists,self::$offset,self::$limit);
}
@ -427,7 +427,7 @@ class XML_Data
*/
public static function songs($songs,$playlist_data='')
{
if (count($songs) > self::$limit OR self::$offset > 0) {
if (count($songs) > self::$limit or self::$offset > 0) {
$songs = array_slice($songs, self::$offset, self::$limit);
}
@ -512,7 +512,7 @@ class XML_Data
*/
public static function videos($videos)
{
if (count($videos) > self::$limit OR self::$offset > 0) {
if (count($videos) > self::$limit or self::$offset > 0) {
$videos = array_slice($videos,self::$offset,self::$limit);
}

View file

@ -161,7 +161,7 @@ function get_languages()
$full_file = AmpConfig::get('prefix') . '/locale/' . $file;
/* Check to see if it's a directory */
if (is_dir($full_file) AND substr($file,0,1) != '.' AND $file != 'base') {
if (is_dir($full_file) and substr($file,0,1) != '.' and $file != 'base') {
switch ($file) {
case 'af_ZA'; $name = 'Afrikaans'; break; /* Afrikaans */
case 'bg_BG'; $name = '&#x0411;&#x044a;&#x043b;&#x0433;&#x0430;&#x0440;&#x0441;&#x043a;&#x0438;'; break; /* Bulgarian */

View file

@ -36,7 +36,7 @@ Session::_auto_init();
// Set up for redirection on important error cases
$path = get_web_path();
if (isset($_SERVER['HTTP_HOST'])) {
$path = $http_type . $_SERVER['HTTP_HOST'] . $path;
$path = $http_type . $_SERVER['HTTP_HOST'] . $path;
}
// Check to make sure the config file exists. If it doesn't then go ahead and
@ -199,7 +199,7 @@ if (!defined('NO_SESSION') && AmpConfig::get('use_auth')) {
$GLOBALS['user']->fullname = $auth['fullname'];
$GLOBALS['user']->access = intval($auth['access']);
}
if (!$GLOBALS['user']->id AND !AmpConfig::get('demo_mode')) {
if (!$GLOBALS['user']->id and !AmpConfig::get('demo_mode')) {
Auth::logout(session_id());
exit;
}

View file

@ -305,7 +305,7 @@ function install_create_config($download = false)
*/
function install_create_account($username, $password, $password2)
{
if (!strlen($username) OR !strlen($password)) {
if (!strlen($username) or !strlen($password)) {
Error::add('general', T_('No Username/Password specified'));
return false;
}

View file

@ -96,13 +96,13 @@ function update_preference($user_id,$name,$pref_id,$value)
$level_check = "level_" . $name;
/* First see if they are an administrator and we are applying this to everything */
if ($GLOBALS['user']->has_access(100) AND make_bool($_REQUEST[$apply_check])) {
if ($GLOBALS['user']->has_access(100) and make_bool($_REQUEST[$apply_check])) {
Preference::update_all($pref_id,$value);
return true;
}
/* Check and see if they are an admin and the level def is set */
if ($GLOBALS['user']->has_access(100) AND make_bool($_REQUEST[$level_check])) {
if ($GLOBALS['user']->has_access(100) and make_bool($_REQUEST[$level_check])) {
Preference::update_level($pref_id,$_REQUEST[$level_check]);
}

View file

@ -172,7 +172,7 @@ class Catalog_dropbox extends Catalog
$path = $data['path'];
$getchunk = $data['getchunk'];
if (!strlen($apikey) OR !strlen($secret)) {
if (!strlen($apikey) or !strlen($secret)) {
Error::add('general', T_('Error: API Key and Secret Required for Dropbox Catalogs'));
return false;
}

View file

@ -844,7 +844,7 @@ class Catalog_local extends Catalog
public function updateMetadata($media, $sort_pattern='', $rename_pattern='')
{
// Check for patterns
if (!$sort_pattern OR !$rename_pattern) {
if (!$sort_pattern or !$rename_pattern) {
$catalog = Catalog::create_from_id($media->catalog);
$sort_pattern = $catalog->sort_pattern;
$rename_pattern = $catalog->rename_pattern;

View file

@ -145,7 +145,7 @@ class Catalog_remote extends Catalog
return false;
}
if (!strlen($username) OR !strlen($password)) {
if (!strlen($username) or !strlen($password)) {
Error::add('general', T_('Error: Username and Password Required for Remote Catalogs'));
return false;
}

View file

@ -167,7 +167,7 @@ class Catalog_soundcloud extends Catalog
$userid = $data['userid'];
$secret = $data['secret'];
if (!strlen($userid) OR !strlen($secret)) {
if (!strlen($userid) or !strlen($secret)) {
Error::add('general', T_('Error: UserID and Secret Required for SoundCloud Catalogs'));
return false;
}
@ -274,7 +274,7 @@ class Catalog_soundcloud extends Catalog
if ($songs) {
foreach ($songs as $song) {
if ($song->streamable == true && $song->kind == 'track') {
$data = Array();
$data = array();
$data['artist'] = $song->user->username;
$data['album'] = $data['artist'];
$data['title'] = $song->title;

View file

@ -147,7 +147,7 @@ class Catalog_subsonic extends Catalog
return false;
}
if (!strlen($username) OR !strlen($password)) {
if (!strlen($username) or !strlen($password)) {
Error::add('general', T_('Error: Username and Password Required for Subsonic Catalogs'));
return false;
}
@ -221,7 +221,7 @@ class Catalog_subsonic extends Catalog
if ($songs['success']) {
foreach ($songs['data']['directory']['child'] as $song) {
if (is_array($song)) {
$data = Array();
$data = array();
$data['artist'] = html_entity_decode($song['artist']);
$data['album'] = html_entity_decode($song['album']);
$data['title'] = html_entity_decode($song['title']);

View file

@ -433,7 +433,7 @@ class HttpQPlayer
$msg = "GET /$cmd?p=$this->password";
// Foreach our arguments
foreach ($args AS $key => $val) {
foreach ($args as $key => $val) {
$msg = $msg . "&$key=$val";
}

View file

@ -100,10 +100,10 @@ class UPnPDevice
curl_setopt( $ch, CURLOPT_URL, $controlUrl );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $body );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
curl_setopt( $ch, CURLOPT_HEADER, TRUE );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HEADER, true );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
$response = curl_exec( $ch );
curl_close( $ch );

View file

@ -376,7 +376,7 @@ class VlcPlayer
$msg = "GET /requests/$cmd";
// Foreach our arguments
foreach ($args AS $key => $val) {
foreach ($args as $key => $val) {
$msg .= "$key=$val";
}

View file

@ -159,7 +159,7 @@ if (!$share_id) {
// If require session is set then we need to make sure we're legit
if (AmpConfig::get('use_auth') && AmpConfig::get('require_session')) {
if (!AmpConfig::get('require_localnet_session') AND Access::check_network('network',$GLOBALS['user']->id,'5')) {
if (!AmpConfig::get('require_localnet_session') and Access::check_network('network',$GLOBALS['user']->id,'5')) {
debug_event('play', 'Streaming access allowed for local network IP ' . $_SERVER['REMOTE_ADDR'],'5');
} else {
if (!Session::exists('stream', $sid)) {
@ -211,7 +211,7 @@ if (AmpConfig::get('demo_mode') || (!Access::check('interface','25') )) {
that they have enough access to play this mojo
*/
if (AmpConfig::get('access_control')) {
if (!Access::check_network('stream',$GLOBALS['user']->id,'25') AND
if (!Access::check_network('stream',$GLOBALS['user']->id,'25') and
!Access::check_network('network',$GLOBALS['user']->id,'25')) {
debug_event('UI::access_denied', "Streaming Access Denied: " . $_SERVER['REMOTE_ADDR'] . " does not have stream level access",'3');
UI::access_denied();
@ -377,7 +377,7 @@ $browser = new Horde_Browser();
/* If they are just trying to download make sure they have rights
* and then present them with the download file
*/
if ($_GET['action'] == 'download' AND AmpConfig::get('download')) {
if ($_GET['action'] == 'download' and AmpConfig::get('download')) {
debug_event('play', 'Downloading file...', 5);
// STUPID IE
$media_name = str_replace(array('?','/','\\'),"_",$media->f_file);

View file

@ -14,7 +14,7 @@ fi
PHPCSFIXERARGS="fix -v --fixers="
# Mandatory fix
FIXERS1="indentation,linefeed,trailing_spaces,short_tag,braces,controls_spaces,eof_ending,visibility,align_equals,concat_with_spaces"
FIXERS1="indentation,linefeed,trailing_spaces,short_tag,braces,controls_spaces,eof_ending,visibility,align_equals,concat_with_spaces,elseif,line_after_namespace,lowercase_constants,lowercase_keywords"
# Optionnal fix & false positive
#FIXERS2="visibility"

View file

@ -59,7 +59,7 @@ switch ($_REQUEST['action']) {
// Check 'value' with isset because it can null
//(user type a "start with" word and deletes it)
if ($_REQUEST['key'] && (isset($_REQUEST['multi_alpha_filter']) OR isset($_REQUEST['value']))) {
if ($_REQUEST['key'] && (isset($_REQUEST['multi_alpha_filter']) or isset($_REQUEST['value']))) {
// Set any new filters we've just added
$browse->set_filter($_REQUEST['key'], $_REQUEST['multi_alpha_filter']);
$browse->set_catalog($_SESSION['catalog']);

View file

@ -112,7 +112,7 @@ class fs
return array('type'=>'folder', 'content'=> $id);
}
if (is_file($dir)) {
$ext = strpos($dir, '.') !== FALSE ? substr($dir, strrpos($dir, '.') + 1) : '';
$ext = strpos($dir, '.') !== false ? substr($dir, strrpos($dir, '.') + 1) : '';
$dat = array('type' => $ext, 'content' => '');
switch ($ext) {
/*case 'txt':

View file

@ -31,7 +31,7 @@ $results = array();
switch ($_REQUEST['action']) {
case 'random_albums':
$albums = Album::get_random(6);
if (count($albums) AND is_array($albums)) {
if (count($albums) and is_array($albums)) {
ob_start();
require_once AmpConfig::get('prefix') . UI::find_template('show_random_albums.inc.php');
$results['random_selection'] = ob_get_clean();
@ -48,7 +48,7 @@ switch ($_REQUEST['action']) {
break;
case 'random_videos':
$videos = Video::get_random(6);
if (count($videos) AND is_array($videos)) {
if (count($videos) and is_array($videos)) {
ob_start();
require_once AmpConfig::get('prefix') . UI::find_template('show_random_videos.inc.php');
$results['random_video_selection'] = ob_get_clean();

View file

@ -67,7 +67,7 @@ switch ($_REQUEST['action']) {
AmpConfig::set('play_type', $new, true);
}
if (($new == 'localplay' AND $current != 'localplay') OR ($current == 'localplay' AND $new != 'localplay')) {
if (($new == 'localplay' and $current != 'localplay') or ($current == 'localplay' and $new != 'localplay')) {
$results['rightbar'] = UI::ajax_include('rightbar.inc.php');
}

View file

@ -48,7 +48,7 @@ if (!AmpConfig::get('access_control')) {
* Verify the existance of the Session they passed in we do allow them to
* login via this interface so we do have an exception for action=login
*/
if (!Session::exists('api', $_REQUEST['auth']) AND $_REQUEST['action'] != 'handshake' AND $_REQUEST['action'] != 'ping') {
if (!Session::exists('api', $_REQUEST['auth']) and $_REQUEST['action'] != 'handshake' and $_REQUEST['action'] != 'ping') {
debug_event('Access Denied','Invalid Session attempt to API [' . $_REQUEST['action'] . ']','3');
ob_end_clean();
echo XML_Data::error('401', T_('Session Expired'));
@ -68,7 +68,7 @@ if (!Access::check_network('init-api', $username, 5)) {
exit();
}
if ($_REQUEST['action'] != 'handshake' AND $_REQUEST['action'] != 'ping') {
if ($_REQUEST['action'] != 'handshake' and $_REQUEST['action'] != 'ping') {
Session::extend($_REQUEST['auth']);
$GLOBALS['user'] = User::get_from_username($username);
}

View file

@ -485,7 +485,7 @@ $_SESSION['login'] = false;
<iframe name="util_iframe" id="util_iframe" style="display:none;" src="<?php echo $web_path; ?>/util.php"></iframe>
<div id="content" class="content-<?php echo AmpConfig::get('ui_fixed') ? (AmpConfig::get('topmenu') ? 'fixed-topmenu' : 'fixed') : 'float'; ?> <?php echo (($count_temp_playlist || AmpConfig::get('play_type') == 'localplay') ? '' : 'content-right-wild'); echo $isCollapsed ? ' content-left-wild' : ''; ?>">
<?php if (AmpConfig::get('int_config_version') != AmpConfig::get('config_version') AND $GLOBALS['user']->has_access(100)) {
<?php if (AmpConfig::get('int_config_version') != AmpConfig::get('config_version') and $GLOBALS['user']->has_access(100)) {
?>
<div class="fatalerror">
<?php echo T_('Error Config File Out of Date');

View file

@ -118,7 +118,7 @@ if ($client->f_avatar) {
<?php $rowparity = UI::flip_class(); ?>
<dt class="<?php echo $rowparity; ?>"><?php echo T_('Status'); ?></dt>
<dd class="<?php echo $rowparity; ?>">
<?php if ($client->is_logged_in() AND $client->is_online()) {
<?php if ($client->is_logged_in() and $client->is_online()) {
?>
<i style="color:green;"><?php echo T_('User is Online Now');
?></i>

View file

@ -42,7 +42,7 @@ $web_path = AmpConfig::get('web_path');
<script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
<div>
<?php
if ($validation == User::get_validation($username) AND strlen($validation)) {
if ($validation == User::get_validation($username) and strlen($validation)) {
User::activate_user($username);
?>
<h3><?php echo T_('User Activated');

View file

@ -112,7 +112,7 @@
?>
</td>
<?php
if (($libitem->is_logged_in()) AND ($libitem->is_online())) {
if (($libitem->is_logged_in()) and ($libitem->is_online())) {
echo "<td class=\"cel_online user_online\"> &nbsp; </td>";
} elseif ($libitem->disabled == 1) {
echo "<td class=\"cel_online user_disabled\"> &nbsp; </td>";

View file

@ -129,7 +129,7 @@
<?php
}
?>
<?php if ($server_allow = AmpConfig::get('allow_localplay_playback') AND $controller = AmpConfig::get('localplay_controller') AND $access_check = Access::check('localplay','5')) {
<?php if ($server_allow = AmpConfig::get('allow_localplay_playback') and $controller = AmpConfig::get('localplay_controller') and $access_check = Access::check('localplay','5')) {
?>
<?php
// Little bit of work to be done here