Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
bb5041bb
Commit
bb5041bb
authored
9 years ago
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors and inet_ntop warnings
parent
8b026b05
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
12 deletions
+10
-12
format.php
qa-include/app/format.php
+3
-3
admin.php
qa-include/db/admin.php
+0
-1
install.php
qa-include/db/install.php
+1
-2
admin-approve.php
qa-include/pages/admin/admin-approve.php
+1
-1
question.php
qa-include/pages/question.php
+2
-2
user-profile.php
qa-include/pages/user-profile.php
+2
-2
qa-event-logger.php
qa-plugin/event-logger/qa-event-logger.php
+1
-1
No files found.
qa-include/app/format.php
View file @
bb5041bb
...
...
@@ -549,7 +549,7 @@
}
if
(
@
$options
[
'whoview'
])
{
$fields
[
'who'
]
=
qa_who_to_html
(
$isbyuser
,
@
$post
[
'userid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
inet_ntop
()
@
$post
[
'createip'
])
:
null
,
$microdata
,
$post
[
'name'
]);
$fields
[
'who'
]
=
qa_who_to_html
(
$isbyuser
,
@
$post
[
'userid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
@
inet_ntop
(
@
$post
[
'createip'
])
:
null
,
$microdata
,
$post
[
'name'
]);
if
(
isset
(
$post
[
'points'
]))
{
if
(
@
$options
[
'pointsview'
])
...
...
@@ -628,7 +628,7 @@
}
if
(
isset
(
$post
[
'lastuserid'
])
&&
@
$options
[
'whoview'
])
$fields
[
'who_2'
]
=
qa_who_to_html
(
isset
(
$userid
)
&&
(
$post
[
'lastuserid'
]
==
$userid
),
$post
[
'lastuserid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
inet_ntop
(
$post
[
'lastip'
])
:
null
,
false
);
$fields
[
'who_2'
]
=
qa_who_to_html
(
isset
(
$userid
)
&&
(
$post
[
'lastuserid'
]
==
$userid
),
$post
[
'lastuserid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
@
inet_ntop
(
$post
[
'lastip'
])
:
null
,
false
);
}
...
...
@@ -890,7 +890,7 @@
if
(
@
$options
[
'whoview'
])
{
$isbyuser
=
qa_post_is_by_user
(
array
(
'userid'
=>
$question
[
'ouserid'
],
'cookieid'
=>
@
$question
[
'ocookieid'
]),
$userid
,
$cookieid
);
$fields
[
'who'
]
=
qa_who_to_html
(
$isbyuser
,
$question
[
'ouserid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
inet_ntop
(
@
$question
[
'oip'
])
:
null
,
false
,
@
$question
[
'oname'
]);
$fields
[
'who'
]
=
qa_who_to_html
(
$isbyuser
,
$question
[
'ouserid'
],
$usershtml
,
@
$options
[
'ipview'
]
?
@
inet_ntop
(
@
$question
[
'oip'
])
:
null
,
false
,
@
$question
[
'oname'
]);
if
(
isset
(
$question
[
'opoints'
]))
{
if
(
@
$options
[
'pointsview'
])
$fields
[
'who'
][
'points'
]
=
(
$question
[
'opoints'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
...
...
This diff is collapsed.
Click to expand it.
qa-include/db/admin.php
View file @
bb5041bb
...
...
@@ -195,7 +195,6 @@
foreach
(
$results
as
$result
)
{
$userid
=
$result
[
'userid'
];
$result
[
'createip'
]
=
inet_ntop
(
$result
[
'createip'
]);
if
(
!
isset
(
$users
[
$userid
]))
{
$users
[
$result
[
'userid'
]]
=
$result
;
...
...
This diff is collapsed.
Click to expand it.
qa-include/db/install.php
View file @
bb5041bb
...
...
@@ -1465,8 +1465,8 @@
// add column to qa_users to handle new bcrypt passwords
qa_db_upgrade_query
(
'ALTER TABLE ^users ADD COLUMN passhash '
.
$definitions
[
'users'
][
'passhash'
]
.
' AFTER passcheck'
);
qa_db_upgrade_query
(
$locktablesquery
);
break
;
}
break
;
case
63
:
// convert IP addresses to new binary format
...
...
@@ -1493,7 +1493,6 @@
}
qa_db_upgrade_query
(
$locktablesquery
);
break
;
}
// Up to here: Version 1.8 alpha
}
...
...
This diff is collapsed.
Click to expand it.
qa-include/pages/admin/admin-approve.php
View file @
bb5041bb
...
...
@@ -86,7 +86,7 @@
$message
[
'content'
]
=
qa_lang_html
(
'users/registered_label'
)
.
' '
.
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$user
[
'created'
]),
'^2'
=>
qa_ip_anchor_html
(
inet_ntop
(
$user
[
'createip'
])),
'^2'
=>
qa_ip_anchor_html
(
@
inet_ntop
(
$user
[
'createip'
])),
))
.
'<br/>'
;
$htmlemail
=
qa_html
(
$user
[
'email'
]);
...
...
This diff is collapsed.
Click to expand it.
qa-include/pages/question.php
View file @
bb5041bb
...
...
@@ -430,8 +430,8 @@
(
!
qa_is_http_post
())
&&
qa_is_human_probably
()
&&
(
(
!
$question
[
'views'
])
||
(
// if it has more than zero views
(
(
inet_ntop
(
$question
[
'lastviewip'
])
!=
qa_remote_ip_address
())
||
(
!
isset
(
$question
[
'lastviewip'
]))
)
&&
// then it must be different IP from last view
(
(
inet_ntop
(
$question
[
'createip'
])
!=
qa_remote_ip_address
())
||
(
!
isset
(
$question
[
'createip'
]))
)
&&
// and different IP from the creator
(
(
@
inet_ntop
(
$question
[
'lastviewip'
])
!=
qa_remote_ip_address
())
||
(
!
isset
(
$question
[
'lastviewip'
]))
)
&&
// then it must be different IP from last view
(
(
@
inet_ntop
(
$question
[
'createip'
])
!=
qa_remote_ip_address
())
||
(
!
isset
(
$question
[
'createip'
]))
)
&&
// and different IP from the creator
(
(
$question
[
'userid'
]
!=
$userid
)
||
(
!
isset
(
$question
[
'userid'
]))
)
&&
// and different user from the creator
(
(
$question
[
'cookieid'
]
!=
$cookieid
)
||
(
!
isset
(
$question
[
'cookieid'
]))
)
// and different cookieid from the creator
)
)
...
...
This diff is collapsed.
Click to expand it.
qa-include/pages/user-profile.php
View file @
bb5041bb
...
...
@@ -583,7 +583,7 @@
'value'
=>
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$useraccount
[
'loggedin'
]),
'^2'
=>
qa_ip_anchor_html
(
inet_ntop
(
$useraccount
[
'loginip'
])),
'^2'
=>
qa_ip_anchor_html
(
@
inet_ntop
(
$useraccount
[
'loginip'
])),
)),
'note'
=>
$userediting
?
null
:
qa_lang_html
(
'users/only_shown_moderators'
),
'id'
=>
'lastlogin'
,
...
...
@@ -596,7 +596,7 @@
'value'
=>
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$useraccount
[
'written'
]),
'^2'
=>
qa_ip_anchor_html
(
inet_ntop
(
$useraccount
[
'writeip'
])),
'^2'
=>
qa_ip_anchor_html
(
@
inet_ntop
(
$useraccount
[
'writeip'
])),
)),
'note'
=>
$userediting
?
null
:
qa_lang_html
(
'users/only_shown_moderators'
),
'id'
=>
'lastwrite'
,
...
...
This diff is collapsed.
Click to expand it.
qa-plugin/event-logger/qa-event-logger.php
View file @
bb5041bb
...
...
@@ -33,7 +33,7 @@ class qa_event_logger
return
'CREATE TABLE ^eventlog ('
.
'datetime DATETIME NOT NULL,'
.
'ipaddress VAR
BINARY (16
),'
.
'ipaddress VAR
CHAR (45
),'
.
'userid '
.
qa_get_mysql_user_column_type
()
.
','
.
'handle VARCHAR('
.
QA_DB_MAX_HANDLE_LENGTH
.
'),'
.
'cookieid BIGINT UNSIGNED,'
.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment