PowerPress Podcasting plugin by Blubrry - Version 8.2

Version Description

  • Released 2/10/2020
  • Eliminated Episode tab--whole episode box appears
  • New interface with multiple tabs and cleaner, clearer settings
  • Media link is now verified automatically
  • Updated id3 library to be compatible with PHP 7.4
Download this release

Release Info

Developer benbeecroft
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 8.2
Comparing to
See all releases

Code changes from version 8.1.2 to 8.2

css/episode-box.css ADDED
@@ -0,0 +1,1059 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* pp-tooltip container */
2
+ div[class^="pp-tooltip"] {
3
+ position: relative;
4
+ display: inline-block;
5
+ background-color: #dadada;
6
+ color: white;
7
+ padding: 1px 6px 1px 6px;
8
+ border-radius: 9px;
9
+ width: 6px;
10
+ height: 16px;
11
+ text-align: center;
12
+ font-family: Roboto, serif;
13
+ }
14
+
15
+ /* pp-tooltip text */
16
+ div[class^="pp-tooltip"] .text-pp-tooltip {
17
+ position: absolute;
18
+ visibility: hidden;
19
+ min-width: 300px;
20
+ background-color: #3e3f42;
21
+ color: #fff;
22
+ text-align: center;
23
+ padding: 5px;
24
+ border-radius: 6px;
25
+ z-index: 1;
26
+ font-family: Roboto, sans-serif;
27
+ top: -100%;
28
+ }
29
+
30
+ .pp-tooltip-left .text-pp-tooltip {
31
+ right: 1%;
32
+ margin-right: 120%;
33
+ }
34
+
35
+ .pp-tooltip-right .text-pp-tooltip {
36
+ margin-left: -5px;
37
+ border-width: 5px;
38
+ left: 150%;
39
+ }
40
+
41
+ /* Show the pp-tooltip text when you mouse over the pp-tooltip container */
42
+ div[class^="pp-tooltip"]:hover .text-pp-tooltip {
43
+ visibility: visible;
44
+ }
45
+
46
+ /* arrow on pp-tooltip */
47
+ div[class^="pp-tooltip"] .text-pp-tooltip::after {
48
+ content: " ";
49
+ position: absolute;
50
+ border-width: 5px;
51
+ border-style: solid;
52
+ top: 50%;
53
+ }
54
+
55
+ .pp-tooltip-left .text-pp-tooltip::after {
56
+ border-color: transparent transparent transparent #3e3f42;
57
+ right: -3%;
58
+ }
59
+
60
+ .pp-tooltip-right .text-pp-tooltip::after {
61
+ border-color: transparent #3e3f42 transparent transparent;
62
+ left: -3%;
63
+ }
64
+
65
+ /* Style the tab */
66
+ .pp-tab {
67
+ font-size: 16px;
68
+ overflow: hidden;
69
+ border-bottom: 1px solid #EFEFEF;
70
+ width: 100%;
71
+ }
72
+
73
+ /* Style the buttons that are used to open the tab content */
74
+ .pp-tab button {
75
+ background-color: inherit;
76
+ float: left;
77
+ border: none;
78
+ outline: none;
79
+ cursor: pointer;
80
+ padding: 3vh 0;
81
+ margin: 0 3%;
82
+ transition: 0.3s;
83
+ width: 19%;
84
+ }
85
+
86
+ /* Change background color of buttons on hover */
87
+ .pp-tab button:hover {
88
+ background-color: #ddd;
89
+ }
90
+
91
+ /* Create an active/current tablink class */
92
+ .pp-tab button.active {
93
+ border-bottom: 3px solid #1a6deb;
94
+ font-weight: bold;
95
+ }
96
+
97
+ .pp-tabcontent {
98
+ margin: 0 14px 14px 14px;
99
+ }
100
+
101
+ .pp-metamarks-row {
102
+ margin-top: 3em;
103
+ margin-left: 1em;
104
+ position: relative;
105
+ width: 90%;
106
+ box-shadow: inset 0 0 0 1px #EAEDF3;
107
+ border: 1px solid #EAEDF3;
108
+ border-radius: 4px;
109
+ }
110
+ .pp-metamarks-row input {
111
+ vertical-align:top;
112
+ }
113
+ .pp-metamarks-row input.pp-metamark-link {
114
+ }
115
+ .pp-metamarks-row select {
116
+ vertical-align:top;
117
+ }
118
+ .pp-metamarks-row textarea {
119
+ height: 50px;
120
+ resize: none;
121
+ }
122
+ .pp-metamark-delete a {
123
+ margin: 4px 0pt 0pt -2px;
124
+ cursor: pointer;
125
+ width: 10px;
126
+ height: 10px;
127
+ text-indent: -9999px;
128
+ overflow: hidden;
129
+ top: 4px;
130
+ left: -14px;
131
+ }
132
+
133
+ div[id^="select-media-file"] {
134
+ vertical-align: top;
135
+ padding-top: 1vh;
136
+ }
137
+
138
+ a[id^="pp-change-media-link"], div[id^="save-media"] {
139
+ cursor: pointer;
140
+ }
141
+
142
+ select[id^="powerpress_category_"] {
143
+ max-width: 51.6%;
144
+ width: 100%;
145
+ height: 56px;
146
+ }
147
+
148
+ div[id^="pp-category-dropdown-"] {
149
+ margin: 1em 1em 0 3em;
150
+ }
151
+
152
+ .metamark-preview-pos, .metamark-preview-type, .pp-metamark-delete, .pp-metamark-edit {
153
+ display: inline-block;
154
+ }
155
+
156
+ .metamark-preview-pos, .pp-metamark-delete {
157
+
158
+ margin: 1em;
159
+ }
160
+
161
+ .pp-metamark-edit, .metamark-preview-type {
162
+ margin: 1em 0;
163
+ }
164
+
165
+ .metamark-top-section {
166
+ border-bottom: 1px solid #EAEDF3;
167
+ border-radius: 4px 4px 0 0;
168
+ box-shadow: inset 0 0 0 1px #EAEDF3;
169
+ width: 100%;
170
+ }
171
+
172
+ .pp-metamark-edit, .pp-metamark-delete {
173
+ float: right;
174
+ }
175
+
176
+ .metamark-input-container {
177
+ width: 90%;
178
+ margin: 3em auto auto auto;
179
+ }
180
+
181
+ .pp-metamark-label {
182
+ top: 10px;
183
+ left: 10px;
184
+ display: inline-block;
185
+ }
186
+
187
+ .pp-metamark-edit {
188
+ display: inline-block;
189
+ }
190
+
191
+ .label-container {
192
+ display: inline-block;
193
+ margin-top: 2ch;
194
+ }
195
+
196
+ select[id^="metamark-type-"] {
197
+ width: 100%;
198
+ height: 52px;
199
+ }
200
+
201
+ div[id^="type-label-"] {
202
+ width: 40%;
203
+ margin: 1em 2% 1em 0;
204
+ display: inline-block;
205
+ }
206
+
207
+ input[id^="metamark-pos-"], input[id^="metamark-dur-"], input[id^="metamark-link-"] {
208
+ width: 100%;
209
+ height: 58px;
210
+ }
211
+
212
+ div[id^="pos-label-"] {
213
+ width: 26%;
214
+ margin: 1em 0 1em 1%;
215
+ display: inline-block;
216
+ }
217
+
218
+ div[id^="dur-label-"] {
219
+ width: 28%;
220
+ margin: 1em 0 1em 2%;
221
+ float: right;
222
+ display: inline-block;
223
+ }
224
+
225
+ div[id^="value-container-"] {
226
+ margin-bottom: 3em;
227
+ }
228
+
229
+ input[id^="metamark-link-"] {
230
+ margin: auto;
231
+ }
232
+
233
+ textarea[id^="metamark-val-"] {
234
+ height: 72px;
235
+ width: 100%;
236
+ margin: auto;
237
+ }
238
+
239
+ #powerpress-podcast .inside {
240
+ margin: 0;
241
+ padding: 0;
242
+ }
243
+
244
+ div[id^="apple-podcast-opt"] {
245
+ border-radius: 4px;
246
+ background-color: #F5F5F5;
247
+ padding: 3%;
248
+ width: 90%;
249
+ margin-bottom: 5vh;
250
+ }
251
+
252
+ div[id^="ep-info-not-apple"] {
253
+ margin-bottom: 20px;
254
+ }
255
+
256
+ .pp-blue-button {
257
+ display: inline-block;
258
+ border-radius: 4px;
259
+ background-color: #0c74d5;
260
+ color: white;
261
+ font-family: Roboto, sans-serif;
262
+ font-size: 16px;
263
+ font-weight: 500;
264
+ padding: 1ch 2em 1ch 2em;
265
+ margin-right: 1em;
266
+ cursor: pointer;
267
+ text-align: center;
268
+ }
269
+
270
+ .pp-gray-button {
271
+ background-color: #f5f5f5;
272
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2);
273
+ color: black;
274
+ display: inline-block;
275
+ border-radius: 4px;
276
+ font-family: Roboto, sans-serif;
277
+ font-size: 16px;
278
+ font-weight: bold;
279
+ padding: 1ch 2em 1ch 2em;
280
+ margin-right: 1em;
281
+ cursor: pointer;
282
+ text-align: center;
283
+ border: 0;
284
+ }
285
+
286
+ h4[class^="pp-section-title"] {
287
+ color: #3E3F42;
288
+ font-family: Roboto, sans-serif;
289
+ font-size: 16px;
290
+ font-weight: bold;
291
+ line-height: 38px;
292
+ margin-bottom: 0;
293
+ margin-top: 0;
294
+ float: left;
295
+ display: inline-block;
296
+ }
297
+
298
+ .pp-section-title-block {
299
+ width: 100%;
300
+ }
301
+
302
+ .ep-box-text {
303
+ font-size: 14px;
304
+ margin-top: 2ch;
305
+ margin-bottom: 0;
306
+ }
307
+
308
+ .pp-section-subtitle {
309
+ color: #5A5C60;
310
+ font-family: Roboto, sans-serif;
311
+ font-size: 14px;
312
+ font-weight: 500;
313
+ line-height: 16px;
314
+ }
315
+
316
+ /* Style the tab content */
317
+ .pp-tabcontent {
318
+ display: none;
319
+ border-top: none;
320
+ padding: 40px;
321
+ }
322
+
323
+ .pp-tabcontent.active {
324
+ display: block;
325
+ }
326
+
327
+ h3[id^="pp-pp-selected-media-head"] {
328
+ color: #263238;
329
+ font-family: Roboto, sans-serif;
330
+ font-size: 20px;
331
+ font-weight: bold;
332
+ letter-spacing: -0.06px;
333
+ line-height: 24px;
334
+ margin-left: 2em;
335
+ margin-bottom: 1ch;
336
+ }
337
+
338
+ div[id^="pp-edit-media-button"] {
339
+ text-align: center;
340
+ padding: 1ch 2em 1ch 2em;
341
+ }
342
+
343
+ div[id^="a-pp-selected-media"] {
344
+ padding: 2em;
345
+ background-color: #F5F5F5;
346
+ }
347
+
348
+ div[class^="metamark-preview-"] {
349
+ font-weight: bold;
350
+ }
351
+
352
+
353
+ div[id^="explicit-switch-base"] {
354
+ display: inline-block;
355
+ padding: 5px;
356
+ background-color: #e6e6e6;
357
+ width: 100%;
358
+ border-radius: 4px;
359
+ }
360
+
361
+ .explicit-option {
362
+ background-color: #e6e6e6;
363
+ }
364
+
365
+ .explicit-selected {
366
+ background-color: white;
367
+ box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16);
368
+ border-radius: 4px;
369
+ }
370
+
371
+ .explicit-option, .explicit-selected {
372
+ border-collapse: collapse;
373
+ font-weight: bold;
374
+ display: inline-block;
375
+ width: 32%;
376
+ padding-top: 1ch;
377
+ padding-bottom: 1ch;
378
+ text-align: center;
379
+ font-size: 14px;
380
+ font-family: Roboto, sans-serif;
381
+ cursor: pointer;
382
+ }
383
+
384
+ div[id^="pp-selected-media-text"] {
385
+ max-width: 50%;
386
+ width: 100%;
387
+ display: inline-block;
388
+ margin: 0 1em 0 3em;
389
+ }
390
+
391
+ .powerpress_podcast_box, #episode-box-container {
392
+ padding: 10px;
393
+ }
394
+
395
+ div[id^="pp-change-media-file"] {
396
+ vertical-align: top;
397
+ margin-top: 2em;
398
+ }
399
+
400
+ div[class^="ep-box-line"] {
401
+ box-sizing: border-box;
402
+ display: inline-block;
403
+ height: 1px;
404
+ width: 100%;
405
+ border-top: 1px solid #EFEFEF;
406
+ }
407
+
408
+ div[class="ep-box-line-bold"] {
409
+ border-top: 2px solid #EFEFEF;
410
+ width: 92%;
411
+ margin-left: 4%;
412
+ margin-right: 4%;
413
+ }
414
+
415
+ .ep-box-line-margin {
416
+ margin: 17px 0 17px 0;
417
+ }
418
+
419
+ .pp-shortcode-example {
420
+ box-sizing: border-box;
421
+ border: 1px solid #E8E8E8;
422
+ background-color: #F0F0F0;
423
+ line-height: 36px;
424
+ padding-left: 2em;
425
+ padding-right: 2em;
426
+ }
427
+
428
+ div[id^="pp-display-player"] {
429
+ width: 45%;
430
+ display: inline-block;
431
+ }
432
+
433
+ div[id^="pp-player-size"] {
434
+ width: 53%;
435
+ display: inline-block;
436
+ vertical-align: top;
437
+ }
438
+
439
+ .pp-hidden-settings {
440
+ display: none;
441
+ }
442
+
443
+ img[id^="pp-image-preview"] {
444
+ width: 16vh;
445
+ height: 16vh;
446
+ border: 3px solid #717171;
447
+ }
448
+
449
+ img[id^="poster-pp-image-preview"] {
450
+ width: 32ch;
451
+ height: 18ch;
452
+ border: 3px solid #717171;
453
+ }
454
+
455
+ .powerpress-art-text {
456
+ width: 70%;
457
+ display: inline-block;
458
+ vertical-align: top;
459
+ }
460
+
461
+ .powerpress-art-preview {
462
+ width: 28%;
463
+ display: inline-block;
464
+ }
465
+
466
+ p[id^="ep-box-filename"] {
467
+ color: #6B6C6F;
468
+ font-family: Roboto, sans-serif;
469
+ font-size: 14px;
470
+ letter-spacing: 0.15px;
471
+ line-height: 56px;
472
+ margin: 0 5px 0 5px;
473
+ display: inline;
474
+ }
475
+
476
+ div[id^="pp-warning-messages"] {
477
+ margin-left: 3em;
478
+ }
479
+
480
+ div[id^="media-details-container"] {
481
+ margin-top: 2ch;
482
+ margin-bottom: 2ch;
483
+ }
484
+
485
+ a.media-details, button.apple-advanced {
486
+ color: #0c74d5;
487
+ font-family: Roboto, sans-serif;
488
+ font-size: 14px;
489
+ font-weight: bold;
490
+ line-height: 22px;
491
+ cursor: pointer;
492
+ border: none;
493
+ box-shadow: none;
494
+ background-color: #F5F5F5;
495
+ }
496
+
497
+ input[id^="powerpress_size"] {
498
+ width: 50%;
499
+ text-align: center;
500
+ height: 28px;
501
+ }
502
+
503
+ input[id^="powerpress_duration_"] {
504
+ width: 48px;
505
+ text-align: center;
506
+ height: 34px;
507
+ }
508
+
509
+ div[id^="media-file-details"] {
510
+ width: 100%;
511
+ }
512
+
513
+ .media-details {
514
+ margin: 0 3em 0 3em;
515
+ font-weight: 500;
516
+ }
517
+
518
+ .pp-detail-section {
519
+ margin: 2ch 6em 2ch 6em;
520
+ }
521
+
522
+ .details-auto-detect {
523
+ font-family: Roboto, sans-serif;
524
+ display: inline-block;
525
+ width: 30%
526
+ }
527
+
528
+ .details-specify {
529
+ font-family: Roboto, sans-serif;
530
+ display: inline-block;
531
+ width: 43%;
532
+ }
533
+
534
+ .details-not-specified {
535
+ font-family: Roboto, sans-serif;
536
+ display: inline-block;
537
+ width: 25%;
538
+ }
539
+
540
+ a[id^="select-media-link"], a[id^="pp-change-media-link"] {
541
+ text-decoration: none;
542
+ display: inline-block;
543
+ width: 27ch;
544
+ }
545
+
546
+ input[class="media-details-radio"] {
547
+ width: 22px;
548
+ height: 22px;
549
+ border: 2px solid #B1B1B1;
550
+ }
551
+
552
+ input[class="media-details-radio"]:checked {
553
+ border: 2px solid #0c74d5;
554
+ }
555
+
556
+ input[class="media-details-radio"]:checked:before {
557
+ width: 12px;
558
+ height: 12px;
559
+ margin: 3px;
560
+ background-color: #0c74d5;
561
+ }
562
+
563
+ label[class="ep-box-caption"] {
564
+ color: rgba(0,0,0,0.6);
565
+ font-family: Roboto, sans-serif;
566
+ font-size: 12px;
567
+ letter-spacing: 0.4px;
568
+ font-weight: 300;
569
+ margin-left: 2em;
570
+ }
571
+
572
+ label[class^="ep-box-label"] {
573
+ position: relative;
574
+ top: 2px;
575
+ padding: 0 2px 0 2px;
576
+ bottom: 10px;
577
+ background: transparent;
578
+ }
579
+
580
+ label[class^="ep-box-label-under"] {
581
+ position: relative;
582
+ padding: 0 2px 0 2px;
583
+ bottom: 10px;
584
+ left: 10px;
585
+ top: 0;
586
+ background: transparent;
587
+ }
588
+
589
+ input[class="ep-box-input"], textarea[class="ep-box-input"], select[class="ep-box-input"], div[class="ep-box-input"] {
590
+ border-radius: 4px;
591
+ background-color: white;
592
+ border: 1px solid #B1B1B1;
593
+ font-size: 14px;
594
+ height: 56px;
595
+ }
596
+
597
+ textarea[id^="powerpress_summary_"] {
598
+ height: 130px;
599
+ resize: none;
600
+ padding: 10px;
601
+ font-family: Roboto, sans-serif;
602
+ font-size: 14px;
603
+ line-height: 22px;
604
+ width: 100%;
605
+ }
606
+
607
+ textarea[id^="powerpress_embed_"] {
608
+ resize: none;
609
+ }
610
+
611
+ textarea[id^="powerpress_summary_"]::-webkit-scrollbar {
612
+ height: 85%;
613
+ }
614
+
615
+ /* Track */
616
+ textarea[id^="powerpress_summary_"]::-webkit-scrollbar-track {
617
+ box-shadow: inset 0 0 5px grey;
618
+ border-radius: 4px;
619
+ }
620
+
621
+ /* Handle */
622
+ textarea[id^="powerpress_summary_"]::-webkit-scrollbar-thumb {
623
+ background: white;
624
+ border-radius: 4px;
625
+ border: grey 1px solid;
626
+ }
627
+
628
+ div[id^="pp-url-input-container-"] {
629
+ width: 100%;
630
+ }
631
+
632
+ label[id^="pp-url-input-above"] {
633
+ position: relative;
634
+ top: 8px;
635
+ background-color: #f5f5f5;
636
+ padding: 0 3px 0 3px;
637
+ }
638
+
639
+ .pp-url-input-label {
640
+ color: #0c74d5;
641
+ margin-left: 10px;
642
+ }
643
+
644
+ input[id^="powerpress_url_"], div[id^="powerpress_url_"] {
645
+ width: 100%;
646
+ border-radius: 4px;
647
+ box-sizing: border-box;
648
+ height: 56px;
649
+ }
650
+
651
+ input[id^="powerpress_url_"] {
652
+ box-shadow: inset 0 0 0 1px #0c74d5;
653
+ background: transparent;
654
+ border-color: #0c74d5;
655
+ }
656
+
657
+ input[class="apple-opt-input"], select[class="apple-opt-input"], textarea[class="apple-opt-input"] {
658
+ width: 100%;
659
+ border-radius: 4px;
660
+ box-sizing: border-box;
661
+ background-color: white;
662
+ border: 1px solid #B1B1B1;
663
+ font-size: 14px;
664
+ }
665
+
666
+ input[class="apple-opt-input"], select[class="apple-opt-input"] {
667
+ height: 56px;
668
+ }
669
+
670
+ input[id^="powerpress_itunes_image_"], input[id^="powerpress_image_"] {
671
+ width: 90%;
672
+ border-radius: 4px;
673
+ box-sizing: border-box;
674
+ height: 56px;
675
+ }
676
+
677
+ input[id^="powerpress_feature_"] {
678
+ border-radius: 2px;
679
+ border: 2px solid #66788A;
680
+ height: 18px;
681
+ width: 18px;
682
+ }
683
+
684
+ input[class="ep-box-checkbox"] {
685
+ box-sizing: border-box;
686
+ height: 16px;
687
+ width: 16px;
688
+ border: 1px solid #D8DCE6;
689
+ border-radius: 3px;
690
+ background: linear-gradient(0deg, #F6F7F9 0%, #FFFFFF 100%);
691
+ box-shadow: inset 0 2px 0 0 rgba(255,255,255,0.05), 0 1px 1px 0 rgba(22,29,37,0.05);
692
+ margin: 1em 1ch 1em 1ch;
693
+ }
694
+
695
+ .pp-section-container {
696
+ display: block;
697
+ margin-bottom: 4ch;
698
+ width: 100%;
699
+ justify-content: space-between;
700
+ }
701
+
702
+ .apple-opt-section-container {
703
+ display: block;
704
+ margin-bottom: 2ch;
705
+ width: 100%;
706
+ justify-content: space-between;
707
+ }
708
+
709
+ div[id^="height-"] {
710
+ height: 70px;
711
+ }
712
+
713
+ div[id^="apple-feature"] {
714
+ margin-top: 1vh;
715
+ }
716
+
717
+ div[id^="title-container"] {
718
+ width: 50%;
719
+ }
720
+
721
+ div[id^="season-container"] {
722
+ width: 30%;
723
+ }
724
+
725
+ input[id^="powerpress_episode_season"]:disabled {
726
+ background-color: #f5f5f5;
727
+ }
728
+
729
+ div[id^="explicit-container"] {
730
+ display:inline-block;
731
+ width: 35%;
732
+ float: right;
733
+ max-height: 30px;
734
+ margin-right: 1em;
735
+ }
736
+
737
+ div[id^="apple-title-container"] {
738
+ width: 58%;
739
+ margin-right: 3ch;
740
+ }
741
+
742
+ div[id^="episode-no-container"], div[id^="season-container"] {
743
+ display:inline-block;
744
+ width:18%;
745
+ margin-top: 3vh;
746
+ }
747
+
748
+ div[id^="season-container"] {
749
+ float: right;
750
+ }
751
+
752
+ div[id^="feature-container"] {
753
+ margin-top: 3vh;
754
+ width: 70%;
755
+ }
756
+
757
+ div[id^="type-container"] {
758
+ width: 29.5%;
759
+ vertical-align: top;
760
+ margin: 2ch 0 0 0;
761
+ }
762
+
763
+ div[id^="media-input"] {
764
+ width: 100%;
765
+ }
766
+
767
+ /* Responsiveness with buttons, Apple Opt Section, and third option in media details */
768
+ @media (max-width: 1152px) {
769
+ div[id^="pp-selected-media-text"] {
770
+ max-width: 80%;
771
+ margin-right: 3em;
772
+ }
773
+ div[id^="edit-media-file"], div[id^="pp-change-media-file"], div[id^="select-media-file"], div[id^="pp-category-dropdown"] {
774
+ width: 80%;
775
+ margin: 1em 3em 0 3em;
776
+ }
777
+ .details-not-specified {
778
+ margin-top: 1em;
779
+ width: 100%
780
+ }
781
+ .details-auto-detect, .details-specify {
782
+ width: 48%
783
+ }
784
+ div[id^="explicit-container"] {
785
+ width: 40%;
786
+ }
787
+ div[id^="feature-container"] {
788
+ width: 100%;
789
+ }
790
+ }
791
+
792
+ /* Responsiveness for second option in media details (all 3 stack), explicit switch, and episode and season no */
793
+ @media (max-width: 832px) {
794
+ div[class^="details-"] {
795
+ width: 100%;
796
+ margin-top: 1em;
797
+ }
798
+ .pp-detail-section {
799
+ margin: 2ch 1em 2ch 1em;
800
+ }
801
+ div[id^="explicit-container"] {
802
+ width: 98%;
803
+ margin: 1em 0 0 0;
804
+ float: left;
805
+ }
806
+ div[id^="apple-title-container"] {
807
+ width: 100%;
808
+ margin-top: 1em;
809
+ }
810
+ div[id^="episode-no-container"] {
811
+ width: 45%;
812
+ }
813
+ div[id^="season-container"] {
814
+ width: 45%;
815
+ }
816
+ .pp-tabcontent {
817
+ padding: 15px;
818
+ }
819
+ #wpbody select {
820
+ height: 52px;
821
+ }
822
+ div[id^="type-label-"] {
823
+ width: 99%;
824
+ margin: 1em 0 1em 0;
825
+ }
826
+ div[id^="pos-label-"] {
827
+ width: 40%;
828
+ margin-left: 0;
829
+ }
830
+ div[id^="dur-label-"] {
831
+ width: 40%;
832
+ margin-right: 0;
833
+ }
834
+ .media-details {
835
+ margin-left: 1em;
836
+ }
837
+ div[id^="edit-media-file"], div[id^="pp-change-media-file"], div[id^="select-media-file"], div[id^="pp-category-dropdown"] {
838
+ margin: 1em 1em 0 1em;
839
+ width: 90%;
840
+ }
841
+ div[id^="pp-selected-media-text"] {
842
+ margin: 1em 1em 0 1em;
843
+ max-width: 90%;
844
+ }
845
+ .powerpress-art-text, .powerpress-art-preview {
846
+ width: 100%;
847
+ }
848
+ div[id^="type-container"] {
849
+ width: 50%;
850
+ }
851
+ input[type="checkbox"]:checked:before {
852
+ font: normal 21px/1 dashicons;
853
+ }
854
+ h3[id^="pp-pp-selected-media-head"] {
855
+ margin-left: 1em;
856
+ }
857
+ .powerpress-art-preview {
858
+ text-align: center;
859
+ }
860
+ input[id^="powerpress_itunes_image_"], input[id^="powerpress_image_"] {
861
+ width: 100%;
862
+ }
863
+ }
864
+
865
+ /* More responsiveness with buttons */
866
+ @media (max-width: 592px) {
867
+ .pp-blue-button, .pp-gray-button {
868
+ display: block;
869
+ margin: 1ch 0 0 0;
870
+ }
871
+ div[id^="edit-media-file"], div[id^="pp-change-media-file"], div[id^="select-media-file"], div[id^="pp-category-dropdown"] {
872
+ max-width: 90%;
873
+ }
874
+ .explicit-option, .explicit-selected {
875
+ font-size: 12px;
876
+ }
877
+ .artwork-button {
878
+ padding: 1em 2ch;
879
+ }
880
+ div[id^="apple-podcast-opt"] {
881
+ padding: 6%;
882
+ }
883
+ div[id^="pp-display-player"], div[id^="pp-player-size"] {
884
+ width: 100%;
885
+ }
886
+ div[id^="type-container"] {
887
+ width: 100%;
888
+ }
889
+ input[id^="powerpress_duration_"] {
890
+ width: 36px;
891
+ padding: 6px;
892
+ height: 28px;
893
+ }
894
+ a[id^="select-media-link"] {
895
+ width: 100%;
896
+ }
897
+ select[id^="powerpress_category"] option {
898
+ width: 100%;
899
+ }
900
+ }
901
+
902
+ @media (max-width: 375px) {
903
+ .pp-detail-section {
904
+ margin: 2ch 1em 2ch 0;
905
+ }
906
+ .media-details {
907
+ margin-left: 0;
908
+ }
909
+ .explicit-option, .explicit-selected {
910
+ width: 31%;
911
+ }
912
+ div[id^="pos-label-"], div[id^="dur-label-"] {
913
+ width: 100%;
914
+ margin: 1em 0 1em 0;
915
+ }
916
+ .tab {
917
+ font-size: 12px;
918
+ }
919
+ a[id^="show-details-link"], a[id^="hide-details-link"] {
920
+ font-size: 12px;
921
+ }
922
+ input[id^="powerpress_duration_"] {
923
+ width: 28px;
924
+ padding: 2px;
925
+ }
926
+ }
927
+
928
+
929
+ /* Responsiveness with buttons, Apple Opt Section, and third option in media details */
930
+ @media (max-width: 1456px) {
931
+ .classic-editor div[id^="pp-selected-media-text"] {
932
+ max-width: 80%;
933
+ margin-right: 3em;
934
+ }
935
+ .classic-editor div[id^="edit-media-file"], .classic-editor div[id^="pp-change-media-file"], .classic-editor div[id^="select-media-file"], .classic-editor div[id^="pp-category-dropdown"] {
936
+ width: 80%;
937
+ margin: 1em 3em 0 5em;
938
+ }
939
+ .classic-editor .details-not-specified {
940
+ margin-top: 1em;
941
+ width: 100%
942
+ }
943
+ .classic-editor .details-auto-detect, .details-specify {
944
+ width: 48%
945
+ }
946
+ .classic-editor div[id^="explicit-container"] {
947
+ width: 40%;
948
+ }
949
+ .classic-editor div[id^="feature-container"] {
950
+ width: 100%;
951
+ }
952
+ }
953
+
954
+ /* Responsiveness for second option in media details (all 3 stack), explicit switch, and episode and season no */
955
+ @media (max-width: 1132px) {
956
+ .classic-editor div[class^="details-"] {
957
+ width: 100%;
958
+ margin-top: 1em;
959
+ }
960
+ .classic-editor .pp-detail-section {
961
+ margin: 2ch 1em 2ch 1em;
962
+ }
963
+ .classic-editor div[id^="explicit-container"] {
964
+ width: 98%;
965
+ margin: 1em 0 0 0;
966
+ float: left;
967
+ }
968
+ .classic-editor div[id^="apple-title-container"] {
969
+ width: 100%;
970
+ margin-top: 1em;
971
+ }
972
+ .classic-editor div[id^="episode-no-container"] {
973
+ width: 45%;
974
+ }
975
+ .classic-editor div[id^="season-container"] {
976
+ width: 45%;
977
+ }
978
+ .classic-editor .pp-tabcontent {
979
+ padding: 15px;
980
+ }
981
+ .classic-editor #wpbody select {
982
+ height: 52px;
983
+ }
984
+ .classic-editor div[id^="type-label-"] {
985
+ width: 99%;
986
+ margin: 1em 0 1em 0;
987
+ }
988
+ .classic-editor div[id^="pos-label-"] {
989
+ width: 40%;
990
+ margin-left: 0;
991
+ }
992
+ .classic-editor div[id^="dur-label-"] {
993
+ width: 40%;
994
+ margin-right: 0;
995
+ }
996
+ .classic-editor .media-details {
997
+ margin-left: 1em;
998
+ }
999
+ .classic-editor div[id^="edit-media-file"], .classic-editor div[id^="pp-change-media-file"] .classic-editor div[id^="select-media-file"], .classic-editor div[id^="pp-category-dropdown"] {
1000
+ margin: 1em 1em 0 1em;
1001
+ width: 90%;
1002
+ }
1003
+ .classic-editor div[id^="pp-selected-media-text"] {
1004
+ margin: 1em 1em 0 1em;
1005
+ max-width: 90%;
1006
+ }
1007
+ .classic-editor .powerpress-art-text, .classic-editor .powerpress-art-preview {
1008
+ width: 100%;
1009
+ }
1010
+ .classic-editor div[id^="type-container"] {
1011
+ width: 50%;
1012
+ }
1013
+ .classic-editor input[type="checkbox"]:checked:before {
1014
+ font: normal 21px/1 dashicons;
1015
+ }
1016
+ .classic-editor h3[id^="pp-pp-selected-media-head"] {
1017
+ margin-left: 1em;
1018
+ }
1019
+ .classic-editor .powerpress-art-preview {
1020
+ text-align: center;
1021
+ }
1022
+ .classic-editor input[id^="powerpress_itunes_image_"], .classic-editor input[id^="powerpress_image_"] {
1023
+ width: 100%;
1024
+ }
1025
+ }
1026
+
1027
+ /* More responsiveness with buttons */
1028
+ @media (max-width: 892px) {
1029
+ .classic-editor .pp-blue-button, .classic-editor .pp-gray-button {
1030
+ display: block;
1031
+ margin: 1ch 0 0 0;
1032
+ }
1033
+ .classic-editor div[id^="edit-media-file"], .classic-editor div[id^="pp-change-media-file"], .classic-editor div[id^="select-media-file"], .classic-editor div[id^="pp-category-dropdown"] {
1034
+ max-width: 90%;
1035
+ }
1036
+ .classic-editor .explicit-option, .classic-editor .explicit-selected {
1037
+ font-size: 12px;
1038
+ }
1039
+ .classic-editor .artwork-button {
1040
+ padding: 1em 2ch;
1041
+ }
1042
+ .classic-editor div[id^="apple-podcast-opt"] {
1043
+ padding: 6%;
1044
+ }
1045
+ .classic-editor div[id^="pp-display-player"], .classic-editor div[id^="pp-player-size"] {
1046
+ width: 100%;
1047
+ }
1048
+ .classic-editor div[id^="type-container"] {
1049
+ width: 100%;
1050
+ }
1051
+ .classic-editor input[id^="powerpress_duration_"] {
1052
+ width: 36px;
1053
+ padding: 6px;
1054
+ height: 28px;
1055
+ }
1056
+ .classic-editor select[id^="powerpress_category"] option {
1057
+ width: 100%;
1058
+ }
1059
+ }
getid3/getid3.lib.php CHANGED
@@ -19,9 +19,9 @@ class getid3_lib
19
  $returnstring = '';
20
  for ($i = 0; $i < strlen($string); $i++) {
21
  if ($hex) {
22
- $returnstring .= str_pad(dechex(ord($string{$i})), 2, '0', STR_PAD_LEFT);
23
  } else {
24
- $returnstring .= ' '.(preg_match("#[\x20-\x7E]#", $string{$i}) ? $string{$i} : '¤');
25
  }
26
  if ($spaces) {
27
  $returnstring .= ' ';
@@ -110,11 +110,11 @@ class getid3_lib
110
  // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
111
  if (strpos($binarypointnumber, '.') === false) {
112
  $binarypointnumber = '0.'.$binarypointnumber;
113
- } elseif ($binarypointnumber{0} == '.') {
114
  $binarypointnumber = '0'.$binarypointnumber;
115
  }
116
  $exponent = 0;
117
- while (($binarypointnumber{0} != '1') || (substr($binarypointnumber, 1, 1) != '.')) {
118
  if (substr($binarypointnumber, 1, 1) == '.') {
119
  $exponent--;
120
  $binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3);
@@ -122,7 +122,7 @@ class getid3_lib
122
  $pointpos = strpos($binarypointnumber, '.');
123
  $exponent += ($pointpos - 1);
124
  $binarypointnumber = str_replace('.', '', $binarypointnumber);
125
- $binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1);
126
  }
127
  }
128
  $binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT);
@@ -191,7 +191,7 @@ class getid3_lib
191
  if (!$bitword) {
192
  return 0;
193
  }
194
- $signbit = $bitword{0};
195
 
196
  switch (strlen($byteword) * 8) {
197
  case 32:
@@ -208,7 +208,7 @@ class getid3_lib
208
  // 80-bit Apple SANE format
209
  // http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/
210
  $exponentstring = substr($bitword, 1, 15);
211
- $isnormalized = intval($bitword{16});
212
  $fractionstring = substr($bitword, 17, 63);
213
  $exponent = pow(2, self::Bin2Dec($exponentstring) - 16383);
214
  $fraction = $isnormalized + self::DecimalBinary2Float($fractionstring);
@@ -268,10 +268,10 @@ class getid3_lib
268
  }
269
  for ($i = 0; $i < $bytewordlen; $i++) {
270
  if ($synchsafe) { // disregard MSB, effectively 7-bit bytes
271
- //$intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems
272
- $intvalue += (ord($byteword{$i}) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7);
273
  } else {
274
- $intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i));
275
  }
276
  }
277
  if ($signed && !$synchsafe) {
@@ -298,7 +298,7 @@ class getid3_lib
298
  $binvalue = '';
299
  $bytewordlen = strlen($byteword);
300
  for ($i = 0; $i < $bytewordlen; $i++) {
301
- $binvalue .= str_pad(decbin(ord($byteword{$i})), 8, '0', STR_PAD_LEFT);
302
  }
303
  return $binvalue;
304
  }
@@ -342,7 +342,7 @@ class getid3_lib
342
  public static function Bin2Dec($binstring, $signed=false) {
343
  $signmult = 1;
344
  if ($signed) {
345
- if ($binstring{0} == '1') {
346
  $signmult = -1;
347
  }
348
  $binstring = substr($binstring, 1);
@@ -706,7 +706,7 @@ class getid3_lib
706
  $newcharstring .= "\xEF\xBB\xBF";
707
  }
708
  for ($i = 0; $i < strlen($string); $i++) {
709
- $charval = ord($string{$i});
710
  $newcharstring .= self::iconv_fallback_int_utf8($charval);
711
  }
712
  return $newcharstring;
@@ -719,7 +719,7 @@ class getid3_lib
719
  $newcharstring .= "\xFE\xFF";
720
  }
721
  for ($i = 0; $i < strlen($string); $i++) {
722
- $newcharstring .= "\x00".$string{$i};
723
  }
724
  return $newcharstring;
725
  }
@@ -731,7 +731,7 @@ class getid3_lib
731
  $newcharstring .= "\xFF\xFE";
732
  }
733
  for ($i = 0; $i < strlen($string); $i++) {
734
- $newcharstring .= $string{$i}."\x00";
735
  }
736
  return $newcharstring;
737
  }
@@ -751,27 +751,27 @@ class getid3_lib
751
  $offset = 0;
752
  $stringlength = strlen($string);
753
  while ($offset < $stringlength) {
754
- if ((ord($string{$offset}) | 0x07) == 0xF7) {
755
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
756
- $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
757
- ((ord($string{($offset + 1)}) & 0x3F) << 12) &
758
- ((ord($string{($offset + 2)}) & 0x3F) << 6) &
759
- (ord($string{($offset + 3)}) & 0x3F);
760
  $offset += 4;
761
- } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
762
  // 1110bbbb 10bbbbbb 10bbbbbb
763
- $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
764
- ((ord($string{($offset + 1)}) & 0x3F) << 6) &
765
- (ord($string{($offset + 2)}) & 0x3F);
766
  $offset += 3;
767
- } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
768
  // 110bbbbb 10bbbbbb
769
- $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
770
- (ord($string{($offset + 1)}) & 0x3F);
771
  $offset += 2;
772
- } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
773
  // 0bbbbbbb
774
- $charval = ord($string{$offset});
775
  $offset += 1;
776
  } else {
777
  // error? throw some kind of warning here?
@@ -794,27 +794,27 @@ class getid3_lib
794
  $offset = 0;
795
  $stringlength = strlen($string);
796
  while ($offset < $stringlength) {
797
- if ((ord($string{$offset}) | 0x07) == 0xF7) {
798
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
799
- $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
800
- ((ord($string{($offset + 1)}) & 0x3F) << 12) &
801
- ((ord($string{($offset + 2)}) & 0x3F) << 6) &
802
- (ord($string{($offset + 3)}) & 0x3F);
803
  $offset += 4;
804
- } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
805
  // 1110bbbb 10bbbbbb 10bbbbbb
806
- $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
807
- ((ord($string{($offset + 1)}) & 0x3F) << 6) &
808
- (ord($string{($offset + 2)}) & 0x3F);
809
  $offset += 3;
810
- } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
811
  // 110bbbbb 10bbbbbb
812
- $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
813
- (ord($string{($offset + 1)}) & 0x3F);
814
  $offset += 2;
815
- } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
816
  // 0bbbbbbb
817
- $charval = ord($string{$offset});
818
  $offset += 1;
819
  } else {
820
  // error? throw some kind of warning here?
@@ -837,27 +837,27 @@ class getid3_lib
837
  $offset = 0;
838
  $stringlength = strlen($string);
839
  while ($offset < $stringlength) {
840
- if ((ord($string{$offset}) | 0x07) == 0xF7) {
841
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
842
- $charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
843
- ((ord($string{($offset + 1)}) & 0x3F) << 12) &
844
- ((ord($string{($offset + 2)}) & 0x3F) << 6) &
845
- (ord($string{($offset + 3)}) & 0x3F);
846
  $offset += 4;
847
- } elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
848
  // 1110bbbb 10bbbbbb 10bbbbbb
849
- $charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
850
- ((ord($string{($offset + 1)}) & 0x3F) << 6) &
851
- (ord($string{($offset + 2)}) & 0x3F);
852
  $offset += 3;
853
- } elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
854
  // 110bbbbb 10bbbbbb
855
- $charval = ((ord($string{($offset + 0)}) & 0x1F) << 6) &
856
- (ord($string{($offset + 1)}) & 0x3F);
857
  $offset += 2;
858
- } elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
859
  // 0bbbbbbb
860
- $charval = ord($string{$offset});
861
  $offset += 1;
862
  } else {
863
  // error? maybe throw some warning here?
@@ -1054,22 +1054,22 @@ class getid3_lib
1054
  case 'UTF-8':
1055
  $strlen = strlen($string);
1056
  for ($i = 0; $i < $strlen; $i++) {
1057
- $char_ord_val = ord($string{$i});
1058
  $charval = 0;
1059
  if ($char_ord_val < 0x80) {
1060
  $charval = $char_ord_val;
1061
  } elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F && $i+3 < $strlen) {
1062
  $charval = (($char_ord_val & 0x07) << 18);
1063
- $charval += ((ord($string{++$i}) & 0x3F) << 12);
1064
- $charval += ((ord($string{++$i}) & 0x3F) << 6);
1065
- $charval += (ord($string{++$i}) & 0x3F);
1066
  } elseif ((($char_ord_val & 0xE0) >> 5) == 0x07 && $i+2 < $strlen) {
1067
  $charval = (($char_ord_val & 0x0F) << 12);
1068
- $charval += ((ord($string{++$i}) & 0x3F) << 6);
1069
- $charval += (ord($string{++$i}) & 0x3F);
1070
  } elseif ((($char_ord_val & 0xC0) >> 6) == 0x03 && $i+1 < $strlen) {
1071
  $charval = (($char_ord_val & 0x1F) << 6);
1072
- $charval += (ord($string{++$i}) & 0x3F);
1073
  }
1074
  if (($charval >= 32) && ($charval <= 127)) {
1075
  $HTMLstring .= htmlentities(chr($charval));
19
  $returnstring = '';
20
  for ($i = 0; $i < strlen($string); $i++) {
21
  if ($hex) {
22
+ $returnstring .= str_pad(dechex(ord($string[$i])), 2, '0', STR_PAD_LEFT);
23
  } else {
24
+ $returnstring .= ' '.(preg_match("#[\x20-\x7E]#", $string[$i]) ? $string[$i] : '¤');
25
  }
26
  if ($spaces) {
27
  $returnstring .= ' ';
110
  // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
111
  if (strpos($binarypointnumber, '.') === false) {
112
  $binarypointnumber = '0.'.$binarypointnumber;
113
+ } elseif ($binarypointnumber[0] == '.') {
114
  $binarypointnumber = '0'.$binarypointnumber;
115
  }
116
  $exponent = 0;
117
+ while (($binarypointnumber[0] != '1') || (substr($binarypointnumber, 1, 1) != '.')) {
118
  if (substr($binarypointnumber, 1, 1) == '.') {
119
  $exponent--;
120
  $binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3);
122
  $pointpos = strpos($binarypointnumber, '.');
123
  $exponent += ($pointpos - 1);
124
  $binarypointnumber = str_replace('.', '', $binarypointnumber);
125
+ $binarypointnumber = $binarypointnumber[0].'.'.substr($binarypointnumber, 1);
126
  }
127
  }
128
  $binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT);
191
  if (!$bitword) {
192
  return 0;
193
  }
194
+ $signbit = $bitword[0];
195
 
196
  switch (strlen($byteword) * 8) {
197
  case 32:
208
  // 80-bit Apple SANE format
209
  // http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/
210
  $exponentstring = substr($bitword, 1, 15);
211
+ $isnormalized = intval($bitword[16]);
212
  $fractionstring = substr($bitword, 17, 63);
213
  $exponent = pow(2, self::Bin2Dec($exponentstring) - 16383);
214
  $fraction = $isnormalized + self::DecimalBinary2Float($fractionstring);
268
  }
269
  for ($i = 0; $i < $bytewordlen; $i++) {
270
  if ($synchsafe) { // disregard MSB, effectively 7-bit bytes
271
+ //$intvalue = $intvalue | (ord($byteword[$i]) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems
272
+ $intvalue += (ord($byteword[$i]) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7);
273
  } else {
274
+ $intvalue += ord($byteword[$i]) * pow(256, ($bytewordlen - 1 - $i));
275
  }
276
  }
277
  if ($signed && !$synchsafe) {
298
  $binvalue = '';
299
  $bytewordlen = strlen($byteword);
300
  for ($i = 0; $i < $bytewordlen; $i++) {
301
+ $binvalue .= str_pad(decbin(ord($byteword[$i])), 8, '0', STR_PAD_LEFT);
302
  }
303
  return $binvalue;
304
  }
342
  public static function Bin2Dec($binstring, $signed=false) {
343
  $signmult = 1;
344
  if ($signed) {
345
+ if ($binstring[0] == '1') {
346
  $signmult = -1;
347
  }
348
  $binstring = substr($binstring, 1);
706
  $newcharstring .= "\xEF\xBB\xBF";
707
  }
708
  for ($i = 0; $i < strlen($string); $i++) {
709
+ $charval = ord($string[$i]);
710
  $newcharstring .= self::iconv_fallback_int_utf8($charval);
711
  }
712
  return $newcharstring;
719
  $newcharstring .= "\xFE\xFF";
720
  }
721
  for ($i = 0; $i < strlen($string); $i++) {
722
+ $newcharstring .= "\x00".$string[$i];
723
  }
724
  return $newcharstring;
725
  }
731
  $newcharstring .= "\xFF\xFE";
732
  }
733
  for ($i = 0; $i < strlen($string); $i++) {
734
+ $newcharstring .= $string[$i]."\x00";
735
  }
736
  return $newcharstring;
737
  }
751
  $offset = 0;
752
  $stringlength = strlen($string);
753
  while ($offset < $stringlength) {
754
+ if ((ord($string[$offset]) | 0x07) == 0xF7) {
755
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
756
+ $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) &
757
+ ((ord($string[($offset + 1)]) & 0x3F) << 12) &
758
+ ((ord($string[($offset + 2)]) & 0x3F) << 6) &
759
+ (ord($string[($offset + 3)]) & 0x3F);
760
  $offset += 4;
761
+ } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) {
762
  // 1110bbbb 10bbbbbb 10bbbbbb
763
+ $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) &
764
+ ((ord($string[($offset + 1)]) & 0x3F) << 6) &
765
+ (ord($string[($offset + 2)]) & 0x3F);
766
  $offset += 3;
767
+ } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) {
768
  // 110bbbbb 10bbbbbb
769
+ $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) &
770
+ (ord($string[($offset + 1)]) & 0x3F);
771
  $offset += 2;
772
+ } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) {
773
  // 0bbbbbbb
774
+ $charval = ord($string[$offset]);
775
  $offset += 1;
776
  } else {
777
  // error? throw some kind of warning here?
794
  $offset = 0;
795
  $stringlength = strlen($string);
796
  while ($offset < $stringlength) {
797
+ if ((ord($string[$offset]) | 0x07) == 0xF7) {
798
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
799
+ $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) &
800
+ ((ord($string[($offset + 1)]) & 0x3F) << 12) &
801
+ ((ord($string[($offset + 2)]) & 0x3F) << 6) &
802
+ (ord($string[($offset + 3)]) & 0x3F);
803
  $offset += 4;
804
+ } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) {
805
  // 1110bbbb 10bbbbbb 10bbbbbb
806
+ $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) &
807
+ ((ord($string[($offset + 1)]) & 0x3F) << 6) &
808
+ (ord($string[($offset + 2)]) & 0x3F);
809
  $offset += 3;
810
+ } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) {
811
  // 110bbbbb 10bbbbbb
812
+ $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) &
813
+ (ord($string[($offset + 1)]) & 0x3F);
814
  $offset += 2;
815
+ } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) {
816
  // 0bbbbbbb
817
+ $charval = ord($string[$offset]);
818
  $offset += 1;
819
  } else {
820
  // error? throw some kind of warning here?
837
  $offset = 0;
838
  $stringlength = strlen($string);
839
  while ($offset < $stringlength) {
840
+ if ((ord($string[$offset]) | 0x07) == 0xF7) {
841
  // 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
842
+ $charval = ((ord($string[($offset + 0)]) & 0x07) << 18) &
843
+ ((ord($string[($offset + 1)]) & 0x3F) << 12) &
844
+ ((ord($string[($offset + 2)]) & 0x3F) << 6) &
845
+ (ord($string[($offset + 3)]) & 0x3F);
846
  $offset += 4;
847
+ } elseif ((ord($string[$offset]) | 0x0F) == 0xEF) {
848
  // 1110bbbb 10bbbbbb 10bbbbbb
849
+ $charval = ((ord($string[($offset + 0)]) & 0x0F) << 12) &
850
+ ((ord($string[($offset + 1)]) & 0x3F) << 6) &
851
+ (ord($string[($offset + 2)]) & 0x3F);
852
  $offset += 3;
853
+ } elseif ((ord($string[$offset]) | 0x1F) == 0xDF) {
854
  // 110bbbbb 10bbbbbb
855
+ $charval = ((ord($string[($offset + 0)]) & 0x1F) << 6) &
856
+ (ord($string[($offset + 1)]) & 0x3F);
857
  $offset += 2;
858
+ } elseif ((ord($string[$offset]) | 0x7F) == 0x7F) {
859
  // 0bbbbbbb
860
+ $charval = ord($string[$offset]);
861
  $offset += 1;
862
  } else {
863
  // error? maybe throw some warning here?
1054
  case 'UTF-8':
1055
  $strlen = strlen($string);
1056
  for ($i = 0; $i < $strlen; $i++) {
1057
+ $char_ord_val = ord($string[$i]);
1058
  $charval = 0;
1059
  if ($char_ord_val < 0x80) {
1060
  $charval = $char_ord_val;
1061
  } elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F && $i+3 < $strlen) {
1062
  $charval = (($char_ord_val & 0x07) << 18);
1063
+ $charval += ((ord($string[++$i]) & 0x3F) << 12);
1064
+ $charval += ((ord($string[++$i]) & 0x3F) << 6);
1065
+ $charval += (ord($string[++$i]) & 0x3F);
1066
  } elseif ((($char_ord_val & 0xE0) >> 5) == 0x07 && $i+2 < $strlen) {
1067
  $charval = (($char_ord_val & 0x0F) << 12);
1068
+ $charval += ((ord($string[++$i]) & 0x3F) << 6);
1069
+ $charval += (ord($string[++$i]) & 0x3F);
1070
  } elseif ((($char_ord_val & 0xC0) >> 6) == 0x03 && $i+1 < $strlen) {
1071
  $charval = (($char_ord_val & 0x1F) << 6);
1072
+ $charval += (ord($string[++$i]) & 0x3F);
1073
  }
1074
  if (($charval >= 32) && ($charval <= 127)) {
1075
  $HTMLstring .= htmlentities(chr($charval));
getid3/getid3.php CHANGED
@@ -151,16 +151,16 @@ class getID3
151
  $this->warning('WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", this may break things.');
152
  }
153
 
154
- // Check for magic_quotes_runtime
155
  if (function_exists('get_magic_quotes_runtime')) {
156
- if (get_magic_quotes_runtime()) {
157
  return $this->startup_error('magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).');
158
  }
159
  }
160
 
161
- // Check for magic_quotes_gpc
162
  if (function_exists('magic_quotes_gpc')) {
163
- if (get_magic_quotes_gpc()) {
164
  return $this->startup_error('magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).');
165
  }
166
  }
@@ -378,8 +378,8 @@ class getID3
378
  $header = fread($this->fp, 10);
379
  if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
380
  $this->info['id3v2']['header'] = true;
381
- $this->info['id3v2']['majorversion'] = ord($header{3});
382
- $this->info['id3v2']['minorversion'] = ord($header{4});
383
  $this->info['avdataoffset'] += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
384
  }
385
  }
151
  $this->warning('WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", this may break things.');
152
  }
153
 
154
+ //
155
  if (function_exists('get_magic_quotes_runtime')) {
156
+ if (false) {
157
  return $this->startup_error('magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).');
158
  }
159
  }
160
 
161
+ //
162
  if (function_exists('magic_quotes_gpc')) {
163
+ if (false) {
164
  return $this->startup_error('magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).');
165
  }
166
  }
378
  $header = fread($this->fp, 10);
379
  if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
380
  $this->info['id3v2']['header'] = true;
381
+ $this->info['id3v2']['majorversion'] = ord($header[3]);
382
+ $this->info['id3v2']['minorversion'] = ord($header[4]);
383
  $this->info['avdataoffset'] += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
384
  }
385
  }
getid3/module.audio.mp3.php CHANGED
@@ -681,7 +681,7 @@ class getid3_mp3 extends getid3_handler
681
  if ($thisfile_mpeg_audio['xing_flags']['toc']) {
682
  $LAMEtocData = substr($headerstring, $VBRidOffset + 16, 100);
683
  for ($i = 0; $i < 100; $i++) {
684
- $thisfile_mpeg_audio['toc'][$i] = ord($LAMEtocData{$i});
685
  }
686
  }
687
  if ($thisfile_mpeg_audio['xing_flags']['vbr_scale']) {
@@ -1144,9 +1144,9 @@ class getid3_mp3 extends getid3_handler
1144
 
1145
  $SyncPattern1 = substr($MPEGaudioData, 0, 4);
1146
  // may be different pattern due to padding
1147
- $SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) | 0x02).$SyncPattern1{3};
1148
  if ($SyncPattern2 === $SyncPattern1) {
1149
- $SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) & 0xFD).$SyncPattern1{3};
1150
  }
1151
 
1152
  $framelength = false;
@@ -1249,9 +1249,9 @@ class getid3_mp3 extends getid3_handler
1249
  if (strlen($head4) < 4) {
1250
  break;
1251
  }
1252
- if ($head4{0} != "\xFF") {
1253
  for ($i = 1; $i < 4; $i++) {
1254
- if ($head4{$i} == "\xFF") {
1255
  $this->fseek($i - 4, SEEK_CUR);
1256
  continue 2;
1257
  }
@@ -1283,7 +1283,7 @@ class getid3_mp3 extends getid3_handler
1283
  $WhereWeWere = $this->ftell();
1284
  $this->fseek($MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
1285
  $next4 = $this->fread(4);
1286
- if ($next4{0} == "\xFF") {
1287
  if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
1288
  $MPEGaudioHeaderDecodeCache[$next4] = self::MPEGaudioHeaderDecode($next4);
1289
  }
@@ -1425,7 +1425,7 @@ class getid3_mp3 extends getid3_handler
1425
  return false;
1426
  }
1427
 
1428
- if (($header{$SynchSeekOffset} == "\xFF") && ($header{($SynchSeekOffset + 1)} > "\xE0")) { // synch detected
1429
  if (!isset($FirstFrameThisfileInfo) && !isset($info['mpeg']['audio'])) {
1430
  $FirstFrameThisfileInfo = $info;
1431
  $FirstFrameAVDataOffset = $avdataoffset + $SynchSeekOffset;
@@ -1521,7 +1521,7 @@ class getid3_mp3 extends getid3_handler
1521
  $this->fseek($scan_start_offset[$current_segment]);
1522
  $buffer_4k = $this->fread(4096);
1523
  for ($j = 0; $j < (strlen($buffer_4k) - 4); $j++) {
1524
- if (($buffer_4k{$j} == "\xFF") && ($buffer_4k{($j + 1)} > "\xE0")) { // synch detected
1525
  if ($this->decodeMPEGaudioHeader($scan_start_offset[$current_segment] + $j, $dummy, false, false, $FastMode)) {
1526
  $calculated_next_offset = $scan_start_offset[$current_segment] + $j + $dummy['mpeg']['audio']['framelength'];
1527
  if ($this->decodeMPEGaudioHeader($calculated_next_offset, $dummy, false, false, $FastMode)) {
@@ -1807,18 +1807,18 @@ class getid3_mp3 extends getid3_handler
1807
  }
1808
 
1809
  $MPEGrawHeader['synch'] = (getid3_lib::BigEndian2Int(substr($Header4Bytes, 0, 2)) & 0xFFE0) >> 4;
1810
- $MPEGrawHeader['version'] = (ord($Header4Bytes{1}) & 0x18) >> 3; // BB
1811
- $MPEGrawHeader['layer'] = (ord($Header4Bytes{1}) & 0x06) >> 1; // CC
1812
- $MPEGrawHeader['protection'] = (ord($Header4Bytes{1}) & 0x01); // D
1813
- $MPEGrawHeader['bitrate'] = (ord($Header4Bytes{2}) & 0xF0) >> 4; // EEEE
1814
- $MPEGrawHeader['sample_rate'] = (ord($Header4Bytes{2}) & 0x0C) >> 2; // FF
1815
- $MPEGrawHeader['padding'] = (ord($Header4Bytes{2}) & 0x02) >> 1; // G
1816
- $MPEGrawHeader['private'] = (ord($Header4Bytes{2}) & 0x01); // H
1817
- $MPEGrawHeader['channelmode'] = (ord($Header4Bytes{3}) & 0xC0) >> 6; // II
1818
- $MPEGrawHeader['modeextension'] = (ord($Header4Bytes{3}) & 0x30) >> 4; // JJ
1819
- $MPEGrawHeader['copyright'] = (ord($Header4Bytes{3}) & 0x08) >> 3; // K
1820
- $MPEGrawHeader['original'] = (ord($Header4Bytes{3}) & 0x04) >> 2; // L
1821
- $MPEGrawHeader['emphasis'] = (ord($Header4Bytes{3}) & 0x03); // MM
1822
 
1823
  return $MPEGrawHeader;
1824
  }
681
  if ($thisfile_mpeg_audio['xing_flags']['toc']) {
682
  $LAMEtocData = substr($headerstring, $VBRidOffset + 16, 100);
683
  for ($i = 0; $i < 100; $i++) {
684
+ $thisfile_mpeg_audio['toc'][$i] = ord($LAMEtocData[$i]);
685
  }
686
  }
687
  if ($thisfile_mpeg_audio['xing_flags']['vbr_scale']) {
1144
 
1145
  $SyncPattern1 = substr($MPEGaudioData, 0, 4);
1146
  // may be different pattern due to padding
1147
+ $SyncPattern2 = $SyncPattern1[0].$SyncPattern1[1].chr(ord($SyncPattern1[2]) | 0x02).$SyncPattern1[3];
1148
  if ($SyncPattern2 === $SyncPattern1) {
1149
+ $SyncPattern2 = $SyncPattern1[0].$SyncPattern1[1].chr(ord($SyncPattern1[2]) & 0xFD).$SyncPattern1[3];
1150
  }
1151
 
1152
  $framelength = false;
1249
  if (strlen($head4) < 4) {
1250
  break;
1251
  }
1252
+ if ($head4[0] != "\xFF") {
1253
  for ($i = 1; $i < 4; $i++) {
1254
+ if ($head4[$i] == "\xFF") {
1255
  $this->fseek($i - 4, SEEK_CUR);
1256
  continue 2;
1257
  }
1283
  $WhereWeWere = $this->ftell();
1284
  $this->fseek($MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
1285
  $next4 = $this->fread(4);
1286
+ if ($next4[0] == "\xFF") {
1287
  if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
1288
  $MPEGaudioHeaderDecodeCache[$next4] = self::MPEGaudioHeaderDecode($next4);
1289
  }
1425
  return false;
1426
  }
1427
 
1428
+ if (($header[$SynchSeekOffset] == "\xFF") && ($header[($SynchSeekOffset + 1)] > "\xE0")) { // synch detected
1429
  if (!isset($FirstFrameThisfileInfo) && !isset($info['mpeg']['audio'])) {
1430
  $FirstFrameThisfileInfo = $info;
1431
  $FirstFrameAVDataOffset = $avdataoffset + $SynchSeekOffset;
1521
  $this->fseek($scan_start_offset[$current_segment]);
1522
  $buffer_4k = $this->fread(4096);
1523
  for ($j = 0; $j < (strlen($buffer_4k) - 4); $j++) {
1524
+ if (($buffer_4k[$j] == "\xFF") && ($buffer_4k[($j + 1)] > "\xE0")) { // synch detected
1525
  if ($this->decodeMPEGaudioHeader($scan_start_offset[$current_segment] + $j, $dummy, false, false, $FastMode)) {
1526
  $calculated_next_offset = $scan_start_offset[$current_segment] + $j + $dummy['mpeg']['audio']['framelength'];
1527
  if ($this->decodeMPEGaudioHeader($calculated_next_offset, $dummy, false, false, $FastMode)) {
1807
  }
1808
 
1809
  $MPEGrawHeader['synch'] = (getid3_lib::BigEndian2Int(substr($Header4Bytes, 0, 2)) & 0xFFE0) >> 4;
1810
+ $MPEGrawHeader['version'] = (ord($Header4Bytes[1]) & 0x18) >> 3; // BB
1811
+ $MPEGrawHeader['layer'] = (ord($Header4Bytes[1]) & 0x06) >> 1; // CC
1812
+ $MPEGrawHeader['protection'] = (ord($Header4Bytes[1]) & 0x01); // D
1813
+ $MPEGrawHeader['bitrate'] = (ord($Header4Bytes[2]) & 0xF0) >> 4; // EEEE
1814
+ $MPEGrawHeader['sample_rate'] = (ord($Header4Bytes[2]) & 0x0C) >> 2; // FF
1815
+ $MPEGrawHeader['padding'] = (ord($Header4Bytes[2]) & 0x02) >> 1; // G
1816
+ $MPEGrawHeader['private'] = (ord($Header4Bytes[2]) & 0x01); // H
1817
+ $MPEGrawHeader['channelmode'] = (ord($Header4Bytes[3]) & 0xC0) >> 6; // II
1818
+ $MPEGrawHeader['modeextension'] = (ord($Header4Bytes[3]) & 0x30) >> 4; // JJ
1819
+ $MPEGrawHeader['copyright'] = (ord($Header4Bytes[3]) & 0x08) >> 3; // K
1820
+ $MPEGrawHeader['original'] = (ord($Header4Bytes[3]) & 0x04) >> 2; // L
1821
+ $MPEGrawHeader['emphasis'] = (ord($Header4Bytes[3]) & 0x03); // MM
1822
 
1823
  return $MPEGrawHeader;
1824
  }
getid3/module.tag.id3v2.php CHANGED
@@ -56,8 +56,8 @@ class getid3_id3v2 extends getid3_handler
56
  $header = $this->fread(10);
57
  if (substr($header, 0, 3) == 'ID3' && strlen($header) == 10) {
58
 
59
- $thisfile_id3v2['majorversion'] = ord($header{3});
60
- $thisfile_id3v2['minorversion'] = ord($header{4});
61
 
62
  // shortcut
63
  $id3v2_majorversion = &$thisfile_id3v2['majorversion'];
@@ -76,7 +76,7 @@ class getid3_id3v2 extends getid3_handler
76
 
77
  }
78
 
79
- $id3_flags = ord($header{5});
80
  switch ($id3v2_majorversion) {
81
  case 2:
82
  // %ab000000 in v2.2
@@ -257,7 +257,7 @@ class getid3_id3v2 extends getid3_handler
257
  $thisfile_id3v2['padding']['length'] = strlen($framedata);
258
  $thisfile_id3v2['padding']['valid'] = true;
259
  for ($i = 0; $i < $thisfile_id3v2['padding']['length']; $i++) {
260
- if ($framedata{$i} != "\x00") {
261
  $thisfile_id3v2['padding']['valid'] = false;
262
  $thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
263
  $info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)';
@@ -319,7 +319,7 @@ class getid3_id3v2 extends getid3_handler
319
 
320
  $len = strlen($framedata);
321
  for ($i = 0; $i < $len; $i++) {
322
- if ($framedata{$i} != "\x00") {
323
  $thisfile_id3v2['padding']['valid'] = false;
324
  $thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
325
  $info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)';
@@ -427,11 +427,11 @@ class getid3_id3v2 extends getid3_handler
427
  $footer = $this->fread(10);
428
  if (substr($footer, 0, 3) == '3DI') {
429
  $thisfile_id3v2['footer'] = true;
430
- $thisfile_id3v2['majorversion_footer'] = ord($footer{3});
431
- $thisfile_id3v2['minorversion_footer'] = ord($footer{4});
432
  }
433
  if ($thisfile_id3v2['majorversion_footer'] <= 4) {
434
- $id3_flags = ord(substr($footer{5}));
435
  $thisfile_id3v2_flags['unsynch_footer'] = (bool) ($id3_flags & 0x80);
436
  $thisfile_id3v2_flags['extfoot_footer'] = (bool) ($id3_flags & 0x40);
437
  $thisfile_id3v2_flags['experim_footer'] = (bool) ($id3_flags & 0x20);
@@ -669,7 +669,7 @@ class getid3_id3v2 extends getid3_handler
669
  //unset($parsedFrame['data']); do not unset, may be needed elsewhere, e.g. for replaygain
670
 
671
 
672
- } elseif ($parsedFrame['frame_name']{0} == 'T') { // 4.2. T??[?] Text information frame
673
  // There may only be one text information frame of its kind in an tag.
674
  // <Header for 'Text information frame', ID: 'T000' - 'TZZZ',
675
  // excluding 'TXXX' described in 4.2.6.>
@@ -773,7 +773,7 @@ class getid3_id3v2 extends getid3_handler
773
  unset($parsedFrame['data']);
774
 
775
 
776
- } elseif ($parsedFrame['frame_name']{0} == 'W') { // 4.3. W??? URL link frames
777
  // There may only be one URL link frame of its kind in a tag,
778
  // except when stated otherwise in the frame description
779
  // <Header for 'URL link frame', ID: 'W000' - 'WZZZ', excluding 'WXXX'
@@ -1052,7 +1052,7 @@ class getid3_id3v2 extends getid3_handler
1052
  $parsedFrame['lyrics'][$timestampindex]['data'] = substr($frame_remainingdata, $frame_offset, $frame_terminatorpos - $frame_offset);
1053
 
1054
  $frame_remainingdata = substr($frame_remainingdata, $frame_terminatorpos + strlen($frame_textencoding_terminator));
1055
- if (($timestampindex == 0) && (ord($frame_remainingdata{0}) != 0)) {
1056
  // timestamp probably omitted for first data item
1057
  } else {
1058
  $parsedFrame['lyrics'][$timestampindex]['timestamp'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 4));
@@ -3599,10 +3599,10 @@ class getid3_id3v2 extends getid3_handler
3599
 
3600
  public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) {
3601
  for ($i = 0; $i < strlen($numberstring); $i++) {
3602
- if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) {
3603
- if (($numberstring{$i} == '.') && $allowdecimal) {
3604
  // allowed
3605
- } elseif (($numberstring{$i} == '-') && $allownegative && ($i == 0)) {
3606
  // allowed
3607
  } else {
3608
  return false;