Skip to content

Instantly share code, notes, and snippets.

View Nicofuma's full-sized avatar

Tristan Darricau Nicofuma

View GitHub Profile
@Nicofuma
Nicofuma / a.php
Last active September 24, 2016 08:46
<?php
function phpbb_get_max_setting_from_group(\phpbb\db\driver\driver_interface $db, $user_id, $setting)
{
if ($setting !== 'max_recipients' && $setting !== 'message_limit')
{
throw new InvalidArgumentException('Setting "' . $setting . '" is not supported');
}
// Get maximum number of allowed recipients
@Nicofuma
Nicofuma / composer.patch
Created September 5, 2016 19:20
Patch to skip invalid packages in cmposer repositories
diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php
index 78ef743..d91d471 100644
--- a/src/Composer/Repository/ComposerRepository.php
+++ b/src/Composer/Repository/ComposerRepository.php
@@ -343,6 +343,7 @@ public function whatProvides(Pool $pool, $name, $bypassFilters = false)
$this->providers[$name] = array();
foreach ($packages['packages'] as $versions) {
foreach ($versions as $version) {
+ try {
// avoid loading the same objects twice
@Nicofuma
Nicofuma / fluent-setters.md
Created August 25, 2016 12:28
PHPStrom templates (PHP 5 & 7, type hint arrays, string[] support, ...)
#set($typeHintText = "$TYPE_HINT")
#set($nonTypeHintableTypes = ["", "string", "int", "mixed", "number", "void", "object", "real", "double", "float", "resource", "null", "bool", "boolean"])
#foreach($nonTypeHintableType in $nonTypeHintableTypes)
    #if ($nonTypeHintableType == $TYPE_HINT)
        #set($typeHintText = "")
    #end
#end

#if ($typeHintText.matches('^((\\)?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+)+$'))
@Nicofuma
Nicofuma / Releasing 3.2.0-RC1.md
Last active June 27, 2016 20:26
Releasing 3.2.0-RC1

Todo List for 3.2.0-RC1

General

  • Make sure phpBB/docs/CREDTIS.txt is up to date
  • Make sure Contributors have their ranks
  • Make sure all reports in the security tracker are closed or invalid
  • Go through Issues fixed in 3.2.0-RC1 and correct any unreadable descriptions
  • Check the feature hightlights wiki page for completeness
  • Branch of prep-release-3.2.0-RC1 from master:
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index 13433c3..33547c3 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
-style_version = 3.1.6
-phpbb_version = 3.1.6
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index cf2f0a4..5ff904f 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -70,9 +70,6 @@ $lang = array_merge($lang, array(
'CAT_FLASH_FILES' => 'Flash files',
'CAT_IMAGES' => 'Images',
- 'CAT_QUICKTIME_FILES' => 'Quicktime media files',
- 'CAT_RM_FILES' => 'RealMedia media files',
tab > catégorie > module
module :
class:
- title
- route
- perms (or expression language with auth and other info available ?)
- handle()
definition:
- tag : module => <category_name> && order
As you probably know, the 3.1 brings radical changes to the whole system of phpBB MOD. In fact what we call a MOD today no longer exist and will be replaced by a new extension system based on a simple concept:
[list][*][b][color=#008000]The extensions do not change the code of phpBB [/color] [/b], they are located in a separate folder (one per extension) and use a number of mechanisms to interact with the heart of phpBB.[/list]
But a new system that uses any new mechanisms can be difficult to understand, so I will try to present the general architecture of an extension and then explain how the different mechanisms and concepts used by the function extensions.
[list=1]
[*] [size=150] [color=#800080] [b] Templates [/b] [/color] [/size]
As you may know, with the 3.1 template engine change: instead of using a template engine developed internally used [b] Twig [/b](http://twig.sensiolabs.org) but actually it changes what?
And ben [u] it does not change anything [/u]. Of course it is possible to use all the feat
Mapping:
- "logical name" (the one used by the backend) used as a fallback if there isn't any mapping or if the mapped file isn't found
- done by namespace:
- The global namespace (__main__ is always a copy of an existing namepsace => the mapping is also copied)
- The 'core' namespace uses the mapping of the user style
- The '<style_name>' namespace uses the mapping of the style
- The '<vendor_ext_name>' namespace uses the mapping of the user style
- the mapping of a style is the combination of its mapping file and of all its parents (the oldest parent is merged first, so the more specific can override it)
Namespaces:
a:8:{s:5:"token";s:6:"3997eb";s:6:"parent";N;s:8:"children";a:0:{}s:4:"data";a:6:{s:6:"config";C:62:"Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector":420:{a:16:{s:8:"app_name";N;s:11:"app_version";N;s:5:"token";s:6:"3997eb";s:15:"symfony_version";s:6:"2.3.12";s:4:"name";s:3:"n/a";s:3:"env";s:3:"n/a";s:5:"debug";s:3:"n/a";s:11:"php_version";s:6:"5.5.12";s:14:"xdebug_enabled";b:1;s:14:"eaccel_enabled";b:0;s:11:"apc_enabled";b:0;s:14:"xcache_enabled";b:0;s:16:"wincache_enabled";b:0;s:20:"zend_opcache_enabled";b:0;s:7:"bundles";a:0:{}s:9:"sapi_name";s:14:"apache2handler";}}s:6:"events";C:61:"Symfony\Component\HttpKernel\DataCollector\EventDataCollector":3653:{a:2:{s:16:"called_listeners";a:5:{s:91:"kernel.request.Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest";a:7:{s:5:"event";s:14:"kernel.request";s:4:"type";s:6:"Method";s:5:"class";s:59:"Symfony\Component\HttpKernel\EventListener\ProfilerListener";s:6:"method";s:15:"onKernelRequest";s:4:"file";s:136:"C:\Users\Tristan