mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
Feature_1255 :
- single quotes in queries - start using $conf['dblayer'] git-svn-id: http://piwigo.org/svn/trunk@4385 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -242,9 +242,9 @@ $template->assign(
|
||||
'status_values' => array('public','private'),
|
||||
|
||||
'CAT_STATUS' => $category['status'],
|
||||
'CAT_VISIBLE' => $category['visible'],
|
||||
'CAT_COMMENTABLE' => $category['commentable'],
|
||||
'CAT_UPLOADABLE' => $category['uploadable'],
|
||||
'CAT_VISIBLE' => boolean_to_string($category['visible']),
|
||||
'CAT_COMMENTABLE' => boolean_to_string($category['commentable']),
|
||||
'CAT_UPLOADABLE' => boolean_to_string($category['uploadable']),
|
||||
|
||||
'IMG_ORDER_DEFAULT' => empty($category['image_order']) ?
|
||||
'checked="checked"' : '',
|
||||
|
||||
@@ -38,12 +38,17 @@ class c13y_internal
|
||||
*/
|
||||
function c13y_version($c13y)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$check_list = array();
|
||||
|
||||
$check_list[] = array('type' => 'PHP', 'current' => phpversion(), 'required' => REQUIRED_PHP_VERSION);
|
||||
|
||||
$db_version = pwg_get_db_version();
|
||||
$check_list[] = array('type' => 'MySQL', 'current' => $db_version, 'required' => REQUIRED_MYSQL_VERSION);
|
||||
$check_list[] = array('type' => $conf['dblayer'],
|
||||
'current' => $db_version,
|
||||
'required' => constant('REQUIRED_'.strtoupper($conf['dblayer']).'_VERSION')
|
||||
);
|
||||
|
||||
foreach ($check_list as $elem)
|
||||
{
|
||||
|
||||
@@ -416,7 +416,7 @@ function get_fs_directories($path, $recursive = true)
|
||||
function update_global_rank()
|
||||
{
|
||||
$query = '
|
||||
SELECT id, if(id_uppercat is null,\'\',id_uppercat) AS id_uppercat, uppercats, rank, global_rank
|
||||
SELECT id, id_uppercat, uppercats, rank, global_rank
|
||||
FROM '.CATEGORIES_TABLE.'
|
||||
ORDER BY id_uppercat,rank,name';
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ class plugins
|
||||
if (empty($errors))
|
||||
{
|
||||
$query = '
|
||||
INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES ("'
|
||||
. $plugin_id . '","' . $this->fs_plugins[$plugin_id]['version'] . '"
|
||||
INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES (\''
|
||||
. $plugin_id . '\',\'' . $this->fs_plugins[$plugin_id]['version'] . '\'
|
||||
)';
|
||||
pwg_query($query);
|
||||
}
|
||||
@@ -110,8 +110,8 @@ INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES ("'
|
||||
{
|
||||
$query = '
|
||||
UPDATE ' . PLUGINS_TABLE . '
|
||||
SET state="active", version="'.$this->fs_plugins[$plugin_id]['version'].'"
|
||||
WHERE id="' . $plugin_id . '"';
|
||||
SET state=\'active\', version=\''.$this->fs_plugins[$plugin_id]['version'].'\'
|
||||
WHERE id=\'' . $plugin_id . '\'';
|
||||
pwg_query($query);
|
||||
}
|
||||
break;
|
||||
@@ -126,7 +126,7 @@ WHERE id="' . $plugin_id . '"';
|
||||
die('invalid current state ' . $crt_db_plugin['state']);
|
||||
}
|
||||
$query = '
|
||||
UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="' . $plugin_id . '"';
|
||||
UPDATE ' . PLUGINS_TABLE . ' SET state=\'inactive\' WHERE id=\'' . $plugin_id . '\'';
|
||||
pwg_query($query);
|
||||
if (file_exists($file_to_include))
|
||||
{
|
||||
@@ -144,7 +144,7 @@ UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="' . $plugin_id . '"'
|
||||
die ('CANNOT UNINSTALL - NOT INSTALLED');
|
||||
}
|
||||
$query = '
|
||||
DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
|
||||
DELETE FROM ' . PLUGINS_TABLE . ' WHERE id=\'' . $plugin_id . '\'';
|
||||
pwg_query($query);
|
||||
if (file_exists($file_to_include))
|
||||
{
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ $template->assign(
|
||||
'PWG_VERSION' => PHPWG_VERSION,
|
||||
'OS' => PHP_OS,
|
||||
'PHP_VERSION' => phpversion(),
|
||||
'DB_ENGINE' => 'MySQL',
|
||||
'DB_ENGINE' => $conf['dblayer'],
|
||||
'DB_VERSION' => $db_version,
|
||||
'DB_ELEMENTS' => l10n_dec('%d element', '%d elements', $nb_elements),
|
||||
'DB_CATEGORIES' =>
|
||||
|
||||
Reference in New Issue
Block a user