Skip to content

Commit

Permalink
order and remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyrot committed Feb 7, 2015
1 parent 48e5a4d commit 61ad29c
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 94 deletions.
25 changes: 10 additions & 15 deletions html.php
Expand Up @@ -22,14 +22,21 @@
class html
{
/**
* Default settings for this script, which can be overridden in the configuration file. These variables should
* all appear in $settings_list[] along with their type.
* Variables listed in $settings_list[] can have their default value overridden in the configuration file.
*/
private $addhtml_foot = '';
private $addhtml_head = '';
private $channel = '';
private $cid = '';
private $color = [
'night' => 'b',
'morning' => 'g',
'afternoon' => 'y',
'evening' => 'r'];
private $datetime = [];
private $estimate = false;
private $history = false;
private $l_total = 0;
private $maxrows = 5;
private $maxrows_people2 = 10;
private $maxrows_people_alltime = 30;
Expand All @@ -38,6 +45,7 @@ class html
private $maxrows_people_year = 10;
private $maxrows_recenturls = 25;
private $minrows = 3;
private $output = '';
private $recenturls_type = 1;
private $rows_domains_tlds = 10;
private $search_user = false;
Expand Down Expand Up @@ -65,19 +73,6 @@ class html
private $stylesheet = 'sss.css';
private $userstats = false;

/**
* Variables that shouldn't be tampered with.
*/
private $color = [
'night' => 'b',
'morning' => 'g',
'afternoon' => 'y',
'evening' => 'r'];
private $datetime = [];
private $estimate = false;
private $l_total = 0;
private $output = '';

public function __construct($settings)
{
/**
Expand Down
3 changes: 1 addition & 2 deletions maintenance.php
Expand Up @@ -24,8 +24,7 @@ class maintenance
use base;

/**
* Default settings for this script, which can be overridden in the configuration file. These variables should
* all appear in $settings_list[] along with their type.
* Variables listed in $settings_list[] can have their default value overridden in the configuration file.
*/
private $rankings = false;
private $settings_list = ['rankings' => 'bool'];
Expand Down
18 changes: 7 additions & 11 deletions nick.php
Expand Up @@ -22,27 +22,20 @@
class nick
{
use base;

/**
* Variables that shouldn't be tampered with.
*/
private $ex_actions_stack = [];
private $ex_exclamations_stack = [];
private $ex_questions_stack = [];
private $ex_uppercased_stack = [];
private $quote_stack = [];
private $topics_objs = [];
private $urls_objs = [];
private $actions = 0;
private $characters = 0;
private $csnick = '';
private $date = '';
private $ex_actions = '';
private $ex_actions_stack = [];
private $ex_exclamations = '';
private $ex_exclamations_stack = [];
private $ex_kicked = '';
private $ex_kicks = '';
private $ex_questions = '';
private $ex_questions_stack = [];
private $ex_uppercased = '';
private $ex_uppercased_stack = [];
private $exclamations = 0;
private $firstseen = '';
private $joins = 0;
Expand Down Expand Up @@ -121,6 +114,7 @@ class nick
private $questions = 0;
private $quits = 0;
private $quote = '';
private $quote_stack = [];
private $s_01 = 0;
private $s_02 = 0;
private $s_03 = 0;
Expand Down Expand Up @@ -174,9 +168,11 @@ class nick
private $slapped = 0;
private $slaps = 0;
private $topics = 0;
private $topics_objs = [];
private $topmonologue = 0;
private $uppercased = 0;
private $urls = 0;
private $urls_objs = [];
private $words = 0;

public function __construct($csnick)
Expand Down
77 changes: 36 additions & 41 deletions parser.php
Expand Up @@ -24,19 +24,45 @@ class parser
use base;

/**
* Default settings for this script, which can be overridden in the configuration file. These variables should
* all appear in $settings_list[] along with their type.
*/
private $settings_list = ['wordtracking' => 'bool'];
private $wordtracking = true;

/**
* Variables that shouldn't be tampered with.
* Variables listed in $settings_list[] can have their default value overridden in the configuration file.
*/
private $hex_latin1supplement = '[\x80-\xFF]';
private $hex_validutf8 = '([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})';
private $l_00 = 0;
private $l_01 = 0;
private $l_02 = 0;
private $l_03 = 0;
private $l_04 = 0;
private $l_05 = 0;
private $l_06 = 0;
private $l_07 = 0;
private $l_08 = 0;
private $l_09 = 0;
private $l_10 = 0;
private $l_11 = 0;
private $l_12 = 0;
private $l_13 = 0;
private $l_14 = 0;
private $l_15 = 0;
private $l_16 = 0;
private $l_17 = 0;
private $l_18 = 0;
private $l_19 = 0;
private $l_20 = 0;
private $l_21 = 0;
private $l_22 = 0;
private $l_23 = 0;
private $l_afternoon = 0;
private $l_evening = 0;
private $l_morning = 0;
private $l_night = 0;
private $l_total = 0;
private $linenum_lastnonempty = 0;
private $newline = '';
private $nicks_objs = [];
private $prevline = '';
private $prevnick = '';
private $settings_list = ['wordtracking' => 'bool'];
private $smileys = [
':)' => 's_01',
';)' => 's_02',
Expand Down Expand Up @@ -88,43 +114,12 @@ class parser
':[' => 's_48',
'>:(' => 's_49',
';o' => 's_50'];
private $streak = 0;
private $urltools;
private $words_objs = [];
private $wordtracking = true;
protected $date = '';
private $l_00 = 0;
private $l_01 = 0;
private $l_02 = 0;
private $l_03 = 0;
private $l_04 = 0;
private $l_05 = 0;
private $l_06 = 0;
private $l_07 = 0;
private $l_08 = 0;
private $l_09 = 0;
private $l_10 = 0;
private $l_11 = 0;
private $l_12 = 0;
private $l_13 = 0;
private $l_14 = 0;
private $l_15 = 0;
private $l_16 = 0;
private $l_17 = 0;
private $l_18 = 0;
private $l_19 = 0;
private $l_20 = 0;
private $l_21 = 0;
private $l_22 = 0;
private $l_23 = 0;
private $l_afternoon = 0;
private $l_evening = 0;
private $l_morning = 0;
private $l_night = 0;
private $l_total = 0;
protected $linenum = 0;
private $linenum_lastnonempty = 0;
private $prevline = '';
private $prevnick = '';
private $streak = 0;

public function __construct($settings)
{
Expand Down
13 changes: 4 additions & 9 deletions sss.php
Expand Up @@ -38,33 +38,28 @@
});

/**
* Class for controlling all main features of the program.
* Class for controlling all features of the program.
*/
class sss
{
/**
* Default settings for this script, which can be overridden in the configuration file. These variables should
* all appear in $settings_list[] along with their type.
* Variables listed in $settings_list[] can have their default value overridden in the configuration file.
*/
private $autolinknicks = true;
private $database = 'sss.db3';
private $logfile_dateformat = '';
private $outputbits = 1;
private $parser = '';
private $settings = [];
private $settings_list = [
'autolinknicks' => 'bool',
'database' => 'string',
'logfile_dateformat' => 'string',
'outputbits' => 'int',
'parser' => 'string',
'timezone' => 'string'];
private $timezone = 'UTC';

/**
* Variables that shouldn't be tampered with.
*/
private $settings = [];
private $settings_list_required = [];
private $timezone = 'UTC';

public function __construct()
{
Expand Down
8 changes: 4 additions & 4 deletions table.php
Expand Up @@ -22,17 +22,17 @@
class table
{
use base;
private $head = '';
private $maxrows = 0;
private $minrows = 0;
private $urltools;
private $cid = '';
private $decimals = 1;
private $head = '';
private $keys = [];
private $maxrows = 0;
private $medium = false;
private $minrows = 0;
private $percentage = false;
private $queries = [];
private $total = 0;
private $urltools;
private $v3a = false;

public function __construct($head, $minrows, $maxrows)
Expand Down
4 changes: 0 additions & 4 deletions topic.php
Expand Up @@ -22,10 +22,6 @@
class topic
{
use base;

/**
* Variables that shouldn't be tampered with.
*/
private $datetime = [];
private $topic = '';

Expand Down
4 changes: 0 additions & 4 deletions url.php
Expand Up @@ -22,10 +22,6 @@
class url
{
use base;

/**
* Variables that shouldn't be tampered with.
*/
private $datetime = [];
private $fqdn = '';
private $tld = '';
Expand Down
4 changes: 0 additions & 4 deletions word.php
Expand Up @@ -22,10 +22,6 @@
class word
{
use base;

/**
* Variables that shouldn't be tampered with.
*/
private $word = '';
private $length = 0;
private $total = 0;
Expand Down

0 comments on commit 61ad29c

Please sign in to comment.