Skip to main content
Recent Posts
1
Bug Reports / Re: Attachment Directory management error
Last post by badmonkey -
Humm .... this is why @emanuele is updating this code for 2.0 :D

Just for a test, try using
Code: [Select]
					if (empty($modSettings['attachmentUploadDir']))
{
$modSettings['attachmentUploadDir'] = array();
}
else
{
$test = @Util::unserialize($modSettings['attachmentUploadDir']);
if ($test === false)
{
$modSettings['attachmentUploadDir'] = array($modSettings['attachmentUploadDir']);
}
else
{
$modSettings['attachmentUploadDir'] = $test;
}
}
instead of the other single line I gave you.
 
 
This code also removes the original error, and results in no directory creation (which you probably expected). 
3
Bug Reports / Re: Attachment Directory management error
Last post by badmonkey -
Maybe...
Line 190:
Code: [Select]
if (isset($this->_req->post->attachmentUploadDir))
to:
Code: [Select]
			if (isset($this->_req->post->attachmentUploadDir) ||
!empty($this->_req->post->use_subdirectories_for_attachments))
 
 Tried this. There was no error managing the settings. However, setting it to Auto subdivided by month and year resulted in no directory created and, of course, inability to upload.
5
Feature Discussion / Re: Sphinx Search
Last post by emanuele -
 emanuele loves when Spuds throws at us abbreviations like in this case and I have no idea what the heck he is talking about. xD
6
Bug Reports / Re: Attachment Directory management error
Last post by Spuds -
Humm .... this is why @emanuele is updating this code for 2.0 :D

Just for a test, try using
Code: [Select]
					if (empty($modSettings['attachmentUploadDir']))
{
$modSettings['attachmentUploadDir'] = array();
}
else
{
$test = @Util::unserialize($modSettings['attachmentUploadDir']);
if ($test === false)
{
$modSettings['attachmentUploadDir'] = array($modSettings['attachmentUploadDir']);
}
else
{
$modSettings['attachmentUploadDir'] = $test;
}
}
instead of the other single line I gave you.
7
Bug Reports / Re: Attachment Directory management error
Last post by badmonkey -
Hummm .... try adding the following line just above that line ( in ManaageAttachments.controller.php )
Code: [Select]
					$modSettings['attachmentUploadDir'] = !empty($modSettings['attachmentUploadDir']) ?: array();
and lets see what happens
 
 Well, it must be progress!  ;D Now the error is:


Code: [Select]
Warning: in_array() expects parameter 2 to be array, bool given
8
Feature Discussion / Sphinx Search
Last post by Spuds -
I was reviewing some items in Sphinx QL code and noticed a couple of items which I think can be improved.

First is the specific post that gets displayed in the search results, this is really a bug.  Specifically the topic that the post is in is a very relevant overall topic, but the specific post in that topic that gets shown in the results is incorrect.    There are two options here, one is to simply show and link to the first post in that topic, or link and show the most relevant post inside of that topic.

Next up is the ranker that we use, currently is PROXIMITY_BM25 , if you don't know what that is or don't use sphinx then don't worry about it.  I've been playing with some improved ranker equations, based off SPH04 but using bm25F values and high ranking for exact or subject matches.

So if you use sphinx and want to try a couple of things to see what you get, let me know :D
10
Bug Reports / Re: Attachment Directory management error
Last post by Spuds -
Hummm .... try adding the following line just above that line ( in ManaageAttachments.controller.php )
Code: [Select]
					$modSettings['attachmentUploadDir'] = !empty($modSettings['attachmentUploadDir']) ?: array();
and lets see what happens