From 82592d21e79b12243606e56c0d3c6ac62526ce38 Mon Sep 17 00:00:00 2001 From: Ashiyane Digital Security Team Date: Wed, 4 Jul 2012 10:50:44 +0200 Subject: [PATCH 01/35] Translated using Weblate. --- po/fa.po | 303 +++++++++++++++++++++---------------------------------- 1 file changed, 116 insertions(+), 187 deletions(-) diff --git a/po/fa.po b/po/fa.po index b6b2f5cd1e..297d3b0788 100644 --- a/po/fa.po +++ b/po/fa.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.2-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2012-06-04 13:42+0200\n" -"PO-Revision-Date: 2012-07-03 16:34+0200\n" +"PO-Revision-Date: 2012-07-04 10:40+0200\n" "Last-Translator: Ashiyane Digital Security Team \n" "Language-Team: persian \n" "Language: fa\n" @@ -408,10 +408,8 @@ msgstr "آخرین بازدید" #, php-format msgid "%s table" msgid_plural "%s tables" -msgstr[0] "" -"%s جدول" -msgstr[1] "" -"%s جدولها" +msgstr[0] "%s جدول" +msgstr[1] "%s جدولها" #: db_qbe.php:41 msgid "You have to choose at least one column to display" @@ -563,10 +561,8 @@ msgstr "حذف" #, php-format msgid "Total: %s match" msgid_plural "Total: %s matches" -msgstr[0] "" -"مجموع: %s مطابقت" -msgstr[1] "" -"مجموع: %s مطابقتها" +msgstr[0] "مجموع: %s مطابقت" +msgstr[1] "مجموع: %s مطابقتها" #: db_search.php:274 msgid "Search in database" @@ -1696,7 +1692,7 @@ msgstr "بارگیری لاگ ها" #: js/messages.php:208 msgid "Monitor refresh failed" -msgstr "رفرش مانیتور موفقیت آمیز نبود" +msgstr "مانیتور رفرش ریت" #: js/messages.php:209 msgid "" @@ -1880,19 +1876,19 @@ msgstr "پاک کردن" #: js/messages.php:269 msgid "The definition of a stored function must contain a RETURN statement!" -msgstr "تعریف یک تابع ذخیره شده باید شامل یک دستور بازگشت باشد" +msgstr "تعریف یک تابع ذخیره شده باید شامل یک دستور بازگشت باشد!" #: js/messages.php:276 #, php-format msgid "Add %d value(s)" -msgstr "اضافه کردن مقدار %d " +msgstr "اضافه کردن مقدار %d" #: js/messages.php:279 msgid "" "Note: If the file contains multiple tables, they will be combined into one" msgstr "" "توجه داشته باشید:اگر این فایل شامل جداول چند گانه میباشد,انها به یکی تبدیل " -"خواهند شد " +"خواهند شد" #: js/messages.php:282 msgid "Hide query box" @@ -1944,7 +1940,7 @@ msgstr "زوم جستجو" #: js/messages.php:300 msgid "Each point represents a data row." -msgstr ".هر نقطه نشان دهنده یک سطر داده ها" +msgstr "هر نقطه نشان دهنده یک سطر داده ها." #: js/messages.php:302 msgid "Hovering over a point will show its label." @@ -1956,36 +1952,36 @@ msgstr "برای بزرگنمایی,یک بخش را با موس انتخاب ن #: js/messages.php:306 msgid "Click reset zoom link to come back to original state." -msgstr "" +msgstr "برای تنظیم مجدد بر روی لینک زوم کرده تا به حالت اصلی برگردید." #: js/messages.php:308 msgid "Click a data point to view and possibly edit the data row." msgstr "" +"با کیک بر روی داده ها ان ها را بینید و احتمالا ردیف داده ها راویرایش کنید." #: js/messages.php:310 msgid "The plot can be resized by dragging it along the bottom right corner." msgstr "" +"تغییر اندازه طرح با کشیدن آن در امتداد گوشه پایین سمت راس میتواند انجام " +"گیرد." #: js/messages.php:312 -#, fuzzy #| msgid "Add/Delete columns" msgid "Select two columns" -msgstr "اضافه/حذف ستون ها" +msgstr "انتخاب دو ستون" #: js/messages.php:313 msgid "Select two different columns" -msgstr "" +msgstr "انتخاب دو ستون متفاوت" #: js/messages.php:314 -#, fuzzy #| msgid "SQL result" msgid "Query results" -msgstr "نتيجه SQL" +msgstr "نتایج پرس و جو" #: js/messages.php:315 -#, fuzzy msgid "Data point content" -msgstr "توضيحات جدول" +msgstr "محتوای داده ها" #: js/messages.php:318 tbl_change.php:312 tbl_indexes.php:228 #: tbl_indexes.php:255 @@ -1994,27 +1990,25 @@ msgstr "در نظر نگرفتن" #: js/messages.php:319 libraries/display_tbl.lib.php:1391 msgid "Copy" -msgstr "" +msgstr "کپی" #: js/messages.php:334 -#, fuzzy msgid "Add columns" -msgstr "افزودن ستون جديد" +msgstr "افزودن ستونها" #: js/messages.php:337 msgid "Select referenced key" -msgstr "" +msgstr "انتخاب کلید اشاره" #: js/messages.php:338 msgid "Select Foreign Key" -msgstr "" +msgstr "انتخاب کلید خارجی" #: js/messages.php:339 msgid "Please select the primary key or a unique key" -msgstr "" +msgstr "لطفا کلید اولیه و یا یک کلید منحصر به فرد را انتخاب کنید" #: js/messages.php:340 pmd_general.php:77 tbl_relation.php:541 -#, fuzzy #| msgid "Choose field to display" msgid "Choose column to display" msgstr "ستون را براي نمايش انتخاب نماييد" @@ -2024,76 +2018,78 @@ msgid "" "You haven't saved the changes in the layout. They will be lost if you don't " "save them. Do you want to continue?" msgstr "" +"تغییر در طرح شما ذخیره نشده است. آنها از دست خواهد رفت اگر شما آنها را ذخیره " +"نکنید. ایا شما میخواهید ادامه دهید؟" #: js/messages.php:344 msgid "Add an option for column " -msgstr "" +msgstr "اضافه کردن تنظیمات برای ستون " #: js/messages.php:347 msgid "Press escape to cancel editing" -msgstr "" +msgstr "دکمه ی escape را برای صرفنظر کردن از ویرایش" #: js/messages.php:348 msgid "" "You have edited some data and they have not been saved. Are you sure you " "want to leave this page before saving the data?" msgstr "" +"شما مقداری داده ویرایش کردید و ان ها ذخیره نشده اند.ایا شما برای ترک این " +"صفحه بدون ذخیره کردن داده ها اطمینان دارید؟" #: js/messages.php:349 msgid "Drag to reorder" -msgstr "" +msgstr "برای دوباره مرتب کردن drag کنید" #: js/messages.php:350 -#, fuzzy #| msgid "Click to select" msgid "Click to sort" -msgstr "برای انتخاب کلیک کنبد" +msgstr "برای مرتب کردن کلیک کنید" #: js/messages.php:351 msgid "Click to mark/unmark" -msgstr "" +msgstr "برای علامتگذاری / برداشتن علامت اینجا را کلبک کن" #: js/messages.php:352 msgid "Click the drop-down arrow
to toggle column's visibility" -msgstr "" +msgstr "با کلیک بر روی منوی کشویی
به ضامن دید ستون" #: js/messages.php:354 msgid "" "This table does not contain a unique column. Features related to the grid " "edit, checkbox, Edit, Copy and Delete links may not work after saving." msgstr "" +"این جدول هیچ مقدار کلیدی ندارد. امکانات ویرایش جدولی، چک باکس ها ، ویرایش ، " +"کپی و حذف ممکن است کار نکنند." #: js/messages.php:355 msgid "" "You can also edit most columns
by clicking directly on their content." msgstr "" +"شما همچنین می توانید بیشتر ستون ها را
با کلیک روی آنها ویرایش کنید." #: js/messages.php:356 msgid "Go to link" -msgstr "" +msgstr "به لینک بروید" #: js/messages.php:359 -#, fuzzy #| msgid "Change password" msgid "Generate password" msgstr "تغيير اسم رمز" #: js/messages.php:360 libraries/replication_gui.lib.php:369 -#, fuzzy msgid "Generate" -msgstr "توليد‌شده توسط" +msgstr "توليد‌ کن" #: js/messages.php:361 -#, fuzzy #| msgid "Change password" msgid "Change Password" msgstr "تغيير اسم رمز" #: js/messages.php:364 tbl_structure.php:480 -#, fuzzy #| msgid "Mon" msgid "More" -msgstr "دوشنبه" +msgstr "بیشتر" #: js/messages.php:367 setup/lib/index.lib.php:173 #, php-format @@ -2101,35 +2097,32 @@ msgid "" "A newer version of phpMyAdmin is available and you should consider " "upgrading. The newest version is %s, released on %s." msgstr "" +"نسخه جدید phpmyadmin آمده است و شما باید به فکر به روز رسانی باشید. جدیدترین " +"نسخه %s و در %s بیرون آمده است." #. l10n: Latest available phpMyAdmin version #: js/messages.php:369 -#, fuzzy #| msgid "Last version" msgid ", latest stable version:" -msgstr "نسخه قبلی" +msgstr "نسخه قبلی:" #: js/messages.php:370 -#, fuzzy msgid "up to date" -msgstr "No databases" +msgstr "به روز" #. l10n: Display text for calendar close link #: js/messages.php:389 -#, fuzzy #| msgid "None" msgid "Done" -msgstr "خير" +msgstr "انجام شد" #: js/messages.php:393 -#, fuzzy #| msgid "Previous" msgctxt "Previous month" msgid "Prev" msgstr "قبل" #: js/messages.php:398 -#, fuzzy #| msgid "Next" msgctxt "Next month" msgid "Next" @@ -2137,29 +2130,25 @@ msgstr "بعد" #. l10n: Display text for current month link in calendar #: js/messages.php:401 -#, fuzzy #| msgid "Total" msgid "Today" -msgstr "جمع كل" +msgstr "امروز" #: js/messages.php:404 -#, fuzzy #| msgid "Binary" msgid "January" -msgstr "دودويي" +msgstr "ژانویه" #: js/messages.php:405 msgid "February" -msgstr "" +msgstr "فوریه" #: js/messages.php:406 -#, fuzzy #| msgid "Mar" msgid "March" msgstr "مارس" #: js/messages.php:407 -#, fuzzy #| msgid "Apr" msgid "April" msgstr "آوريل" @@ -2169,40 +2158,36 @@ msgid "May" msgstr "مي" #: js/messages.php:409 -#, fuzzy #| msgid "Jun" msgid "June" msgstr "ژوئن" #: js/messages.php:410 -#, fuzzy #| msgid "Jul" msgid "July" msgstr "جولاي" #: js/messages.php:411 -#, fuzzy #| msgid "Aug" msgid "August" msgstr "آگوست" #: js/messages.php:412 msgid "September" -msgstr "" +msgstr "سپتامبر" #: js/messages.php:413 -#, fuzzy #| msgid "Oct" msgid "October" msgstr "اكتبر" #: js/messages.php:414 msgid "November" -msgstr "" +msgstr "نوامبر" #: js/messages.php:415 msgid "December" -msgstr "" +msgstr "دسامبر" #. l10n: Short month name #: js/messages.php:419 libraries/common.lib.php:1609 @@ -2226,7 +2211,6 @@ msgstr "آوريل" #. l10n: Short month name #: js/messages.php:427 libraries/common.lib.php:1617 -#, fuzzy #| msgid "May" msgctxt "Short month name" msgid "May" @@ -2268,19 +2252,16 @@ msgid "Dec" msgstr "دسامبر" #: js/messages.php:444 -#, fuzzy #| msgid "Sun" msgid "Sunday" msgstr "يكشنبه" #: js/messages.php:445 -#, fuzzy #| msgid "Mon" msgid "Monday" msgstr "دوشنبه" #: js/messages.php:446 -#, fuzzy #| msgid "Tue" msgid "Tuesday" msgstr "سه‌شنبه" @@ -2294,7 +2275,6 @@ msgid "Thursday" msgstr "پنجشنبه" #: js/messages.php:449 -#, fuzzy #| msgid "Fri" msgid "Friday" msgstr "جمعه" @@ -2305,7 +2285,6 @@ msgstr "شنبه" #. l10n: Short week day name #: js/messages.php:454 -#, fuzzy #| msgctxt "Short week day name" #| msgid "Sun" msgid "Sun" @@ -2343,49 +2322,42 @@ msgstr "شنبه" #. l10n: Minimal week day name #: js/messages.php:470 -#, fuzzy #| msgid "Sun" msgid "Su" msgstr "يكشنبه" #. l10n: Minimal week day name #: js/messages.php:472 -#, fuzzy #| msgid "Mon" msgid "Mo" msgstr "دوشنبه" #. l10n: Minimal week day name #: js/messages.php:474 -#, fuzzy #| msgid "Tue" msgid "Tu" msgstr "سه‌شنبه" #. l10n: Minimal week day name #: js/messages.php:476 -#, fuzzy #| msgid "Wed" msgid "We" msgstr "چهارشنبه" #. l10n: Minimal week day name #: js/messages.php:478 -#, fuzzy #| msgid "Thu" msgid "Th" msgstr "پنج‌شنبه" #. l10n: Minimal week day name #: js/messages.php:480 -#, fuzzy #| msgid "Fri" msgid "Fr" msgstr "جمعه" #. l10n: Minimal week day name #: js/messages.php:482 -#, fuzzy #| msgid "Sat" msgid "Sa" msgstr "شنبه" @@ -2398,15 +2370,14 @@ msgstr "هفته" #. l10n: Month-year order for calendar, use either "calendar-month-year" or "calendar-year-month". #: js/messages.php:487 msgid "calendar-month-year" -msgstr "" +msgstr "تقویم-ماه-سال" #. l10n: Year suffix for calendar, "none" is empty. #: js/messages.php:489 -#, fuzzy #| msgid "None" msgctxt "Year suffix" msgid "none" -msgstr "خير" +msgstr "هیچ" #: js/messages.php:498 msgid "Hour" @@ -2423,7 +2394,7 @@ msgstr "ثانیه" #: libraries/Advisor.class.php:168 #, php-format msgid "Failed formatting string for rule '%s'. PHP threw following error: %s" -msgstr "" +msgstr "در فرمت دادن به رشته '%s' موفق نبود. PHP خطای روبه رو را داد:%s" #: libraries/Advisor.class.php:326 server_status.php:955 msgid "per second" @@ -2440,20 +2411,20 @@ msgstr "در ساعت" #: libraries/Advisor.class.php:335 msgid "per day" -msgstr "" +msgstr "هر روز" #: libraries/Config.class.php:703 msgid "Remove \"./config\" directory before using phpMyAdmin!" -msgstr "" +msgstr "مسیر \"./config\" را قبل از استفاده از PHPMYADMIN حذف نمایید!" #: libraries/Config.class.php:729 #, php-format msgid "Existing configuration file (%s) is not readable." -msgstr "" +msgstr "فایل تنظیمات فعلی (%s) قابل خواندن نیست." #: libraries/Config.class.php:755 msgid "Wrong permissions on configuration file, should not be world writable!" -msgstr "" +msgstr "تنظمیات دسترسی اشتباه در فایل تنظیمات ، نباید قابل نوشتن جهانی باشد!" #: libraries/Config.class.php:1306 msgid "Font size" @@ -2461,15 +2432,15 @@ msgstr "اندازه حروف" #: libraries/Error_Handler.class.php:62 msgid "Too many error messages, some are not displayed." -msgstr "" +msgstr "خطای زیاد،برخی نمایش داده نشدند." #: libraries/File.class.php:221 msgid "File was not an uploaded file." -msgstr "" +msgstr "فایل آپلود شده نبود." #: libraries/File.class.php:260 libraries/File.class.php:389 msgid "Unknown error while uploading." -msgstr "" +msgstr "خطای ناشناخته به هنگام آپلود." #: libraries/File.class.php:278 msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini." @@ -2541,7 +2512,6 @@ msgstr "" #: libraries/Index.class.php:448 libraries/rte/rte_events.lib.php:480 #: libraries/rte/rte_routines.lib.php:957 tbl_tracking.php:263 #: tbl_tracking.php:327 -#, fuzzy msgid "Comment" msgstr "توضيحات" @@ -2604,9 +2574,8 @@ msgid "Could not save recent table" msgstr "" #: libraries/RecentTable.class.php:142 -#, fuzzy msgid "Recent tables" -msgstr "No tables" +msgstr "جدول های اخیر" #: libraries/RecentTable.class.php:149 msgid "There are no recent tables" @@ -3337,10 +3306,9 @@ msgid "SQL Validator is disabled" msgstr "" #: libraries/config/FormDisplay.class.php:745 -#, fuzzy #| msgid "Link not found" msgid "SOAP extension not found" -msgstr "پيوند پيدا نشد" +msgstr "کتابخانه SOAP یافت نشد" #: libraries/config/FormDisplay.class.php:753 #, php-format @@ -3380,9 +3348,8 @@ msgid "Improves efficiency of screen refresh" msgstr "" #: libraries/config/messages.inc.php:18 -#, fuzzy msgid "Enable Ajax" -msgstr "فعال" +msgstr "ایجکس فعال شود" #: libraries/config/messages.inc.php:19 msgid "" @@ -3525,9 +3492,8 @@ msgid "Debug SQL" msgstr "" #: libraries/config/messages.inc.php:49 -#, fuzzy msgid "Default display direction" -msgstr "آمار پايگاههاي داده" +msgstr "تنظیم پیش فرض جهت نمایش" #: libraries/config/messages.inc.php:50 msgid "Tab that is displayed when entering a database" @@ -3584,26 +3550,23 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:63 -#, fuzzy #| msgid "Table maintenance" msgid "Disable multi table maintenance" -msgstr "نگهداشت جدول" +msgstr "نگهداشت چندتایی جدول را غیر فعال کنید" #: libraries/config/messages.inc.php:64 msgid "Edit SQL queries in popup window" msgstr "" #: libraries/config/messages.inc.php:65 -#, fuzzy #| msgid "Edit next row" msgid "Edit in window" -msgstr "ویرایش کردن ردیف بعدی" +msgstr "ویرایش کردن این پنجره" #: libraries/config/messages.inc.php:66 -#, fuzzy #| msgid "Display Features" msgid "Display errors" -msgstr "نمايش خصوصيات" +msgstr "نمایش خطاها" #: libraries/config/messages.inc.php:67 msgid "Gather errors" @@ -3632,9 +3595,8 @@ msgid "Save as file" msgstr "ذخيره به صورت پرونده" #: libraries/config/messages.inc.php:73 libraries/config/messages.inc.php:241 -#, fuzzy msgid "Character set of the file" -msgstr "مجموعه كاراكترهاي پرونده:" +msgstr "مجموعه كاراكترهاي پرونده" #: libraries/config/messages.inc.php:74 libraries/config/messages.inc.php:90 #: tbl_gis_visualization.php:181 tbl_printview.php:327 tbl_structure.php:846 @@ -3653,7 +3615,6 @@ msgstr "فشرده‌سازي" #: libraries/export/excel.php:25 libraries/export/htmlword.php:30 #: libraries/export/latex.php:72 libraries/export/ods.php:25 #: libraries/export/odt.php:58 libraries/export/texytext.php:28 -#, fuzzy #| msgid "Put fields names in the first row" msgid "Put columns names in the first row" msgstr "قراردادن نام ستونها در اولين سطر" @@ -3661,7 +3622,6 @@ msgstr "قراردادن نام ستونها در اولين سطر" #: libraries/config/messages.inc.php:77 libraries/config/messages.inc.php:243 #: libraries/config/messages.inc.php:250 libraries/import/csv.php:76 #: libraries/import/ldi.php:42 -#, fuzzy #| msgid "Fields enclosed by" msgid "Columns enclosed by" msgstr "ستونهاي درميان‌گرفته با" @@ -3669,7 +3629,6 @@ msgstr "ستونهاي درميان‌گرفته با" #: libraries/config/messages.inc.php:78 libraries/config/messages.inc.php:244 #: libraries/config/messages.inc.php:251 libraries/import/csv.php:81 #: libraries/import/ldi.php:43 -#, fuzzy #| msgid "Fields escaped by" msgid "Columns escaped by" msgstr "ستونهاي جداشده با" @@ -3689,10 +3648,9 @@ msgstr "" #: libraries/config/messages.inc.php:81 libraries/config/messages.inc.php:247 #: libraries/config/messages.inc.php:255 libraries/import/csv.php:63 #: libraries/import/ldi.php:41 -#, fuzzy #| msgid "Lines terminated by" msgid "Columns terminated by" -msgstr "خطوط منتهي به" +msgstr "ستون های از بین رفته به وسیله" #: libraries/config/messages.inc.php:82 libraries/config/messages.inc.php:242 #: libraries/import/csv.php:86 libraries/import/ldi.php:44 @@ -3720,10 +3678,9 @@ msgstr "" #: libraries/config/messages.inc.php:145 libraries/export/htmlword.php:24 #: libraries/export/latex.php:40 libraries/export/odt.php:32 #: libraries/export/sql.php:123 libraries/export/texytext.php:23 -#, fuzzy #| msgid "%s table(s)" msgid "Dump table" -msgstr "%s جدول(ها)" +msgstr "بیرون کشیدن جدول" #: libraries/config/messages.inc.php:94 libraries/export/latex.php:32 msgid "Include table caption" @@ -3751,15 +3708,13 @@ msgstr "" #: libraries/config/messages.inc.php:102 libraries/config/messages.inc.php:114 #: libraries/config/messages.inc.php:138 tbl_relation.php:392 -#, fuzzy msgid "Relations" -msgstr "عمليات" +msgstr "رابطه ها" #: libraries/config/messages.inc.php:107 -#, fuzzy #| msgid "Export" msgid "Export method" -msgstr "صدور" +msgstr "روش صدور" #: libraries/config/messages.inc.php:116 libraries/config/messages.inc.php:118 msgid "Save on server" @@ -3775,10 +3730,9 @@ msgid "Remember file name template" msgstr "" #: libraries/config/messages.inc.php:122 -#, fuzzy #| msgid "Enclose table and field names with backquotes" msgid "Enclose table and column names with backquotes" -msgstr "قراردادن نام جدولها و ستونها بين علامت نقل‌قول (\" ' \")" +msgstr "قراردادن نام جدولها و ستونها بين علامت نقل‌قول" #: libraries/config/messages.inc.php:123 libraries/config/messages.inc.php:262 #: libraries/display_export.lib.php:348 @@ -3794,9 +3748,8 @@ msgid "Creation/Update/Check dates" msgstr "" #: libraries/config/messages.inc.php:126 -#, fuzzy msgid "Use delayed inserts" -msgstr "وروديهاي تمديدشده" +msgstr "از ورودی با تاخیر استفاده نمایید" #: libraries/config/messages.inc.php:127 libraries/export/sql.php:81 msgid "Disable foreign key checks" @@ -3807,10 +3760,9 @@ msgid "Use hexadecimal for BLOB" msgstr "" #: libraries/config/messages.inc.php:132 -#, fuzzy #| msgid "Extended inserts" msgid "Use ignore inserts" -msgstr "وروديهاي تمديدشده" +msgstr "از ورودی های درنظرگرفته نشده استفاده نمایید" #: libraries/config/messages.inc.php:134 msgid "Syntax to use when inserting data" @@ -3821,10 +3773,9 @@ msgid "Maximal length of created query" msgstr "" #: libraries/config/messages.inc.php:140 -#, fuzzy #| msgid "Export" msgid "Export type" -msgstr "صدور" +msgstr "نوع صدور" #: libraries/config/messages.inc.php:141 libraries/export/sql.php:73 msgid "Enclose export in a transaction" @@ -3913,9 +3864,8 @@ msgid "Features" msgstr "" #: libraries/config/messages.inc.php:170 -#, fuzzy msgid "General" -msgstr "توليد‌شده توسط" +msgstr "عمومی" #: libraries/config/messages.inc.php:171 msgid "Set some commonly used options" @@ -3942,9 +3892,8 @@ msgid "LaTeX" msgstr "" #: libraries/config/messages.inc.php:180 -#, fuzzy msgid "Databases display options" -msgstr "آمار پايگاههاي داده" +msgstr "گزینه های نمایش پایگاه داده" #: libraries/config/messages.inc.php:181 setup/frames/menu.inc.php:18 msgid "Navigation frame" @@ -3956,7 +3905,6 @@ msgstr "" #: libraries/config/messages.inc.php:183 libraries/select_server.lib.php:35 #: setup/frames/index.inc.php:112 -#, fuzzy msgid "Servers" msgstr "سرور" @@ -3977,10 +3925,9 @@ msgid "Microsoft Office" msgstr "" #: libraries/config/messages.inc.php:190 -#, fuzzy #| msgid "Documentation" msgid "Open Document" -msgstr "مستندات" +msgstr "مستندات باز" #: libraries/config/messages.inc.php:192 msgid "Other core settings" @@ -3991,10 +3938,9 @@ msgid "Settings that didn't fit enywhere else" msgstr "" #: libraries/config/messages.inc.php:194 -#, fuzzy #| msgid "Page number:" msgid "Page titles" -msgstr "شماره صفحه:" +msgstr "عنوان صفحه" #: libraries/config/messages.inc.php:195 msgid "" @@ -4029,10 +3975,9 @@ msgid "Basic settings" msgstr "" #: libraries/config/messages.inc.php:201 -#, fuzzy #| msgid "Documentation" msgid "Authentication" -msgstr "مستندات" +msgstr "ورود" #: libraries/config/messages.inc.php:202 msgid "Authentication settings" @@ -4091,26 +4036,22 @@ msgstr "" #: libraries/config/messages.inc.php:215 libraries/config/messages.inc.php:220 #: setup/frames/menu.inc.php:17 -#, fuzzy msgid "SQL queries" msgstr "پرس و جوي SQL" #: libraries/config/messages.inc.php:217 -#, fuzzy msgid "SQL Query box" -msgstr "پرس و جوي SQL" +msgstr "جعبه پرس و جوي SQL" #: libraries/config/messages.inc.php:218 msgid "Customize links shown in SQL Query boxes" msgstr "" #: libraries/config/messages.inc.php:221 -#, fuzzy msgid "SQL queries settings" -msgstr "پرس و جوي SQL" +msgstr "تنظیمات پرس و جوي SQL" #: libraries/config/messages.inc.php:222 -#, fuzzy msgid "SQL Validator" msgstr "معتبرسازي SQL" @@ -4131,7 +4072,6 @@ msgid "Customize startup page" msgstr "" #: libraries/config/messages.inc.php:226 -#, fuzzy msgid "Tabs" msgstr "جدول" @@ -4307,7 +4247,7 @@ msgstr "" #: libraries/config/messages.inc.php:278 msgid "Display databases in a tree" -msgstr "پایگاه داده را در یک درخت نمایش بده." +msgstr "پایگاه داده را در یک درخت نمایش بده" #: libraries/config/messages.inc.php:279 msgid "Disable this if you want to see all databases at once" @@ -4360,10 +4300,9 @@ msgid "Maximum number of recently used tables; set 0 to disable" msgstr "" #: libraries/config/messages.inc.php:291 -#, fuzzy #| msgid "Analyze table" msgid "Recently used tables" -msgstr "تحليل جدول" +msgstr "جدول های استفاده شده اخیر" #: libraries/config/messages.inc.php:292 msgid "Use less graphically intense tabs" @@ -4508,10 +4447,9 @@ msgid "Use natural order for sorting table and database names" msgstr "" #: libraries/config/messages.inc.php:324 -#, fuzzy #| msgid "Alter table order by" msgid "Natural order" -msgstr "تغيير جدول مرتب شده با" +msgstr "نوبت خنثی" #: libraries/config/messages.inc.php:325 libraries/config/messages.inc.php:335 msgid "Use only icons, only text or both" @@ -4766,19 +4704,17 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:386 -#, fuzzy #| msgid "Any host" msgid "Control host" -msgstr "همه ميزبانها" +msgstr "کنترل هاست" #: libraries/config/messages.inc.php:387 msgid "Count tables when showing database list" msgstr "" #: libraries/config/messages.inc.php:388 -#, fuzzy msgid "Count tables" -msgstr "No tables" +msgstr "تعداد جداول" #: libraries/config/messages.inc.php:389 msgid "" @@ -4924,9 +4860,8 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:419 -#, fuzzy msgid "Relation table" -msgstr "مرمت جدول" +msgstr "ارتباط جدول" #: libraries/config/messages.inc.php:420 msgid "SQL command to fetch available databases" @@ -4982,10 +4917,9 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:432 -#, fuzzy #| msgid "Displaying Column Comments" msgid "Display columns table" -msgstr "نمايش توضيحات ستون" +msgstr "نمایش جدول ستون ها" #: libraries/config/messages.inc.php:433 msgid "" @@ -5032,10 +4966,9 @@ msgid "Defines the list of statements the auto-creation uses for new versions." msgstr "" #: libraries/config/messages.inc.php:442 -#, fuzzy #| msgid "Statements" msgid "Statements to track" -msgstr "شرج" +msgstr "جملاتی که باید ردگیری شوند" #: libraries/config/messages.inc.php:443 msgid "" @@ -5054,9 +4987,8 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:446 -#, fuzzy msgid "Automatically create versions" -msgstr "نسخه سرور" +msgstr "به صورت خودکار نسخه ایجاد شود" #: libraries/config/messages.inc.php:447 msgid "" @@ -5187,7 +5119,6 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:474 libraries/sql_query_form.lib.php:352 -#, fuzzy msgid "Retain query box" msgstr "پرس و جوي SQL" @@ -8021,7 +7952,7 @@ msgstr "" #: libraries/server_synchronize.lib.php:1308 msgid "Difference" -msgstr "" +msgstr "تفاوت" #: libraries/server_synchronize.lib.php:1309 server_synchronize.php:1188 #, fuzzy @@ -9044,7 +8975,7 @@ msgstr "" #: server_privileges.php:46 server_privileges.php:277 #: server_privileges.php:649 msgid "Allows to set up events for the event scheduler" -msgstr "" +msgstr "دادن مجوز برای قرار دهی رویداد برای لیست رویدادهای زمانی" #: server_privileges.php:47 server_privileges.php:311 #: server_privileges.php:637 @@ -9054,12 +8985,13 @@ msgstr "" #: server_privileges.php:48 server_privileges.php:233 #: server_privileges.php:624 msgid "Allows importing data from and exporting data into files." -msgstr "" +msgstr "دادن اجازه برای وارد و خارج کردن اطلاعات از فایل ها." #: server_privileges.php:49 server_privileges.php:655 msgid "" "Allows adding users and privileges without reloading the privilege tables." msgstr "" +"دادن اجازه برای ایجاد کاربران و اعطای امتیازات بدون بارگذاری اطلاعات جداول." #: server_privileges.php:50 server_privileges.php:241 #: server_privileges.php:631 @@ -12502,7 +12434,7 @@ msgid "" "restarting after changing open_files_limit." msgstr "" "می توانید با افزایش {open_files_limit}، و چک کردن سابقه اجرایی در هنگام " -"اجرای مجدد" +"اجرای مجدد." #: po/advisory_rules.php:188 #, php-format @@ -12925,12 +12857,12 @@ msgstr "مقدار concurrent_insert صفر میباشد" #~ "a semicolon is missing somewhere.
If you receive a blank page, " #~ "everything is fine." #~ msgstr "" -#~ "phpMyAdmin قادر به خواندن پرونده تنظيمات نمي‌باشد!
اين ممكن است به " -#~ "خاطر وجود يك مشكل دستوري و يا پيدانشدن پرونده توسط php باشد.
لطفا " -#~ "پرونده تنظميات را مستقيما توسط پيوند زير صدا زده و پيغام(هاي) خطاي php كه " -#~ "دريافت مي‌كنيد را بخوانيد. در اكثر موارد يك علامت نقل قول (\" ' \") يا " -#~ "ويرگول‌نقطه (\" ; \") در جايي وجود ندارد.
اگر يك صفحه خالي دريافت " -#~ "كرديد ، همه چيز درست است." +#~ "phpMyAdmin قادر به خواندن پرونده تنظيمات نمي‌باشد!
اين ممكن است به خاطر " +#~ "وجود يك مشكل دستوري و يا پيدانشدن پرونده توسط php باشد.
لطفا پرونده " +#~ "تنظميات را مستقيما توسط پيوند زير صدا زده و پيغام(هاي) خطاي php كه دريافت " +#~ "مي‌كنيد را بخوانيد. در اكثر موارد يك علامت نقل قول (\" ' \") يا ويرگول‌نقطه (\" " +#~ "; \") در جايي وجود ندارد.
اگر يك صفحه خالي دريافت كرديد ، همه چيز درست " +#~ "است." #~ msgid "seconds" #~ msgstr "ثانیه" @@ -12968,8 +12900,8 @@ msgstr "مقدار concurrent_insert صفر میباشد" #~ "The additional features for working with linked tables have been " #~ "deactivated. To find out why click %shere%s." #~ msgstr "" -#~ "امكانات اضافي براي كاركردن با جدولهاي پيوندي غيرفعال شده‌است . براي " -#~ "پيداكردن دليل آن %sاينجا%s را بزنيد ." +#~ "امكانات اضافي براي كاركردن با جدولهاي پيوندي غيرفعال شده‌است . براي پيداكردن " +#~ "دليل آن %sاينجا%s را بزنيد ." #~ msgid "No tables" #~ msgstr "No tables" @@ -12983,22 +12915,20 @@ msgstr "مقدار concurrent_insert صفر میباشد" #~ "those values, precede it with a backslash (for example '\\\\xyz' or 'a" #~ "\\'b')." #~ msgstr "" -#~ "اگر نوع ستون \"enum\" يا \"set\" مي‌باشد ، لطفا براي ورود مقادير از اين " -#~ "قالب استفاده نماييد : 'a','b','c'...
اگر احتياج داشتيد كه از علامت " -#~ "مميز برعكس(بك‌اسلش) (\" \\ \") يا نقل‌قول تكي (\" ' \") در آن مقادير " -#~ "استفاده نماييد ، قبل از آنها علامت (\" \\ \") را بگذاريد
(براي " -#~ "مثال'\\\\xyz' يا 'a\\'b')" +#~ "اگر نوع ستون \"enum\" يا \"set\" مي‌باشد ، لطفا براي ورود مقادير از اين قالب " +#~ "استفاده نماييد : 'a','b','c'...
اگر احتياج داشتيد كه از علامت مميز " +#~ "برعكس(بك‌اسلش) (\" \\ \") يا نقل‌قول تكي (\" ' \") در آن مقادير استفاده نماييد ، " +#~ "قبل از آنها علامت (\" \\ \") را بگذاريد
(براي مثال'\\\\xyz' يا 'a\\'b')" #~ msgid "" #~ "Enter each value in a separate field. If you ever need to put a backslash " #~ "(\"\\\") or a single quote (\"'\") amongst those values, precede it with " #~ "a backslash (for example '\\\\xyz' or 'a\\'b')." #~ msgstr "" -#~ "اگر نوع ستون \"enum\" يا \"set\" مي‌باشد ، لطفا براي ورود مقادير از اين " -#~ "قالب استفاده نماييد : 'a','b','c'...
اگر احتياج داشتيد كه از علامت " -#~ "مميز برعكس(بك‌اسلش) (\" \\ \") يا نقل‌قول تكي (\" ' \") در آن مقادير " -#~ "استفاده نماييد ، قبل از آنها علامت (\" \\ \") را بگذاريد
(براي " -#~ "مثال'\\\\xyz' يا 'a\\'b')" +#~ "اگر نوع ستون \"enum\" يا \"set\" مي‌باشد ، لطفا براي ورود مقادير از اين قالب " +#~ "استفاده نماييد : 'a','b','c'...
اگر احتياج داشتيد كه از علامت مميز " +#~ "برعكس(بك‌اسلش) (\" \\ \") يا نقل‌قول تكي (\" ' \") در آن مقادير استفاده نماييد ، " +#~ "قبل از آنها علامت (\" \\ \") را بگذاريد
(براي مثال'\\\\xyz' يا 'a\\'b')" #~ msgid "New table" #~ msgstr "No tables" @@ -13041,10 +12971,9 @@ msgstr "مقدار concurrent_insert صفر میباشد" #~ "conversion. Either configure PHP to enable these extensions or disable " #~ "charset conversion in phpMyAdmin." #~ msgstr "" -#~ "بارگذاري iconv يا recode extension كه براي تبديل مجموعه كاراكترها لازم " -#~ "است ، مقدور نمي‌باشد، php را براي اجازه استفاده از آنها تنظيم كرده و يا " -#~ "تبديل مجموعه كاراكترها (charset conversion) را در phpMyAdmin غيرفعال " -#~ "نماييد." +#~ "بارگذاري iconv يا recode extension كه براي تبديل مجموعه كاراكترها لازم است " +#~ "، مقدور نمي‌باشد، php را براي اجازه استفاده از آنها تنظيم كرده و يا تبديل " +#~ "مجموعه كاراكترها (charset conversion) را در phpMyAdmin غيرفعال نماييد." #~ msgid "Field" #~ msgstr "ستون" From c4d0cee7f5760a84d657342834f5d3a4c698b630 Mon Sep 17 00:00:00 2001 From: Ashiyane Digital Security Team Date: Wed, 4 Jul 2012 10:59:07 +0200 Subject: [PATCH 02/35] Translated using Weblate. --- po/fa.po | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/po/fa.po b/po/fa.po index 297d3b0788..4e2ca63d11 100644 --- a/po/fa.po +++ b/po/fa.po @@ -5058,7 +5058,6 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:461 -#, fuzzy msgid "Show display direction" msgstr "آمار پايگاههاي داده" @@ -5069,7 +5068,6 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:463 -#, fuzzy msgid "Show field types" msgstr "نمايش جدولها" @@ -5086,7 +5084,6 @@ msgid "Whether to show hint or not" msgstr "" #: libraries/config/messages.inc.php:467 -#, fuzzy #| msgid "Show grid" msgid "Show hint" msgstr "Show grid" @@ -5127,7 +5124,6 @@ msgid "Allow to display database and table statistics (eg. space usage)" msgstr "" #: libraries/config/messages.inc.php:476 -#, fuzzy msgid "Show statistics" msgstr "آمار سطرها" @@ -5198,7 +5194,6 @@ msgstr "" #: libraries/config/messages.inc.php:494 tbl_tracking.php:460 #: tbl_tracking.php:517 -#, fuzzy msgid "Username" msgstr "نام كاربر:" @@ -5227,7 +5222,6 @@ msgid "" msgstr "" #: libraries/config/messages.inc.php:500 -#, fuzzy #| msgid "Add/Delete Field Columns" msgid "Textarea columns" msgstr "اضافه يا حذف ستونها" @@ -5251,7 +5245,6 @@ msgid "Title of browser window when nothing is selected" msgstr "" #: libraries/config/messages.inc.php:506 -#, fuzzy #| msgid "Default" msgid "Default title" msgstr "پيش‌فرض" @@ -5379,7 +5372,6 @@ msgstr "" #: libraries/config/setup.forms.php:292 #: libraries/config/user_preferences.forms.php:190 -#, fuzzy msgid "Database export options" msgstr "آمار پايگاههاي داده" @@ -5545,7 +5537,6 @@ msgstr "" #: libraries/display_create_database.lib.php:21 #: libraries/display_create_database.lib.php:39 -#, fuzzy #| msgid "Create new database" msgid "Create database" msgstr "ساخت پايگاه داده جديد" @@ -5556,7 +5547,6 @@ msgstr "ساختن" #: libraries/display_create_database.lib.php:43 server_privileges.php:123 #: server_privileges.php:1587 server_replication.php:33 -#, fuzzy msgid "No Privileges" msgstr "امتيازات" @@ -5574,7 +5564,6 @@ msgid "Name" msgstr "اسم" #: libraries/display_create_table.lib.php:55 -#, fuzzy #| msgid "Number of rows per page" msgid "Number of columns" msgstr "تعداد سطرها در هر صفحه" @@ -5584,7 +5573,6 @@ msgid "Could not load export plugins, please check your installation!" msgstr "" #: libraries/display_export.lib.php:82 -#, fuzzy #| msgid "Create table on database %s" msgid "Exporting databases from the current server" msgstr "ساخت جدول جديد در پايگاه داده %s" From bc854d66f296fb236841ae1a1e7233743c95604c Mon Sep 17 00:00:00 2001 From: Ashiyane Digital Security Team Date: Wed, 4 Jul 2012 11:22:28 +0200 Subject: [PATCH 03/35] Translated using Weblate. --- po/fa.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/fa.po b/po/fa.po index 4e2ca63d11..762d6fdfc8 100644 --- a/po/fa.po +++ b/po/fa.po @@ -5578,16 +5578,16 @@ msgid "Exporting databases from the current server" msgstr "ساخت جدول جديد در پايگاه داده %s" #: libraries/display_export.lib.php:84 -#, fuzzy, php-format +#, php-format #| msgid "Create table on database %s" msgid "Exporting tables from \"%s\" database" msgstr "ساخت جدول جديد در پايگاه داده %s" #: libraries/display_export.lib.php:86 -#, fuzzy, php-format +#, php-format #| msgid "Create table on database %s" msgid "Exporting rows from \"%s\" table" -msgstr "ساخت جدول جديد در پايگاه داده %s" +msgstr "ساخت جدول جديد در پايگاه داده %s " #: libraries/display_export.lib.php:92 #, fuzzy From 7b1b3137c86b25db1c511bc7ecd6a97cba7b1938 Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Wed, 4 Jul 2012 23:40:22 +0530 Subject: [PATCH 04/35] Test cases for Script.class.php --- test/classes/PMA_Error_test.php | 2 +- test/classes/PMA_Scripts_test.php | 137 ++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 test/classes/PMA_Scripts_test.php diff --git a/test/classes/PMA_Error_test.php b/test/classes/PMA_Error_test.php index 518a4e369f..0965b90546 100644 --- a/test/classes/PMA_Error_test.php +++ b/test/classes/PMA_Error_test.php @@ -1,6 +1,6 @@ object = $this->getMockForAbstractClass('PMA_Scripts'); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + * + * @access protected + * @return void + */ + protected function tearDown() + { + unset($this->object); + } + + /** + * Call private functions by making the visibitlity to public. + * + * @param string $name method name + * @param array $params parameters for the invocation + * + * @return the output from the private method. + */ + private function _callPrivateFunction($name, $params) + { + $class = new ReflectionClass('PMA_Scripts'); + $method = $class->getMethod($name); + $method->setAccessible(true); + return $method->invokeArgs($this->object, $params); + } + + /** + * Test for _includeFile + * + * @param tring $url Location of javascript, relative to js/ folder. + * @param int $timestamp The date when the file was last modified + * @param string $ie_conditional true - wrap with IE conditional comment + * 'lt 9' etc. - wrap for specific IE version + * @param $output output from the _includeFile method + * + * @dataProvider providerForTestIncludeFile + */ + public function testIncludeFile($url, $timestamp, $ie_conditional, $output){ + $this->assertEquals( + $this->_callPrivateFunction( + '_includeFile', + array($url, $timestamp, $ie_conditional) + ), + $output + ); + } + + /** + * @return array data for testIncludeFile + */ + public function providerForTestIncludeFile(){ + return array( + array( + 'common.js', + null, + true, + ' +' + ), + array( + 'common.js', + null, + false, + ' +' + ) + ); + } + + /** + * Test for getDisplay + */ + public function testGetDisplay(){ + + $this->object->addFile('common.js'); + $this->object->addEvent('onClick', 'doSomething'); + + $this->assertEquals( + $this->object->getDisplay(), + ' +' + ); + } + + /** + * test for addCode + */ + public function testAddCode(){ + + $this->object->addCode('alert(\'CodeAdded\')'); + + $this->assertEquals( + $this->object->getDisplay(), + '' + ); + } +} From ec4478b4585c9cc28fb00a80843354b1b8c5da5d Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Thu, 5 Jul 2012 00:19:49 +0530 Subject: [PATCH 05/35] Test cases for PMA_Types class --- test/classes/PMA_Types_test.php | 149 ++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/test/classes/PMA_Types_test.php b/test/classes/PMA_Types_test.php index 19f276ecbf..1481763690 100644 --- a/test/classes/PMA_Types_test.php +++ b/test/classes/PMA_Types_test.php @@ -22,10 +22,159 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase $this->object = new PMA_Types; } + /** + * Test for isUnaryOperator + */ public function testUnary() { $this->assertTrue($this->object->isUnaryOperator('IS NULL')); $this->assertFalse($this->object->isUnaryOperator('=')); } + + /** + * Test for getUnaryOperators + */ + public function testGetUnaryOperators(){ + $this->assertEquals($this->object->getUnaryOperators(), + array( + 'IS NULL', + 'IS NOT NULL', + "= ''", + "!= ''", + ) + ); + } + + /** + * Test for getNullOperators + */ + public function testGetNullOperators(){ + $this->assertEquals($this->object->getNullOperators(), + array( + 'IS NULL', + 'IS NOT NULL', + ) + ); + } + + /** + * Test for getEnumOperators + */ + public function testGetEnumOperators(){ + $this->assertEquals($this->object->getEnumOperators(), + array( + '=', + '!=', + ) + ); + } + + /** + * Test for getTextOperators + */ + public function testgetTextOperators(){ + $this->assertEquals($this->object->getTextOperators(), + array( + 'LIKE', + 'LIKE %...%', + 'NOT LIKE', + '=', + '!=', + 'REGEXP', + 'REGEXP ^...$', + 'NOT REGEXP', + "= ''", + "!= ''", + 'IN (...)', + 'NOT IN (...)', + 'BETWEEN', + 'NOT BETWEEN', + ) + ); + } + + /** + * Test for getNumberOperators + */ + public function testGetNumberOperators(){ + $this->assertEquals($this->object->getNumberOperators(), + array( + '=', + '>', + '>=', + '<', + '<=', + '!=', + 'LIKE', + 'NOT LIKE', + 'IN (...)', + 'NOT IN (...)', + 'BETWEEN', + 'NOT BETWEEN', + ) + ); + } + + /** + * @param string $type Type of field + * @param boolean $null Whether field can be NULL + * @param $output + * + * @dataProvider providerForGetTypeOperators + */ + public function testGetTypeOperators($type, $null, $output){ + $this->assertEquals( + $this->object->getTypeOperators($type, $null), + $output + ); + } + + /** + * data provider for testGetTypeOperators + */ + public function providerForGetTypeOperators(){ + return array( + array( + 'enum', + false, + array( + '=', + '!=', + ) + ), + array( + 'CHAR', + true, + array( + '=', + '>', + '>=', + '<', + '<=', + '!=', + 'LIKE', + 'NOT LIKE', + 'IN (...)', + 'NOT IN (...)', + 'BETWEEN', + 'NOT BETWEEN', + 'IS NULL', + 'IS NOT NULL', + ), + array( + 'int', + false, + array( + '=', + '!=', + ) + ), + ) + ); + } + + public function testGetTypeOperatorsHtml(){ + $this->assertTrue(true); + } } ?> From 41413a13fc13cb64a5cb7cab8751499c51da6065 Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Wed, 4 Jul 2012 23:58:01 +0300 Subject: [PATCH 06/35] Add missing word in descriptions --- libraries/plugins/AuthenticationPlugin.class.php | 2 +- libraries/plugins/ExportPlugin.class.php | 2 +- libraries/plugins/ImportPlugin.class.php | 2 +- libraries/plugins/TransformationsInterface.int.php | 2 +- libraries/plugins/transformations/{todo_rewrite => }/README | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename libraries/plugins/transformations/{todo_rewrite => }/README (100%) diff --git a/libraries/plugins/AuthenticationPlugin.class.php b/libraries/plugins/AuthenticationPlugin.class.php index 9b2ea57aac..b825ade644 100644 --- a/libraries/plugins/AuthenticationPlugin.class.php +++ b/libraries/plugins/AuthenticationPlugin.class.php @@ -13,7 +13,7 @@ if (! defined('PHPMYADMIN')) { require_once "PluginObserver.class.php"; /** - * Provides a common interface that will have to implemented by all of the + * Provides a common interface that will have to be implemented by all of the * authentication plugins. * * @package PhpMyAdmin diff --git a/libraries/plugins/ExportPlugin.class.php b/libraries/plugins/ExportPlugin.class.php index 620db86a3a..5784229feb 100644 --- a/libraries/plugins/ExportPlugin.class.php +++ b/libraries/plugins/ExportPlugin.class.php @@ -13,7 +13,7 @@ if (! defined('PHPMYADMIN')) { require_once "PluginObserver.class.php"; /** - * Provides a common interface that will have to implemented by all of the + * Provides a common interface that will have to be implemented by all of the * export plugins. Some of the plugins will also implement other public * methods, but those are not declared here, because they are not implemented * by all export plugins. diff --git a/libraries/plugins/ImportPlugin.class.php b/libraries/plugins/ImportPlugin.class.php index 018f3a60a0..142aad252e 100644 --- a/libraries/plugins/ImportPlugin.class.php +++ b/libraries/plugins/ImportPlugin.class.php @@ -13,7 +13,7 @@ if (! defined('PHPMYADMIN')) { require_once "PluginObserver.class.php"; /** - * Provides a common interface that will have to implemented by all of the + * Provides a common interface that will have to be implemented by all of the * import plugins. * * @package PhpMyAdmin diff --git a/libraries/plugins/TransformationsInterface.int.php b/libraries/plugins/TransformationsInterface.int.php index 7519cae210..ee8d7988cf 100644 --- a/libraries/plugins/TransformationsInterface.int.php +++ b/libraries/plugins/TransformationsInterface.int.php @@ -10,7 +10,7 @@ if (! defined('PHPMYADMIN')) { } /** - * Provides a common interface that will have to implemented by all of the + * Provides a common interface that will have to be implemented by all of the * transformations plugins. * * @package PhpMyAdmin diff --git a/libraries/plugins/transformations/todo_rewrite/README b/libraries/plugins/transformations/README similarity index 100% rename from libraries/plugins/transformations/todo_rewrite/README rename to libraries/plugins/transformations/README From eaec1e28bf117061c322e32e2a431c5c6bd83cf3 Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Thu, 5 Jul 2012 09:57:59 +0300 Subject: [PATCH 07/35] Add templates, generators and documentation for new transformations --- Documentation.html | 142 ++++-------------- libraries/plugins/transformations/TEMPLATE | 46 ++++++ .../plugins/transformations/TEMPLATE_ABSTRACT | 89 +++++++++++ .../transformations/generator_main_class.sh | 16 ++ .../transformations/generator_plugin.sh | 64 ++++++++ .../transformations/todo_rewrite/TEMPLATE | 38 ----- .../todo_rewrite/TEMPLATE_MIMETYPE | 12 -- .../transformations/todo_rewrite/generator.sh | 23 --- .../todo_rewrite/template_generator.sh | 24 --- .../template_generator_mimetype.sh | 19 --- 10 files changed, 244 insertions(+), 229 deletions(-) create mode 100644 libraries/plugins/transformations/TEMPLATE create mode 100644 libraries/plugins/transformations/TEMPLATE_ABSTRACT create mode 100755 libraries/plugins/transformations/generator_main_class.sh create mode 100755 libraries/plugins/transformations/generator_plugin.sh delete mode 100644 libraries/plugins/transformations/todo_rewrite/TEMPLATE delete mode 100644 libraries/plugins/transformations/todo_rewrite/TEMPLATE_MIMETYPE delete mode 100755 libraries/plugins/transformations/todo_rewrite/generator.sh delete mode 100755 libraries/plugins/transformations/todo_rewrite/template_generator.sh delete mode 100755 libraries/plugins/transformations/todo_rewrite/template_generator_mimetype.sh diff --git a/Documentation.html b/Documentation.html index b30cbd54e3..ba903772e0 100644 --- a/Documentation.html +++ b/Documentation.html @@ -27,7 +27,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
  • Introduction
  • Installation
  • Setup script
  • -
  • Configuration
  • +
  • Configuration
  • Transformations
  • FAQ
  • Developers
  • @@ -2486,8 +2486,10 @@ setfacl -d -m "g:www-data:rwx" tmp

    3. File structure

    -

    All mimetypes and their transformations are defined through single files in - the directory 'libraries/transformations/'.

    +

    All specific transformations for mimetypes are defined through class files in + the directory 'libraries/plugins/transformations/'. Each of them extends + a certain transformation abstract class declared in + libraries/plugins/transformations/abstract.

    They are stored in files to ease up customization and easy adding of new transformations.

    @@ -2496,109 +2498,35 @@ setfacl -d -m "g:www-data:rwx" tmp always work. It makes no sense to apply a transformation to a mimetype the transform-function doesn't know to handle.

    -

    One can, however, use empty mime-types and global transformations which should work - for many mimetypes. You can also use transforms on a different mimetype than what they where built - for, but pay attention to option usage as well as what the transformation does to your - column.

    -

    There is a file called 'transformations.lib.php' that provides some basic functions which can be included by any other transform function.

    -

    There are 5 possible file names:

    +

    The file name convention is + [Mimetype]_[Subtype]_[Transformation Name].class.php,
    + while the abtract class that it extends has the name + [Transformation Name]TransformationsPlugin.

    + All of the methods that have to be implemented by a transformations plug-in are:
    +

      +
    1. getMIMEType() and getMIMESubtype() in the main class;
    2. +
    3. getName(), getInfo() and applyTransformation() in the abstract class it extends.
    4. +
    +

    + +

    The getMIMEType(), getMIMESubtype() and getName() methods return the name of the + MIME type, MIME Subtype and transformation accordingly. getInfo() returns the + transformation's description and possible options it may receive and + applyTransformation() is the method that does the actual work of the + transformation plug-in.

    -
    1. A mimetype+subtype transform:

      +

      Please see the libraries/plugins/transformations/TEMPLATE and + libraries/plugins/transformations/TEMPLATE_ABSTRACT + files for adding your own transformation plug-in. You can also generate a + new transformation plug-in (with or without the abstract transformation class), + by using + libraries/plugins/transformations/generator_plugin.sh or
      + libraries/plugins/transformations/generator_main_class.sh.

      - [mimetype]_[subtype]__[transform].inc.php

      - - Please not that mimetype and subtype are separated via '_', which shall - not be contained in their names. The transform function/filename may - contain only characters which cause no problems in the file system as - well as the PHP function naming convention.

      - - The transform function will the be called - 'PMA_transform_[mimetype]_[subtype]__[transform]()'.

      - - Example:

      - - text_html__formatted.inc.php
      - PMA_transform_text_html__formatted()
    2. - -
    3. A mimetype (w/o subtype) transform:

      - - [mimetype]__[transform].inc.php

      - - Please note that there are no single '_' characters. - The transform function/filename may contain only characters which cause - no problems in the file system as well as the PHP function naming - convention.

      - - The transform function will the be called - 'PMA_transform_[mimetype]__[transform]()'.

      - - Example:

      - - text__formatted.inc.php
      - PMA_transform_text__formatted()
    4. - -
    5. A mimetype+subtype without specific transform function

      - - [mimetype]_[subtype].inc.php

      - - Please note that there are no '__' characters in the filename. Do not - use special characters in the filename causing problems with the file - system.

      - - No transformation function is defined in the file itself.

      - - Example:

      - - text_plain.inc.php
      - (No function)
    6. - -
    7. A mimetype (w/o subtype) without specific transform function

      - - [mimetype].inc.php

      - - Please note that there are no '_' characters in the filename. Do not use - special characters in the filename causing problems with the file system. -

      - - No transformation function is defined in the file itself.

      - - Example:

      - - text.inc.php
      - (No function)
    8. - -
    9. A global transform function with no specific mimetype

      - - global__[transform].inc.php

      - - The transform function will the be called - 'PMA_transform_global__[transform]()'.

      - - Example:

      - - global__formatted
      - PMA_transform_global__formatted()
    10. -
    - -

    So generally use '_' to split up mimetype and subtype, and '__' to provide a - transform function.

    - -

    All filenames containing no '__' in themselves are not shown as valid transform - functions in the dropdown.

    - -

    Please see the libraries/transformations/TEMPLATE file for adding your own transform - function. See the libraries/transformations/TEMPLATE_MIMETYPE for adding a mimetype - without a transform function.

    - -

    To create a new transform function please see - libraries/transformations/template_generator.sh. - To create a new, empty mimetype please see - libraries/transformations/template_generator_mimetype.sh.

    - -

    A transform function always gets passed three variables:

    +

    The applyTransformation() method always gets passed three variables:

    1. $buffer - Contains the text inside of the column. This is the text, you want to transform.
    2. @@ -2615,18 +2543,6 @@ setfacl -d -m "g:www-data:rwx" tmp column (i.e. 'text/plain', 'image/jpeg' etc.)
    -

    Additionally you should also provide additional function to provide - information about the transformation to the user. This function should - have same name as transformation function just with appended - _info suffix. This function accepts no parameters and returns - array with information about the transformation. Currently following keys - can be used: -

    -
    -
    info
    -
    Long description of the transformation.
    -
    -

    FAQ - Frequently Asked Questions

    diff --git a/libraries/plugins/transformations/TEMPLATE b/libraries/plugins/transformations/TEMPLATE new file mode 100644 index 0000000000..5668f34224 --- /dev/null +++ b/libraries/plugins/transformations/TEMPLATE @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/libraries/plugins/transformations/TEMPLATE_ABSTRACT b/libraries/plugins/transformations/TEMPLATE_ABSTRACT new file mode 100644 index 0000000000..68946aaa76 --- /dev/null +++ b/libraries/plugins/transformations/TEMPLATE_ABSTRACT @@ -0,0 +1,89 @@ +mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.) + + return $buffer; + } + + /** + * This method is called when any PluginManager to which the observer + * is attached calls PluginManager::notify() + * + * @param SplSubject $subject The PluginManager notifying the observer + * of an update. + * + * @todo implement + * @return void + */ + public function update (SplSubject $subject) + { + ; + } + + + /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */ + + + /** + * Gets the TransformationName of the specific plugin + * + * @return string + */ + public static function getName() + { + return "[TransformationName]"; + } +} +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/generator_main_class.sh b/libraries/plugins/transformations/generator_main_class.sh new file mode 100755 index 0000000000..05876671ac --- /dev/null +++ b/libraries/plugins/transformations/generator_main_class.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Shell script that creates only the main class for a new transformation +# plug-in, using a template +# +# $1: MIMEType +# $2: MIMESubtype +# $3: Transformation Name + +if [ $# != 3 ] +then + echo -e "Usage: ./generator_main_class.sh MIMEType MIMESubtype TransformationName\n" + exit 65 +fi + +./generator_plugin.sh "$1" "$2" "$3" "--generate_only_main_class" \ No newline at end of file diff --git a/libraries/plugins/transformations/generator_plugin.sh b/libraries/plugins/transformations/generator_plugin.sh new file mode 100755 index 0000000000..225a2cb98a --- /dev/null +++ b/libraries/plugins/transformations/generator_plugin.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# +# Shell script that creates a new transformation plug-in (both main and +# abstract class) using a template. +# +# The 'description' parameter will add a new entry in the language file. +# Watch out for special escaping. +# +# $1: MIMEType +# $2: MIMESubtype +# $3: Transformation Name +# $4: (optional) Description + +echo $# +if [ $# -ne 3 -a $# -ne 4 ]; then + echo -e "Usage: ./generator_plugin.sh MIMEType MIMESubtype TransformationName [Description]\n" + exit 65 +fi + +# make sure that the MIME Type, MIME Subtype and Transformation names +# are in the correct format + +# make all names lowercase +MT="`echo $1 | tr [:upper:] [:lower:]`" +MS="`echo $2 | tr [:upper:] [:lower:]`" +TN="`echo $3 | tr [:upper:] [:lower:]`" +# make first letter uppercase +MT="${MT^}" +MS="${MS^}" +TN="${TN^}" +# make the first letter after each underscore uppercase +MT="`echo $MT`" +MT="`echo $MT | sed -e 's/_./\U&\E/g'`" +MS="`echo $MS`" +MS="`echo $MS | sed -e 's/_./\U&\E/g'`" +TN="`echo $TN`" +TN="`echo $TN | sed -e 's/_./\U&\E/g'`" + +# define the name of the main class file and of its template +ClassFile=$MT\_$MS\_$TN.class.php +Template=TEMPLATE +# define the name of the abstract class file and its template +AbstractClassFile=abstract/"$TN"TransformationsPlugin.class.php +AbstractTemplate=TEMPLATE_ABSTRACT +# replace template names with argument names +sed "s/\[MIMEType]/$MT/; s/\[MIMESubtype\]/$MS/; s/\[TransformationName\]/$TN/;" < $Template > $ClassFile +echo "Created $ClassFile" + +GenerateAbstractClass=1 +if [ -n $4 ]; then + if [ "$4" == "--generate_only_main_class" ]; then + if [ -e $AbstractClassFile ]; then + GenerateAbstractClass=0 + fi + fi +fi + +if [ $GenerateAbstractClass -eq 1 ]; then + # replace template names with argument names + sed "s/\[TransformationName\]/$TN/; s/Description of the transformation./$4/;" < $AbstractTemplate > $AbstractClassFile + echo "Created $AbstractClassFile" +fi + +echo "" \ No newline at end of file diff --git a/libraries/plugins/transformations/todo_rewrite/TEMPLATE b/libraries/plugins/transformations/todo_rewrite/TEMPLATE deleted file mode 100644 index 463aded524..0000000000 --- a/libraries/plugins/transformations/todo_rewrite/TEMPLATE +++ /dev/null @@ -1,38 +0,0 @@ -___.inc.php - * - * The string [ENTER_FILENAME_HERE] shall be substituted with the filename without the '.inc.php' - * extension. For further information regarding naming conventions see the /Documentation.html file. - */ - -function PMA_transformation_[ENTER_FILENAME_HERE]_info() -{ - return array( - 'info' => __('Description of the transformation.'), - ); -} - -function PMA_transformation_[ENTER_FILENAME_HERE]($buffer, $options = array(), $meta = '') -{ - // possibly use a global transform and feed it with special options - - // further operations on $buffer using the $options[] array. - - // You can evaluate the propagated $meta Object. It's contained fields are described in http://www.php.net/mysql_fetch_field. - // This stored information can be used to get the field information about the transformed field. - // $meta->mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.) - - return $buffer; -} - -?> diff --git a/libraries/plugins/transformations/todo_rewrite/TEMPLATE_MIMETYPE b/libraries/plugins/transformations/todo_rewrite/TEMPLATE_MIMETYPE deleted file mode 100644 index 291eb603b1..0000000000 --- a/libraries/plugins/transformations/todo_rewrite/TEMPLATE_MIMETYPE +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/libraries/plugins/transformations/todo_rewrite/generator.sh b/libraries/plugins/transformations/todo_rewrite/generator.sh deleted file mode 100755 index 034d0f020d..0000000000 --- a/libraries/plugins/transformations/todo_rewrite/generator.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -# Shell script that adds a new function file using a template. Should not be called directly -# but instead by template_Generator.sh and template_generator_mimetype.sh -# -# -# $1: Template -# $2: Filename -# $3: (optional) Description - -if [ $# == 0 ] -then - echo "Please call template_generator.sh or template_generator_mimetype.sh instead" - echo "" - exit 65 -fi -functionupper="`echo $2 | tr [:lower:] [:upper:]`" -functionlower="`echo $2 | tr [:upper:] [:lower:]`" - -sed "s/\[ENTER_FILENAME_HERE\]/$functionupper/; s/\[enter_filename_here\]/$functionlower/; s/Description of the transformation./$3/;" < $1 > $2.inc.php - -echo "Created $2.inc.php" -echo "" diff --git a/libraries/plugins/transformations/todo_rewrite/template_generator.sh b/libraries/plugins/transformations/todo_rewrite/template_generator.sh deleted file mode 100755 index 0b029e9482..0000000000 --- a/libraries/plugins/transformations/todo_rewrite/template_generator.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Shell script that adds a new mimetype with transform function. -# -# The filename should contain either 'mimetype_subtype' or 'mimetype'. -# The suffix '.inc.php' is appended automatically! -# -# The 'description' parameter will add a new entry in the language file. Watch out for -# special escaping. -# -# Example: template_generator.sh 'filename' 'description' -# -if [ $# == 0 ] -then - echo "Usage: template_generator.sh 'filename' 'description'" - echo "" - exit 65 -fi - - - -./generator.sh 'TEMPLATE' "$1" "$2" -echo " " -echo "New TRANSFORM FUNCTION $1.inc.php added." diff --git a/libraries/plugins/transformations/todo_rewrite/template_generator_mimetype.sh b/libraries/plugins/transformations/todo_rewrite/template_generator_mimetype.sh deleted file mode 100755 index b93ee5d4ea..0000000000 --- a/libraries/plugins/transformations/todo_rewrite/template_generator_mimetype.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Shell script that adds a new mimetype without transform function. -# -# The filename should contain either 'mimetype_subtype' or 'mimetype'. -# The suffix '.inc.php' is appended automatically! -# -# Example: template_generator_mimetype.sh 'filename' -# -if [ $# == 0 ] -then - echo "Usage: template_generator_mimetype.sh 'filename'" - echo "" - exit 65 -fi - -./generator.sh 'TEMPLATE_MIMETYPE' "$1" -echo " " -echo "New MIMETYPE $1.inc.php added." From d956f18d35085d8223e8d499ab9b75e6025fee48 Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Thu, 5 Jul 2012 22:07:16 +0530 Subject: [PATCH 08/35] Test cases for PMA_Types_MySQL class --- test/classes/PMA_Types_MySQL_test.php | 500 ++++++++++++++++++++++++++ test/classes/PMA_Types_test.php | 106 +++++- 2 files changed, 603 insertions(+), 3 deletions(-) create mode 100644 test/classes/PMA_Types_MySQL_test.php diff --git a/test/classes/PMA_Types_MySQL_test.php b/test/classes/PMA_Types_MySQL_test.php new file mode 100644 index 0000000000..281598e53a --- /dev/null +++ b/test/classes/PMA_Types_MySQL_test.php @@ -0,0 +1,500 @@ +object = new PMA_Types_MySQL(); + } + + /** + * Test for getTypeDescription + * + * @param string $type The data type to get a description. + * @param $output string + * + * @dataProvider providerForTestGetTypeDescription + */ + public function testGetTypeDescription($type, $output){ + $this->assertEquals( + $this->object->getTypeDescription($type), + $output + ); + } + + /** + * Provider for testGetTypeDescription + * @return array + */ + public function providerForTestGetTypeDescription(){ + return array( + array( + 'TINYINT', + 'A 1-byte integer, signed range is -128 to 127, unsigned range is 0 to 255' + ), + array( + 'SMALLINT', + 'A 2-byte integer, signed range is -32,768 to 32,767, unsigned range is 0 to 65,535' + ), + array( + 'MEDIUMINT', + 'A 3-byte integer, signed range is -8,388,608 to 8,388,607, unsigned range is 0 to 16,777,215' + ), + array( + 'INT', + 'A 4-byte integer, signed range is -2,147,483,648 to 2,147,483,647, unsigned range is 0 to 4,294,967,295.' + ), + array( + 'BIGINT', + 'An 8-byte integer, signed range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, unsigned range is 0 to 18,446,744,073,709,551,615' + ), + array( + 'DECIMAL', + 'A fixed-point number (M, D) - the maximum number of digits (M) is 65 (default 10), the maximum number of decimals (D) is 30 (default 0)' + ), + array( + 'FLOAT', + 'A small floating-point number, allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38' + ), + array( + 'DOUBLE', + 'A double-precision floating-point number, allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308' + ), + array( + 'REAL', + 'Synonym for DOUBLE (exception: in REAL_AS_FLOAT SQL mode it is a synonym for FLOAT)' + ), + array( + 'BIT', + 'A bit-field type (M), storing M of bits per value (default is 1, maximum is 64)' + ), + array( + 'BOOLEAN', + 'A synonym for TINYINT(1), a value of zero is considered false, nonzero values are considered true' + ), + array( + 'SERIAL', + 'An alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE' + ), + array( + 'DATE', + 'A date, supported range is 1000-01-01 to 9999-12-31' + ), + array( + 'DATETIME', + 'A date and time combination, supported range is 1000-01-01 00:00:00 to 9999-12-31 23:59:59' + ), + array( + 'TIMESTAMP', + 'A timestamp, range is 1970-01-01 00:00:01 UTC to 2038-01-09 03:14:07 UTC, stored as the number of seconds since the epoch (1970-01-01 00:00:00 UTC)' + ), + array( + 'TIME', + 'A time, range is -838:59:59 to 838:59:59' + ), + array( + 'YEAR', + 'A year in four-digit (4, default) or two-digit (2) format, the allowable values are 70 (1970) to 69 (2069) or 1901 to 2155 and 0000' + ), + array( + 'CHAR', + 'A fixed-length (0-255, default 1) string that is always right-padded with spaces to the specified length when stored' + ), + array( + 'VARCHAR', + 'A variable-length (0-65,535) string, the effective maximum length is subject to the maximum row size' + ), + array( + 'TINYTEXT', + 'A TEXT column with a maximum length of 255 (2^8 - 1) characters, stored with a one-byte prefix indicating the length of the value in bytes' + ), + array( + 'TEXT', + 'A TEXT column with a maximum length of 65,535 (2^16 - 1) characters, stored with a two-byte prefix indicating the length of the value in bytes' + ), + array( + 'MEDIUMTEXT', + 'A TEXT column with a maximum length of 16,777,215 (2^24 - 1) characters, stored with a three-byte prefix indicating the length of the value in bytes' + ), + array( + 'LONGTEXT', + 'A TEXT column with a maximum length of 4,294,967,295 or 4GiB (2^32 - 1) characters, stored with a four-byte prefix indicating the length of the value in bytes' + ), + array( + 'BINARY', + 'Similar to the CHAR type, but stores binary byte strings rather than non-binary character strings' + ), + array( + 'VARBINARY', + 'Similar to the VARCHAR type, but stores binary byte strings rather than non-binary character strings' + ), + array( + 'TINYBLOB', + 'A BLOB column with a maximum length of 255 (2^8 - 1) bytes, stored with a one-byte prefix indicating the length of the value' + ), + array( + 'MEDIUMBLOB', + 'A BLOB column with a maximum length of 16,777,215 (2^24 - 1) bytes, stored with a three-byte prefix indicating the length of the value' + ), + array( + 'BLOB', + 'A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with a two-byte prefix indicating the length of the value' + ), + array( + 'LONGBLOB', + 'A BLOB column with a maximum length of 4,294,967,295 or 4GiB (2^32 - 1) bytes, stored with a four-byte prefix indicating the length of the value' + ), + array( + 'ENUM', + 'An enumeration, chosen from the list of up to 65,535 values or the special \'\' error value' + ), + array( + 'SET', + 'A single value chosen from a set of up to 64 members' + ), + array( + 'GEOMETRY', + 'A type that can store a geometry of any type' + ), + array( + 'POINT', + 'A point in 2-dimensional space' + ), + array( + 'LINESTRING', + 'A curve with linear interpolation between points' + ), + array( + 'POLYGON', + 'A polygon' + ), + array( + 'MULTIPOINT', + 'A collection of points' + ), + array( + 'MULTILINESTRING', + 'A collection of curves with linear interpolation between points' + ), + array( + 'MULTIPOLYGON', + 'A collection of polygons' + ), + array( + 'GEOMETRYCOLLECTION', + 'A collection of geometry objects of any type' + ), + array( + 'UNKNOWN', + '' + ) + ); + } + + /** + * Test for getTypeClass + * + * @param $type + * @param $output + * + * @dataProvider providerFortTestGetTypeClass + */ + public function testGetTypeClass($type, $output){ + $this->assertEquals( + $this->object->getTypeClass($type), + $output + ); + } + + public function providerFortTestGetTypeClass(){ + return array( + array( + 'SERIAL', + 'NUMBER' + ), + array( + 'YEAR', + 'DATE' + ), + array( + 'GEOMETRYCOLLECTION', + 'SPATIAL' + ), + array( + 'SET', + 'CHAR' + ), + array( + 'UNKNOWN', + '' + ) + ); + } + + /** + * Test for getFunctionsClass + * + * @param string $class The class to get function list. + * @param $output array + * + * @dataProvider providerFortTestGetFunctionsClass + */ + public function testGetFunctionsClass($class, $output){ + + if (! defined('PMA_MYSQL_INT_VERSION')) { + define('PMA_MYSQL_INT_VERSION', 50000); + } + + $this->assertEquals( + $this->object->getFunctionsClass($class), + $output + ); + } + + public function providerFortTestGetFunctionsClass(){ + return array( + array( + 'CHAR', + array( + 'BIN', + 'CHAR', + 'CURRENT_USER', + 'COMPRESS', + 'DATABASE', + 'DAYNAME', + 'DES_DECRYPT', + 'DES_ENCRYPT', + 'ENCRYPT', + 'HEX', + 'INET_NTOA', + 'LOAD_FILE', + 'LOWER', + 'LTRIM', + 'MD5', + 'MONTHNAME', + 'OLD_PASSWORD', + 'PASSWORD', + 'QUOTE', + 'REVERSE', + 'RTRIM', + 'SHA1', + 'SOUNDEX', + 'SPACE', + 'TRIM', + 'UNCOMPRESS', + 'UNHEX', + 'UPPER', + 'USER', + 'UUID', + 'VERSION', + ) + ), + array( + 'DATE', + array( + 'CURRENT_DATE', + 'CURRENT_TIME', + 'DATE', + 'FROM_DAYS', + 'FROM_UNIXTIME', + 'LAST_DAY', + 'NOW', + 'SEC_TO_TIME', + 'SYSDATE', + 'TIME', + 'TIMESTAMP', + 'UTC_DATE', + 'UTC_TIME', + 'UTC_TIMESTAMP', + 'YEAR', + ) + ), + array( + 'SPATIAL', + array( + 'GeomFromText', + 'GeomFromWKB', + + 'GeomCollFromText', + 'LineFromText', + 'MLineFromText', + 'PointFromText', + 'MPointFromText', + 'PolyFromText', + 'MPolyFromText', + + 'GeomCollFromWKB', + 'LineFromWKB', + 'MLineFromWKB', + 'PointFromWKB', + 'MPointFromWKB', + 'PolyFromWKB', + 'MPolyFromWKB', + ) + ), + array( + 'NUMBER', + array( + '0' => 'ABS', + '1' => 'ACOS', + '2' => 'ASCII', + '3' => 'ASIN', + '4' => 'ATAN', + '5' => 'BIT_LENGTH', + '6' => 'BIT_COUNT', + '7' => 'CEILING', + '8' => 'CHAR_LENGTH', + '9' => 'CONNECTION_ID', + '10' => 'COS', + '11' => 'COT', + '12' => 'CRC32', + '13' => 'DAYOFMONTH', + '14' => 'DAYOFWEEK', + '15' => 'DAYOFYEAR', + '16' => 'DEGREES', + '17' => 'EXP', + '18' => 'FLOOR', + '19' => 'HOUR', + '20' => 'INET_ATON', + '21' => 'LENGTH', + '22' => 'LN', + '23' => 'LOG', + '24' => 'LOG2', + '25' => 'LOG10', + '26' => 'MICROSECOND', + '27' => 'MINUTE', + '28' => 'MONTH', + '29' => 'OCT', + '30' => 'ORD', + '31' => 'PI', + '32' => 'QUARTER', + '33' => 'RADIANS', + '34' => 'RAND', + '35' => 'ROUND', + '36' => 'SECOND', + '37' => 'SIGN', + '38' => 'SIN', + '39' => 'SQRT', + '40' => 'TAN', + '41' => 'TO_DAYS', + '43' => 'TIME_TO_SEC', + '44' => 'UNCOMPRESSED_LENGTH', + '45' => 'UNIX_TIMESTAMP', + '47' => 'WEEK', + '48' => 'WEEKDAY', + '49' => 'WEEKOFYEAR', + '50' => 'YEARWEEK' + ) + ), + array( + 'UNKNOWN', + array() + ) + ); + } + + /** + * Test for getAttributes + */ + public function testGetAttributes(){ + $this->assertEquals( + $this->object->getAttributes(), + array( + '', + 'BINARY', + 'UNSIGNED', + 'UNSIGNED ZEROFILL', + 'on update CURRENT_TIMESTAMP', + ) + ); + } + + /** + * Test for getColumns + */ + public function testGetColumns(){ + $this->assertEquals( + $this->object->getColumns(), + array( + 0 => 'INT', + 1 => 'VARCHAR', + 2 => 'TEXT', + 3 => 'DATE', + 'Numeric' => array ( + 'TINYINT', + 'SMALLINT', + 'MEDIUMINT', + 'INT', + 'BIGINT', + '-', + 'DECIMAL', + 'FLOAT', + 'DOUBLE', + 'REAL', + '-', + 'BIT', + 'BOOLEAN', + 'SERIAL', + ), + 'Date and time' => array ( + 'DATE', + 'DATETIME', + 'TIMESTAMP', + 'TIME', + 'YEAR', + ), + 'String' => array ( + 'CHAR', + 'VARCHAR', + '-', + 'TINYTEXT', + 'TEXT', + 'MEDIUMTEXT', + 'LONGTEXT', + '-', + 'BINARY', + 'VARBINARY', + '-', + 'TINYBLOB', + 'MEDIUMBLOB', + 'BLOB', + 'LONGBLOB', + '-', + 'ENUM', + 'SET', + ), + 'Spatial' => array ( + 'GEOMETRY', + 'POINT', + 'LINESTRING', + 'POLYGON', + 'MULTIPOINT', + 'MULTILINESTRING', + 'MULTIPOLYGON', + 'GEOMETRYCOLLECTION', + ) + ) + ); + } +} diff --git a/test/classes/PMA_Types_test.php b/test/classes/PMA_Types_test.php index 1481763690..4875211d52 100644 --- a/test/classes/PMA_Types_test.php +++ b/test/classes/PMA_Types_test.php @@ -1,5 +1,13 @@ assertTrue(true); + /** + * Test for getTypeOperatorsHtml + * + * @param string $type Type of field + * @param boolean $null Whether field can be NULL + * @param string $selectedOperator Option to be selected + * @param $output + * + * @dataProvider providerForTestGetTypeOperatorsHtml + */ + public function testGetTypeOperatorsHtml($type, $null, $selectedOperator, $output){ + $this->assertEquals( + $this->object->getTypeOperatorsHtml($type, $null, $selectedOperator), + $output + ); + } + + /** + * Provider for testGetTypeOperatorsHtml + */ + public function providerForTestGetTypeOperatorsHtml(){ + return array( + array( + 'enum', + false, + '=', + '' + ) + ); + } + + /** + * Test for getTypeDescription + */ + public function testGetTypeDescription(){ + $this->assertEquals( + $this->object->getTypeDescription('enum'), + '' + ); + } + + /** + * Test for getFunctionsClass + */ + public function testGetFunctionsClass(){ + $this->assertEquals( + $this->object->getFunctionsClass('enum'), + array() + ); + } + + /** + * Test for getFunctions + */ + public function testGetFunctions(){ + $this->assertEquals( + $this->object->getFunctions('enum'), + array() + ); + } + + /** + * Test for getAllFunctions + */ + public function testGetAllFunctions(){ + $this->assertEquals( + $this->object->getAllFunctions(), + array() + ); + } + + /** + * Test for getAttributes + */ + public function testGetAttributes(){ + $this->assertEquals( + $this->object->getAttributes(), + array() + ); + } + + /** + * Test for getColumns + */ + public function testGetColumns(){ + $this->assertEquals( + $this->object->getColumns(), + array( + 'INT', + 'VARCHAR', + 'TEXT', + 'DATE', + ) + ); } } ?> From ded761f64e0363cf3fce5278778594fc183b63d0 Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Thu, 5 Jul 2012 23:51:35 +0530 Subject: [PATCH 09/35] Test cases for PMA_Types_Drizzle class --- test/classes/PMA_Types_Drizzle_test.php | 366 ++++++++++++++++++++++++ test/classes/PMA_Types_test.php | 2 +- 2 files changed, 367 insertions(+), 1 deletion(-) create mode 100644 test/classes/PMA_Types_Drizzle_test.php diff --git a/test/classes/PMA_Types_Drizzle_test.php b/test/classes/PMA_Types_Drizzle_test.php new file mode 100644 index 0000000000..a6b93fa519 --- /dev/null +++ b/test/classes/PMA_Types_Drizzle_test.php @@ -0,0 +1,366 @@ +object = new PMA_Types_Drizzle(); + } + + /** + * Test for getTypeDescription + * + * @param string $type The data type to get a description. + * @param $output string + * + * @dataProvider providerForTestGetTypeDescription + */ + public function testGetTypeDescription($type, $output){ + $this->assertEquals( + $this->object->getTypeDescription($type), + $output + ); + } + + /** + * Provider for testGetTypeDescription + * @return array + */ + public function providerForTestGetTypeDescription(){ + return array( + array( + 'INTEGER', + 'A 4-byte integer, range is -2,147,483,648 to 2,147,483,647' + ), + array( + 'BIGINT', + 'An 8-byte integer, range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807' + ), + array( + 'DECIMAL', + 'A fixed-point number (M, D) - the maximum number of digits (M) is 65 (default 10), the maximum number of decimals (D) is 30 (default 0)' + ), + array( + 'DOUBLE', + 'A system\'s default double-precision floating-point number' + ), + array( + 'BOOLEAN', + 'True or false' + ), + array( + 'SERIAL', + 'An alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE' + ), + array( + 'UUID', + 'Stores a Universally Unique Identifier (UUID)' + ), + array( + 'DATE', + 'A date, supported range is 0001-01-01 to 9999-12-31' + ), + array( + 'DATETIME', + 'A date and time combination, supported range is 0001-01-01 00:00:0 to 9999-12-31 23:59:59' + ), + array( + 'TIMESTAMP', + 'A timestamp, range is \'0001-01-01 00:00:00\' UTC to \'9999-12-31 23:59:59\' UTC; TIMESTAMP(6) can store microseconds' + ), + array( + 'TIME', + 'A time, range is 00:00:00 to 23:59:59' + ), + array( + 'VARCHAR', + 'A variable-length (0-16,383) string, the effective maximum length is subject to the maximum row size' + ), + array( + 'TEXT', + 'A TEXT column with a maximum length of 65,535 (2^16 - 1) characters, stored with a two-byte prefix indicating the length of the value in bytes' + ), + array( + 'VARBINARY', + 'A variable-length (0-65,535) string, uses binary collation for all comparisons' + ), + array( + 'BLOB', + 'A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with a four-byte prefix indicating the length of the value' + ), + array( + 'ENUM', + 'An enumeration, chosen from the list of defined values' + ), + array( + 'UNKNOWN', + '' + ) + ); + } + + /** + * Test for getTypeClass + * + * @param $type + * @param $output + * + * @dataProvider providerFortTestGetTypeClass + */ + public function testGetTypeClass($type, $output){ + $this->assertEquals( + $this->object->getTypeClass($type), + $output + ); + } + + public function providerFortTestGetTypeClass(){ + return array( + array( + 'SERIAL', + 'NUMBER' + ), + array( + 'TIME', + 'DATE' + ), + array( + 'ENUM', + 'CHAR' + ), + array( + 'UUID', + 'UUID' + ), + array( + 'UNKNOWN', + '' + ) + ); + } + + /** + * Test for getFunctionsClass + * + * @param string $class The class to get function list. + * @param $output array + * + * @dataProvider providerFortTestGetFunctionsClass + */ + public function testGetFunctionsClass($class, $output){ + + if (! function_exists('PMA_DBI_fetch_result')) { + function PMA_DBI_fetch_result($query) + { + return array('table1', 'table`2'); + } + } + + $this->assertEquals( + $this->object->getFunctionsClass($class), + $output + ); + } + + /** + * Provider for testGetFunctionsClass + * @return array + */ + public function providerFortTestGetFunctionsClass(){ + return array( + array( + 'UUID', + array( + 'UUID' + ) + ), + array( + 'DATE', + array( + 'CURRENT_DATE', + 'CURRENT_TIME', + 'DATE', + 'FROM_DAYS', + 'FROM_UNIXTIME', + 'LAST_DAY', + 'NOW', + 'SYSDATE', + 'TIMESTAMP', + 'UTC_DATE', + 'UTC_TIME', + 'UTC_TIMESTAMP', + 'YEAR', + ) + ), + array( + 'NUMBER', + array( + 'ABS', + 'ACOS', + 'ASCII', + 'ASIN', + 'ATAN', + 'BIT_COUNT', + 'CEILING', + 'CHAR_LENGTH', + 'CONNECTION_ID', + 'COS', + 'COT', + 'CRC32', + 'DAYOFMONTH', + 'DAYOFWEEK', + 'DAYOFYEAR', + 'DEGREES', + 'EXP', + 'FLOOR', + 'HOUR', + 'LENGTH', + 'LN', + 'LOG', + 'LOG2', + 'LOG10', + 'MICROSECOND', + 'MINUTE', + 'MONTH', + 'OCT', + 'ORD', + 'PI', + 'QUARTER', + 'RADIANS', + 'RAND', + 'ROUND', + 'SECOND', + 'SIGN', + 'SIN', + 'SQRT', + 'TAN', + 'TO_DAYS', + 'TIME_TO_SEC', + 'UNCOMPRESSED_LENGTH', + 'UNIX_TIMESTAMP', + //'WEEK', // same as TIME + 'WEEKDAY', + 'WEEKOFYEAR', + 'YEARWEEK', + ) + ), + array( + 'CHAR', + array( + 0 => 'BIN', + 1 => 'CHAR', + 2 => 'COMPRESS', + 3 => 'CURRENT_USER', + 4 => 'DATABASE', + 5 => 'DAYNAME', + 6 => 'HEX', + 7 => 'LOAD_FILE', + 8 => 'LOWER', + 9 => 'LTRIM', + 10 => 'MD5', + 11 => 'MONTHNAME', + 12 => 'QUOTE', + 13 => 'REVERSE', + 14 => 'RTRIM', + 15 => 'SCHEMA', + 16 => 'SPACE', + 17 => 'TRIM', + 18 => 'UNCOMPRESS', + 19 => 'UNHEX', + 20 => 'UPPER', + 21 => 'USER', + 22 => 'UUID', + 23 => 'VERSION', + 24 => 'table1', + 25 => 'table`2' + ) + ), + array( + 'UNKNOWN', + array() + ) + ); + } + + /** + * Test for getAttributes + */ + public function testGetAttributes(){ + $this->assertEquals( + $this->object->getAttributes(), + array( + '', + 'on update CURRENT_TIMESTAMP', + ) + ); + } + + /** + * Test for getColumns + */ + public function testGetColumns(){ + + if (! defined('PMA_MYSQL_INT_VERSION')) { + define('PMA_MYSQL_INT_VERSION', 20120130); + } + + $this->assertEquals( + $this->object->getColumns(), + array( + 0 => 'INT', + 1 => 'VARCHAR', + 2 => 'TEXT', + 3 => 'DATE', + 'Numeric' => array ( + 'INTEGER', + 'BIGINT', + '-', + 'DECIMAL', + 'DOUBLE', + '-', + 'BOOLEAN', + 'SERIAL', + 'UUID', + ), + 'Date and time' => array ( + 'DATE', + 'DATETIME', + 'TIMESTAMP', + 'TIME', + ), + 'String' => array ( + 'VARCHAR', + 'TEXT', + '-', + 'VARBINARY', + 'BLOB', + '-', + 'ENUM', + '-', + 'IPV6' + ), + ) + ); + } +} diff --git a/test/classes/PMA_Types_test.php b/test/classes/PMA_Types_test.php index 4875211d52..35f340b1d1 100644 --- a/test/classes/PMA_Types_test.php +++ b/test/classes/PMA_Types_test.php @@ -27,7 +27,7 @@ class PMA_TypesTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->object = new PMA_Types; + $this->object = new PMA_Types(); } /** From 9d21db75dd3a56933e8234e21947f2db374081ca Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Fri, 6 Jul 2012 01:14:28 +0300 Subject: [PATCH 10/35] Add missing include --- libraries/Table.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 704be2f262..570a1519cb 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -792,6 +792,7 @@ class PMA_Table // do not create the table if dataonly if ($what != 'dataonly') { + require_once "libraries/plugin_interface.lib.php"; // get Export SQL instance $export_sql_plugin = PMA_getPlugin( "export", From 8107ead4b744359e20e22013c97852678297a95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3n=20M=C3=A9ixome?= Date: Fri, 6 Jul 2012 02:49:02 +0200 Subject: [PATCH 11/35] Translated using Weblate. --- po/gl.po | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/po/gl.po b/po/gl.po index ea5723f84f..f26dec91b7 100644 --- a/po/gl.po +++ b/po/gl.po @@ -13616,15 +13616,14 @@ msgstr "concurrent_insert está definido a 0" #~ "No description is available for this transformation.
    Please ask the " #~ "author what %s does." #~ msgstr "" -#~ "Non existe descrición desta transformación.
    Pregúntelle ao autor que " -#~ "é o que fai %s." +#~ "Non existe descrición desta transformación.
    Pregúntelle ao autor que é " +#~ "o que fai %s." #~ msgid "" #~ "MIME types printed in italics do not have a separate transformation " #~ "function" #~ msgstr "" -#~ "Os tipos MIME en cursiva non contan cunha función de transformación " -#~ "separada" +#~ "Os tipos MIME en cursiva non contan cunha función de transformación separada" #~ msgid "rows" #~ msgstr "Visualizar" From 15ca02031f4a43016c4f7109a4f2b3a8e2ccc887 Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Fri, 6 Jul 2012 10:48:55 +0530 Subject: [PATCH 12/35] Improve test cases for PMA_Theme_test.php --- test/classes/PMA_Theme_test.php | 208 +++++++++++++++++++++++++++++--- 1 file changed, 188 insertions(+), 20 deletions(-) diff --git a/test/classes/PMA_Theme_test.php b/test/classes/PMA_Theme_test.php index 51369ba7a7..d65f2a0e6c 100644 --- a/test/classes/PMA_Theme_test.php +++ b/test/classes/PMA_Theme_test.php @@ -8,6 +8,7 @@ require_once 'libraries/Config.class.php'; require_once 'libraries/Theme_Manager.class.php'; require_once 'libraries/php-gettext/gettext.inc'; require_once 'libraries/sqlparser.lib.php'; +require_once 'libraries/url_generating.lib.php'; /** * Test class for PMA_Theme. @@ -214,30 +215,197 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase } /** - * Test for loading CSS files. * - * @return nothing - * - * @todo Needs to be revisited as original test is somehow broken. - */ - public function testLoadCss() - { - $this->markTestIncomplete( - 'This test seems to cause some problems in output buffering handling' - ); - //$this->expectOutputRegex('/.*FILE: codemirror.css.php.*/'); - //$this->assertTrue($this->object->loadCss()); - } - - /** - * - * @todo Implement testPrintPreview(). + * Test for getPrintPreview(). */ public function testPrintPreview() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' + $this->assertEquals( + $this->object->getPrintPreview(), + '' + ); + } + + /** + * Test for getCssIEClearFilter + */ + public function testGetCssIEClearFilter(){ + $this->assertEquals( + $this->object->getCssIEClearFilter(), + '' + ); + } + + /** + * Test for getFontSize + */ + public function testGetFontSize(){ + $this->assertEquals( + $this->object->getFontSize(), + '82%' + ); + + $_COOKIE['pma_fontsize'] = '14px'; + $this->assertEquals( + $this->object->getFontSize(), + '14px' + ); + + $GLOBALS['PMA_Config']->set('fontsize','12px'); + $this->assertEquals( + $this->object->getFontSize(), + '12px' + ); + + } + + /** + * Test for getCssGradient + */ + public function testgetCssGradient(){ + $this->assertEquals( + $this->object->getCssGradient('12345', '54321'), + 'background-image: url(./themes/svg_gradient.php?from=12345&to=54321); +background-size: 100% 100%; +background: -webkit-gradient(linear, left top, left bottom, from(#12345), to(#54321)); +background: -webkit-linear-gradient(top, #12345, #54321); +background: -moz-linear-gradient(top, #12345, #54321); +background: -ms-linear-gradient(top, #12345, #54321); +background: -o-linear-gradient(top, #12345, #54321);' + ); + } + + /** + * Test for getCssCodeMirror + */ + public function testGetCssCodeMirror(){ + $this->assertEquals( + $this->object->getCssCodeMirror(), + 'span.cm-keyword, span.cm-statement-verb { + color: #909; +} +span.cm-variable { + color: black; +} +span.cm-comment { + color: #808000; +} +span.cm-mysql-string { + color: #008000; +} +span.cm-operator { + color: fuchsia; +} +span.cm-mysql-word { + color: black; +} +span.cm-builtin { + color: #f00; +} +span.cm-variable-2 { + color: #f90; +} +span.cm-variable-3 { + color: #00f; +} +span.cm-separator { + color: fuchsia; +} +span.cm-number { + color: teal; +}' + ); + + $GLOBALS['cfg']['CodemirrorEnable'] = false; + $this->assertEquals( + $this->object->getCssCodeMirror(), + '' + ); + } + + /** + * Test for getImgPath + * @param string $file file name for image + * @param $output + * + * @dataProvider providerForGetImgPath + */ + public function testGetImgPath($file, $output){ + $this->assertEquals( + $this->object->getImgPath($file), + $output + ); + } + + /** + * Provider for testGetImgPath + * @return array + */ + public function providerForGetImgPath(){ + return array( + array( + null, + '' + ), + array( + 'screen.png', + './themes/pmahomme/img/screen.png' + ), + array( + 'arrow_ltr.png', + './themes/pmahomme/img/arrow_ltr.png' + ) + + ); + } + + /** + * Test for buildSQPCssRule + */ + public function testBuildSQPCssRule(){ + $this->assertEquals( + $this->object->buildSQPCssRule('PMA_Config', 'fontSize', '12px'), + '.PMA_Config {fontSize: 12px;} +' + ); + } + + /** + * Test for buildSQPCssData + */ + public function testBuildSQPCssData(){ + $this->assertEquals( + $this->object->buildSQPCssData(), + '.syntax_comment {color: #808000;} +.syntax_comment_mysql {} +.syntax_comment_ansi {} +.syntax_comment_c {} +.syntax_digit {} +.syntax_digit_hex {color: teal;} +.syntax_digit_integer {color: teal;} +.syntax_digit_float {color: aqua;} +.syntax_punct {color: fuchsia;} +.syntax_alpha {} +.syntax_alpha_columnType {color: #f90;} +.syntax_alpha_columnAttrib {color: #00f;} +.syntax_alpha_reservedWord {color: #909;} +.syntax_alpha_functionName {color: #f00;} +.syntax_alpha_identifier {color: black;} +.syntax_alpha_charset {color: #6495ed;} +.syntax_alpha_variable {color: #800000;} +.syntax_quote {color: #008000;} +.syntax_quote_double {} +.syntax_quote_single {} +.syntax_quote_backtick {} +.syntax_indent0 {margin-left: 0em;} +.syntax_indent1 {margin-left: 1em;} +.syntax_indent2 {margin-left: 2em;} +.syntax_indent3 {margin-left: 3em;} +.syntax_indent4 {margin-left: 4em;} +.syntax_indent5 {margin-left: 5em;} +.syntax_indent6 {margin-left: 6em;} +.syntax_indent7 {margin-left: 7em;} +' ); } } From 51a232cf7d4094cf81ae0eee3e77d1cefdd4d617 Mon Sep 17 00:00:00 2001 From: Yasitha Pandithawatta Date: Fri, 6 Jul 2012 11:20:43 +0530 Subject: [PATCH 13/35] Improve test cases for PMA_Theme_Manager --- test/classes/PMA_Theme_Manager_test.php | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/test/classes/PMA_Theme_Manager_test.php b/test/classes/PMA_Theme_Manager_test.php index ad8bdd818b..d9c7bfbec1 100644 --- a/test/classes/PMA_Theme_Manager_test.php +++ b/test/classes/PMA_Theme_Manager_test.php @@ -14,6 +14,8 @@ require_once 'libraries/url_generating.lib.php'; require_once 'libraries/php-gettext/gettext.inc'; require_once 'libraries/Theme.class.php'; require_once 'libraries/Theme_Manager.class.php'; +require_once 'libraries/Config.class.php'; +require_once 'libraries/core.lib.php'; class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase { @@ -25,6 +27,7 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase $GLOBALS['cfg']['ServerDefault'] = 0; $GLOBALS['server'] = 99; $_SESSION[' PMA_token '] = 'token'; + $GLOBALS['PMA_Config'] = new PMA_Config(); } public function testCookieName() @@ -46,5 +49,58 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase $this->assertContains('