| 
					
				 | 
			
			
				@@ -91,21 +91,21 @@ class Core 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				return array('name' => $child['name'], 'score' => $score['score'] ? $score['score'] : 0);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if (!$config_id) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$config = Dever::db('score/config')->one(array('type' => 1));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if (!$config_id) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$config = Dever::db('score/config')->one(array('type' => 1));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			} else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$config = Dever::db('score/config')->one($config_id);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if ($config) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$where = array();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$where['uid'] = $uid;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$where['config_id'] = $config['id'];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				$score = Dever::db('score/user')->one($where);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$config = Dever::db('score/config')->one($config_id);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if ($config) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$where = array();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$where['uid'] = $uid;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$where['config_id'] = $config['id'];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			$score = Dever::db('score/user')->one($where);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				return array('name' => $config['name'], 'score' => $score['score'] ? $score['score'] : 0);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			return array('name' => $config['name'], 'score' => $score['score'] ? $score['score'] : 0);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return false;
 
			 |