scan db faster + choose theme

Issue #289 new
Nicolas Vivien created an issue

Hello,

here is some suggestion i made to pla

  • Store list of database from dir_tree() in session so that on next loading the page is loaded faster

  • Add $dirLevel in dir_tree() to indicate the level of sub-dir to scan so that the scan is faster

  • Add "Choose a theme"

  • Theme selected is stored in cookie for 1 year

patch is based from branch-master v1.9.6

Comments (13)

  1. Christopher Kramer

    Thanks. Hmm... Lots of issues in one :( Can you please open separate issues for each change? With an individual patch?

    And we are using tabs, not spaces for indention.

  2. Nicolas Vivien reporter

    Hello Christopher, I have separated my suggestions.

    This issue contains 2 suggestions but the 3rd & 4th one depend on the 1st & 2nd one

  3. phpLiteAdmin repo owner

    The patch cannot be used directly:

    • most changes in it just replace tabs with spaces for indention - we use tabs
    • most new code uses spaces instead of tabs for indention
    • are the changes in language files really translated by a human? We do not use automated translations. If some text is added in a new version, it stays untranslated until some mother-tongue speaker updates the language file.
    • the theme selection puts whatever the theme cookie says into the <link> if the file exists. It does neither check the file extension nor the path to the file. Together with some XSS problem, this might become a security issue.
    • javascript belongs into the js file in the resources folder, as this enables minimization etc.
    • I don't see a reason why the theme selection needs javascript and cookies set by JS. This means the cookie cannot be http-only which might again contribute to security issues. It can be implemented easily with less code in pure php.
    • have not checked the db scan code yet
  4. Log in to comment