Warning: session_start(): open(/var/lib/php/sessions/sess_e0m5bn9peic53h6jpnbna8bc26, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass SavedSessions extends Module {
transient SS sessions;
transient JTable table;
transient new Var changed;
void start {
sessions = new FileBasedStringMap(javaxSavedSessionsDir());
}
void triggerUpdate {
changed.set(true); super.triggerUpdate();
}
JComponent visualize() {
table = sexyTable();
VF1 restore = voidfunc(int row) {
S name = (S) getTableCell(table, row, 0);
S text = sessions.get(name);
if (text != null)
restoreModulesSession(text);
};
tablePopupMenuItemsThreaded(table, "Restore", restore);
onDoubleClickThreaded(table, restore);
triggerUpdate();
ret centerAndSouthWithMargins(table, jbutton("Save session...", r {
inputText("Save session as", voidfunc(S name) {
fS text = modulesSessionGrab();
sessions.put(or2(trim(name), "Unnamed Session") + " [" + localDateWithSeconds() + ", " + computerID() + ", OS: " + programID() + "]", text);
triggerUpdate();
});
}));
}
void unvisualize2() { table = null; }
void update() {
if (atomicFlipVarToFalse(changed))
dataToTable_uneditable(table, listToMapsWithSingleKey("Session Name", sortedKeys(sessions)));
}
}