Skip to content

Commit

Permalink
! Importer failed for SMF2 because the smiley folder was no longer st…
Browse files Browse the repository at this point in the history
…ored in the database. (import.php, smf2_to_wedge.xml)

Signed-off-by: Nao <nao@wedge>
  • Loading branch information
Nao committed May 12, 2014
1 parent 26e2ca3 commit b7f06c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 2 additions & 1 deletion import.php
Expand Up @@ -1618,11 +1618,12 @@ public static function stripslashes_recursive($var, $level = 0)
return $new_var;
}

public static function copy_smileys($source, $dest)
public static function copy_smileys($source)
{
if (!is_dir($source) || !($dir = opendir($source)))
return;

$dest = dirname(__FILE__) . '/assets/smileys';
while ($file = readdir($dir))
{
if ($file == '.' || $file == '..')
Expand Down
9 changes: 1 addition & 8 deletions smf2_to_wedge.xml
Expand Up @@ -602,21 +602,14 @@
<title>Copying smileys</title>
<detect>{$from_prefix}smileys</detect>
<code>
$request = $db->query("
SELECT value
FROM {$to_prefix}settings
WHERE variable='smileys_dir';");
list ($we_smileys_dir) = $db->fetch_row($request);
$db->free_result($request);

$request = $db->query("
SELECT value
FROM {$from_prefix}settings
WHERE variable='smileys_dir';");
list ($smf_smileys_dir) = $db->fetch_row($request);
$db->free_result($request);

helper::copy_smileys($smf_smileys_dir, $we_smileys_dir);
helper::copy_smileys($smf_smileys_dir);
</code>
</step>

Expand Down

0 comments on commit b7f06c6

Please sign in to comment.