Browse Source

Housekeeping and bug fixes

biotorrents 4 years ago
parent
commit
8058498b34

+ 56
- 58
classes/config.template View File

@@ -73,7 +73,7 @@ ENV::setPub('SEP', '⸬'); # e.g., News ⸬ BioTorrents.de
73 73
 ENV::setPub('CRUMB', '›'); # e.g., Forums › Board › Thread
74 74
 
75 75
 # The FQDN of your site, e.g., dev.biotorrents.de
76
-( # Old format: ternary
76
+( # Old format
77 77
     !$ENV->DEV
78 78
         ? define('SITE_DOMAIN', 'biotorrents.de') # Production
79 79
         : define('SITE_DOMAIN', 'dev.biotorrents.de') # Development
@@ -90,7 +90,7 @@ ENV::setPub(
90 90
 ENV::setPub('IMAGE_DOMAIN', 'pics.biotorrents.de');
91 91
 
92 92
 # The root of the server, used for includes, e.g., /var/www/html/dev.biotorrents.de/
93
-( # Old format: ternary
93
+( # Old format
94 94
     !$ENV->DEV
95 95
         ? define('SERVER_ROOT', '/var/www/html/biotorrents.de/') # Production
96 96
         : define('SERVER_ROOT', '/var/www/html/dev.biotorrents.de/') # Development
@@ -104,7 +104,7 @@ ENV::setPub(
104 104
 );
105 105
 
106 106
 # Where torrent files are stored, e.g., /var/www/torrents-dev/
107
-( # Old format: ternary
107
+( # Old format
108 108
     !$ENV->DEV
109 109
         ? define('TORRENT_STORE', '/var/www/torrents/') # Production
110 110
         : define('TORRENT_STORE', '/var/www/torrents-dev/') # Development
@@ -125,6 +125,21 @@ ENV::setPub('STATIC_SERVER', '/static/');
125 125
 ENV::setPub('SRI', 'sha384');
126 126
 
127 127
 
128
+/**
129
+ * Tech support
130
+ */
131
+
132
+$TechSupport = [
133
+  'Email' => 'help@biotorrents.de',
134
+  'Subject' => '[TxID '.strtoupper(bin2hex(random_bytes(2))).'] Specific subject line with TxID intact',
135
+  'Body' => 'A detailed description of how you reach the error and the full text of any site messages you may receive.'
136
+];
137
+ENV::setPub(
138
+    'HELP',
139
+    new RecursiveArrayObject($TechSupport)
140
+);
141
+
142
+
128 143
 /**
129 144
  * App keys
130 145
  *
@@ -141,22 +156,16 @@ if (!$ENV->DEV) {
141 156
     ENV::setPriv('ENCKEY', '00000000000000000000000000000000');
142 157
   
143 158
     # Alphanumeric random key. This key must be the argument to schedule.php for the schedule to work
144
-    define('SCHEDULE_KEY', '00000000000000000000000000000000');
145 159
     ENV::setPriv('SCHEDULE_KEY', '00000000000000000000000000000000');
146 160
   
147 161
     # Random key. Used for generating unique RSS auth key
148
-    define('RSS_HASH', '00000000000000000000000000000000');
149 162
     ENV::setPriv('RSS_HASH', '00000000000000000000000000000000');
150 163
 }
151 164
 
152 165
 # Development
153 166
 else {
154 167
     ENV::setPriv('ENCKEY', '00000000000000000000000000000000');
155
-
156
-    define('SCHEDULE_KEY', '00000000000000000000000000000000');
157 168
     ENV::setPriv('SCHEDULE_KEY', '00000000000000000000000000000000');
158
-    
159
-    define('RSS_HASH', '00000000000000000000000000000000');
160 169
     ENV::setPriv('RSS_HASH', '00000000000000000000000000000000');
161 170
 }
162 171
 
@@ -190,32 +199,23 @@ else {
190 199
  */
191 200
 
192 201
 # Ocelot connection, e.g., 0.0.0.0
193
-define('TRACKER_HOST', '0.0.0.0');
194 202
 ENV::setPriv('TRACKER_HOST', '0.0.0.0');
195 203
 
196 204
  # Production
197
- if (!$ENV->DEV) {
198
-     define('TRACKER_PORT', 34000);
199
-     ENV::setPriv('TRACKER_PORT', 34000);
205
+if (!$ENV->DEV) {
206
+    ENV::setPriv('TRACKER_PORT', 34000);
200 207
   
201
-     # Must be 32 alphanumeric characters and match site_password in ocelot.conf
202
-     define('TRACKER_SECRET', '00000000000000000000000000000000');
203
-     ENV::setPriv('TRACKER_SECRET', '00000000000000000000000000000000');
208
+    # Must be 32 alphanumeric characters and match site_password in ocelot.conf
209
+    ENV::setPriv('TRACKER_SECRET', '00000000000000000000000000000000');
204 210
 
205
-     # Must be 32 alphanumeric characters and match report_password in ocelot.conf
206
-     define('TRACKER_REPORTKEY', '00000000000000000000000000000000');
207
-     ENV::setPriv('TRACKER_REPORTKEY', '00000000000000000000000000000000');
208
- }
211
+    # Must be 32 alphanumeric characters and match report_password in ocelot.conf
212
+    ENV::setPriv('TRACKER_REPORTKEY', '00000000000000000000000000000000');
213
+}
209 214
 
210 215
 # Development
211 216
 else {
212
-    define('TRACKER_PORT', 34001);
213 217
     ENV::setPriv('TRACKER_PORT', 34001);
214
-  
215
-    define('TRACKER_SECRET', '00000000000000000000000000000000');
216 218
     ENV::setPriv('TRACKER_SECRET', '00000000000000000000000000000000');
217
-  
218
-    define('TRACKER_REPORTKEY', '00000000000000000000000000000000');
219 219
     ENV::setPriv('TRACKER_REPORTKEY', '00000000000000000000000000000000');
220 220
 }
221 221
 
@@ -254,13 +254,13 @@ if (!$ENV->DEV) {
254 254
 else {
255 255
     define('ANNOUNCE_URLS', [
256 256
       [ # Tier 1
257
-        'https://devtr.biotorrents.de:443',
257
+        'https://trx.biotorrents.de:443',
258 258
       ], [] # Tier 2
259 259
     ]);
260 260
 
261 261
     $AnnounceURLs = [
262 262
       [ # Tier 1
263
-        'https://devtr.biotorrents.de:443',
263
+        'https://trx.biotorrents.de:443',
264 264
       ], [], # Tier 2
265 265
     ];
266 266
     ENV::setPub(
@@ -398,8 +398,6 @@ ENV::setPub('USER_LIMIT', 0);
398 398
 ENV::setPub('STARTING_INVITES', 2);
399 399
 ENV::setPub('STARTING_TOKENS', 2);
400 400
 ENV::setPub('STARTING_UPLOAD', 5368709120);
401
-
402
-define('DONOR_INVITES', 2);
403 401
 ENV::setPub('DONOR_INVITES', 2);
404 402
 
405 403
 # Bonus Points
@@ -426,10 +424,10 @@ ENV::setPub(
426 424
     'PASSWORD_ADVICE',
427 425
     <<<HTML
428 426
     <p>
429
-      Any password of 15 characters or longer will be accepted, but a strong password
427
+      Any password 15 characters or longer is accepted, but a strong password
430 428
       <ul>
431
-        <li>is really a pass<em>phrase</em> with uppercase and lowercase letters and many small words,</li>
432
-        <li>that contains numbers and symbols, including complex Unicode characters like emoji.</li>
429
+        <li>is a pass<em>phrase</em> of mixed case with many small words,</li>
430
+        <li>that contains complex characters including Unicode and emoji.</li>
433 431
       </ul>
434 432
     </p>
435 433
 HTML
@@ -470,21 +468,21 @@ ENV::setPub(
470 468
  */
471 469
 
472 470
 #       Name of class     Class ID (not level)
473
-define('ADMIN',          '1');
474
-define('USER',           '2');
475
-define('MEMBER',         '3');
476
-define('POWER',          '4');
477
-define('ELITE',          '5');
478
-define('LEGEND',         '8');
479
-define('MOD',            '11');
480
-define('SYSOP',          '15');
481
-define('ARTIST',         '19');
482
-define('DONOR',          '20');
483
-define('VIP',            '21');
471
+define('ADMIN', '1');
472
+define('USER', '2');
473
+define('MEMBER', '3');
474
+define('POWER', '4');
475
+define('ELITE', '5');
476
+define('LEGEND', '8');
477
+define('MOD', '11');
478
+define('SYSOP', '15');
479
+define('ARTIST', '19');
480
+define('DONOR', '20');
481
+define('VIP', '21');
484 482
 define('TORRENT_MASTER', '23');
485
-define('POWER_TM',       '24');
486
-define('FLS_TEAM',       '33');
487
-define('FORUM_MOD',      '9001');
483
+define('POWER_TM', '24');
484
+define('FLS_TEAM', '33');
485
+define('FORUM_MOD', '9001');
488 486
 
489 487
 
490 488
 /**
@@ -563,15 +561,15 @@ $AutomatedBadgeIDs = [
563 561
   ],
564 562
 
565 563
   'Posts' => [
566
-    '5'    => 60,
567
-    '10'   => 61,
568
-    '25'   => 62,
569
-    '50'   => 63,
570
-    '100'  => 64,
571
-    '250'  => 65,
572
-    '500'  => 66,
573
-    '1000' => 67,
574
-    '2500' => 68,
564
+    '5'    => 30,
565
+    '10'   => 31,
566
+    '25'   => 32,
567
+    '50'   => 33,
568
+    '100'  => 34,
569
+    '250'  => 35,
570
+    '500'  => 36,
571
+    '1000' => 37,
572
+    '2500' => 38,
575 573
   ]
576 574
 ];
577 575
 ENV::setPub(
@@ -608,7 +606,7 @@ ENV::setPub(
608 606
  *     . $InstanceID;
609 607
  */
610 608
 
611
-$DatabaseFields = [
609
+$DB = [
612 610
   'AccessionNumber' => [
613 611
     'Label' => 'Accession Number',
614 612
     'Selector' => ['DOI' => 'javdb', 'RefSeq' => 'anidb', 'UniProt' => 'ehentai'],
@@ -639,8 +637,8 @@ $DatabaseFields = [
639 637
   # etc.
640 638
 ];
641 639
 ENV::setPub(
642
-    'DBMAP',
643
-    new RecursiveArrayObject($DatabaseFields)
640
+    'META',
641
+    new RecursiveArrayObject($DB)
644 642
 );
645 643
 
646 644
 

+ 1
- 1
classes/script_start.php View File

@@ -303,7 +303,7 @@ if (isset($_COOKIE['session']) && isset($_COOKIE['userid'])) {
303 303
 
304 304
     // Create LoggedUser array
305 305
     $LoggedUser = array_merge($HeavyInfo, $LightInfo, $UserStats);
306
-    $LoggedUser['RSS_Auth'] = md5($LoggedUser['ID'] . RSS_HASH . $LoggedUser['torrent_pass']);
306
+    $LoggedUser['RSS_Auth'] = md5($LoggedUser['ID'] . $ENV->getPriv('RSS_HASH') . $LoggedUser['torrent_pass']);
307 307
 
308 308
     // $LoggedUser['RatioWatch'] as a bool to disable things for users on Ratio Watch
309 309
     $LoggedUser['RatioWatch'] = (

+ 1
- 1
classes/torrent_form.class.php View File

@@ -355,7 +355,7 @@ HTML;
355 355
                   <p id="category_description" class="">
356 356
                   <!-- $Cat->Description will live here -->
357 357
                   Please see the
358
-                  <a href="https://dev.biotorrents.de/wiki.php?action=article&name=categories">Categories Wiki</a>
358
+                  <a href="/wiki.php?action=article&name=categories">Categories Wiki</a>
359 359
                   for details
360 360
                   </p>
361 361
                 </td>

+ 30
- 10
classes/tracker.class.php View File

@@ -20,8 +20,10 @@ class Tracker
20 20
      */
21 21
     public static function update_tracker($Action, $Updates, $ToIRC = false)
22 22
     {
23
+        $ENV = ENV::go();
24
+
23 25
         // Build request
24
-        $Get = TRACKER_SECRET . "/update?action=$Action";
26
+        $Get = $ENV->getPriv('TRACKER_SECRET') . "/update?action=$Action";
25 27
         foreach ($Updates as $Key => $Value) {
26 28
             $Get .= "&$Key=$Value";
27 29
         }
@@ -102,10 +104,13 @@ class Tracker
102 104
      */
103 105
     private static function get_stats($Type, $Params = false)
104 106
     {
105
-        if (!defined('TRACKER_REPORTKEY')) {
107
+        $ENV = ENV::go();
108
+
109
+        if (!defined($ENV->getPriv('TRACKER_REPORTKEY'))) {
106 110
             return false;
107 111
         }
108
-        $Get = TRACKER_REPORTKEY . '/report?';
112
+
113
+        $Get = $ENV->getPriv('TRACKER_REPORTKEY') . '/report?';
109 114
         if ($Type === self::STATS_MAIN) {
110 115
             $Get .= 'get=stats';
111 116
         } elseif ($Type === self::STATS_USER && !empty($Params['key'])) {
@@ -113,10 +118,12 @@ class Tracker
113 118
         } else {
114 119
             return false;
115 120
         }
121
+
116 122
         $Response = self::send_request($Get);
117 123
         if ($Response === false) {
118 124
             return false;
119 125
         }
126
+
120 127
         $Stats = [];
121 128
         foreach (explode("\n", $Response) as $Stat) {
122 129
             list($Val, $Key) = explode(" ", $Stat, 2);
@@ -125,6 +132,7 @@ class Tracker
125 132
         return $Stats;
126 133
     }
127 134
 
135
+
128 136
     /**
129 137
      * Send a request to the tracker
130 138
      *
@@ -135,6 +143,8 @@ class Tracker
135 143
      */
136 144
     private static function send_request($Get, $MaxAttempts = 1, &$Err = false)
137 145
     {
146
+        $ENV = ENV::go();
147
+
138 148
         $Header = "GET /$Get HTTP/1.1\r\nConnection: Close\r\n\r\n";
139 149
         $Attempts = 0;
140 150
         $Sleep = 0;
@@ -152,7 +162,13 @@ class Tracker
152 162
             }
153 163
 
154 164
             // Send request
155
-            $File = fsockopen(TRACKER_HOST, TRACKER_PORT, $ErrorNum, $ErrorString);
165
+            $File = fsockopen(
166
+                $ENV->getPriv('TRACKER_HOST'),
167
+                $ENV->getPriv('TRACKER_PORT'),
168
+                $ErrorNum,
169
+                $ErrorString
170
+            );
171
+            
156 172
             if ($File) {
157 173
                 if (fwrite($File, $Header) === false) {
158 174
                     $Err = "Failed to fwrite()";
@@ -169,6 +185,7 @@ class Tracker
169 185
             while (!feof($File)) {
170 186
                 $Response .= fread($File, 1024);
171 187
             }
188
+
172 189
             $DataStart = strpos($Response, "\r\n\r\n") + 4;
173 190
             $DataEnd = strrpos($Response, "\n");
174 191
             if ($DataEnd > $DataStart) {
@@ -176,17 +193,20 @@ class Tracker
176 193
             } else {
177 194
                 $Data = "";
178 195
             }
196
+
179 197
             $Status = substr($Response, $DataEnd + 1);
180 198
             if ($Status == "success") {
181 199
                 $Success = true;
182 200
             }
183 201
         }
184
-        $Request = array(
185
-      'path' => substr($Get, strpos($Get, '/')),
186
-      'response' => ($Success ? $Data : $Response),
187
-      'status' => ($Success ? 'ok' : 'failed'),
188
-      'time' => 1000 * (microtime(true) - $StartTime)
189
-    );
202
+
203
+        $Request = [
204
+            'path' => substr($Get, strpos($Get, '/')),
205
+            'response' => ($Success ? $Data : $Response),
206
+            'status' => ($Success ? 'ok' : 'failed'),
207
+            'time' => 1000 * (microtime(true) - $StartTime)
208
+        ];
209
+
190 210
         self::$Requests[] = $Request;
191 211
         if ($Success) {
192 212
             return $Data;

+ 2
- 1
sections/feeds/index.php View File

@@ -23,6 +23,7 @@ if (
23 23
     error(400, $NoHTML = true);
24 24
 }
25 25
 
26
+# Initialize
26 27
 require_once 'classes/env.class.php';
27 28
 $ENV = ENV::go();
28 29
 
@@ -45,7 +46,7 @@ if (!$Enabled = $Cache->get_value("enabled_$User")) {
45 46
 }
46 47
 
47 48
 # Check for RSS auth
48
-if (md5($User.RSS_HASH.$_GET['passkey']) !== $_GET['auth'] || (int) $Enabled !== 1) {
49
+if (md5($User.$ENV->getPriv('RSS_HASH').$_GET['passkey']) !== $_GET['auth'] || (int) $Enabled !== 1) {
49 50
     $Feed->open_feed();
50 51
     $Feed->channel('Blocked', 'RSS feed.');
51 52
     $Feed->close_feed();

+ 9
- 1
sections/peerupdate/index.php View File

@@ -1,7 +1,11 @@
1 1
 <?php
2
+#declare(strict_types=1);
3
+
4
+$ENV = ENV::go();
2 5
 
3 6
 // We keep torrent groups cached. However, the peer counts change often, so our solutions are to not cache them for long, or to update them. Here is where we updated them.
4
-if ((!isset($argv[1]) || $argv[1]!=SCHEDULE_KEY) && !check_perms('admin_schedule')) { // authorization, Fix to allow people with perms hit this page.
7
+if ((!isset($argv[1]) || $argv[1]!== $ENV->getPriv('SCHEDULE_KEY'))
8
+&& !check_perms('admin_schedule')) { // auth fix to let people with perms hit this page
5 9
     error(403);
6 10
 }
7 11
 
@@ -50,6 +54,7 @@ $RowNum = 0;
50 54
 $LastGroupID = 0;
51 55
 $UpdatedKeys = $UncachedGroups = 0;
52 56
 list($TorrentID, $GroupID, $Seeders, $Leechers, $Snatches) = $DB->next_record(MYSQLI_NUM, false);
57
+
53 58
 while ($TorrentID) {
54 59
     if ($LastGroupID != $GroupID) {
55 60
         $CachedData = $Cache->get_value("torrent_group_$GroupID");
@@ -62,6 +67,7 @@ while ($TorrentID) {
62 67
         }
63 68
         $LastGroupID = $GroupID;
64 69
     }
70
+
65 71
     while ($LastGroupID == $GroupID) {
66 72
         $RowNum++;
67 73
         if (isset($CachedStats) && is_array($CachedStats[$TorrentID])) {
@@ -72,6 +78,7 @@ while ($TorrentID) {
72 78
             $Changed = true;
73 79
             unset($OldValues);
74 80
         }
81
+
75 82
         if (!($RowNum % $StepSize)) {
76 83
             $DB->query("
77 84
         SELECT *
@@ -84,6 +91,7 @@ while ($TorrentID) {
84 91
         $LastGroupID = $GroupID;
85 92
         list($TorrentID, $GroupID, $Seeders, $Leechers, $Snatches) = $DB->next_record(MYSQLI_NUM, false);
86 93
     }
94
+    
87 95
     if ($Changed) {
88 96
         $Cache->cache_value("torrent_group_$LastGroupID", $CachedData, 0);
89 97
         unset($CachedStats);

+ 1
- 1
sections/requests/take_new_edit.php View File

@@ -190,7 +190,7 @@ if ($NewRequest) {
190 190
       TitleJP = '".db_string($TitleJP??"")."',
191 191
       Image = '".db_string($Image)."',
192 192
       Description = '".db_string($Description)."',
193
-      CatalogueNumber = '".db_string($CatalogueNumber)."',
193
+      CatalogueNumber = '".db_string($CatalogueNumber)."'
194 194
     WHERE ID = $RequestID");
195 195
 
196 196
     // We need to be able to delete artists/tags

+ 5
- 2
sections/schedule/index.php View File

@@ -1,4 +1,7 @@
1 1
 <?php
2
+#declare(strict_types=1);
3
+
4
+$ENV = ENV::go();
2 5
 
3 6
 // This page is run every 15 minutes by cron
4 7
 // todo: See if strict equality will break everything
@@ -31,8 +34,8 @@ function run_all_in($Dir)
31 34
     }
32 35
 }
33 36
 
34
-if ((!isset($_REQUEST['key']) || $_REQUEST['key'] !== SCHEDULE_KEY)
35
-    #&& (!isset($argv[1]) || $argv[1] !== SCHEDULE_KEY)
37
+if ((!isset($_REQUEST['key']) || $_REQUEST['key'] !== $ENV->getPriv('SCHEDULE_KEY'))
38
+    #|| (!isset($argv[1]) || $argv[1] !== $ENV->getPriv('SCHEDULE_KEY'))
36 39
     && !$AS) {
37 40
     error(403);
38 41
 }

+ 33
- 30
sections/tools/managers/ocelot.php View File

@@ -1,51 +1,54 @@
1
-<?
1
+<?php
2
+#declare(strict_types=1);
3
+
4
+$ENV = ENV::go();
5
+
2 6
 $Key = $_REQUEST['key'];
3 7
 $Type = $_REQUEST['type'];
4 8
 
5
-if (($Key != TRACKER_SECRET) || $_SERVER['REMOTE_ADDR'] != TRACKER_HOST) {
6
-  send_irc(DEBUG_CHAN, 'Ocelot Auth Failure '.$_SERVER['REMOTE_ADDR']);
7
-  error(403);
9
+if (($Key !== $ENV->getPriv('TRACKER_SECRET')) || $_SERVER['REMOTE_ADDR'] !== $ENV->getPriv('TRACKER_HOST')) {
10
+    send_irc(DEBUG_CHAN, 'Ocelot Auth Failure '.$_SERVER['REMOTE_ADDR']);
11
+    error(403);
8 12
 }
9 13
 
10 14
 switch ($Type) {
11 15
   case 'expiretoken':
12 16
     if (isset($_GET['tokens'])) {
13
-      $Tokens = explode(',', $_GET['tokens']);
14
-      if (empty($Tokens)) {
15
-        error(0);
16
-      }
17
-      $Cond = $UserIDs = [];
18
-      foreach ($Tokens as $Key => $Token) {
19
-        list($UserID, $TorrentID) = explode(':', $Token);
20
-        if (!is_number($UserID) || !is_number($TorrentID)) {
21
-          continue;
17
+        $Tokens = explode(',', $_GET['tokens']);
18
+        if (empty($Tokens)) {
19
+            error(0);
22 20
         }
23
-        $Cond[] = "(UserID = $UserID AND TorrentID = $TorrentID)";
24
-        $UserIDs[] = $UserID;
25
-      }
26
-      if (!empty($Cond)) {
27
-        $Query = "
21
+        $Cond = $UserIDs = [];
22
+        foreach ($Tokens as $Key => $Token) {
23
+            list($UserID, $TorrentID) = explode(':', $Token);
24
+            if (!is_number($UserID) || !is_number($TorrentID)) {
25
+                continue;
26
+            }
27
+            $Cond[] = "(UserID = $UserID AND TorrentID = $TorrentID)";
28
+            $UserIDs[] = $UserID;
29
+        }
30
+        if (!empty($Cond)) {
31
+            $Query = "
28 32
           UPDATE users_freeleeches
29 33
           SET Expired = TRUE
30 34
           WHERE ".implode(" OR ", $Cond);
31
-        $DB->query($Query);
32
-        foreach ($UserIDs as $UserID) {
33
-          $Cache->delete_value("users_tokens_$UserID");
35
+            $DB->query($Query);
36
+            foreach ($UserIDs as $UserID) {
37
+                $Cache->delete_value("users_tokens_$UserID");
38
+            }
34 39
         }
35
-      }
36 40
     } else {
37
-      $TorrentID = $_REQUEST['torrentid'];
38
-      $UserID = $_REQUEST['userid'];
39
-      if (!is_number($TorrentID) || !is_number($UserID)) {
40
-        error(403);
41
-      }
42
-      $DB->query("
41
+        $TorrentID = $_REQUEST['torrentid'];
42
+        $UserID = $_REQUEST['userid'];
43
+        if (!is_number($TorrentID) || !is_number($UserID)) {
44
+            error(403);
45
+        }
46
+        $DB->query("
43 47
         UPDATE users_freeleeches
44 48
         SET Expired = TRUE
45 49
         WHERE UserID = $UserID
46 50
           AND TorrentID = $TorrentID");
47
-      $Cache->delete_value("users_tokens_$UserID");
51
+        $Cache->delete_value("users_tokens_$UserID");
48 52
     }
49 53
     break;
50 54
 }
51
-?>

+ 2
- 2
sections/upload/upload_handle.php View File

@@ -256,8 +256,8 @@ default:
256 256
             'resolution',
257 257
             '1',
258 258
             'string',
259
-            'Scope must be between 5 and 20 characters.',
260
-            array('maxlength' => 20, 'minlength' => 5)
259
+            'Scope must be between 4 and 20 characters.',
260
+            array('maxlength' => 20, 'minlength' => 4)
261 261
         );
262 262
         
263 263
         # torrents_group.TagList

+ 0
- 13
static/styles/bookish/scss/fonts.scss View File

@@ -27,19 +27,6 @@ header,
27 27
     text-align: center;
28 28
 }
29 29
 
30
-.torrent_form {
31
-    label {
32
-        font-weight: bold;
33
-    }
34
-
35
-    .required {
36
-        &:after {
37
-            color: red;
38
-            content: "*";
39
-        }
40
-    }
41
-}
42
-
43 30
 /* Links */
44 31
 a {
45 32
     color: black;

+ 18
- 1
static/styles/global/scss/fonts.scss View File

@@ -5,7 +5,7 @@ html {
5 5
 }
6 6
 
7 7
 /*
8
- * Classes
8
+ * Spacing classes
9 9
  */
10 10
 
11 11
 .center {
@@ -54,6 +54,23 @@ code br {
54 54
     display: none;
55 55
 }
56 56
 
57
+/*
58
+ * Torrent form
59
+*/
60
+
61
+.torrent_form {
62
+    label {
63
+        font-weight: bold;
64
+    }
65
+
66
+    .required {
67
+        &:after {
68
+            color: red;
69
+            content: "*";
70
+        }
71
+    }
72
+}
73
+
57 74
 /* Good/bad examples on rules pages */
58 75
 .important_text {
59 76
     color: red;

Loading…
Cancel
Save