mirror of
https://github.com/phpLiteAdmin/pla.git
synced 2026-05-05 01:30:06 -05:00
Explained why records do not get counted when the db is big and table has no primary key. Also added option to force counting anyway.
This introduced the new language text counting_skipped that still needs to be translated into all languages except German. This fixes issue #226. Note that we should fix issue #79 so the user has a chance to add a primay key. git-svn-id: https://phpliteadmin.googlecode.com/svn/source/trunk@424 c054f44c-0d31-6418-e286-147a9414beb1
This commit is contained in:
@@ -2993,7 +2993,7 @@ else //user is authorized - display the main application
|
||||
|
||||
if ($auth->isPasswordDefault())
|
||||
{
|
||||
echo "<div class='confirm' style='margin:20px;'>";
|
||||
echo "<div class='confirm' style='margin:20px 0px;'>";
|
||||
echo sprintf($lang['warn_passwd'],(is_readable('phpliteadmin.config.php')?'phpliteadmin.config.php':PAGE))."<br />".$lang['warn0'];
|
||||
echo "</div>";
|
||||
}
|
||||
@@ -3061,9 +3061,12 @@ else //user is authorized - display the main application
|
||||
$skippedTables = false;
|
||||
for($i=0; $i<sizeof($result); $i++)
|
||||
{
|
||||
$records = $db->numRows($result[$i]['name'], true);
|
||||
$records = $db->numRows($result[$i]['name'], (!isset($_GET['forceCount'])));
|
||||
if($records == '?')
|
||||
{
|
||||
$skippedTables = true;
|
||||
$records = "<a href='?forceCount=1'>?</a>";
|
||||
}
|
||||
else
|
||||
$totalRecords += $records;
|
||||
$tdWithClass = "<td class='td".($i%2 ? "1" : "2")."'>";
|
||||
@@ -3160,11 +3163,13 @@ else //user is authorized - display the main application
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td class='tdheader' colspan='12'>".sizeof($result)." total</td>";
|
||||
echo "<td class='tdheader' colspan='1' style='text-align:right;'>".$totalRecords.($skippedTables?' + ?':'')."</td>";
|
||||
echo "<td class='tdheader' colspan='1' style='text-align:right;'>".$totalRecords.($skippedTables?" <a href='?forceCount=1'>+ ?</a>":"")."</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "<br/>";
|
||||
}
|
||||
if($skippedTables)
|
||||
echo "<div class='confirm' style='margin-bottom:20px;'>".sprintf($lang["counting_skipped"],"<a href='?forceCount=1'>","</a>")."</div>";
|
||||
echo "<fieldset>";
|
||||
echo "<legend><b>".$lang['create_tbl_db']." '".htmlencode($db->getName())."'</b></legend>";
|
||||
echo "<form action='?action=table_create' method='post'>";
|
||||
|
||||
@@ -231,6 +231,8 @@ $lang = array(
|
||||
"warn0" => "لقد قمنا بتحزيرك.",
|
||||
"warn_passwd" => "إنك تستخدم كلمة السر المعروفة وهذا يشكل خطر على بنك المعلومات. بإمكانك تغيير كلمة السر بسهولة في المكان الأعلى من ملف %s .",
|
||||
"warn_dumbass" => "لم تقم بإستخدام القيمة.",
|
||||
#todo: translate
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "التعبير: Select",
|
||||
"delimit" => "تقسيم الأمر عبر هذه العلامة",
|
||||
"back_top" => "إلى البداية",
|
||||
|
||||
@@ -230,6 +230,8 @@ $lang = array(
|
||||
"warn0" => "你已经受到警告.",
|
||||
"warn_passwd" => "你正在使用默认的密码, 这比较危险的. 你可以很方便的在 %s 文件的中进行修改.",
|
||||
"warn_dumbass" => "你没有改变值 笨蛋[dumbass] ;-)",
|
||||
#todo: translate
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "选择语句",
|
||||
"delimit" => "分隔符",
|
||||
"back_top" => "回到上面",
|
||||
|
||||
@@ -231,6 +231,8 @@ $lang = array(
|
||||
"warn0" => "Sie wurden gewarnt.",
|
||||
"warn_passwd" => "Sie verwenden das Standard-Password, was gefährlich sein kann. Sie können es leicht im oberen Bereich von %s ändern.",
|
||||
"warn_dumbass" => "Sie haben den Wert nicht verwendet.",
|
||||
"counting_skipped" => "Das Zählen der Anzahl Datensätze einiger Tabellen wurde übersprungen, da die Datenbank verhältnismäßig groß ist und
|
||||
für einige Tabellen kein Primärschlüssel definiert ist, sodass das Zählen der Datensätze lange dauertn kann. Füge einen Primärschlüssel hinzu oder %serzwinge das Zählen%s.",
|
||||
"sel_state" => "Select-Ausdruck",
|
||||
"delimit" => "Ausdrücke trennen mit",
|
||||
"back_top" => "Zum Anfang",
|
||||
|
||||
@@ -232,6 +232,7 @@ $lang = array(
|
||||
"warn0" => "You have been warned.",
|
||||
"warn_passwd" => "You are using the default password, which can be dangerous. You can change it easily at the top of %s.",
|
||||
"warn_dumbass" => "You didn't change the value dumbass ;-)",
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "Select Statement",
|
||||
"delimit" => "Delimiter",
|
||||
"back_top" => "Back to Top",
|
||||
|
||||
@@ -230,6 +230,8 @@ $lang = array(
|
||||
"warn0" => "Vous avez été prévenu.",
|
||||
"warn_passwd" => "Vous utilisez le mot de passe par défaut, cela est risqué. Vous pouvez le modifier facilement en haut du fichier %s.",
|
||||
"warn_dumbass" => "Vous n'avez pas changé la valeur, idiot ;-)",
|
||||
#todo: translate
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "Choisir une déclaration",
|
||||
"delimit" => "Délimiteur",
|
||||
"back_top" => "Retour au haut de la page",
|
||||
|
||||
@@ -234,6 +234,8 @@ $lang = array(
|
||||
"warn0" => "Sei stato avvisato.",
|
||||
"warn_passwd" => "Stai usando la password di default, può essere pericoloso. Puoi cambiarla facilmente editando %s.",
|
||||
"warn_dumbass" => "Non hai cambiato dumbass ;-)",
|
||||
#todo: translate
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "Seleziona l'istruzione",
|
||||
"delimit" => "Delimitatore",
|
||||
"back_top" => "Torna in cima",
|
||||
|
||||
@@ -230,6 +230,8 @@ $lang = array(
|
||||
"warn0" => "Вы были предупреждены.",
|
||||
"warn_passwd" => "Вы используете пароль по умолчанию, что не безопасно. Вы можете поменять его вверху %s.",
|
||||
"warn_dumbass" => "Вы не изменили значение",
|
||||
#todo: translate
|
||||
"counting_skipped" => "Counting of records has been skipped for some tables because your database is comparably big and some tables don't have primary keys assigned to them so counting might be slow. Add a primary key to these tables or %sforce counting%s.",
|
||||
"sel_state" => "Выберите Определение",
|
||||
"delimit" => "Разделитель",
|
||||
"back_top" => "Вернуться Наверх",
|
||||
|
||||
Reference in New Issue
Block a user