Skip to content

Commit 2bef25a

Browse files
committed
Ignore vendor/ and use new highlighter and gitignore file
1 parent 9173fcc commit 2bef25a

333 files changed

Lines changed: 1708 additions & 93871 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

composer.phar

972 KB
Binary file not shown.

config/services.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
parameters:
22
phpbbde.pastebin.path: '%core.root_path%ext/phpbbde/pastebin/'
3-
phpbbde.pastebin.geshi: '%phpbbde.pastebin.path%vendor/easybook/geshi/'
4-
phpbbde.pastebin.geshilangs: '%phpbbde.pastebin.geshi%geshi/'
53
phpbbde.pastebin.cron.prune_interval: 86400
64
tables.phpbbde.pastebin.pastebin: '%core.table_prefix%pastebin'
75
services:
86
phpbbde.pastebin.functions.utility:
97
class: phpbbde\pastebin\functions\utility
108
arguments:
11-
- '%phpbbde.pastebin.geshilangs%'
129
- '%core.php_ext%'
1310
- '@language'
1411
phpbbde.pastebin.functions.pastebin:
@@ -35,7 +32,6 @@ services:
3532
- '@phpbbde.pastebin.functions.pastebin'
3633
- '%core.root_path%'
3734
- '%core.php_ext%'
38-
- '%phpbbde.pastebin.geshilangs%'
3935
- '%tables.phpbbde.pastebin.pastebin%'
4036
phpbbde.pastebin.base_listener:
4137
class: phpbbde\pastebin\event\base_events

functions/utility.php

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,7 @@
1010

1111
class utility
1212
{
13-
/**
14-
* Geshi directory
15-
*
16-
* @var string
17-
*/
18-
var $geshi_dir = '';
19-
20-
/**
21-
* List of geshi installed langs
22-
*
23-
* @var array
24-
*/
25-
var $geshi_list = array();
26-
27-
/** @var string */
13+
/** @var string */
2814
protected $php_ext;
2915

3016
/* @var \phpbb\language\language */
@@ -36,12 +22,9 @@ class utility
3622
* @param \phpbb\language\language $language
3723
*/
3824
function __construct(
39-
$geshi_dir,
4025
$php_ext,
4126
\phpbb\language\language $language)
4227
{
43-
$this->geshi_dir = $geshi_dir;
44-
$this->geshi_list = $this->geshi_list();
4528
$this->php_ext = $php_ext;
4629
$this->language = $language;
4730
}
@@ -50,10 +33,10 @@ function __construct(
5033
/**
5134
* Check if $needle is in one of geshis supported languages
5235
*/
53-
function geshi_check($needle)
36+
/*function geshi_check($needle)
5437
{
5538
return in_array($needle, $this->geshi_list);
56-
}
39+
}*/
5740

5841
/**
5942
* List of all geshi langs
@@ -93,17 +76,20 @@ function highlight_select($default = 'text')
9376
* Don't forget to add fitting language variables to \phpbbde\pastebin\language\<iso>\pastebin.php as well
9477
*/
9578
$programming_langs = array(
96-
'text',
97-
'php',
98-
'sql',
99-
'html5',
79+
'base',
80+
'blade',
10081
'css',
82+
'doccoment',
83+
'gdscript',
10184
'javascript',
85+
'json',
86+
'php',
87+
'sql',
88+
'twig',
10289
'xml',
103-
'diff',
104-
'robots',
90+
'yaml',
10591
);
106-
92+
// Make no highlighting as text as default
10793
if (!in_array($default, $this->geshi_list))
10894
{
10995
$default = 'text';
@@ -113,11 +99,8 @@ function highlight_select($default = 'text')
11399
$lang_prefix = 'PASTEBIN_LANGS_';
114100
foreach ($programming_langs as $code)
115101
{
116-
if (in_array($code, $this->geshi_list))
117-
{
118-
$output .= '<option' . (($default == $code) ? ' selected="selected"' : '') . ' value="' . htmlentities($code, ENT_QUOTES) . '">' . $this->language->lang($lang_prefix . strtoupper($code)) . '</option>';
119-
}
120-
}
102+
$output .= '<option' . (($default == $code) ? ' selected="selected"' : '') . ' value="' . htmlentities($code, ENT_QUOTES) . '">' . $this->language->lang($lang_prefix . strtoupper($code)) . '</option>';
103+
}
121104

122105
return $output;
123106
}

vendor/autoload.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
// autoload.php @generated by Composer
44

5+
if (PHP_VERSION_ID < 50600) {
6+
if (!headers_sent()) {
7+
header('HTTP/1.1 500 Internal Server Error');
8+
}
9+
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10+
if (!ini_get('display_errors')) {
11+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12+
fwrite(STDERR, $err);
13+
} elseif (!headers_sent()) {
14+
echo $err;
15+
}
16+
}
17+
trigger_error(
18+
$err,
19+
E_USER_ERROR
20+
);
21+
}
22+
523
require_once __DIR__ . '/composer/autoload_real.php';
624

725
return ComposerAutoloaderInite29ac243941deb1509821f7b4d6204ed::getLoader();

0 commit comments

Comments
 (0)