コード例 #1
0
ファイル: patch-00097-alla.php プロジェクト: cjbayliss/alloc
<?php

$q = prepare("SELECT * FROM person WHERE dailyTaskEmail = 'yes'");
$db = new db_alloc();
$db->query($q);
while ($r = $db->row()) {
    $person = new person();
    $person->set_id($r["personID"]);
    $person->select();
    $person->load_prefs();
    $person->prefs["dailyTaskEmail"] = 'yes';
    $person->store_prefs();
}
コード例 #2
0
ファイル: patch-00283-alla.php プロジェクト: cjbayliss/alloc
        $current_user->prefs["taskListHome_filter"]["personID"] = $current_user->get_id();
        $current_user->prefs["taskListHome_filter"]["taskStatus"] = $current_user->prefs["topTasksStatus"];
        unset($current_user->prefs["topTasksStatus"]);
    }
    if ($current_user->prefs["topTasksNum"]) {
        $current_user->prefs["showTaskListHome"] = 1;
        $current_user->prefs["taskListHome_filter"]["applyFilter"] = 1;
        $current_user->prefs["taskListHome_filter"]["personID"] = $current_user->get_id();
        $current_user->prefs["taskListHome_filter"]["limit"] = $current_user->prefs["topTasksNum"];
        unset($current_user->prefs["topTasksNum"]);
    }
    if ($current_user->prefs["showTimeSheetStats"]) {
        $current_user->prefs["showTimeSheetStatsHome"] = 1;
    } else {
        $current_user->prefs["showTimeSheetStatsHome"] = 0;
    }
    unset($current_user->prefs["showTimeSheetStats"]);
    if ($current_user->prefs["showNewTimeSheetItem"]) {
        $current_user->prefs["showTimeSheetItemHome"] = 1;
    } else {
        $current_user->prefs["showTimeSheetItemHome"] = 0;
    }
    unset($current_user->prefs["showNewTimeSheetItem"]);
    if ($current_user->prefs["showNewTsiHintItem"]) {
        $current_user->prefs["showTimeSheetItemHintHome"] = 1;
    } else {
        $current_user->prefs["showTimeSheetItemHintHome"] = 0;
    }
    unset($current_user->prefs["showNewTsiHintItem"]);
    $current_user->store_prefs();
}