Project

General

Profile

« Previous | Next » 

Revision 1072

Added by Matthias almost 15 years ago

replaced all remaining mktime() with time(), except from third party scripts

View differences:

trunk/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
------------------------------------- 2.8.0 -------------------------------------
14
16-July 2009 Matthias Gallas
15
!	replaced all remaining mktime() with time(), except from third party scripts
14 16
15-July 2009 Matthias Gallas
15 17
!	changed in modules/admin.php and admin/pages/add.php mktime() to time()
16 18
!	changed in wrapper modul modify.html to modify.htt
trunk/wb/admin/pages/save.php
72 72
$module = $results_array['module'];
73 73

  
74 74
// Update the pages table
75
$now = mktime();
75
$now = time();
76 76
$query = "UPDATE ".TABLE_PREFIX."pages SET modified_when = '$now', modified_by = '".$admin->get_user_id()."' WHERE page_id = '$page_id'";
77 77
$database->query($query);
78 78

  
trunk/wb/admin/login/forgot/index.php
52 52
		
53 53
		// Check if the password has been reset in the last 2 hours
54 54
		$last_reset = $results_array['last_reset'];
55
		$time_diff = mktime()-$last_reset; // Time since last reset in seconds
55
		$time_diff = time()-$last_reset; // Time since last reset in seconds
56 56
		$time_diff = $time_diff/60/60; // Time since last reset in hours
57 57
		if($time_diff < 2) {
58 58
			
......
75 75
				$i++;
76 76
			}
77 77
			
78
			$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".md5($new_pass)."', last_reset = '".mktime()."' WHERE user_id = '".$results_array['user_id']."'");
78
			$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".md5($new_pass)."', last_reset = '".time()."' WHERE user_id = '".$results_array['user_id']."'");
79 79
			
80 80
			if($database->is_error()) {
81 81
				// Error updating database
trunk/wb/account/forgot_form.php
46 46
		
47 47
		// Check if the password has been reset in the last 2 hours
48 48
		$last_reset = $results_array['last_reset'];
49
		$time_diff = mktime()-$last_reset; // Time since last reset in seconds
49
		$time_diff = time()-$last_reset; // Time since last reset in seconds
50 50
		$time_diff = $time_diff/60/60; // Time since last reset in hours
51 51
		if($time_diff < 2) {
52 52
			
......
68 68
				$new_pass = $new_pass . $tmp;
69 69
				$i++;
70 70
			}
71
			$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".md5($new_pass)."', last_reset = '".mktime()."' WHERE user_id = '".$results_array['user_id']."'");
71
			$database->query("UPDATE ".TABLE_PREFIX."users SET password = '".md5($new_pass)."', last_reset = '".time()."' WHERE user_id = '".$results_array['user_id']."'");
72 72
			
73 73
			if($database->is_error()) {
74 74
				// Error updating database
trunk/wb/modules/droplets/install.php
62 62
		}
63 63
		$droplet = implode ( "\n", $cArray );
64 64
		$name = substr($dropfile,0,-4);
65
		$modified_when = mktime();
65
		$modified_when = time();
66 66
		$modified_by = method_exists($admin, 'get_user_id') ? $admin->get_user_id() : 1;
67 67
		$database->query("INSERT INTO `$table`  
68 68
			(name, code, description, comments, active, modified_when, modified_by) 
trunk/wb/modules/droplets/modify_droplet.php
46 46
echo registerEditArea ('contentedit','php',true,'both',true,true,600,450,'search, fullscreen, |, undo, redo, |, select_font,|, highlight, reset_highlight, |, help');
47 47
		
48 48

  
49
$modified_when = mktime();
49
$modified_when = time();
50 50
$modified_by = $admin->get_user_id();
51 51

  
52 52
// Get header and footer
trunk/wb/modules/droplets/add_droplet.php
22 22
	$module_edit_link = ADMIN_URL .'/admintools/tool.php?tool=droplets';
23 23
	$admin = new admin('admintools', 'admintools');
24 24

  
25
	$modified_when = mktime();
25
	$modified_when = time();
26 26
	$modified_by = $admin->get_user_id();
27 27

  
28 28
	// Insert new row into database
trunk/wb/modules/droplets/save_droplet.php
48 48
	$content = $admin->add_slashes(str_replace($tags, '', $_POST['savecontent']));
49 49
	
50 50
	$comments = $admin->add_slashes($admin->get_post('comments'));
51
	$modified_when = mktime();
51
	$modified_when = time();
52 52
	$modified_by = $admin->get_user_id(); 
53 53
}
54 54

  
trunk/wb/modules/form/view.php
435 435
						$submitted_by = 0;
436 436
					}
437 437
					$email_body = $wb->add_slashes($email_body);
438
					$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_submissions (page_id,section_id,submitted_when,submitted_by,body) VALUES ('".PAGE_ID."','$section_id','".mktime()."','$submitted_by','$email_body')");
438
					$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_submissions (page_id,section_id,submitted_when,submitted_by,body) VALUES ('".PAGE_ID."','$section_id','".time()."','$submitted_by','$email_body')");
439 439
					// Make sure submissions table isn't too full
440 440
					$query_submissions = $database->query("SELECT submission_id FROM ".TABLE_PREFIX."mod_form_submissions ORDER BY submitted_when");
441 441
					$num_submissions = $query_submissions->numRows();
trunk/wb/modules/backup/backup-sql.php
24 24
*/
25 25

  
26 26
// Filename to use
27
$filename = $_SERVER['HTTP_HOST'].'-backup-'.gmdate('Y-m-d', mktime()+TIMEZONE).'.sql';
27
$filename = $_SERVER['HTTP_HOST'].'-backup-'.gmdate('Y-m-d', time()+TIMEZONE).'.sql';
28 28

  
29 29
// Check if user clicked on the backup button
30 30
if(!isset($_POST['backup'])){ 
......
40 40
"#\n".
41 41
"# Website Baker ".WB_VERSION." Database Backup\n".
42 42
"# ".WB_URL."\n".
43
"# ".gmdate(DATE_FORMAT, mktime()+TIMEZONE).", ".gmdate(TIME_FORMAT, mktime()+TIMEZONE)."\n".
43
"# ".gmdate(DATE_FORMAT, time()+TIMEZONE).", ".gmdate(TIME_FORMAT, time()+TIMEZONE)."\n".
44 44
"#".
45 45
"\n";
46 46

  
trunk/wb/modules/news/save_post.php
111 111
	$publisheduntil=0;
112 112

  
113 113
// Update row
114
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', published_when = '$publishedwhen', published_until = '$publisheduntil', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
114
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', published_when = '$publishedwhen', published_until = '$publisheduntil', posted_when = '".time()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
115 115

  
116 116
// Check if there is a db error, otherwise say successful
117 117
if($database->is_error()) {
trunk/wb/modules/news/submit_comment.php
97 97
	}
98 98

  
99 99
	// Insert the comment into db
100
	$commented_when = mktime();
100
	$commented_when = time();
101 101
	if($wb->is_authenticated() == true) {
102 102
		$commented_by = $wb->get_user_id();
103 103
	} else {

Also available in: Unified diff