Ejemplo n.º 1
0
function do_exit()
{
    remove_link();
    exit;
}
    $rowids = get_link_rowids($shortlink);
    if (in_array($before, $trello_affecting_lists) != in_array($after, $trello_affecting_lists)) {
        loggly_log(json_encode($rowids));
        foreach ($rowids as $rowid) {
            $newl = $oldl = '';
            $newa = $olda = '';
            if (isset($links[$rowid])) {
                $oldl = $links[$rowid];
            }
            if (isset($archive[$rowid])) {
                $olda = $archive[$rowid];
            }
            if (in_array($before, $trello_affecting_lists) && !in_array($after, $trello_affecting_lists)) {
                //loggly_log(json_encode(array("listchange" => "archive")));
                $newl = remove_link($oldl, $shortlink);
                $newa = add_link($olda, $shortlink);
            } else {
                //loggly_log(json_encode(array("listchange" => "restore")));
                $newl = add_link($oldl, $shortlink);
                $newa = remove_link($olda, $shortlink);
            }
            //loggly_log(json_encode(array("fields" => array("tlold" => $oldl, "tlnew" => $newl, "taold" => $olda, "tanew" => $newa))));
            if ($newl != $oldl || $newa != $olda) {
                $data = json_encode(array("fields" => array("Trello links" => $newl, "Trello archive" => $newa)));
                update_airtable_metric($rowid, $data);
                loggly_log($data);
            }
        }
    }
}
loggly_log(json_encode($action));
Ejemplo n.º 3
0
?>
                        </a>
                    </td>
                    <td>
                        <?php 
echo $product->price;
?>
                    </td>
                    <td>
                        <?php 
echo $product->producer;
?>
                    </td>
                    <td>
                        <a href="<?php 
echo remove_link($product);
?>
" target="_self">
                            remove
                        </a>
                    </td>
                </tr>
            </tdoby>
        <? endforeach; ?>
        <? if(empty($products)): ?>
            <tbody>
            <tr>
                <td colspan="5">nothing to show</td>
            </tr>
            </tbody>
        <? endif; ?>