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
Feb 22, 2016
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 @@
...
@@ -549,7 +549,7 @@
}
}
if
(
@
$options
[
'whoview'
])
{
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
(
isset
(
$post
[
'points'
]))
{
if
(
@
$options
[
'pointsview'
])
if
(
@
$options
[
'pointsview'
])
...
@@ -628,7 +628,7 @@
...
@@ -628,7 +628,7 @@
}
}
if
(
isset
(
$post
[
'lastuserid'
])
&&
@
$options
[
'whoview'
])
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 @@
...
@@ -890,7 +890,7 @@
if
(
@
$options
[
'whoview'
])
{
if
(
@
$options
[
'whoview'
])
{
$isbyuser
=
qa_post_is_by_user
(
array
(
'userid'
=>
$question
[
'ouserid'
],
'cookieid'
=>
@
$question
[
'ocookieid'
]),
$userid
,
$cookieid
);
$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
(
isset
(
$question
[
'opoints'
]))
{
if
(
@
$options
[
'pointsview'
])
if
(
@
$options
[
'pointsview'
])
$fields
[
'who'
][
'points'
]
=
(
$question
[
'opoints'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
$fields
[
'who'
][
'points'
]
=
(
$question
[
'opoints'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
...
...
qa-include/db/admin.php
View file @
bb5041bb
...
@@ -195,7 +195,6 @@
...
@@ -195,7 +195,6 @@
foreach
(
$results
as
$result
)
{
foreach
(
$results
as
$result
)
{
$userid
=
$result
[
'userid'
];
$userid
=
$result
[
'userid'
];
$result
[
'createip'
]
=
inet_ntop
(
$result
[
'createip'
]);
if
(
!
isset
(
$users
[
$userid
]))
{
if
(
!
isset
(
$users
[
$userid
]))
{
$users
[
$result
[
'userid'
]]
=
$result
;
$users
[
$result
[
'userid'
]]
=
$result
;
...
...
qa-include/db/install.php
View file @
bb5041bb
...
@@ -1465,8 +1465,8 @@
...
@@ -1465,8 +1465,8 @@
// add column to qa_users to handle new bcrypt passwords
// 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
(
'ALTER TABLE ^users ADD COLUMN passhash '
.
$definitions
[
'users'
][
'passhash'
]
.
' AFTER passcheck'
);
qa_db_upgrade_query
(
$locktablesquery
);
qa_db_upgrade_query
(
$locktablesquery
);
break
;
}
}
break
;
case
63
:
case
63
:
// convert IP addresses to new binary format
// convert IP addresses to new binary format
...
@@ -1493,7 +1493,6 @@
...
@@ -1493,7 +1493,6 @@
}
}
qa_db_upgrade_query
(
$locktablesquery
);
qa_db_upgrade_query
(
$locktablesquery
);
break
;
break
;
}
// Up to here: Version 1.8 alpha
// Up to here: Version 1.8 alpha
}
}
...
...
qa-include/pages/admin/admin-approve.php
View file @
bb5041bb
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
$message
[
'content'
]
=
qa_lang_html
(
'users/registered_label'
)
.
' '
.
$message
[
'content'
]
=
qa_lang_html
(
'users/registered_label'
)
.
' '
.
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$user
[
'created'
]),
'^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/>'
;
))
.
'<br/>'
;
$htmlemail
=
qa_html
(
$user
[
'email'
]);
$htmlemail
=
qa_html
(
$user
[
'email'
]);
...
...
qa-include/pages/question.php
View file @
bb5041bb
...
@@ -430,8 +430,8 @@
...
@@ -430,8 +430,8 @@
(
!
qa_is_http_post
())
&&
(
!
qa_is_http_post
())
&&
qa_is_human_probably
()
&&
qa_is_human_probably
()
&&
(
(
!
$question
[
'views'
])
||
(
// if it has more than zero views
(
(
!
$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
[
'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
[
'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
[
'userid'
]
!=
$userid
)
||
(
!
isset
(
$question
[
'userid'
]))
)
&&
// and different user from the creator
(
(
$question
[
'cookieid'
]
!=
$cookieid
)
||
(
!
isset
(
$question
[
'cookieid'
]))
)
// and different cookieid from the creator
(
(
$question
[
'cookieid'
]
!=
$cookieid
)
||
(
!
isset
(
$question
[
'cookieid'
]))
)
// and different cookieid from the creator
)
)
)
)
...
...
qa-include/pages/user-profile.php
View file @
bb5041bb
...
@@ -583,7 +583,7 @@
...
@@ -583,7 +583,7 @@
'value'
=>
'value'
=>
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$useraccount
[
'loggedin'
]),
'^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'
),
'note'
=>
$userediting
?
null
:
qa_lang_html
(
'users/only_shown_moderators'
),
'id'
=>
'lastlogin'
,
'id'
=>
'lastlogin'
,
...
@@ -596,7 +596,7 @@
...
@@ -596,7 +596,7 @@
'value'
=>
'value'
=>
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
strtr
(
qa_lang_html
(
'users/x_ago_from_y'
),
array
(
'^1'
=>
qa_time_to_string
(
qa_opt
(
'db_time'
)
-
$useraccount
[
'written'
]),
'^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'
),
'note'
=>
$userediting
?
null
:
qa_lang_html
(
'users/only_shown_moderators'
),
'id'
=>
'lastwrite'
,
'id'
=>
'lastwrite'
,
...
...
qa-plugin/event-logger/qa-event-logger.php
View file @
bb5041bb
...
@@ -33,7 +33,7 @@ class qa_event_logger
...
@@ -33,7 +33,7 @@ class qa_event_logger
return
'CREATE TABLE ^eventlog ('
.
return
'CREATE TABLE ^eventlog ('
.
'datetime DATETIME NOT NULL,'
.
'datetime DATETIME NOT NULL,'
.
'ipaddress VAR
BINARY (16
),'
.
'ipaddress VAR
CHAR (45
),'
.
'userid '
.
qa_get_mysql_user_column_type
()
.
','
.
'userid '
.
qa_get_mysql_user_column_type
()
.
','
.
'handle VARCHAR('
.
QA_DB_MAX_HANDLE_LENGTH
.
'),'
.
'handle VARCHAR('
.
QA_DB_MAX_HANDLE_LENGTH
.
'),'
.
'cookieid BIGINT UNSIGNED,'
.
'cookieid BIGINT UNSIGNED,'
.
...
...
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