Template::move PHP Method

move() public method

It does not take care on database info upgrade because it trusts of the cool Template::UpdateStatus() function.
public move ( string $p_current_folder, string $p_destination_folder ) : boolean
$p_current_folder string
$p_destination_folder string
return boolean true on succes or false on failure
    public function move($p_current_folder, $p_destination_folder)
    {
        global $Campsite;
        global $g_user;
        if (self::IsValidPath($p_current_folder) && self::IsValidPath($p_destination_folder)) {
            $currentFolder = $p_current_folder == '/' ? '' : $p_current_folder;
            $destinationFolder = $p_destination_folder == '/' ? '' : $p_destination_folder;
            $currentFullPath = $Campsite['TEMPLATE_DIRECTORY'] . $currentFolder . '/' . basename($this->getName());
            $destinationFullPath = $Campsite['TEMPLATE_DIRECTORY'] . $destinationFolder . '/' . basename($this->getName());
            if (rename($currentFullPath, $destinationFullPath)) {
                return true;
            }
        }
        return false;
    }