Changeset 19836


Ignore:
Timestamp:
01/05/13 14:25:22 (7 years ago)
Author:
mistic100
Message:

define data dir in a constant

Location:
extensions/AdditionalPages/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/trunk/admin/add_page.inc.php

    r19429 r19836  
    125125 
    126126    // Backup file 
    127     mkgetdir($conf['data_location'], MKGETDIR_DEFAULT&~MKGETDIR_DIE_ON_ERROR); 
    128     mkgetdir($conf['data_location'].'/additional_pages_backup', MKGETDIR_PROTECT_HTACCESS&~MKGETDIR_DIE_ON_ERROR); 
    129     $sav_file = @fopen($conf['data_location'].'/additional_pages_backup/' . $edited_page['id'] . '.txt', "w"); 
     127    mkgetdir(AP_BACKUP_DIR, MKGETDIR_PROTECT_HTACCESS&~MKGETDIR_DIE_ON_ERROR); 
     128    $sav_file = @fopen(AP_BACKUP_DIR . $edited_page['id'] . '.txt', "w"); 
    130129    @fwrite($sav_file, "Title: ".stripslashes($_POST['title'])."\nPermalink: ".stripslashes($_POST['permalink'])."\n\n".stripslashes($_POST['ap_content'])); 
    131130    @fclose($sav_file); 
  • extensions/AdditionalPages/trunk/admin/edit_page.inc.php

    r19429 r19836  
    1212{ 
    1313  pwg_query('DELETE FROM ' . ADD_PAGES_TABLE . ' WHERE id = ' . $_GET['edit'] . ';'); 
    14   @unlink($conf['data_location'].'/additional_pages_backup/' . $_GET['edit'] . '.txt'); 
     14  @unlink(AP_BACKUP_DIR . $_GET['edit'] . '.txt'); 
    1515 
    1616  if ($conf['AP']['homepage'] == $_GET['edit']) 
  • extensions/AdditionalPages/trunk/main.inc.php

    r16247 r19836  
    2222define('ADD_PAGES_TABLE' , $prefixeTable . 'additionalpages'); 
    2323define('AP_DISTRIBUED', AP_PATH . 'distribued/'); 
     24define('AP_BACKUP_DIR', PHPWG_ROOT_PATH . $conf['data_location'] . 'additional_pages_backup/'); 
    2425 
    2526$conf['AP'] = @unserialize($conf['additional_pages']); 
Note: See TracChangeset for help on using the changeset viewer.