mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Coding standards
This commit is contained in:
@@ -365,7 +365,7 @@ class Core extends \Pimple
|
|||||||
{
|
{
|
||||||
// require_once __DIR__ . '/../../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
|
// require_once __DIR__ . '/../../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
|
||||||
require_once __DIR__ . '/Loader/Autoloader.php';
|
require_once __DIR__ . '/Loader/Autoloader.php';
|
||||||
|
|
||||||
$loader = new Loader\Autoloader();
|
$loader = new Loader\Autoloader();
|
||||||
|
|
||||||
$loader->registerPrefixes(array('Twig' => realpath(__DIR__ . '/../../vendor/Twig/lib')));
|
$loader->registerPrefixes(array('Twig' => realpath(__DIR__ . '/../../vendor/Twig/lib')));
|
||||||
@@ -384,7 +384,7 @@ class Core extends \Pimple
|
|||||||
'Doctrine\\Logger' => realpath(__DIR__ . '/../../'),
|
'Doctrine\\Logger' => realpath(__DIR__ . '/../../'),
|
||||||
'Monolog' => realpath(__DIR__ . '/../../vendor/Silex/vendor/monolog/src'),
|
'Monolog' => realpath(__DIR__ . '/../../vendor/Silex/vendor/monolog/src'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$loader->register();
|
$loader->register();
|
||||||
|
|
||||||
require_once __DIR__ . '/../../vendor/Silex/autoload.php';
|
require_once __DIR__ . '/../../vendor/Silex/autoload.php';
|
||||||
|
@@ -67,4 +67,4 @@ Class ApcAutoloader extends Autoloader implements CacheStrategy
|
|||||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -42,4 +42,4 @@ class Autoloader extends UniversalClassLoader
|
|||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -55,4 +55,4 @@ class CacheAutoloader extends Autoloader
|
|||||||
$this->cache->register($prepend);
|
$this->cache->register($prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,6 @@ namespace Alchemy\Phrasea\Loader;
|
|||||||
interface LoaderStrategy
|
interface LoaderStrategy
|
||||||
{
|
{
|
||||||
public function isAvailable();
|
public function isAvailable();
|
||||||
|
|
||||||
public function register();
|
public function register();
|
||||||
}
|
}
|
||||||
|
@@ -66,4 +66,4 @@ Class XcacheAutoloader extends Autoloader implements CacheStrategy
|
|||||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -39,15 +39,15 @@ class bootstrap
|
|||||||
{
|
{
|
||||||
return static::$core;
|
return static::$core;
|
||||||
}
|
}
|
||||||
|
|
||||||
static::$core = new Core($env);
|
static::$core = new Core($env);
|
||||||
|
|
||||||
if (\setup::is_installed())
|
if (\setup::is_installed())
|
||||||
{
|
{
|
||||||
$gatekeeper = \gatekeeper::getInstance();
|
$gatekeeper = \gatekeeper::getInstance();
|
||||||
$gatekeeper->check_directory();
|
$gatekeeper->check_directory();
|
||||||
}
|
}
|
||||||
|
|
||||||
return static::$core;
|
return static::$core;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -159,8 +159,8 @@
|
|||||||
<table style="border:none;width:100%" cellspacing="0" cellpadding="0">
|
<table style="border:none;width:100%" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:left;">
|
<td style="text-align:left;">
|
||||||
{% trans 'phraseanet:: language' %}
|
{% trans 'phraseanet:: language' %}
|
||||||
|
|
||||||
<select name="lng" id="lng-select" onchange="setLanguage();">
|
<select name="lng" id="lng-select" onchange="setLanguage();">
|
||||||
{% for code, language in core.getAvailableLanguages() %}
|
{% for code, language in core.getAvailableLanguages() %}
|
||||||
<option value="{{ code }}" {% if code == session.get_locale() %}selected="selected"{% endif %}>
|
<option value="{{ code }}" {% if code == session.get_locale() %}selected="selected"{% endif %}>
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right;"><span> © Copyright Alchemy 2005-2010</span></td>
|
<td style="text-align:right;"><span> © Copyright Alchemy 2005-2010</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -11,12 +11,12 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
var $dialog = p4.Dialog.get(1);
|
var $dialog = p4.Dialog.get(1);
|
||||||
var $dialogBox = $dialog.getDomElement();
|
var $dialogBox = $dialog.getDomElement();
|
||||||
|
|
||||||
$('input[name="lst"]', $dialogBox).val(p4.Results.Selection.serialize());
|
$('input[name="lst"]', $dialogBox).val(p4.Results.Selection.serialize());
|
||||||
|
|
||||||
var buttons = $dialog.getOption('buttons');
|
var buttons = $dialog.getOption('buttons');
|
||||||
buttons[language.create] = function(){$('form', $dialogBox).trigger('submit')};
|
buttons[language.create] = function(){$('form', $dialogBox).trigger('submit')};
|
||||||
$dialog.setOption('buttons', buttons);
|
$dialog.setOption('buttons', buttons);
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<option value="{{ collection.get_base_id() }}">{{ collection.get_databox().get_viewname() }} / {{ collection.get_name() }}</option>
|
<option value="{{ collection.get_base_id() }}">{{ collection.get_databox().get_viewname() }} / {{ collection.get_name() }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label>{% trans 'Story name' %}</label>
|
<label>{% trans 'Story name' %}</label>
|
||||||
<input name="name" value="" type="text"/>
|
<input name="name" value="" type="text"/>
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
var $dialogBox = $dialog.getDomElement();
|
var $dialogBox = $dialog.getDomElement();
|
||||||
|
|
||||||
$('input[name="lst"]', $dialogBox).val(p4.Results.Selection.serialize());
|
$('input[name="lst"]', $dialogBox).val(p4.Results.Selection.serialize());
|
||||||
|
|
||||||
var buttons = $dialog.getOption('buttons');
|
var buttons = $dialog.getOption('buttons');
|
||||||
buttons[language.create] = function(){$('form', $dialogBox).trigger('submit')};
|
buttons[language.create] = function(){$('form', $dialogBox).trigger('submit')};
|
||||||
$dialog.setOption('buttons', buttons);
|
$dialog.setOption('buttons', buttons);
|
||||||
|
|
||||||
$('form', $dialogBox).bind('submit', function(event){
|
$('form', $dialogBox).bind('submit', function(event){
|
||||||
|
|
||||||
var $form = $(this);
|
var $form = $(this);
|
||||||
|
Reference in New Issue
Block a user