<commit_before><?php
/**
 * app/footer.inc.php
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2012 <NAME>
 * @see https://www.elabftw.net Official website
 * @license AGPL-3.0
 */
// TODOLIST
$Todolist = new \Elabftw\Elabftw\Todolist($_SESSION['userid']);
$todoItems = $Todolist->readAll();
?>
<div id='todoList'>
    <form id="todo-form">
        <input id="todo" type="text" />
        <input id="submit" type="submit" class='button' value="TODOfy">
    </form>
<p>
   <ul id='todoItems-list'>
<?php
foreach ($todoItems as $todoItem) {
    echo "<li id='todoItem_" . $todoItem['id'] . "'><a href='#' onClick='destroyTodolist(" . $todoItem['id'] .
        ")'>X</a><span style='font-size:60%;display:block;'>" . $todoItem['creation_time'] .<commit_msg>add upgrade procedure for updating todo items from localStorage to SQL<commit_after><?php
/**
 * app/footer.inc.php
 *
 * @author <NAME> <<EMAIL>>
 * @copyright 2012 <NAME>
 * @see https://www.elabftw.net Official website
 * @license AGPL-3.0
 */
// TODOLIST
$Todolist = new \Elabftw\Elabftw\Todolist($_SESSION['userid']);
$todoItems = $Todolist->readAll();
?>
<div id='todoList'>
<script>
// check for old style items and add them to SQL
var orderList = localStorage.getItem('todo-orders');
orderList = orderList ? orderList.split(',') : [];
for( j = 0, k = orderList.length; j < k; j++) {
    $.post("app/controllers/TodolistController.php", {
        create: true,
        body: localStorage.getItem(orderList[j])
    });
}
// delete old style storage
localStorage.clear();
</script>
    <form id="todo-form">
        <input id="todo" type="text" />
        <input id="submit" type="submit" class='button' value="TODOfy">
    </form>
<p>
   <ul id='todoItems-list'>
<?php
foreach ($todoItems as $todoItem) {
    echo "<li id='todoItem_" . $todoItem['id'] . "'><a href='#' onClick='destroyTodolist(" . $todoItem['id'] .
        ")'>X</a><span style='font-size:60%;display:block;'>" . $todoItem['creation_time'] .
{'fraction_non_alphanumeric': 0.20916030534351146, 'fraction_numerical': 0.008651399491094147, 'mean_word_length': 4.01530612244898, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 39, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1954727', 'n_tokens_mistral': 741, 'n_tokens_neox': 723, 'n_words': 150}