"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/setup/_insert_default.php" between
wacko.6.1.18.zip and wacko.6.1.19.zip

About: WackoWiki is a multilingual Wiki-engine that supports WYTIWYG-editing, page rights (ACLs), design themes (skins), file upload, email notification and much more.

_insert_default.php  (wacko.6.1.18):_insert_default.php  (wacko.6.1.19)
skipping to change at line 14 skipping to change at line 14
$pref = $config['table_prefix']; $pref = $config['table_prefix'];
$password_hashed = $config['admin_name'] . $_POST['password']; $password_hashed = $config['admin_name'] . $_POST['password'];
$password_hashed = password_hash( $password_hashed = password_hash(
base64_encode( base64_encode(
h ash('sha256', $password_hashed, true) h ash('sha256', $password_hashed, true)
) , ) ,
PASSWORD_DEFAULT PASSWORD_DEFAULT
); );
$file_path = Ut::join_path(UPLOAD_GLOBAL_DIR, $config['site_logo']);
$image_size = @getimagesize($file_path);
$file_size = filesize($file_path);
$file_hash = sha1_file($file_path);
// sub-select query for user_id
$q_user_id = "SELECT user_id FROM {$pref}user WHERE user_name = '" . _q($con
fig['admin_name']) . "' LIMIT 1";
// user 'system' holds all default pages // user 'system' holds all default pages
$insert_user_system = "INSERT INTO {$pref}user (user_name, pa $insert_user_system =
ssword, email, account_type, signup_time) VALUES ('System', '', '', '1', UTC_TIM "INSERT INTO {$pref}user (
ESTAMP())"; user_name,
password,
email,
account_type,
signup_time
)
VALUES (
'System',
'',
'',
1,
UTC_TIMESTAMP()
)";
// user 'deleted' holds all pages and attachments from deleted users // user 'deleted' holds all pages and attachments from deleted users
$insert_user_deleted = "INSERT INTO {$pref}user (user_name, password, $insert_user_deleted =
email, account_type, signup_time) VALUES ('Deleted', '', '', '1', UTC_TIMESTAMP( "INSERT INTO {$pref}user (
))"; user_name,
password,
email,
account_type,
signup_time
)
VALUES (
'Deleted',
'',
'',
1,
UTC_TIMESTAMP()
)";
// user 'admin' // user 'admin'
$insert_admin = "INSERT INTO {$pref}user (user_name, pa $insert_admin =
ssword, email, signup_time) VALUES ('" . $config['admin_name'] . "', '" . $passw "INSERT INTO {$pref}user (
ord_hashed . "', '" . $config['admin_email'] . "', UTC_TIMESTAMP() )"; user_name,
$insert_admin_setting = "INSERT INTO {$pref}user_setting (user_id, them password,
e, user_lang) VALUES ((SELECT user_id FROM {$pref}user WHERE user_name = '" . $c email,
onfig['admin_name'] . "' LIMIT 1), '" . $config['theme'] . "', '" . $config['lan signup_time
guage'] . "')"; )
VALUES (
'" . _q($config['admin_name']) . "',
'" . _q($password_hashed) . "',
'" . _q($config['admin_email']) . "',
UTC_TIMESTAMP()
)";
$insert_admin_setting =
"INSERT INTO {$pref}user_setting (
user_id,
theme,
user_lang
)
VALUES (
(" . $q_user_id . "),
'" . _q($config['theme']) . "',
'" . _q($config['language']) . "'
)";
// default groups // default groups
$insert_admin_group = "INSERT INTO {$pref}usergroup (group_na $insert_admin_group =
me, description, moderator_id, created, is_system, active) VALUES ('Admins', '', "INSERT INTO {$pref}usergroup (
(SELECT user_id FROM {$pref}user WHERE user_name = '" . $config['admin_name'] . group_name,
"' LIMIT 1), UTC_TIMESTAMP(), 1, 1)"; description,
$insert_admin_group_member = "INSERT INTO {$pref}usergroup_member (group_id, moderator_id,
user_id) VALUES ((SELECT group_id FROM {$pref}usergroup WHERE group_name = 'Adm created,
ins' LIMIT 1), (SELECT user_id FROM {$pref}user WHERE user_name = '" . $config[' is_system,
admin_name'] . "' LIMIT 1))"; active
)
$insert_moderator_group = "INSERT INTO {$pref}usergroup (group_na VALUES (
me, description, moderator_id, created, is_system, active) VALUES ('Moderator', 'Admins',
'', (SELECT user_id FROM {$pref}user WHERE user_name = '" . $config['admin_name' '',
] . "' LIMIT 1), UTC_TIMESTAMP(), 1, 1)"; (" . $q_user_id . "),
$insert_reviewer_group = "INSERT INTO {$pref}usergroup (group_name, desc UTC_TIMESTAMP(),
ription, moderator_id, created, is_system, active) VALUES ('Reviewer', '', (SELE 1,
CT user_id FROM {$pref}user WHERE user_name = '" . $config['admin_name'] . "' LI 1
MIT 1), UTC_TIMESTAMP(), 1, 1)"; )";
$insert_logo_image = "INSERT INTO {$pref}file (page_id, user $insert_admin_group_member =
_id, file_name, file_lang, file_description, created, modified, file_size, pictu "INSERT INTO {$pref}usergroup_member (
re_w, picture_h, file_ext, mime_type) VALUES ('0', (SELECT user_id FROM {$pref}u group_id,
ser WHERE user_name = '" . $config['admin_name'] . "' LIMIT 1), 'wacko_logo.png' user_id
, '" . $config['language'] . "', 'WackoWiki', UTC_TIMESTAMP(), UTC_TIMESTAMP(), )
'1580', '108', '50', 'png', 'image/png')"; VALUES (
(SELECT group_id FROM {$pref}usergroup WHERE group_name = 'Admins
' LIMIT 1),
(" . $q_user_id . ")
)";
$insert_moderator_group =
"INSERT INTO {$pref}usergroup (
group_name,
description,
moderator_id,
created,
is_system,
active
)
VALUES (
'Moderator',
'',
(" . $q_user_id . "),
UTC_TIMESTAMP(),
1,
1
)";
$insert_reviewer_group =
"INSERT INTO {$pref}usergroup (
group_name,
description,
moderator_id,
created,
is_system,
active
)
VALUES (
'Reviewer',
'',
(" . $q_user_id . "),
UTC_TIMESTAMP(),
1,
1
)";
$insert_logo_image =
"INSERT INTO {$pref}file (
page_id,
user_id,
file_name,
file_lang,
file_description,
created,
modified,
file_size,
picture_w,
picture_h,
file_ext,
mime_type,
file_hash
)
VALUES (
0,
(" . $q_user_id . "),
'" . _q($config['site_logo']) . "',
'" . _q($config['language']) . "',
'WackoWiki',
UTC_TIMESTAMP(),
UTC_TIMESTAMP(),
'" . (int) $file_size . "',
'" . (int) $image_size[0] . "',
'" . (int) $image_size[1] . "',
'png',
'image/png',
'" . _q($file_hash) . "'
)";
 End of changes. 5 change blocks. 
13 lines changed or deleted 64 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)