timeclock icon indicating copy to clipboard operation
timeclock copied to clipboard

sysedit.php usage results in errors.

Open Nexis81 opened this issue 10 years ago • 6 comments

using sysedit.php does work. however, using it results in config lines being removed because of the method used for gathering the values from the config.inc.php file.

sysedit.php is not aware of the following:

/* Display weather in US or metric measurements. Options are "f" or "c". Default is "c" */
$weather_units = "f";

Using sysedit.php will cause the following error to occur due to the problem described above. Undefined variable: weather_units in /path/to/phptimeclock/leftmain.php on line 85

Nexis81 avatar Jan 14 '16 22:01 Nexis81

I can see exactly what you mean, sysedit.php should be modified with the current config.inc.php and its new configuration variables.

Did you want to volunteer to fix this? :)

andrew867 avatar Jan 14 '16 22:01 andrew867

I just started using this software today. I don't have a grasp on how most of the files work yet. The way that file reads lines and how a lot of other files work are odd to me.

Nexis81 avatar Jan 14 '16 22:01 Nexis81

It's worth noting that this script is extremely old, so it's not that odd to see some age old methods being employed.

The way that the settings panel works needs to be rewritten, but would require more time than most people would be willing to put into it. I might if I get bored with no work to do one day :-)

benscanfiles avatar Jan 15 '16 00:01 benscanfiles

I started noticing that when I was going through some of the code to resolve echo string problems and regex issues. There's no MVC type of framework being utilized or functions to handle all the endless amounts of reused code. If I can just get the timestamps and tz stuff to work right, I could assist with the rewriting.

Nexis81 avatar Jan 15 '16 02:01 Nexis81

We'll It looks like I'm going to be using this software. I rewrote 1600+ lines last night but I have it my own git server. It's going to end up being a huge rewrite so I probably won't be able to create a pull request to merge it back.

Nexis81 avatar Jan 16 '16 01:01 Nexis81

@Nexis81 We could branch off this version and start a new branch with your MVC version.

andrew867 avatar Mar 11 '16 17:03 andrew867