Skip to content

Commit

Permalink
Final touches to db report errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mastacontrola committed Jan 14, 2017
1 parent 477c201 commit 77dbdc1
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 110 deletions.
2 changes: 1 addition & 1 deletion packages/web/lib/db/pdodb.class.php
Expand Up @@ -28,7 +28,7 @@ class PDODB extends DatabaseManager
/**
* Stores last error for query.
*
* @var bool
* @var bool|string
*/
public $error;
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '8');
define('FOG_VERSION', '9');
define('FOG_SCHEMA', 245);
define('FOG_BCACHE_VER', 111);
define('FOG_SVN_REVISION', 6052);
Expand Down
13 changes: 9 additions & 4 deletions packages/web/lib/pages/schemaupdaterpage.class.php
Expand Up @@ -172,6 +172,7 @@ public function indexPost()
_('Function'),
print_r($update, 1)
);
break;
}
} elseif (false !== self::$DB->query($update)->error) {
$errors[] = sprintf(
Expand All @@ -189,13 +190,17 @@ public function indexPost()
_('Database SQL'),
$update
);
break;
} else {
if (!isset($newSchema)) {
$newSchema = self::getClass('Schema', 1);
}
$newSchema->set('version', ++$version);
}
}
}
$newSchema = self::getClass('Schema', 1)
->set('version', ++$version);
if (count($errors) > 0
|| !$newSchema->save()
if (!$newSchema->save()
|| count($errors) > 0
) {
$fatalerrmsg = '';
$fatalerrmsg = sprintf(
Expand Down
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fog-project-2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-13 23:15-0500\n"
"POT-Creation-Date: 2017-01-13 23:53-0500\n"
"PO-Revision-Date: 2016-05-23 07:36-0400\n"
"Last-Translator: vspushbullet <vspushbullet@gmail.com>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -129,7 +129,7 @@ msgstr "Drucker konnte nicht erstellt werden."
#: /var/www/fog/lib/fog/foggetset.class.php:92
#: /var/www/fog/lib/fog/fogpage.class.php:2293
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:170
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:188
#: /var/www/fog/lib/db/pdodb.class.php:177
#: /var/www/fog/lib/db/pdodb.class.php:216
#: /var/www/fog/lib/db/pdodb.class.php:272
Expand Down Expand Up @@ -341,7 +341,7 @@ msgstr "Objekt"
#: /var/www/fog/lib/fog/fogcontroller.class.php:799
#: /var/www/fog/lib/fog/fogcontroller.class.php:811
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:167
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:185
#: /var/www/fog/commons/text.php:302
msgid "ID"
msgstr "ID"
Expand Down Expand Up @@ -1546,7 +1546,7 @@ msgstr "Hinzufügen"
#: /var/www/fog/lib/pages/groupmanagementpage.class.php:978
#: /var/www/fog/lib/pages/usermanagementpage.class.php:284
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:166
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:183
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:799
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1049
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1316
Expand Down Expand Up @@ -2211,13 +2211,13 @@ msgstr "Ausstehende Gastgeber"

#: /var/www/fog/lib/pages/dashboardpage.class.php:137
#: /var/www/fog/lib/pages/dashboardpage.class.php:146
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:218
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:223
msgid "Click"
msgstr "Klicken Sie auf"

#: /var/www/fog/lib/pages/dashboardpage.class.php:140
#: /var/www/fog/lib/pages/dashboardpage.class.php:149
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:219
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:224
#: /var/www/fog/commons/text.php:92
msgid "here"
msgstr "Hier"
Expand Down Expand Up @@ -4583,32 +4583,32 @@ msgstr "Update wird nicht benötigt!"
msgid "Function"
msgstr "Aktion"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:186
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#, fuzzy
msgid "Database"
msgstr "Datum"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:189
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:190
msgid "Database SQL"
msgstr ""

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:203
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
msgid "Install / Update Failed!"
msgstr "Installation / Update fehlgeschlagen!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:213
msgid "The following errors occurred"
msgstr "Der folgende Fehler aufgetreten"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:217
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:222
msgid "Install / Update Successful!"
msgstr "Installation / Update erfolgreich!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:220
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
msgid "to login"
msgstr "anmelden"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:230
msgid "The following errors occured"
msgstr "Der folgende Fehler aufgetreten"

Expand Down
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-13 23:15-0500\n"
"POT-Creation-Date: 2017-01-13 23:53-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -128,7 +128,7 @@ msgstr "Could not create printer"
#: /var/www/fog/lib/fog/foggetset.class.php:92
#: /var/www/fog/lib/fog/fogpage.class.php:2293
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:170
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:188
#: /var/www/fog/lib/db/pdodb.class.php:177
#: /var/www/fog/lib/db/pdodb.class.php:216
#: /var/www/fog/lib/db/pdodb.class.php:272
Expand Down Expand Up @@ -340,7 +340,7 @@ msgstr "Object"
#: /var/www/fog/lib/fog/fogcontroller.class.php:799
#: /var/www/fog/lib/fog/fogcontroller.class.php:811
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:167
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:185
#: /var/www/fog/commons/text.php:302
msgid "ID"
msgstr "ID"
Expand Down Expand Up @@ -1538,7 +1538,7 @@ msgstr "Add"
#: /var/www/fog/lib/pages/groupmanagementpage.class.php:978
#: /var/www/fog/lib/pages/usermanagementpage.class.php:284
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:166
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:183
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:799
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1049
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1316
Expand Down Expand Up @@ -2201,13 +2201,13 @@ msgstr "Pending hosts"

#: /var/www/fog/lib/pages/dashboardpage.class.php:137
#: /var/www/fog/lib/pages/dashboardpage.class.php:146
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:218
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:223
msgid "Click"
msgstr "Click"

#: /var/www/fog/lib/pages/dashboardpage.class.php:140
#: /var/www/fog/lib/pages/dashboardpage.class.php:149
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:219
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:224
#: /var/www/fog/commons/text.php:92
msgid "here"
msgstr "here"
Expand Down Expand Up @@ -4568,32 +4568,32 @@ msgstr "Update not required!"
msgid "Function"
msgstr "Action"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:186
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#, fuzzy
msgid "Database"
msgstr "Date"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:189
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:190
msgid "Database SQL"
msgstr ""

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:203
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
msgid "Install / Update Failed!"
msgstr "Install / Update Failed!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:213
msgid "The following errors occurred"
msgstr "The following errors occurred"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:217
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:222
msgid "Install / Update Successful!"
msgstr "Install / Update Successful!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:220
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
msgid "to login"
msgstr "to login"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:230
msgid "The following errors occured"
msgstr "The following errors occured"

Expand Down
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-13 23:15-0500\n"
"POT-Creation-Date: 2017-01-13 23:53-0500\n"
"PO-Revision-Date: 2016-05-22 15:14-0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -131,7 +131,7 @@ msgstr "No se pudo crear la impresora"
#: /var/www/fog/lib/fog/foggetset.class.php:92
#: /var/www/fog/lib/fog/fogpage.class.php:2293
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:170
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:188
#: /var/www/fog/lib/db/pdodb.class.php:177
#: /var/www/fog/lib/db/pdodb.class.php:216
#: /var/www/fog/lib/db/pdodb.class.php:272
Expand Down Expand Up @@ -343,7 +343,7 @@ msgstr "Objeto"
#: /var/www/fog/lib/fog/fogcontroller.class.php:799
#: /var/www/fog/lib/fog/fogcontroller.class.php:811
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:167
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:185
#: /var/www/fog/commons/text.php:302
msgid "ID"
msgstr "CARNÉ DE IDENTIDAD"
Expand Down Expand Up @@ -1543,7 +1543,7 @@ msgstr "Añadir"
#: /var/www/fog/lib/pages/groupmanagementpage.class.php:978
#: /var/www/fog/lib/pages/usermanagementpage.class.php:284
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:166
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:183
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:184
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:799
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1049
#: /var/www/fog/lib/pages/hostmanagementpage.class.php:1316
Expand Down Expand Up @@ -2207,13 +2207,13 @@ msgstr "anfitriones pendientes"

#: /var/www/fog/lib/pages/dashboardpage.class.php:137
#: /var/www/fog/lib/pages/dashboardpage.class.php:146
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:218
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:223
msgid "Click"
msgstr "Hacer clic"

#: /var/www/fog/lib/pages/dashboardpage.class.php:140
#: /var/www/fog/lib/pages/dashboardpage.class.php:149
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:219
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:224
#: /var/www/fog/commons/text.php:92
msgid "here"
msgstr "aquí"
Expand Down Expand Up @@ -4578,32 +4578,32 @@ msgstr "No es necesario actualizar!"
msgid "Function"
msgstr "Acción"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:186
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:187
#, fuzzy
msgid "Database"
msgstr "Fecha"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:189
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:190
msgid "Database SQL"
msgstr ""

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:203
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
msgid "Install / Update Failed!"
msgstr "Instalar / Actualizar Error!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:208
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:213
msgid "The following errors occurred"
msgstr "Los siguientes errores ocurrieron"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:217
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:222
msgid "Install / Update Successful!"
msgstr "Instalar / Actualización correcta!"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:220
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
msgid "to login"
msgstr "iniciar sesión"

#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:225
#: /var/www/fog/lib/pages/schemaupdaterpage.class.php:230
msgid "The following errors occured"
msgstr "los siguientes errores ocurrieron"

Expand Down

0 comments on commit 77dbdc1

Please sign in to comment.