We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

what does "define OW_USE_CLOUDFILES" do? | Forum

Topic location: Forum home » Support » General Questions
Joseph
Joseph May 11 '13
in the config.php there is a line and its looks like this define('OW_USE_CLOUDFILES', true);

now at first look I know what you are thinking this must be to use amazon 23 or other cloud storage right?


no this setting does not effect these services at all so my question is what is this for is this for sites hosted on a cloud or is it another part of using cloud storage?

dave Leader
dave May 11 '13

Mine in my config is false so i wonder if you have autoupdate configured or a plugin that has changed that value...

 

appears to be used in the ow_updates folder

 

/* code to move custom default avatars to clouds */

if ( defined('OW_USE_AMAZON_S3_CLOUDFILES') && OW_USE_AMAZON_S3_CLOUDFILES || defined('OW_USE_CLOUDFILES') && OW_USE_CLOUDFILES )
{
    $storage = Updater::getStorage();

    $conf = json_decode(Updater::getConfigService()->getValue('base', 'default_avatar'), true);
    $dir = OW_DIR_USERFILES . 'plugins' . DS . 'base' . DS . 'avatars'. DS;

    if ( !empty($conf[1]) )
    {
        $path = $dir . $conf[1];
        if ( file_exists($path) )
        {
            $storage->copyFile($path, $path);
        }
    }

    if ( !empty($conf[2]) )
    {
        $path = $dir . $conf[2];
        if ( file_exists($path) )
        {
            $storage->copyFile($path, $path);
        }
    }
}

The Forum post is edited by dave May 11 '13
Joseph
Joseph May 11 '13
I changed the value myself actually to see what it would do and nothing happened
dave Leader
dave May 11 '13
yeah  im not totally sure about it either, i know its in the run.php cron as well and several other update files but thats about it.   If i had to take a stab in the dark (totally guessing here) i would say it had something to do with autoupdater  since it is in the update folders..
Joseph
Joseph May 11 '13
well I looked at the cloud tutorials on here rackspace requires this line to be added but funny thing is its already there and the instructions ask you to add it in again so maybe it is for rack host but why add it to the file twice? and if it were rack host wouldn't making it true make my files dependent on a unconfigured rackhost very weird code hopefully Aliia or soemone will have an answer